ICU 63.1  63.1
gender.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-2013, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 *******************************************************************************
8 *
9 *
10 * File GENDER.H
11 *
12 * Modification History:*
13 * Date Name Description
14 *
15 ********************************************************************************
16 */
17 
18 #ifndef _GENDER
19 #define _GENDER
20 
26 #include "unicode/utypes.h"
27 
28 #if !UCONFIG_NO_FORMATTING
29 
30 #include "unicode/locid.h"
31 #include "unicode/ugender.h"
32 #include "unicode/uobject.h"
33 
34 class GenderInfoTest;
35 
37 
40 
46 class U_I18N_API GenderInfo : public UObject {
47 public:
48 
63  static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status);
64 
76  UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const;
77 
83  virtual ~GenderInfo();
84 
85 private:
86  int32_t _style;
87 
92  GenderInfo(const GenderInfo& other);
93 
97  GenderInfo& operator=(const GenderInfo&);
98 
99  GenderInfo();
100 
101  static const GenderInfo* getNeutralInstance();
102 
103  static const GenderInfo* getMixedNeutralInstance();
104 
105  static const GenderInfo* getMaleTaintsInstance();
106 
107  static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status);
108 
109  friend class ::GenderInfoTest;
110  friend void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
111 };
112 
114 
115 #endif /* #if !UCONFIG_NO_FORMATTING */
116 
117 #endif // _GENDER
118 //eof
C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each...
void GenderInfo_initCache(UErrorCode &status)
UGender
Genders.
Definition: ugender.h:30
GenderInfo computes the gender of a list as a whole given the gender of each element.
Definition: gender.h:46
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition: platform.h:840
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:301
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:137
C++ API: Common ICU base class UObject.
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition: uversion.h:138
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:401
C++ API: Locale ID object.
Basic definitions for ICU, for both C and C++ APIs.
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:220
A Locale object represents a specific geographical, political, or cultural region.
Definition: locid.h:192