- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/WorldAction/InputAction.cpp
rce7fdc r091838 22 22 #include "CodePatterns/Log.hpp" 23 23 #include "molecule.hpp" 24 #include "MoleculeListClass.hpp" 24 25 #include "Parser/FormatParserStorage.hpp" 25 26 #include "CodePatterns/Verbose.hpp" … … 43 44 // molecule *mol = NULL; 44 45 boost::filesystem::ifstream test; 46 FormatParserStorage &parsers = FormatParserStorage::getInstance(); 45 47 46 48 // obtain information … … 61 63 #endif 62 64 DoLog(1) && (Log() << Verbose(1) << "Setting config file name prefix to " << FilenamePrefix << "." << endl); 63 FormatParserStorage::getInstance().SetOutputPrefixForAll(FilenamePrefix);65 parsers.SetOutputPrefixForAll(FilenamePrefix); 64 66 } else { 65 67 DoeLog(1) && (eLog() << Verbose(1) << "Input file does not have a suffix, cannot recognize format." << endl); … … 71 73 DoLog(1) && (Log() << Verbose(1) << "Specified config file " << params.filename << " not found." << endl); 72 74 // DONT FAIL: it's just empty and we use the name. // return Action::failure; 75 // nonetheless, add to output formats 76 parsers.setOutputFormat( parsers.getTypeFromSuffix(FilenameSuffix) ); 73 77 } else { 74 78 DoLog(1) && (Log() << Verbose(1) << "Specified config file found, parsing ... "); … … 76 80 // parse the file 77 81 test.open(params.filename); 78 FormatParserStorage::getInstance().load(test, FilenameSuffix); 82 parsers.load(test, FilenameSuffix); 83 parsers.setOutputFormat( parsers.getTypeFromSuffix(FilenameSuffix) ); 79 84 test.close(); 80 85
Note:
See TracChangeset
for help on using the changeset viewer.