00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************* 00005 * Copyright (C) 2008-2009, International Business Machines Corporation and 00006 * others. All Rights Reserved. 00007 ******************************************************************************* 00008 * 00009 * File DTINTRV.H 00010 * 00011 ******************************************************************************* 00012 */ 00013 00014 #ifndef __DTINTRV_H__ 00015 #define __DTINTRV_H__ 00016 00017 #include "unicode/utypes.h" 00018 00019 #if U_SHOW_CPLUSPLUS_API 00020 00021 #include "unicode/uobject.h" 00022 00028 U_NAMESPACE_BEGIN 00029 00030 00036 class U_COMMON_API DateInterval : public UObject { 00037 public: 00038 00045 DateInterval(UDate fromDate, UDate toDate); 00046 00051 virtual ~DateInterval(); 00052 00058 inline UDate getFromDate() const; 00059 00065 inline UDate getToDate() const; 00066 00067 00079 static UClassID U_EXPORT2 getStaticClassID(void); 00080 00092 virtual UClassID getDynamicClassID(void) const; 00093 00094 00099 DateInterval(const DateInterval& other); 00100 00105 DateInterval& operator=(const DateInterval&); 00106 00112 virtual UBool operator==(const DateInterval& other) const; 00113 00119 inline UBool operator!=(const DateInterval& other) const; 00120 00121 00128 virtual DateInterval* clone() const; 00129 00130 private: 00134 DateInterval(); 00135 00136 UDate fromDate; 00137 UDate toDate; 00138 00139 } ;// end class DateInterval 00140 00141 00142 inline UDate 00143 DateInterval::getFromDate() const { 00144 return fromDate; 00145 } 00146 00147 00148 inline UDate 00149 DateInterval::getToDate() const { 00150 return toDate; 00151 } 00152 00153 00154 inline UBool 00155 DateInterval::operator!=(const DateInterval& other) const { 00156 return ( !operator==(other) ); 00157 } 00158 00159 00160 U_NAMESPACE_END 00161 00162 #endif /* U_SHOW_CPLUSPLUS_API */ 00163 00164 #endif
1.6.1