diff --git a/AMDiS/src/Initfile.cc b/AMDiS/src/Initfile.cc index e22348b74cab36c0f0db7031254b77c84379255c..0c65647f8d5ff0cd40a770d3f98bcbdf2335fc0b 100644 --- a/AMDiS/src/Initfile.cc +++ b/AMDiS/src/Initfile.cc @@ -6,6 +6,8 @@ #include <sstream> using namespace std; +namespace AMDiS { + /// the small parser for the initfile. see description of read(Initfile&, istream&) struct Parser { Parser(const string& line) { @@ -140,3 +142,5 @@ void Initfile::write(std::string fn) { write(outFile); }; + +} diff --git a/AMDiS/src/Initfile.h b/AMDiS/src/Initfile.h index 5f815214f9a1550ff84a11fcae7efdd2cea4e49d..00be10fadb3655229fd1b5946111c380b3a06667 100644 --- a/AMDiS/src/Initfile.h +++ b/AMDiS/src/Initfile.h @@ -16,9 +16,11 @@ #include <boost/algorithm/string/trim.hpp> #include <boost/lexical_cast.hpp> -using namespace AMDiS; -namespace InitfileInternal { +namespace AMDiS { + + namespace InitfileInternal { + /// Exceptions struct WrongVectorSize : std::runtime_error { WrongVectorSize(std::string m):std::runtime_error(m) {} @@ -50,7 +52,7 @@ namespace InitfileInternal { return swap; } /// return the delimiter or throw an exception if there is no known delimiter in value - size_t checkDelim(const std::string& value, const std::string& delims) { + inline size_t checkDelim(const std::string& value, const std::string& delims) { size_t pos(std::string::npos); for (unsigned i= 0; i<delims.length(); ++i) { pos= value.find(delims[i]); @@ -164,7 +166,7 @@ namespace InitfileInternal { temp_vec[i]= c[i]; convert(temp_vec, valStr); } -} // end namespace InitfileInternal + } // end namespace InitfileInternal /** The entry in an initfile. This helper class was constructed to allow calls like * val = data.get(tag) @@ -375,4 +377,6 @@ protected: int msgInfo, msgWait, paramInfo; }; + +} // end namespace AMDiS #endif