23 #ifndef UNV_Utilities_HeaderFile
24 #define UNV_Utilities_HeaderFile
47 static string GetPrefix();
57 assert (in_file.good());
58 assert (!ds_name.empty());
60 std::string olds, news;
65 in_file >> olds >> news;
70 while( ((olds !=
"-1") || (news ==
"-1")))
75 if ( in_file.eof() || in_file.fail() )
94 inline double D_to_e(std::string& number)
100 const size_t position = number.find(
"D",6);
101 if ( position != std::string::npos )
102 number.replace(position, 1,
"e");
104 return atof (number.c_str());
114 std::ifstream in_stream(theFileName.c_str());
117 std::string olds, news;
118 while (!in_stream.eof()){
120 std::getline(in_stream, news,
'\n');
122 return (olds ==
" -1");
132 inline std::string
read_line(std::ifstream& in_stream,
const bool next=
true)
135 std::getline( in_stream, resLine );
137 std::getline( in_stream, resLine );
139 if ( resLine.size() > 0 && resLine[ resLine.size()-1 ] ==
'\r' )
140 resLine.resize( resLine.size()-1 );
148 #define MESSAGE(msg) std::cout<<__FILE__<<"["<<__LINE__<<"]::"<<msg<<endl;
150 #define BEGMSG(msg) std::cout<<UNV::PrefixPrinter::GetPrefix()<<msg
152 #define ADDMSG(msg) std::cout<<msg
159 #define EXCEPTION(TYPE, MSG) {\
160 std::ostringstream aStream;\
161 aStream<<__FILE__<<"["<<__LINE__<<"]::"<<MSG;\
162 throw TYPE(aStream.str());\