|
ICU 73.2
73.2
|
00001 // © 2016 and later: Unicode, Inc. and others. 00002 // License & terms of use: http://www.unicode.org/copyright.html 00003 /* 00004 ******************************************************************************** 00005 * Copyright (C) 1997-2006, International Business Machines 00006 * Corporation and others. All Rights Reserved. 00007 ******************************************************************************** 00008 * 00009 * File FIELDPOS.H 00010 * 00011 * Modification History: 00012 * 00013 * Date Name Description 00014 * 02/25/97 aliu Converted from java. 00015 * 03/17/97 clhuang Updated per Format implementation. 00016 * 07/17/98 stephen Added default/copy ctors, and operators =, ==, != 00017 ******************************************************************************** 00018 */ 00019 00020 // ***************************************************************************** 00021 // This file was generated from the java source file FieldPosition.java 00022 // ***************************************************************************** 00023 00024 #ifndef FIELDPOS_H 00025 #define FIELDPOS_H 00026 00027 #include "unicode/utypes.h" 00028 00029 #if U_SHOW_CPLUSPLUS_API 00030 00036 #if !UCONFIG_NO_FORMATTING 00037 00038 #include "unicode/uobject.h" 00039 00040 U_NAMESPACE_BEGIN 00041 00110 class U_I18N_API FieldPosition : public UObject { 00111 public: 00117 enum { DONT_CARE = -1 }; 00118 00123 FieldPosition() 00124 : UObject(), fField(DONT_CARE), fBeginIndex(0), fEndIndex(0) {} 00125 00137 FieldPosition(int32_t field) 00138 : UObject(), fField(field), fBeginIndex(0), fEndIndex(0) {} 00139 00145 FieldPosition(const FieldPosition& copy) 00146 : UObject(copy), fField(copy.fField), fBeginIndex(copy.fBeginIndex), fEndIndex(copy.fEndIndex) {} 00147 00152 virtual ~FieldPosition(); 00153 00159 FieldPosition& operator=(const FieldPosition& copy); 00160 00167 bool operator==(const FieldPosition& that) const; 00168 00175 bool operator!=(const FieldPosition& that) const; 00176 00188 FieldPosition *clone() const; 00189 00195 int32_t getField(void) const { return fField; } 00196 00202 int32_t getBeginIndex(void) const { return fBeginIndex; } 00203 00211 int32_t getEndIndex(void) const { return fEndIndex; } 00212 00218 void setField(int32_t f) { fField = f; } 00219 00225 void setBeginIndex(int32_t bi) { fBeginIndex = bi; } 00226 00232 void setEndIndex(int32_t ei) { fEndIndex = ei; } 00233 00239 virtual UClassID getDynamicClassID() const override; 00240 00246 static UClassID U_EXPORT2 getStaticClassID(); 00247 00248 private: 00253 int32_t fField; 00254 00259 int32_t fBeginIndex; 00260 00265 int32_t fEndIndex; 00266 }; 00267 00268 inline FieldPosition& 00269 FieldPosition::operator=(const FieldPosition& copy) 00270 { 00271 fField = copy.fField; 00272 fEndIndex = copy.fEndIndex; 00273 fBeginIndex = copy.fBeginIndex; 00274 return *this; 00275 } 00276 00277 inline bool 00278 FieldPosition::operator==(const FieldPosition& copy) const 00279 { 00280 return (fField == copy.fField && 00281 fEndIndex == copy.fEndIndex && 00282 fBeginIndex == copy.fBeginIndex); 00283 } 00284 00285 inline bool 00286 FieldPosition::operator!=(const FieldPosition& copy) const 00287 { 00288 return !operator==(copy); 00289 } 00290 00291 U_NAMESPACE_END 00292 00293 #endif /* #if !UCONFIG_NO_FORMATTING */ 00294 00295 #endif /* U_SHOW_CPLUSPLUS_API */ 00296 00297 #endif // _FIELDPOS 00298 //eof
1.7.6.1