#include <system_values.h>
Inheritance diagram for system_values:


Public Member Functions | |
| system_values (const istring §ion_tag) | |
| provides a lookup on values found in the section named "section_tag". | |
| virtual | ~system_values () |
| IMPLEMENT_CLASS_NAME ("system_values") | |
| bool | use_other_manifest (const istring &manifest_file) |
| supports using a different manifest file than the default. | |
| virtual istring | text_form () const |
| shows all items in the table. | |
| bool | lookup (int value, istring &symbolic_name, istring &description, istring &file_location) |
| locates a "value" and finds its name, description and location. | |
| bool | lookup (const istring &symbolic_name, int &value, istring &description, istring &file_location) |
| similar to the above lookup, but seeks on the "symbolic_name". | |
| int | elements () const |
| returns how many items are listed for the types of values specified. | |
| bool | get (int index, istring &symbolic_name, int &value, istring &description, istring &file_location) |
| accesses the "index"th item in the list. | |
Static Public Member Functions | |
| static const char * | OUTCOME_VALUES () |
| values that define the outcomes of operations. | |
| static const char * | FILTER_VALUES () |
| values that define filters used in logging. | |
| static const char * | EVENT_VALUES () |
| values that define event objects used in the program. | |
Static Public Attributes | |
| static const char * | DEFAULT_MANIFEST |
| the default manifest file. | |
The type of value here includes outcomes, events and filters so far. These items are reported in the build manifest that is included with every release of the compiled software. The system_values class provides a lookup interface to the extensible system of unique identifiers which is mapped by the manifest file. The manifest file is processed like an initialization file to retrieve the descriptions and names of symbols when given their numerical identifiers.
Definition at line 37 of file system_values.h.
| system_values::system_values | ( | const istring & | section_tag | ) |
provides a lookup on values found in the section named "section_tag".
the "section_tag" indicates what kind of asset is being looked up in the manifest. it is always assumed that the manifest file is the main one defined here in DEFAULT_MANIFEST. it must be a file created by the value_tagger during the indexing of all value assets defined in the build. the valid values for the section names so far are "DEFINE_ OUTCOME", "DEFINE_ FILTER" and "DEFINE_ EVENT" (with no spaces), but it is better to use the defined "VALUES" methods below (such as OUTCOME_VALUES()). outcomes are used by functions to describe how the operation completed. filters are used to enable different types of logging. events are sent between information source and sink to indicate the occurrence of an activity.
Definition at line 77 of file system_values.cpp.
References FUNCDEF.
| system_values::~system_values | ( | ) | [virtual] |
| system_values::IMPLEMENT_CLASS_NAME | ( | "system_values" | ) |
| const char * system_values::OUTCOME_VALUES | ( | ) | [static] |
| const char * system_values::FILTER_VALUES | ( | ) | [static] |
| const char * system_values::EVENT_VALUES | ( | ) | [static] |
values that define event objects used in the program.
Definition at line 107 of file system_values.cpp.
Referenced by zing_table::show_events().
| bool system_values::use_other_manifest | ( | const istring & | manifest_file | ) |
supports using a different manifest file than the default.
the values will now come from the "manifest_file" instead of the default manifest name shipped with the software release.
Definition at line 97 of file system_values.cpp.
| istring system_values::text_form | ( | ) | const [virtual] |
shows all items in the table.
Reimplemented from object_base.
Definition at line 138 of file system_values.cpp.
References array< contents >::access(), basis::set< contents >::elements(), shell_sort(), and SV_EOL.
| bool system_values::lookup | ( | int | value, | |
| istring & | symbolic_name, | |||
| istring & | description, | |||
| istring & | file_location | |||
| ) |
locates a "value" and finds its name, description and location.
this looks up one of the enumerated values defined for our type of value. true is returned if the value is meaningful. the "symbolic_name" is set to the item's name as used inside the source code (i.e., its enum member's name), the "description" is set to the full textual description of what that value means, and the "file_location" is set to the name of the source file that defines the value.
Definition at line 169 of file system_values.cpp.
Referenced by get(), and zing_table::show_events().
| bool system_values::lookup | ( | const istring & | symbolic_name, | |
| int & | value, | |||
| istring & | description, | |||
| istring & | file_location | |||
| ) |
similar to the above lookup, but seeks on the "symbolic_name".
this lookup tries to associate from the textual name of the value in order to find the integer actual "value" of it. the textual "description" and "file_location" for that item are also included.
Definition at line 180 of file system_values.cpp.
| int system_values::elements | ( | ) | const |
returns how many items are listed for the types of values specified.
Definition at line 190 of file system_values.cpp.
| bool system_values::get | ( | int | index, | |
| istring & | symbolic_name, | |||
| int & | value, | |||
| istring & | description, | |||
| istring & | file_location | |||
| ) |
accesses the "index"th item in the list.
Definition at line 192 of file system_values.cpp.
References bounds_return, and lookup().
const char * system_values::DEFAULT_MANIFEST [static] |
the default manifest file.
it is expected to live in the folder where the applications are.
Definition at line 70 of file system_values.h.
1.5.1