Jpp  15.0.4
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Protected Member Functions | Friends | List of all members
JDATABASE::JDatim_t Struct Reference

Auxiliairy data structure for date and time. More...

#include <JDatim_t.hh>

Inheritance diagram for JDATABASE::JDatim_t:
JEEP::JDate<'/'> JEEP::JTime< JSeparator_t > JLANG::JMultiComparable< JClass_t, JTypelist_t > JLANG::JComparable< JFirst_t, JSecond_t > JLANG::JComparable< JFirst_t, JSecond_t >

Public Member Functions

 JDatim_t ()
 Default constructor. More...
 
 JDatim_t (const JDate_t &date, const JTime_t &time)
 Constructor. More...
 
 ClassDefNV (JDatim_t, 1)
 
bool less (const JDate &date) const
 Less-than method. More...
 
bool less (const JTime &time) const
 Less-than method. More...
 

Static Public Member Functions

static JDatim_t min ()
 Minimal date and time. More...
 
static JDatim_t max ()
 Maximal date and time. More...
 

Public Attributes

int year
 year More...
 
int month
 month More...
 
int day
 day More...
 
int hour
 hour More...
 
int minute
 minute More...
 
int second
 second More...
 

Static Public Attributes

static const char SEPARATOR = '-'
 Separation character. More...
 

Static Protected Member Functions

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. More...
 
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. More...
 

Friends

std::istream & operator>> (std::istream &in, JDatim_t &object)
 Read date and time from input stream. More...
 
std::ostream & operator<< (std::ostream &out, const JDatim_t &object)
 Write date and time to output stream. More...
 

Detailed Description

Auxiliairy data structure for date and time.

Definition at line 28 of file JDatim_t.hh.

Constructor & Destructor Documentation

JDATABASE::JDatim_t::JDatim_t ( )
inline

Default constructor.

Definition at line 42 of file JDatim_t.hh.

43  {}
JDATABASE::JDatim_t::JDatim_t ( const JDate_t date,
const JTime_t time 
)
inline

Constructor.

Parameters
datedate
timetime

Definition at line 52 of file JDatim_t.hh.

53  :
54  JDate_t(date),
55  JTime_t(time)
56  {}
JEEP::JTime<':'> JTime_t
Definition: JTime_t.hh:15
JEEP::JDate<'/'> JDate_t
Definition: JDate_t.hh:15

Member Function Documentation

static JDatim_t JDATABASE::JDatim_t::min ( )
inlinestatic

Minimal date and time.

Definition at line 59 of file JDatim_t.hh.

static JDatim_t JDATABASE::JDatim_t::max ( )
inlinestatic

Maximal date and time.

Definition at line 60 of file JDatim_t.hh.

JDATABASE::JDatim_t::ClassDefNV ( JDatim_t  ,
 
)
bool JEEP::JDate< JSeparator_t >::less ( const JDate<'/'> &  date) const
inlineinherited

Less-than method.

Parameters
datedate
Returns
true if this date earlier than given date; else false

Definition at line 97 of file Jeep/JDate.hh.

98  {
99  if (this->year == date.year) {
100 
101  if (this->month == date.month)
102  return this->day < date.day;
103  else
104  return this->month < date.month;
105 
106  } else {
107 
108  return this->year < date.year;
109  }
110  }
int month
month
Definition: Jeep/JDate.hh:155
template<char JSeparator_t>
bool JEEP::JTime< JSeparator_t >::less ( const JTime< JSeparator_t > &  time) const
inlineinherited

Less-than method.

Parameters
timetime
Returns
true if this time earlier than given time; else false

Definition at line 97 of file Jeep/JTime.hh.

98  {
99  if (this->hour == time.hour) {
100 
101  if (this->minute == time.minute)
102  return this->second < time.second;
103  else
104  return this->minute < time.minute;
105 
106  } else {
107 
108  return this->hour < time.hour;
109  }
110  }
int second
second
Definition: Jeep/JTime.hh:156
int minute
minute
Definition: Jeep/JTime.hh:155
int hour
hour
Definition: Jeep/JTime.hh:154
template<class JClass_t, class JTypelist_t>
template<class JHead_t , class JTail_t >
static bool JLANG::JMultiComparable< JClass_t, JTypelist_t >::lt ( const JClass_t &  first,
const JClass_t &  second,
const JType< JTypeList< JHead_t, JTail_t > > &  type 
)
inlinestaticprotectedinherited

Less than method for composite data types.

Parameters
firstfirst object
secondsecond object
typetype
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  }
Auxiliary class for a type holder.
Definition: JType.hh:19
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
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 JClass_t, class JTypelist_t>
template<class JHead_t >
static bool JLANG::JMultiComparable< JClass_t, JTypelist_t >::lt ( const JClass_t &  first,
const JClass_t &  second,
const JType< JTypeList< JHead_t, JNullType > > &  type 
)
inlinestaticprotectedinherited

Less than method for composite data types.

Parameters
firstfirst object
secondsecond object
typetype
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  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first

Friends And Related Function Documentation

std::istream& operator>> ( std::istream &  in,
JDatim_t object 
)
friend

Read date and time from input stream.

Parameters
ininput stream
objectdate and time
Returns
input stream

Definition at line 70 of file JDatim_t.hh.

71  {
72  in >> static_cast<JDate_t&>(object);
73  in.ignore();
74  in >> static_cast<JTime_t&>(object);
75 
76  return in;
77  }
Auxiliary class for simple time.
Definition: Jeep/JTime.hh:39
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41
std::ostream& operator<< ( std::ostream &  out,
const JDatim_t object 
)
friend

Write date and time to output stream.

Parameters
outoutput stream
objectdate and time
Returns
output stream

Definition at line 87 of file JDatim_t.hh.

88  {
89  out << static_cast<const JDate_t&>(object);
90  out << JDatim_t::SEPARATOR;
91  out << static_cast<const JTime_t&>(object);
92 
93  return out;
94  }
static const char SEPARATOR
Separation character.
Definition: JDatim_t.hh:36

Member Data Documentation

const char JDATABASE::JDatim_t::SEPARATOR = '-'
static

Separation character.

Definition at line 36 of file JDatim_t.hh.

int JEEP::JDate< JSeparator_t >::year
inherited

year

Definition at line 154 of file Jeep/JDate.hh.

int JEEP::JDate< JSeparator_t >::month
inherited

month

Definition at line 155 of file Jeep/JDate.hh.

int JEEP::JDate< JSeparator_t >::day
inherited

day

Definition at line 156 of file Jeep/JDate.hh.

template<char JSeparator_t>
int JEEP::JTime< JSeparator_t >::hour
inherited

hour

Definition at line 154 of file Jeep/JTime.hh.

template<char JSeparator_t>
int JEEP::JTime< JSeparator_t >::minute
inherited

minute

Definition at line 155 of file Jeep/JTime.hh.

template<char JSeparator_t>
int JEEP::JTime< JSeparator_t >::second
inherited

second

Definition at line 156 of file Jeep/JTime.hh.


The documentation for this struct was generated from the following file: