#include <write_build_config.h>


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_set & | exclusions () |
| 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. | |
Definition at line 31 of file write_build_config.h.
| 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().
| 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] |
performs the main action of creating our build configuration header.
Implements application::application_shell.
Definition at line 223 of file write_build_config.cpp.
References basis::astring::compare(), DEFINITIONS_STATEMENT, basis::astring::end(), filesystem::byte_filer::eof(), EXPORT_STATEMENT, filesystem::byte_filer::filename(), structures::version::flex_text_form(), FUNCDEF, filesystem::byte_filer::getline(), filesystem::byte_filer::good(), LOG, MAX_LINE_SIZE, structures::symbol_table< contents >::name(), non_continuable_error, output_decorated_macro(), output_definition_macro(), configuration::variable_tokenizer::parse(), structures::version::set_component(), SETUP_CONSOLE_LOGGER, static_class_name, basis::astring::strip_spaces(), configuration::variable_tokenizer::symbols(), basis::astring::t(), configuration::variable_tokenizer::table(), write_output_file(), and basis::astring::zap().
| 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 | |||
| ) |
parses a 'name=value' pair out of "embedded_value" and writes a macro.
Definition at line 167 of file write_build_config.cpp.
References ADD_COMMENT_RETURN, structures::symbol_table< contents >::name(), configuration::variable_tokenizer::parse(), configuration::variable_tokenizer::symbols(), and configuration::variable_tokenizer::table().
Referenced by execute().
| 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 | |||
| ) |
writes "contents" to "filename" if it differs from current contents.
Definition at line 182 of file write_build_config.cpp.
References filesystem::byte_filer::filename(), FUNCDEF, filesystem::byte_filer::good(), LOG, MAX_HEADER_FILE, non_continuable_error, basis::array< contents >::observe(), filesystem::byte_filer::read(), read, static_class_name, and filesystem::byte_filer::write().
Referenced by execute().
1.6.3