mbxmlutils  1.3.0
Multi-Body XML Utils
 All Classes Functions Typedefs Enumerations
MBXMLUtils::Preprocess Class Reference
Inheritance diagram for MBXMLUtils::Preprocess:
[legend]

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 > &param_)
 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.
 

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)
 
void extractEvaluator ()
 
void preprocess (xercesc::DOMElement *&e, const std::shared_ptr< ParamSet > &param=std::shared_ptr< ParamSet >(), const std::string &parentXPath="", int embedXPathCount=1, const std::shared_ptr< PositionMap > &position=std::make_shared< PositionMap >())
 

Private Attributes

std::shared_ptr
< xercesc::DOMDocument > 
document
 
std::vector
< boost::filesystem::path > 
dependencies
 
std::shared_ptr< Eval > eval
 
std::shared_ptr< ParamSet > param
 
bool preprocessed { false }
 
std::map
< boost::filesystem::path,
std::shared_ptr
< xercesc::DOMDocument > > 
parsedFiles
 

Constructor & Destructor Documentation

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.


The documentation for this class was generated from the following files: