Changeset 2019 for code/branches/objecthierarchy/src/util
- Timestamp:
- Oct 27, 2008, 4:08:51 AM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/util
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/util/Math.cc
r2016 r2019 200 200 static unsigned long aNumber = 135; 201 201 return aNumber++; 202 }203 204 std::string getUniqueNumberStr()205 {206 return convertToString(getUniqueNumber());207 202 } 208 203 -
code/branches/objecthierarchy/src/util/Math.h
r2002 r2019 275 275 276 276 _UtilExport unsigned long getUniqueNumber(); 277 _UtilExport std::string getUniqueNumberStr();278 277 279 278 class _UtilExport IntVector2 -
code/branches/objecthierarchy/src/util/OutputHandler.cc
r1791 r2019 33 33 34 34 #include "OutputHandler.h" 35 #include <time.h> 35 36 36 37 namespace orxonox … … 46 47 this->logfilename_ = logfilename; 47 48 this->logfile_.open(this->logfilename_.c_str(), std::fstream::out); 48 this->logfile_ << "Started log at yyyy/mm/dd hh:mm:ss" << std::endl; // Todo: Get date and time 49 50 time_t rawtime; 51 struct tm* timeinfo; 52 time(&rawtime); 53 timeinfo = localtime(&rawtime); 54 55 this->logfile_ << "Started log at " << asctime(timeinfo) << std::endl; 49 56 this->logfile_.flush(); 50 57 } -
code/branches/objecthierarchy/src/util/String.cc
r1894 r2019 37 37 #include <iostream> 38 38 39 /** 40 @brief Blank string as variable so you can use const std::string& even if you have to return "". 41 */ 42 std::string blankString = ""; 39 #include "Convert.h" 40 #include "Math.h" 41 42 std::string getUniqueNumberString() 43 { 44 return convertToString(getUniqueNumber()); 45 } 43 46 44 47 /** -
code/branches/objecthierarchy/src/util/String.h
r1889 r2019 40 40 #include <sstream> 41 41 42 extern _UtilExport std::string blankString; 42 _UtilExport static const std::string BLANKSTRING = ""; 43 _UtilExport std::string getUniqueNumberString(); 43 44 44 45 _UtilExport void strip(std::string* str);
Note: See TracChangeset
for help on using the changeset viewer.