Forward declaration of the Parser so we can declare it friend. More...
#include <uhal/XmlParser.hpp>
Public Member Functions | |
| Parser () | |
| Default constructor. More... | |
| ~Parser () | |
| Destructor. More... | |
| template<typename T > | |
| void | addRule (const Rule< R > &aRule, T aCallbackHandler) |
| Method to add the rules to the parser. More... | |
| R | operator() (const pugi::xml_node &aNode) |
| Functor which converts an XML node to an object of template type R. More... | |
Private Attributes | |
| uint64_t | mNextHash |
| One-hot encoded hash for rules. More... | |
| boost::unordered_map< std::string, uint64_t > | mHashes |
| Map of the tags to the one-hot encoded hash. More... | |
| std::deque< Rule< R > > | mRules |
| Container for storing rule objects. More... | |
| uint32_t | mRuleCounter |
| Member to track rule numbers for giving each rule a unique ID. More... | |
Forward declaration of the Parser so we can declare it friend.
Parser class which converts an XML node to an object of type R.
Definition at line 71 of file XmlParser.hpp.
| uhal::Parser< R >::Parser | ( | ) |
Default constructor.
Definition at line 223 of file XmlParser.hxx.
| uhal::Parser< R >::~Parser | ( | ) |
Destructor.
Definition at line 231 of file XmlParser.hxx.
| void uhal::Parser< R >::addRule | ( | const Rule< R > & | aRule, |
| T | aCallbackHandler | ||
| ) |
Method to add the rules to the parser.
| aRule | a rule object specifying what to match |
| aCallbackHandler | a function callback to be performed when the rule conditions are met |
Definition at line 239 of file XmlParser.hxx.
| R uhal::Parser< R >::operator() | ( | const pugi::xml_node & | aNode | ) |
Functor which converts an XML node to an object of template type R.
| aNode | an XML node for converting to an object |
Definition at line 314 of file XmlParser.hxx.
|
private |
Map of the tags to the one-hot encoded hash.
Definition at line 249 of file XmlParser.hpp.
|
private |
One-hot encoded hash for rules.
Definition at line 247 of file XmlParser.hpp.
|
private |
Member to track rule numbers for giving each rule a unique ID.
Definition at line 253 of file XmlParser.hpp.
|
private |
Container for storing rule objects.
Definition at line 251 of file XmlParser.hpp.
1.8.13