- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/FormatParserStorage.cpp
r60239f r86cff86 42 42 ParserSuffix.resize(ParserTypes_end, ""); 43 43 44 ParserSuffix[mpqc] = " conf.in";44 ParserSuffix[mpqc] = "in"; 45 45 ParserSuffix[pcp] = "conf"; 46 ParserSuffix[tremolo] = " conf.data";47 ParserSuffix[xyz] = " conf.xyz";46 ParserSuffix[tremolo] = "data"; 47 ParserSuffix[xyz] = "xyz"; 48 48 } 49 49 … … 133 133 } 134 134 135 /** Parses an istream depending on its suffix 136 * \param &input input stream 137 * \param suffix 138 * \return true - parsing ok, false - suffix unknown 139 */ 140 bool FormatParserStorage::get(std::istream &input, std::string suffix) 141 { 142 if (suffix == ParserSuffix[mpqc]) { 143 getMpqc().load(&input); 144 } else if (suffix == ParserSuffix[pcp]) { 145 getPcp().load(&input); 146 } else if (suffix == ParserSuffix[tremolo]) { 147 getTremolo().load(&input); 148 } else if (suffix == ParserSuffix[xyz]) { 149 getXyz().load(&input); 150 } else { 151 DoeLog(1) && (eLog() << Verbose(1) << "Unknown suffix to for FormatParserStorage::get()." << endl); 152 return false; 153 } 154 return true; 155 } 156 135 157 /** Returns reference to the output MpqcParser, adds if not present. 136 158 * \return reference to the output MpqcParser
Note:
See TracChangeset
for help on using the changeset viewer.