write_build_config Class Reference

#include <write_build_config.h>

Inheritance diagram for write_build_config:

Inheritance graph
[legend]
Collaboration diagram for write_build_config:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 write_build_config ()
 ~write_build_config ()
 IMPLEMENT_CLASS_NAME ("write_build_config")
int execute ()
 performs the main action of creating our build configuration header.
const string_setexclusions ()
 returns the set of symbols that we will not include in the header.
outcome output_macro (const istring &symbol, const istring &value, istring &accumulator)
 sends a macro definition for "symbol" with "value" to "accumulator".
outcome output_decorated_macro (const istring &symbol, const istring &value, istring &cfg_accumulator, istring &ver_accumulator)
 produces a new macro by adding a uniquifying string to "symbol".
outcome output_definition_macro (const istring &embedded_value, istring &accumulator)
 parses a 'name=value' pair out of "embedded_value" and writes a macro.
bool process_version_parts (const istring &symbol, const istring &value)
 checks on "symbol" to see if it's a version component. stores if so.
bool check_nesting (const istring &to_check)
 if "to_check" is a make conditional, the nesting level is adjusted.
bool write_output_file (const istring &filename, const istring &contents)
 writes "contents" to "filename" if it differs from current contents.

Detailed Description

Definition at line 31 of file write_build_config.h.


Constructor & Destructor Documentation

write_build_config::write_build_config (  ) 

Definition at line 50 of file write_build_config.cpp.

write_build_config::~write_build_config (  ) 

Definition at line 57 of file write_build_config.cpp.

References WHACK().


Member Function Documentation

write_build_config::IMPLEMENT_CLASS_NAME ( "write_build_config"   ) 

int write_build_config::execute (  )  [virtual]

performs the main action of creating our build configuration header.

Implements application_shell.

Definition at line 214 of file write_build_config.cpp.

References version::BUILD, version::COMMAS, istring::compare(), DEFINITIONS_STATEMENT, version::DOTS, istring::end(), portable::env_string(), EXPORT_STATEMENT, version::flex_text_form(), istring::FROM_BOTH_SIDES, istring::FROM_END, FUNCDEF, application_shell::ini(), LOG, MAX_LINE_SIZE, version::MINOR, symbol_table< contents >::name(), non_continuable_error, output_decorated_macro(), output_definition_macro(), tokenizer::parse(), version::REVISION, version::set_component(), SET_DEFAULT_CONSOLE_LOGGER, static_class_name, istring::strip_spaces(), tokenizer::symbols(), tokenizer::table(), write_output_file(), and istring::zap().

const string_set & write_build_config::exclusions (  ) 

returns the set of symbols that we will not include in the header.

Definition at line 63 of file write_build_config.cpp.

Referenced by output_decorated_macro(), and output_macro().

outcome write_build_config::output_macro ( const istring symbol,
const istring value,
istring accumulator 
)

sends a macro definition for "symbol" with "value" to "accumulator".

Definition at line 82 of file write_build_config.cpp.

References ADD_COMMENT_RETURN, istring::contains(), exclusions(), and common::OKAY.

Referenced by output_decorated_macro().

outcome write_build_config::output_decorated_macro ( const istring symbol,
const istring value,
istring cfg_accumulator,
istring ver_accumulator 
)

produces a new macro by adding a uniquifying string to "symbol".

if the item is a version component, it will be output to the "ver_accumulator" but otherwise it goes to the "cfg_accumulator".

Definition at line 132 of file write_build_config.cpp.

References ADD_COMMENT_RETURN, check_nesting(), istring::contains(), exclusions(), output_macro(), and process_version_parts().

Referenced by execute().

outcome write_build_config::output_definition_macro ( const istring embedded_value,
istring accumulator 
)

parses a 'name=value' pair out of "embedded_value" and writes a macro.

Definition at line 158 of file write_build_config.cpp.

References ADD_COMMENT_RETURN, FUNCDEF, symbol_table< contents >::name(), tokenizer::parse(), tokenizer::symbols(), and tokenizer::table().

Referenced by execute().

bool write_build_config::process_version_parts ( const istring symbol,
const istring value 
)

checks on "symbol" to see if it's a version component. stores if so.

if the string was a version component, then true is returned.

Definition at line 103 of file write_build_config.cpp.

References version::BUILD, version::MAJOR, version::MINOR, version::REVISION, and version::set_component().

Referenced by output_decorated_macro().

bool write_build_config::check_nesting ( const istring to_check  ) 

if "to_check" is a make conditional, the nesting level is adjusted.

also if it's a conditional, true is returned, which means the line can be dropped.

Definition at line 117 of file write_build_config.cpp.

References istring::compare(), ENDIF_STATEMENT, IFEQ_STATEMENT, and IFNEQ_STATEMENT.

Referenced by output_decorated_macro().

bool write_build_config::write_output_file ( const istring filename,
const istring contents 
)

writes "contents" to "filename" if it differs from current contents.

Definition at line 173 of file write_build_config.cpp.

References byte_filer::filename(), FUNCDEF, byte_filer::good(), LOG, MAX_HEADER_FILE, non_continuable_error, byte_filer::read(), read, static_class_name, istring::UNTERMINATED, and byte_filer::write().

Referenced by execute().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:31:04 2008 for HOOPLE Libraries by  doxygen 1.5.1