Changeset View
Changeset View
Standalone View
Standalone View
EvtGenBase/EvtParserXml.hh
Show All 26 Lines | |||||
class EvtParserXml final { | class EvtParserXml final { | ||||
public: | public: | ||||
bool open( std::string filename ); | bool open( std::string filename ); | ||||
bool close(); | bool close(); | ||||
bool readNextTag(); | bool readNextTag(); | ||||
std::string getTagTitle() { return _tagTitle; } | std::string getTagTitle() { return m_tagTitle; } | ||||
std::string getParentTagTitle(); | std::string getParentTagTitle(); | ||||
int getLineNumber() { return _lineNo; } | int getLineNumber() { return m_lineNo; } | ||||
bool isTagInline() { return _inLineTag; } | bool isTagInline() { return m_inLineTag; } | ||||
std::string readAttribute( std::string attribute, | std::string readAttribute( std::string attribute, | ||||
std::string defaultValue = "" ); | std::string defaultValue = "" ); | ||||
bool readAttributeBool( std::string attribute, bool defaultValue = false ); | bool readAttributeBool( std::string attribute, bool defaultValue = false ); | ||||
int readAttributeInt( std::string attribute, int defaultValue = -1 ); | int readAttributeInt( std::string attribute, int defaultValue = -1 ); | ||||
double readAttributeDouble( std::string attribute, double defaultValue = -1. ); | double readAttributeDouble( std::string attribute, double defaultValue = -1. ); | ||||
private: | private: | ||||
std::ifstream _fin; | std::ifstream m_fin; | ||||
std::string _line; | std::string m_line; | ||||
int _lineNo = 0; | int m_lineNo = 0; | ||||
std::string _tag; | std::string m_tag; | ||||
std::string _tagTitle; | std::string m_tagTitle; | ||||
bool _inLineTag; | bool m_inLineTag; | ||||
std::vector<std::string> _tagTree; | std::vector<std::string> m_tagTree; | ||||
bool processTagTree(); | bool processTagTree(); | ||||
bool expandEnvVars( std::string& str ); | bool expandEnvVars( std::string& str ); | ||||
bool isAlphaNum( char c ); | bool isAlphaNum( char c ); | ||||
}; | }; | ||||
#endif | #endif |