/* * NDPosPluginFileReader.h * * Created on: 21 May 2015 * Author: gnx91527 */ #ifndef POSPLUGINAPP_SRC_NDPOSPLUGINFILEREADER_H_ #define POSPLUGINAPP_SRC_NDPOSPLUGINFILEREADER_H_ #include "asynDriver.h" #include #include #include #include class NDPosPluginFileReader { public: static const std::string ELEMENT_NAME; static const std::string ELEMENT_DIMENSIONS; static const std::string ELEMENT_DIMENSION; static const std::string ELEMENT_POSITIONS; static const std::string ELEMENT_POSITION; static const std::string DIMENSION_NAME; NDPosPluginFileReader(); virtual ~NDPosPluginFileReader(); asynStatus validateXML(const std::string& filename); asynStatus loadXML(const std::string& filename); std::vector readDimensions(); std::vector > readPositions(); asynStatus clearPositions(); asynStatus processNode(); asynStatus addDimension(); asynStatus addPosition(); std::string getErrorMsg(); protected: void setErrorMsg(const std::string& msg); private: xmlTextReaderPtr xmlreader; std::vector dimensions; std::vector > positions; std::string errorMessage; }; #endif /* POSPLUGINAPP_SRC_NDPOSPLUGINFILEREADER_H_ */