ICU 66.0.1  66.0.1
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 
19 #if U_SHOW_CPLUSPLUS_API
20 
21 #include "unicode/uobject.h"
22 
28 U_NAMESPACE_BEGIN
29 
30 
37 public:
38 
45  DateInterval(UDate fromDate, UDate toDate);
46 
51  virtual ~DateInterval();
52 
58  inline UDate getFromDate() const;
59 
65  inline UDate getToDate() const;
66 
67 
79  static UClassID U_EXPORT2 getStaticClassID(void);
80 
92  virtual UClassID getDynamicClassID(void) const;
93 
94 
99  DateInterval(const DateInterval& other);
100 
105  DateInterval& operator=(const DateInterval&);
106 
112  virtual UBool operator==(const DateInterval& other) const;
113 
119  inline UBool operator!=(const DateInterval& other) const;
120 
121 
128  virtual DateInterval* clone() const;
129 
130 private:
134  DateInterval();
135 
136  UDate fromDate;
137  UDate toDate;
138 
139 } ;// end class DateInterval
140 
141 
142 inline UDate
144  return fromDate;
145 }
146 
147 
148 inline UDate
150  return toDate;
151 }
152 
153 
154 inline UBool
156  return ( !operator==(other) );
157 }
158 
159 
160 U_NAMESPACE_END
161 
162 #endif /* U_SHOW_CPLUSPLUS_API */
163 
164 #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:96
UDate getFromDate() const
Get the from date.
Definition: dtintrv.h:143
This class represents a date interval.
Definition: dtintrv.h:36
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:251
virtual UClassID getDynamicClassID() const
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
C++ API: Common ICU base class UObject.
UBool operator!=(const DateInterval &other) const
Non-equality operator.
Definition: dtintrv.h:155
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:149
int8_t UBool
The ICU boolean type.
Definition: umachine.h:261