ICU 62.1  62.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
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
U_I18N_API
#define U_I18N_API
Definition: utypes.h:360
U_CALLCONV
#define U_CALLCONV
Definition: platform.h:836
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition: uobject.h:223
UErrorCode
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition: utypes.h:396
ugender.h
C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each...
locid.h
C++ API: Locale ID object.
uobject.h
C++ API: Common ICU base class UObject.
icu::GenderInfo
GenderInfo computes the gender of a list as a whole given the gender of each element.
Definition: gender.h:41
U_NAMESPACE_END
#define U_NAMESPACE_END
Definition: uversion.h:138
U_NAMESPACE_BEGIN
#define U_NAMESPACE_BEGIN
Definition: uversion.h:137
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition: locid.h:188
UGender
UGender
Genders.
Definition: ugender.h:30