CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
Tm getNegInfTm() const
Definition: DateHandler.h:12
oracle::occi::Date minDate()
Definition: DateHandler.h:25
oracle::occi::Date getPlusInfDate() const
Definition: DateHandler.h:15
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 tmToDate(const Tm &inTm) const
Definition: DateHandler.cc:19
Tm getPlusInfTm() const
Definition: DateHandler.h:13
DateHandler()=delete
oracle::occi::Date PLUS_INF_DATE
Definition: DateHandler.h:50
tuple conn
Definition: getInfo.py:9
oracle::occi::Date getNegInfDate() const
Definition: DateHandler.h:14
Tm dateToTm(oracle::occi::Date &date) const
Definition: DateHandler.cc:28
Definition: Tm.h:13
oracle::occi::Connection * m_conn
Definition: DateHandler.h:45