|
Sierra Toolkit
Version of the Day
|
Class ProductRegistry maps product names and attributes to brief descriptive values. Each added product has at a minimum the NAME value initialized. A region type product also has the PRODUCT_TYPE set to PRODUCT_TYPE_REGION. More...
#include <ProductRegistry.hpp>
Public Types | |
|
typedef std::map< std::string, std::string > | AttributeMap |
| Map of attribute keyword to value. | |
|
typedef std::map< std::string, AttributeMap > | ProductMap |
| Map of product name to attribute map. | |
Public Member Functions | |
| void | setRegistryInvalid () |
| Member function setRegistryInvalid marks th registry as contain a conflict of some sort. The ERROR attribute of each product describes each error. | |
| bool | isRegistryOK () |
| Member function isRegistryOK returns true if the registry has not been flagged as having an error via setRegistryInvalid. | |
| const std::string & | getProductName () const |
| Member function getProductName returns the product name. | |
| void | setProductName (const std::string &product_name) |
| Member function setProductName sets the product name. | |
| ProductMap & | getProductMap () const |
| Member function getProductMap returns a reference to the map of all products. | |
| AttributeMap & | addProduct (const std::string &name) |
| Member function addProduct adds a product to the registry. | |
| AttributeMap & | addTPL (const std::string &name, const std::string &version, const std::string &qualifier="") |
| Member function addTPL adds a product to the registry. A product always has the VERSION and QUALIFIER attributes set. | |
| AttributeMap & | addRegion (const std::string &name) |
| Member function addRegion add a region as a product to the registry. A region product is a product with the PRODUCT_TYPE set to PRODUCT_TYPE_REGION. | |
| AttributeMap & | getProductAttributeMap (const std::string &name) |
| Member function getProduct returns a reference to the product attribute map. | |
| const std::string & | getProductAttribute (const std::string &name, const std::string &attribute) const |
| Member function getAttribute returns the attribute for the named product. | |
| std::string & | getProductAttribute (const std::string &name, const std::string &attribute) |
| Member function getAttribute returns the attribute for the named product. | |
| void | setProductAttribute (const std::string &name, const std::string &attribute, const std::string &value) |
| Member function setAttribute sets the attribute for the named poduct to the specified value. | |
Static Public Member Functions | |
| static ProductRegistry & | instance () |
| Member function instance returns a reference to the registry singleton. | |
| static const char * | version () |
| Member function version returns the version number of the combined product. | |
Static Public Attributes | |
| static const std::string | NAME = "Name" |
| Product's name attribute. | |
| static const std::string | TITLE = "Title" |
| Product's title attribute. | |
| static const std::string | VERSION = "Version" |
| TPL's version attribute. | |
| static const std::string | QUALIFIER = "Qualifier" |
| TPL's qualifier attribute. | |
| static const std::string | CONTACT = "Contact" |
| Product's contact attribute. | |
| static const std::string | ERROR = "Error" |
| Product's error attribute. | |
| static const std::string | PRODUCT_TYPE = "Type" |
| Product's product_type attribute. | |
| static const std::string | EXECUTABLE = "Executable" |
| Product's executable attribute. | |
| static const std::string | BUILD_TIME = "Build Time" |
| Product's build_time attribute. | |
| static const std::string | BANNER_DETAIL = "Banner Detail" |
| Product's additional banner info attribute. | |
| static const std::string | COPYRIGHT = "Copyright" |
| Product's copyright information. | |
| static const std::string | REGION_TITLE = "Region Title" |
| Product's region_title attribute. | |
| static const std::string | PRODUCT_TYPE_REGION = "Region" |
| Region product_type value. | |
Class ProductRegistry maps product names and attributes to brief descriptive values. Each added product has at a minimum the NAME value initialized. A region type product also has the PRODUCT_TYPE set to PRODUCT_TYPE_REGION.
A product may have any other attribute keyword and value assocaited with it. In particular, the main execution product often has the /EXECUTABLE_FILE and BUILD_TIME attributes set.
You may add any other attribute keyword and values to the product registry.
Definition at line 55 of file ProductRegistry.hpp.
| ProductRegistry & stk_classic::ProductRegistry::instance | ( | ) | [static] |
Member function instance returns a reference to the registry singleton.
Definition at line 85 of file ProductRegistry.cpp.
| const char * stk_classic::ProductRegistry::version | ( | ) | [static] |
Member function version returns the version number of the combined product.
Definition at line 94 of file ProductRegistry.cpp.
| bool stk_classic::ProductRegistry::isRegistryOK | ( | ) | [inline] |
Member function isRegistryOK returns true if the registry has not been flagged as having an error via setRegistryInvalid.
Definition at line 112 of file ProductRegistry.hpp.
| const std::string& stk_classic::ProductRegistry::getProductName | ( | ) | const [inline] |
Member function getProductName returns the product name.
Definition at line 121 of file ProductRegistry.hpp.
| ProductMap& stk_classic::ProductRegistry::getProductMap | ( | ) | const [inline] |
Member function getProductMap returns a reference to the map of all products.
Definition at line 139 of file ProductRegistry.hpp.
| ProductRegistry::AttributeMap & stk_classic::ProductRegistry::addProduct | ( | const std::string & | name | ) |
Member function addProduct adds a product to the registry.
| name | a std::string const reference to the product's name. |
Definition at line 137 of file ProductRegistry.cpp.
| ProductRegistry::AttributeMap & stk_classic::ProductRegistry::addTPL | ( | const std::string & | name, |
| const std::string & | version, | ||
| const std::string & | qualifier = "" |
||
| ) |
Member function addTPL adds a product to the registry. A product always has the VERSION and QUALIFIER attributes set.
| name | a std::string const reference to the product's name. |
| version | a std::string const reference to the product's version string. |
| qualifier | a std::string const reference to the product's qualifier string. |
Definition at line 105 of file ProductRegistry.cpp.
| ProductRegistry::AttributeMap & stk_classic::ProductRegistry::addRegion | ( | const std::string & | name | ) |
Member function addRegion add a region as a product to the registry. A region product is a product with the PRODUCT_TYPE set to PRODUCT_TYPE_REGION.
| name | a std::string const reference to the product's name. |
Definition at line 150 of file ProductRegistry.cpp.
| ProductRegistry::AttributeMap & stk_classic::ProductRegistry::getProductAttributeMap | ( | const std::string & | name | ) |
Member function getProduct returns a reference to the product attribute map.
| name | a std::string const reference to the product's name. |
Definition at line 162 of file ProductRegistry.cpp.
| const std::string & stk_classic::ProductRegistry::getProductAttribute | ( | const std::string & | name, |
| const std::string & | attribute | ||
| ) | const |
Member function getAttribute returns the attribute for the named product.
| name | a std::string const reference to the product's name. |
| attribute | a std::string const reference to the product's attribute keyword. |
Definition at line 170 of file ProductRegistry.cpp.
| std::string & stk_classic::ProductRegistry::getProductAttribute | ( | const std::string & | name, |
| const std::string & | attribute | ||
| ) |
Member function getAttribute returns the attribute for the named product.
| name | a std::string const reference to the product's name. |
| attribute | a std::string const reference to the product's attribute keyword. |
Definition at line 179 of file ProductRegistry.cpp.
| void stk_classic::ProductRegistry::setProductAttribute | ( | const std::string & | name, |
| const std::string & | attribute, | ||
| const std::string & | value | ||
| ) |
Member function setAttribute sets the attribute for the named poduct to the specified value.
| name | a std::string const reference to the product's name. |
| attribute | a std::string const reference to the product's attribute keyword. |
| value | a std::string const reference to the value of product's attribute. |
Definition at line 188 of file ProductRegistry.cpp.