Auxiliairy data structure for date and time.
More...
#include <JDatim_t.hh>
|
static const char | SEPARATOR = '-' |
| Separation character.
|
|
|
template<class JHead_t , class JTail_t > |
static bool | lt (const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JTail_t > > &type) |
| Less than method for composite data types.
|
|
template<class JHead_t > |
static bool | lt (const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JNullType > > &type) |
| Less than method for composite data types.
|
|
|
std::istream & | operator>> (std::istream &in, JDatim_t &object) |
| Read date and time from input stream.
|
|
std::ostream & | operator<< (std::ostream &out, const JDatim_t &object) |
| Write date and time to output stream.
|
|
Auxiliairy data structure for date and time.
Definition at line 27 of file JDatim_t.hh.
◆ JDatim_t() [1/2]
JDATABASE::JDatim_t::JDatim_t |
( |
| ) |
|
|
inline |
◆ JDatim_t() [2/2]
JDATABASE::JDatim_t::JDatim_t |
( |
const JDate_t & | date, |
|
|
const JTime_t & | time ) |
|
inline |
Constructor.
- Parameters
-
Definition at line 51 of file JDatim_t.hh.
52 :
55 {}
JEEP::JTime<':'> JTime_t
type defintion of time according database format
JEEP::JDate<'/'> JDate_t
type defintion of date according database format
◆ min()
static JDatim_t JDATABASE::JDatim_t::min |
( |
| ) |
|
|
inlinestatic |
Minimal date and time.
Definition at line 58 of file JDatim_t.hh.
◆ max()
static JDatim_t JDATABASE::JDatim_t::max |
( |
| ) |
|
|
inlinestatic |
Maximal date and time.
Definition at line 59 of file JDatim_t.hh.
◆ ClassDefNV()
JDATABASE::JDatim_t::ClassDefNV |
( |
JDatim_t | , |
|
|
1 | ) |
◆ less() [1/2]
template<char JSeparator_t>
bool JEEP::JDate< JSeparator_t >::less |
( |
const JDate< JSeparator_t > & | date | ) |
const |
|
inlineinherited |
Less-than method.
- Parameters
-
- Returns
- true if this date earlier than given date; else false
Definition at line 96 of file JDate.hh.
97 {
98 if (this->
year == date.year) {
99
100 if (this->
month == date.month)
101 return this->
day < date.day;
102 else
103 return this->
month < date.month;
104
105 } else {
106
107 return this->
year < date.year;
108 }
109 }
◆ less() [2/2]
template<char JSeparator_t>
bool JEEP::JTime< JSeparator_t >::less |
( |
const JTime< JSeparator_t > & | time | ) |
const |
|
inlineinherited |
Less-than method.
- Parameters
-
- Returns
- true if this time earlier than given time; else false
Definition at line 96 of file Jeep/JTime.hh.
97 {
98 if (this->
hour == time.hour) {
99
100 if (this->
minute == time.minute)
101 return this->
second < time.second;
102 else
103 return this->
minute < time.minute;
104
105 } else {
106
107 return this->
hour < time.hour;
108 }
109 }
◆ lt() [1/2]
template<class JClass_t , class JTypelist_t >
template<class JHead_t , class JTail_t >
|
inlinestaticprotectedinherited |
Less than method for composite data types.
- Parameters
-
first | first object |
second | second object |
type | type |
- Returns
- true if first object is less than second object; else false
Definition at line 43 of file JMultiComparable.hh.
46 {
47 if (static_cast<const JHead_t&>(first) <
48 static_cast<const JHead_t&>(second))
49 return true;
50 else if (static_cast<const JHead_t&>(second) <
51 static_cast<const JHead_t&>(first))
52 return false;
53 else
54 return lt(first, second, JType<JTail_t>());
55 }
static bool lt(const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JTail_t > > &type)
Less than method for composite data types.
◆ lt() [2/2]
template<class JClass_t , class JTypelist_t >
template<class JHead_t >
|
inlinestaticprotectedinherited |
Less than method for composite data types.
- Parameters
-
first | first object |
second | second object |
type | type |
- Returns
- true if first object is less than second object; else false
Definition at line 67 of file JMultiComparable.hh.
70 {
71 return (static_cast<const JHead_t&>(first) <
72 static_cast<const JHead_t&>(second));
73 }
◆ operator>>
std::istream & operator>> |
( |
std::istream & | in, |
|
|
JDatim_t & | object ) |
|
friend |
Read date and time from input stream.
- Parameters
-
in | input stream |
object | date and time |
- Returns
- input stream
Definition at line 69 of file JDatim_t.hh.
70 {
71 in >>
static_cast<JDate_t&
>(object);
72 in.ignore();
73 in >>
static_cast<JTime_t&
>(object);
74
75 return in;
76 }
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JDatim_t & | object ) |
|
friend |
Write date and time to output stream.
- Parameters
-
out | output stream |
object | date and time |
- Returns
- output stream
Definition at line 86 of file JDatim_t.hh.
87 {
88 out << static_cast<const JDate_t&>(object);
90 out << static_cast<const JTime_t&>(object);
91
92 return out;
93 }
static const char SEPARATOR
Separation character.
◆ SEPARATOR
const char JDATABASE::JDatim_t::SEPARATOR = '-' |
|
static |
◆ year
template<char JSeparator_t>
◆ month
template<char JSeparator_t>
◆ day
template<char JSeparator_t>
◆ hour
template<char JSeparator_t>
◆ minute
template<char JSeparator_t>
◆ second
template<char JSeparator_t>
The documentation for this struct was generated from the following file: