Hosted by: BerliOS Developer Logo

OpenMBV C++ Interface

BerliOS Project Page
 All Classes Functions Enumerations
/home/user/MBSimWindows/openmbv/mbxmlutils/mbxmlutils/preprocess.h
00001 #ifndef _MBXMLUTILS_PREPROCESS_H_
00002 #define _MBXMLUTILS_PREPROCESS_H_
00003 
00004 #include <fmatvec/atom.h>
00005 #include <boost/locale.hpp>
00006 #include <boost/bind.hpp>
00007 #include <mbxmlutilshelper/dom.h>
00008 #include <mbxmlutils/octeval.h>
00009 
00010 namespace MBXMLUtils {
00011 
00012 
00013 class Preprocess : virtual public fmatvec::Atom {
00014   protected:
00015     typedef std::map<FQN, int> PositionMap;
00016   public:
00017     typedef std::vector<std::pair<std::string, octave_value> > ParamSet;
00018     typedef std::unordered_map<std::string, ParamSet> XPathParamSet;
00019     static void preprocess(boost::shared_ptr<MBXMLUtils::DOMParser> parser, // in: parser used to parse XML documents
00020                            OctEval &octEval, // in: octave evaluator used for evaluation
00021                            std::vector<boost::filesystem::path> &dependencies, // out: list of dependent files
00022                            xercesc::DOMElement *&e, // in: element to process; out: e changes only if e is itself a Embed element
00023                            // out: XPath map of top level parameter sets. Note: the XPath position is always interpreted
00024                            //      with a Embed count of 1!
00025                            boost::shared_ptr<XPathParamSet> param=boost::shared_ptr<XPathParamSet>(),
00026 
00027                            // internal: XPath expression of parent element
00028                            const std::string &parentXPath="",
00029                            // internal: XPath position count of the element e
00030                            boost::shared_ptr<PositionMap> position=boost::make_shared<PositionMap>()
00031                           );
00032 };
00033 
00034 }
00035 
00036 #endif