ICU 62.1 62.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#include "unicode/uobject.h"
19
27
28
35public:
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
98
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
128private:
132 DateInterval();
133
134 UDate fromDate;
135 UDate toDate;
136
137} ;// end class DateInterval
138
139
140inline UDate
141DateInterval::getFromDate() const {
142 return fromDate;
143}
144
145
146inline UDate
147DateInterval::getToDate() const {
148 return toDate;
149}
150
151
152inline UBool
153DateInterval::operator!=(const DateInterval& other) const {
154 return ( !operator==(other) );
155}
156
157
159
160#endif
This class represents a date interval.
Definition dtintrv.h:34
virtual UBool operator==(const DateInterval &other) const
Equality operator.
virtual ~DateInterval()
destructor
virtual DateInterval * clone() const
clone this object.
DateInterval(const DateInterval &other)
Copy constructor.
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
DateInterval & operator=(const DateInterval &)
Default assignment operator.
static UClassID getStaticClassID(void)
Return the class ID for this class.
DateInterval(UDate fromDate, UDate toDate)
Construct a DateInterval given a from date and a to date.
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
int8_t UBool
The ICU boolean type.
Definition umachine.h:236
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:93
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:359
double UDate
Date and Time data type.
Definition utypes.h:203
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:138
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:137