|
mbxmlutils
1.3.0
Multi-Body XML Utils
|
Public Types | |
| using | ParamSet = std::map< std::string, Eval::Value > |
Public Member Functions | |
| Preprocess (const boost::filesystem::path &inputFile, std::variant< std::shared_ptr< MBXMLUtils::DOMParser >, xercesc::DOMElement *, boost::filesystem::path > parserVariant) | |
| Preprocess (const std::shared_ptr< xercesc::DOMDocument > &inputDoc) | |
| void | setParam (const std::shared_ptr< ParamSet > ¶m_) |
| Set top level parameters to overwrite before processAndGetDocument is called. | |
| std::shared_ptr< ParamSet > | getParam () const |
| Get available top level parameters after processAndGetDocument is called. | |
| std::shared_ptr< Eval > | getEvaluator () const |
| Get the evaluator. | |
|
const std::vector < boost::filesystem::path > & | getDependencies () const |
| Get all dependencies found during processAndGetDocument. | |
|
std::shared_ptr < xercesc::DOMDocument > | processAndGetDocument () |
| Start preprocessing and return the preprocessed DOMDocument. | |
| std::shared_ptr < xercesc::DOMDocument > | getDOMDocument () |
Private Types | |
| using | PositionMap = std::map< FQN, int > |
Private Member Functions | |
|
std::shared_ptr < xercesc::DOMDocument > | parseCached (const std::shared_ptr< DOMParser > &parser, const boost::filesystem::path &inputFile, std::vector< boost::filesystem::path > &dependencies, const std::string &msg, bool allowUnknownRootElement=false) |
| void | extractEvaluator () |
| bool | preprocess (xercesc::DOMElement *&e, int &nrElementsEmbeded, const std::shared_ptr< ParamSet > ¶m=std::shared_ptr< ParamSet >(), int embedXPathCount=1) |
Private Attributes | |
|
std::shared_ptr < xercesc::DOMDocument > | document |
|
std::vector < boost::filesystem::path > | dependencies |
| std::shared_ptr< Eval > | eval |
| std::shared_ptr< ParamSet > | param |
| std::shared_ptr< DOMParser > | noneValidatingParser |
| bool | preprocessed { false } |
|
std::map < boost::filesystem::path, std::shared_ptr < xercesc::DOMDocument > > | parsedFiles |
Static Private Attributes | |
| static const FQN | embedFileNotFound = PV%"NoneExistentEmbedHref" |
| MBXMLUtils::Preprocess::Preprocess | ( | const boost::filesystem::path & | inputFile, |
| std::variant< std::shared_ptr< MBXMLUtils::DOMParser >, xercesc::DOMElement *, boost::filesystem::path > | parserVariant | ||
| ) |
Instantiate a preprocessor using a inputFile and a parser. The inputFile is read and validated.
| MBXMLUtils::Preprocess::Preprocess | ( | const std::shared_ptr< xercesc::DOMDocument > & | inputDoc | ) |
Instantiate a preprocessor using a already parsed DOMDocument The inputDoc is validated.
|
inline |
Get the DOMDocument. This may be the unprocessed DOMDocument if called before processAndGetDocument or the processed DOMDocument if called after processAndGetDocument.