Class to process feature's xml definition.
More...
#include <Config_FeatureReader.h>
|
| | Config_FeatureReader (const std::string &theXmlFile, const std::string &theLibraryName, const std::string &theDocSection=std::string(), const char *theEventGenerated=0) |
| | Constructor. More...
|
| |
| std::list< std::string > | features () const |
| | Returns list of all features defined in reader's file. More...
|
| |
| CONFIG_EXPORT void | readAll () |
| |
| CONFIG_EXPORT xmlNodePtr | findRoot (const std::string theDocumentPath="") |
| |
|
CONFIG_EXPORT const char * | encoding () const |
| |
|
| static CONFIG_EXPORT std::string | resourcesConfigFile () |
| |
| static CONFIG_EXPORT std::string | pluginConfigFile () |
| |
| static CONFIG_EXPORT std::string | findConfigFile (const std::string theFileName, const int theFindIndex=0) |
| | Checks all possible paths to configuration file given Uses theFindIndex if several solutions can be found (this is the number of solution to find) More...
|
| |
|
| virtual void | processNode (xmlNodePtr aNode) |
| | Overloaded method. Defines how to process each node. More...
|
| |
| virtual void | cleanup (xmlNodePtr aNode) |
| | Overloaded method. Clears attribute cache on exit from attribute's node. More...
|
| |
| virtual bool | processChildren (xmlNodePtr aNode) |
| | Overloaded method. Defines if the given node should be parsed recursively. More...
|
| |
| void | fillFeature (xmlNodePtr theRoot, const std::shared_ptr< Config_FeatureMessage > &outFeatureMessage) |
| | Fills feature message. More...
|
| |
| void | readRecursively (xmlNodePtr theParent) |
| |
| xmlNodePtr | node (void *theNode) |
| | void* -> xmlNodePtr More...
|
| |
| std::string | getNodeName (xmlNodePtr theNode) |
| | Gets xml node name. More...
|
| |
| void | storeAttribute (xmlNodePtr theNode, const char *theNodeAttribute, bool doClean=false) |
| | Stores an attribute in internal map for later use. More...
|
| |
| std::string | restoreAttribute (xmlNodePtr theNode, const char *theNodeAttribute) |
| | Restores an attribute from internal map. More...
|
| |
| std::string | restoreAttribute (const char *theNodeName, const char *theNodeAttribute) |
| | Restores an attribute from internal map. More...
|
| |
| bool | cleanupAttribute (xmlNodePtr theNode, const char *theNodeAttribute) |
| | Cleanups attribute from cache. More...
|
| |
| bool | cleanupAttribute (const char *theNodeName, const char *theNodeAttribute) |
| | Cleanups attribute from cache. More...
|
| |
Class to process feature's xml definition.
◆ Config_FeatureReader()
| Config_FeatureReader::Config_FeatureReader |
( |
const std::string & |
theXmlFile, |
|
|
const std::string & |
theLibraryName, |
|
|
const std::string & |
theDocSection = std::string(), |
|
|
const char * |
theEventGenerated = 0 |
|
) |
| |
◆ features()
| std::list< std::string > Config_FeatureReader::features |
( |
| ) |
const |
Returns list of all features defined in reader's file.
◆ processNode()
| void Config_FeatureReader::processNode |
( |
xmlNodePtr |
aNode | ) |
|
|
protectedvirtual |
Overloaded method. Defines how to process each node.
the box is optional, attribute is in case if the optional attribute value is not empty
Reimplemented from Config_XMLReader.
◆ cleanup()
| void Config_FeatureReader::cleanup |
( |
xmlNodePtr |
aNode | ) |
|
|
protectedvirtual |
Overloaded method. Clears attribute cache on exit from attribute's node.
Reimplemented from Config_XMLReader.
◆ processChildren()
| bool Config_FeatureReader::processChildren |
( |
xmlNodePtr |
aNode | ) |
|
|
protectedvirtual |
Overloaded method. Defines if the given node should be parsed recursively.
Reimplemented from Config_XMLReader.
◆ fillFeature()
| void Config_FeatureReader::fillFeature |
( |
xmlNodePtr |
theRoot, |
|
|
const std::shared_ptr< Config_FeatureMessage > & |
outFeatureMessage |
|
) |
| |
|
protected |
◆ resourcesConfigFile()
| std::string Config_XMLReader::resourcesConfigFile |
( |
| ) |
|
|
staticinherited |
Returns a path to resource files (created from ROOT_DIR environment variable)
- Returns
- string value
◆ pluginConfigFile()
| std::string Config_XMLReader::pluginConfigFile |
( |
| ) |
|
|
staticinherited |
Returns a path to the plugins.xml file (created from ROOT_DIR environment variable)
- Returns
- string value
◆ readAll()
| void Config_XMLReader::readAll |
( |
| ) |
|
|
inherited |
Read all nodes in associated xml file, recursively if processChildren(xmlNode) is true for the xmlNode. For each read node the processNode will be called.
◆ findRoot()
| xmlNodePtr Config_XMLReader::findRoot |
( |
const std::string |
theDocumentPath = "" | ) |
|
|
inherited |
Returns xmlNodePtr to the root of reader's document or NULL if not found. If the path to the document to read is empty, uses myDocumentPath.
◆ findConfigFile()
| std::string Config_XMLReader::findConfigFile |
( |
const std::string |
theFileName, |
|
|
const int |
theFindIndex = 0 |
|
) |
| |
|
staticinherited |
Checks all possible paths to configuration file given Uses theFindIndex if several solutions can be found (this is the number of solution to find)
◆ readRecursively()
| void Config_XMLReader::readRecursively |
( |
xmlNodePtr |
theParent | ) |
|
|
protectedinherited |
Calls processNode() for each child (for some - recursively) of the given node.
- See also
- ReadAll()
◆ node()
| xmlNodePtr Config_XMLReader::node |
( |
void * |
theNode | ) |
|
|
protectedinherited |
◆ getNodeName()
| std::string Config_XMLReader::getNodeName |
( |
xmlNodePtr |
theNode | ) |
|
|
protectedinherited |
◆ storeAttribute()
| void Config_XMLReader::storeAttribute |
( |
xmlNodePtr |
theNode, |
|
|
const char * |
theNodeAttribute, |
|
|
bool |
doClean = false |
|
) |
| |
|
protectedinherited |
Stores an attribute in internal map for later use.
Key is "Node_Name:Node_Attribute" and value is getProperty(theNodeAttribute)
◆ restoreAttribute() [1/2]
| std::string Config_XMLReader::restoreAttribute |
( |
xmlNodePtr |
theNode, |
|
|
const char * |
theNodeAttribute |
|
) |
| |
|
protectedinherited |
Restores an attribute from internal map.
◆ restoreAttribute() [2/2]
| std::string Config_XMLReader::restoreAttribute |
( |
const char * |
theNodeName, |
|
|
const char * |
theNodeAttribute |
|
) |
| |
|
protectedinherited |
Restores an attribute from internal map.
◆ cleanupAttribute() [1/2]
| bool Config_XMLReader::cleanupAttribute |
( |
xmlNodePtr |
theNode, |
|
|
const char * |
theNodeAttribute |
|
) |
| |
|
protectedinherited |
Cleanups attribute from cache.
◆ cleanupAttribute() [2/2]
| bool Config_XMLReader::cleanupAttribute |
( |
const char * |
theNodeName, |
|
|
const char * |
theNodeAttribute |
|
) |
| |
|
protectedinherited |
Cleanups attribute from cache.
◆ myDocumentPath
| std::string Config_XMLReader::myDocumentPath |
|
protectedinherited |
Path to the xml document.
◆ myXmlDoc
| xmlDocPtr Config_XMLReader::myXmlDoc |
|
protectedinherited |
Root of the xml document.
◆ myRootFileName
| std::string Config_XMLReader::myRootFileName |
|
protectedinherited |
◆ myCachedAttributes
| std::map<std::string, std::string> Config_XMLReader::myCachedAttributes |
|
protectedinherited |
A map to store all parent's attributes.
The key has from "Node_Name:Node_Attribute"