feisty meow concerns codebase  2.140
write_build_config Class Reference

#include <write_build_config.h>

Inheritance diagram for write_build_config:
Collaboration diagram for write_build_config:

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. More...
 
const structures::string_setexclusions ()
 returns the set of symbols that we will not include in the header. More...
 
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". More...
 
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". More...
 
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. More...
 
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. More...
 
bool check_nesting (const basis::astring &to_check)
 if "to_check" is a make conditional, the nesting level is adjusted. More...
 
bool write_output_file (const basis::astring &filename, const basis::astring &contents)
 writes "contents" to "filename" if it differs from current contents. More...
 
- Public Member Functions inherited from application::application_shell
 application_shell ()
 constructs an application_shell to serve as the root of the program. More...
 
virtual ~application_shell ()
 
virtual int execute_application ()
 runs the base class's execute() method and catches any exceptions due to it. More...
 
int exit_value () const
 once the application has finished executing, this will contain the exit value. More...
 
const mathematics::chaosrandomizer () const
 provides access to the random number generator owned by this app. More...
 
virtual basis::outcome log (const basis::base_string &to_print, int filter=basis::ALWAYS_PRINT)
 < returns the full name of the current application. More...
 
- Public Member Functions inherited from application::base_application
virtual const char * class_name () const =0
 Returns the bare name of this class as a constant character pointer. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from application::application_shell
static application_shellsingle_instance ()
 in a program with a single application_shell extant, this gives out the instance. More...
 

Detailed Description

Definition at line 31 of file write_build_config.h.

Constructor & Destructor Documentation

◆ write_build_config()

write_build_config::write_build_config ( )

Definition at line 61 of file write_build_config.cpp.

◆ ~write_build_config()

write_build_config::~write_build_config ( )

Definition at line 68 of file write_build_config.cpp.

References basis::WHACK().

Member Function Documentation

◆ check_nesting()

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().

◆ DEFINE_CLASS_NAME()

write_build_config::DEFINE_CLASS_NAME ( "write_build_config"  )

◆ exclusions()

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(), output_definition_macro(), and output_macro().

◆ execute()

◆ output_decorated_macro()

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().

◆ output_definition_macro()

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

◆ output_macro()

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(), and output_definition_macro().

◆ process_version_parts()

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().

◆ write_output_file()

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: