Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 27, 2008, 4:08:51 AM (16 years ago)
Author:
landauf
Message:

many changes, most important: BaseObject takes now a pointer to it's creator which is needed to build a level hierarchy (with different scenes)

Location:
code/branches/objecthierarchy/src/util
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/util/Math.cc

    r2016 r2019  
    200200    static unsigned long aNumber = 135;
    201201    return aNumber++;
    202 }
    203 
    204 std::string getUniqueNumberStr()
    205 {
    206     return convertToString(getUniqueNumber());
    207202}
    208203
  • code/branches/objecthierarchy/src/util/Math.h

    r2002 r2019  
    275275
    276276_UtilExport unsigned long getUniqueNumber();
    277 _UtilExport std::string getUniqueNumberStr();
    278277
    279278class _UtilExport IntVector2
  • code/branches/objecthierarchy/src/util/OutputHandler.cc

    r1791 r2019  
    3333
    3434#include "OutputHandler.h"
     35#include <time.h>
    3536
    3637namespace orxonox
     
    4647        this->logfilename_ = logfilename;
    4748        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;
    4956        this->logfile_.flush();
    5057    }
  • code/branches/objecthierarchy/src/util/String.cc

    r1894 r2019  
    3737#include <iostream>
    3838
    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
     42std::string getUniqueNumberString()
     43{
     44    return convertToString(getUniqueNumber());
     45}
    4346
    4447/**
  • code/branches/objecthierarchy/src/util/String.h

    r1889 r2019  
    4040#include <sstream>
    4141
    42 extern _UtilExport std::string blankString;
     42_UtilExport static const std::string BLANKSTRING = "";
     43_UtilExport std::string getUniqueNumberString();
    4344
    4445_UtilExport void        strip(std::string* str);
Note: See TracChangeset for help on using the changeset viewer.