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 ()
 DEFINE_CLASS_NAME ("write_build_config")
int execute ()
 performs the main action of creating our build configuration header.
const structures::string_setexclusions ()
 returns the set of symbols that we will not include in the header.
basis::outcome output_macro (const basis::astring &symbol, const basis::astring &value, basis::astring &accumulator)
 sends a macro definition for "symbol" with "value" to "accumulator".
basis::outcome output_decorated_macro (const basis::astring &symbol, const basis::astring &value, basis::astring &cfg_accumulator, basis::astring &ver_accumulator)
 produces a new macro by adding a uniquifying string to "symbol".
basis::outcome output_definition_macro (const basis::astring &embedded_value, basis::astring &accumulator)
 parses a 'name=value' pair out of "embedded_value" and writes a macro.
bool process_version_parts (const basis::astring &symbol, const basis::astring &value)
 checks on "symbol" to see if it's a version component. stores if so.
bool check_nesting (const basis::astring &to_check)
 if "to_check" is a make conditional, the nesting level is adjusted.
bool write_output_file (const basis::astring &filename, const basis::astring &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 61 of file write_build_config.cpp.

write_build_config::~write_build_config (  ) 

Definition at line 68 of file write_build_config.cpp.

References basis::WHACK().


Member Function Documentation

bool write_build_config::check_nesting ( const basis::astring 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 127 of file write_build_config.cpp.

References basis::astring::compare(), ENDIF_STATEMENT, IFEQ_STATEMENT, and IFNEQ_STATEMENT.

Referenced by output_decorated_macro().

write_build_config::DEFINE_CLASS_NAME ( "write_build_config"   ) 
const string_set & write_build_config::exclusions (  ) 

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

Definition at line 74 of file write_build_config.cpp.

Referenced by output_decorated_macro(), and output_macro().

int write_build_config::execute (  )  [virtual]
outcome write_build_config::output_decorated_macro ( const basis::astring symbol,
const basis::astring value,
basis::astring cfg_accumulator,
basis::astring 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 141 of file write_build_config.cpp.

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

Referenced by execute().

outcome write_build_config::output_definition_macro ( const basis::astring embedded_value,
basis::astring accumulator 
)
outcome write_build_config::output_macro ( const basis::astring symbol,
const basis::astring value,
basis::astring accumulator 
)

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

Definition at line 92 of file write_build_config.cpp.

References ADD_COMMENT_RETURN, basis::astring::contains(), and exclusions().

Referenced by output_decorated_macro().

bool write_build_config::process_version_parts ( const basis::astring symbol,
const basis::astring 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 113 of file write_build_config.cpp.

References basis::astring::equal_to(), and structures::version::set_component().

Referenced by output_decorated_macro().

bool write_build_config::write_output_file ( const basis::astring filename,
const basis::astring contents 
)

The documentation for this class was generated from the following files:
Generated on Sat Jan 28 04:25:11 2012 for hoople2 project by  doxygen 1.6.3