ICU 57.1 57.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
33public:
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
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
126private:
130 DateInterval();
131
132 UDate fromDate;
133 UDate toDate;
134
135} ;// end class DateInterval
136
137
138inline UDate
140 return fromDate;
141}
142
143
144inline UDate
146 return toDate;
147}
148
149
150inline UBool
152 return ( !operator==(other) );
153}
154
155
157
158#endif
This class represents a date interval.
Definition: dtintrv.h:32
DateInterval & operator=(const DateInterval &)
Default assignment operator.
DateInterval(const DateInterval &other)
Copy constructor.
static UClassID getStaticClassID(void)
Return the class ID for this class.
virtual UBool operator==(const DateInterval &other) const
Equality operator.
UBool operator!=(const DateInterval &other) const
Non-equality operator.
Definition: dtintrv.h:151
UDate getToDate() const
Get the to date.
Definition: dtintrv.h:145
DateInterval(UDate fromDate, UDate toDate)
Construct a DateInterval given a from date and a to date.
UDate getFromDate() const
Get the from date.
Definition: dtintrv.h:139
virtual DateInterval * clone() const
clone this object.
virtual UClassID getDynamicClassID(void) const
Returns a unique class ID POLYMORPHICALLY.
virtual ~DateInterval()
destructor
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:221
UBool operator!=(const StringPiece &x, const StringPiece &y)
Global operator != for StringPiece.
Definition: stringpiece.h:218
int8_t UBool
The ICU boolean type.
Definition: umachine.h:234
C++ API: Common ICU base class UObject.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition: uobject.h:91
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:357
double UDate
Date and Time data type.
Definition: utypes.h:201
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:129