ICU 59.1  59.1
gender.h
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 
21 #include "unicode/utypes.h"
22 
23 #if !UCONFIG_NO_FORMATTING
24 
25 #include "unicode/locid.h"
26 #include "unicode/ugender.h"
27 #include "unicode/uobject.h"
28 
29 class GenderInfoTest;
30 
32 
33 // Forward Declaration
34 void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
35 
41 class U_I18N_API GenderInfo : public UObject {
42 public:
43 
58  static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status);
59 
71  UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const;
72 
78  virtual ~GenderInfo();
79 
80 private:
81  int32_t _style;
82 
87  GenderInfo(const GenderInfo& other);
88 
92  GenderInfo& operator=(const GenderInfo&);
93 
94  GenderInfo();
95 
96  static const GenderInfo* getNeutralInstance();
97 
98  static const GenderInfo* getMixedNeutralInstance();
99 
100  static const GenderInfo* getMaleTaintsInstance();
101 
102  static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status);
103 
104  friend class ::GenderInfoTest;
105  friend void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
106 };
107 
109 
110 #endif /* #if !UCONFIG_NO_FORMATTING */
111 
112 #endif // _GENDER
113 //eof
C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each...
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:41
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition: platform.h:871
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside...
Definition: utypes.h:360
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition: uversion.h:131
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:132
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers...
Definition: utypes.h:396
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:223
A Locale object represents a specific geographical, political, or cultural region.
Definition: locid.h:188