ICU 64.2  64.2
dtintrv.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 *******************************************************************************
5 * Copyright (C) 2008-2009, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 *******************************************************************************
8 *
9 * File DTINTRV.H
10 *
11 *******************************************************************************
12 */
13 
14 #ifndef __DTINTRV_H__
15 #define __DTINTRV_H__
16 
17 #include "unicode/utypes.h"
18 #include "unicode/uobject.h"
19 
27 
28 
35 public:
36 
43  DateInterval(UDate fromDate, UDate toDate);
44 
49  virtual ~DateInterval();
50 
56  inline UDate getFromDate() const;
57 
63  inline UDate getToDate() const;
64 
65 
77  static UClassID U_EXPORT2 getStaticClassID(void);
78 
90  virtual UClassID getDynamicClassID(void) const;
91 
92 
97  DateInterval(const DateInterval& other);
98 
103  DateInterval& operator=(const DateInterval&);
104 
110  virtual UBool operator==(const DateInterval& other) const;
111 
117  inline UBool operator!=(const DateInterval& other) const;
118 
119 
126  virtual DateInterval* clone() const;
127 
128 private:
132  DateInterval();
133 
134  UDate fromDate;
135  UDate toDate;
136 
137 } ;// end class DateInterval
138 
139 
140 inline UDate
142  return fromDate;
143 }
144 
145 
146 inline UDate
148  return toDate;
149 }
150 
151 
152 inline UBool
154  return ( !operator==(other) );
155 }
156 
157 
159 
160 #endif
double UDate
Date and Time data type.
Definition: utypes.h:203
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:93
UDate getFromDate() const
Get the from date.
Definition: dtintrv.h:141
This class represents a date interval.
Definition: dtintrv.h:34
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:218
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
UBool operator!=(const DateInterval &other) const
Non-equality operator.
Definition: dtintrv.h:153
Basic definitions for ICU, for both C and C++ APIs.
#define U_COMMON_API
Set to export library symbols from inside the common library, and to import them from outside...
Definition: utypes.h:300
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
UDate getToDate() const
Get the to date.
Definition: dtintrv.h:147
int8_t UBool
The ICU boolean type.
Definition: umachine.h:225