CMS 3D CMS Logo

DateHandler.h
Go to the documentation of this file.
1 #ifndef DATEHANDLER_H
2 #define DATEHANDLER_H
3 
6 
7 class DateHandler {
8 public:
9  DateHandler(oracle::occi::Environment* env, oracle::occi::Connection* conn);
10  ~DateHandler();
11 
12  inline Tm getNegInfTm() const { return NEG_INF; }
13  inline Tm getPlusInfTm() const { return PLUS_INF; }
14  inline oracle::occi::Date getNegInfDate() const { return NEG_INF_DATE; }
15  inline oracle::occi::Date getPlusInfDate() const { return PLUS_INF_DATE; }
16 
20  inline oracle::occi::Date getCurrentDate() { return oracle::occi::Date(oracle::occi::Date::getSystemDate(m_env)); }
21 
25  inline oracle::occi::Date minDate() { return oracle::occi::Date(m_env, 1970, 1, 1, 0, 0, 0); }
26 
30  inline oracle::occi::Date maxDate() { return oracle::occi::Date(m_env, 9999, 12, 31, 23, 59, 59); }
31 
35  oracle::occi::Date tmToDate(const Tm& inTm) const;
36 
40  Tm dateToTm(oracle::occi::Date& date) const;
41 
42  DateHandler() = delete; // hide the default constructor
43 
44 private:
45  oracle::occi::Connection* m_conn;
46  oracle::occi::Environment* m_env;
47 
50  oracle::occi::Date PLUS_INF_DATE;
51  oracle::occi::Date NEG_INF_DATE;
52 };
53 
54 #endif
oracle::occi::Date maxDate()
Definition: DateHandler.h:30
oracle::occi::Date tmToDate(const Tm &inTm) const
Definition: DateHandler.cc:19
oracle::occi::Date minDate()
Definition: DateHandler.h:25
Tm getNegInfTm() const
Definition: DateHandler.h:12
oracle::occi::Date getCurrentDate()
Definition: DateHandler.h:20
oracle::occi::Date NEG_INF_DATE
Definition: DateHandler.h:51
oracle::occi::Environment * m_env
Definition: DateHandler.h:46
oracle::occi::Date getPlusInfDate() const
Definition: DateHandler.h:15
oracle::occi::Date getNegInfDate() const
Definition: DateHandler.h:14
Tm dateToTm(oracle::occi::Date &date) const
Definition: DateHandler.cc:28
DateHandler()=delete
oracle::occi::Date PLUS_INF_DATE
Definition: DateHandler.h:50
conn
Definition: getInfo.py:9
Tm getPlusInfTm() const
Definition: DateHandler.h:13
Definition: Tm.h:13
oracle::occi::Connection * m_conn
Definition: DateHandler.h:45