#ifndef MODEL__UFO__UFO_Param_Reader_H #define MODEL__UFO__UFO_Param_Reader_H #include #include namespace UFO{ class UFO_Param_Reader{ public: UFO_Param_Reader(const std::string& filepath); ~UFO_Param_Reader() {}; template Read_Type GetEntry(const std::string& block, const unsigned int& n, const unsigned int& m, const Read_Type& def, const bool& err=true); template Read_Type GetEntry(const std::string& block, const unsigned int& n, const Read_Type& def, const bool& err=true); private: std::vector< std::vector > m_lines; int m_use_runcard; // use run card for ufo input instead of separate param_card.dat template Read_Type GetWidth(const unsigned int& n, const Read_Type& def, const bool& err=true); template static Read_Type NotFound(const std::string& block, const unsigned int& n, const unsigned int& m, const Read_Type& def, const bool& err); template static Read_Type NotFound(const std::string& block, const unsigned int& n, const Read_Type& def, const bool& err); static bool IgnoreCaseCompare(const std::string& a, const std::string& b); std::vector< std::vector >::const_iterator FindBlock(const std::string& block); }; } #endif