ICU 58.2 58.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files

- File List
- Globals

dtintrv.h
Go to the documentation of this file.
1 // Copyright (C) 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
26 U_NAMESPACE_BEGIN
27
28
34 class U_COMMON_API DateInterval : public UObject {
35 public:
36
43 DateInterval(UDate fromDate, UDate toDate);
44
49 virtual ~DateInterval();
50
56 UDate getFromDate() const;
57
63 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 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
141 DateInterval::getFromDate() const {
142 return fromDate;
143 }
144
145
146 inline UDate
147 DateInterval::getToDate() const {
148 return toDate;
149 }
150
151
152 inline UBool
153 DateInterval::operator!=(const DateInterval& other) const {
154 return ( !operator==(other) );
155 }
156
157
158 U_NAMESPACE_END
159
160 #endif
icu::UObject::getDynamicClassID
virtual UClassID getDynamicClassID() const
ICU4C "poor man&#39;s RTTI", returns a UClassID for the actual ICU class.
UDate
double UDate
Date and Time data type.
Definition: utypes.h:203
icu::operator==
U_EXPORT UBool operator==(const StringPiece &x, const StringPiece &y)
Global operator == for StringPiece.
UClassID
void * UClassID
UClassID is used to identify classes without using the compiler&#39;s RTTI.
Definition: uobject.h:93
icu::DateInterval::getFromDate
UDate getFromDate() const
Get the from date.
Definition: dtintrv.h:141
icu::DateInterval
This class represents a date interval.
Definition: dtintrv.h:34
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
icu::operator!=
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:220
uobject.h
C++ API: Common ICU base class UObject.
U_NAMESPACE_END
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:132
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
icu::DateInterval::operator!=
UBool operator!=(const DateInterval &other) const
Non-equality operator.
Definition: dtintrv.h:153
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:359
icu::DateInterval::getToDate
UDate getToDate() const
Get the to date.
Definition: dtintrv.h:147
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
UBool
int8_t UBool
The ICU boolean type.
Definition: umachine.h:259