ICU 55.1  55.1
dtintrv.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2008-2009, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 *******************************************************************************
6 *
7 * File DTINTRV.H
8 *
9 *******************************************************************************
10 */
11 
12 #ifndef __DTINTRV_H__
13 #define __DTINTRV_H__
14 
15 #include "unicode/utypes.h"
16 #include "unicode/uobject.h"
17 
25 
26 
33 public:
34 
41  DateInterval(UDate fromDate, UDate toDate);
42 
47  virtual ~DateInterval();
48 
54  UDate getFromDate() const;
55 
61  UDate getToDate() const;
62 
63 
75  static UClassID U_EXPORT2 getStaticClassID(void);
76 
88  virtual UClassID getDynamicClassID(void) const;
89 
90 
95  DateInterval(const DateInterval& other);
96 
102 
108  virtual UBool operator==(const DateInterval& other) const;
109 
115  UBool operator!=(const DateInterval& other) const;
116 
117 
124  virtual DateInterval* clone() const;
125 
126 private:
130  DateInterval();
131 
132  UDate fromDate;
133  UDate toDate;
134 
135 } ;// end class DateInterval
136 
137 
138 inline UDate
139 DateInterval::getFromDate() const {
140  return fromDate;
141 }
142 
143 
144 inline UDate
145 DateInterval::getToDate() const {
146  return toDate;
147 }
148 
149 
150 inline UBool
152  return ( !operator==(other) );
153 }
154 
155 
157 
158 #endif
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
U_COMMON_API
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside.
Definition: utypes.h:357
icu::DateInterval::DateInterval
DateInterval(const DateInterval &other)
Copy constructor.
icu::DateInterval
This class represents a date interval.
Definition: dtintrv.h:32
icu::DateInterval::getDynamicClassID
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
icu::DateInterval::DateInterval
DateInterval(UDate fromDate, UDate toDate)
Construct a DateInterval given a from date and a to date.
icu::DateInterval::operator=
DateInterval & operator=(const DateInterval &)
Default assignment operator.
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:221
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:91
icu::DateInterval::~DateInterval
virtual ~DateInterval()
destructor
icu::operator!=
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:218
UDate
double UDate
Date and Time data type.
Definition: utypes.h:201
icu::DateInterval::clone
virtual DateInterval * clone() const
clone this object.
icu::DateInterval::operator==
virtual UBool operator==(const DateInterval &other) const
Equality operator.
uobject.h
C++ API: Common ICU base class UObject.
icu::DateInterval::getStaticClassID
static UClassID getStaticClassID(void)
Return the class ID for this class.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129