compileTimestamp.h

Go to the documentation of this file.
00001 
00015 #ifndef _DLR_COMMON_COMPILETIMESTAMP_H_
00016 #define _DLR_COMMON_COMPILETIMESTAMP_H_
00017 
00018 namespace dlr {
00019   namespace common {
00021     namespace privateCode {
00022       const std::string compilerDateString(__DATE__);
00023       const std::string compilerTimeString(__TIME__);
00024     } // namespace privateCode;
00026   } // namespace common
00027 } // namespace dlr;
00028 
00029 
00030 namespace dlr {
00031 
00032   namespace common {
00033 
00041     class CompileTimestamp
00042     {
00043     public:
00048       CompileTimestamp()
00049         : m_day(0), m_hour(0), m_minute(0), m_month(0), m_second(0),
00050           m_year(0) {
00051         this->parseCompilerDateString(privateCode::compilerDateString);
00052         this->parseCompilerTimeString(privateCode::compilerTimeString);
00053       }
00054 
00055 
00059       ~CompileTimestamp() {}
00060 
00061 
00069       std::string
00070       getISOString();
00071     
00072 
00073     private:
00074 
00075       void
00076       parseCompilerDateString(const std::string& compilerTimeString);
00077 
00078     
00079       void
00080       parseCompilerTimeString(const std::string& compilerTimeString);
00081 
00082     
00083       int m_day;
00084       int m_hour;
00085       int m_minute;
00086       int m_month;
00087       int m_second;
00088       int m_year;
00089     };
00090 
00091   } // namespace common
00092     
00093 } // namespace dlr
00094 
00095 
00096 /* ======= Declarations to maintain compatibility with legacy code. ======= */
00097 
00098 namespace dlr {
00099 
00100   using common::CompileTimestamp;
00101   
00102 } // namespace dlr
00103 
00104 #endif // #ifndef _DLR_COMMON_COMPILETIMESTAMP_H_

Generated on Tue Nov 24 23:57:55 2009 for dlrCommon Utility Library by  doxygen 1.5.8