ICU 57.1 57.1
gender.h
1/*
2*******************************************************************************
3* Copyright (C) 2008-2013, International Business Machines Corporation and
4* others. All Rights Reserved.
5*******************************************************************************
6*
7*
8* File GENDER.H
9*
10* Modification History:*
11* Date Name Description
12*
13********************************************************************************
14*/
15
16#ifndef _GENDER
17#define _GENDER
18
19#include "unicode/utypes.h"
20
21#if !UCONFIG_NO_FORMATTING
22
23#include "unicode/locid.h"
24#include "unicode/ugender.h"
25#include "unicode/uobject.h"
26
27class GenderInfoTest;
28
30
31// Forward Declaration
32void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
33
39class U_I18N_API GenderInfo : public UObject {
40public:
41
56 static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status);
57
69 UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const;
70
76 virtual ~GenderInfo();
77
78private:
79 int32_t _style;
80
85 GenderInfo(const GenderInfo& other);
86
90 GenderInfo& operator=(const GenderInfo&);
91
92 GenderInfo();
93
94 static const GenderInfo* getNeutralInstance();
95
96 static const GenderInfo* getMixedNeutralInstance();
97
98 static const GenderInfo* getMaleTaintsInstance();
99
100 static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status);
101
102 friend class ::GenderInfoTest;
103 friend void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
104};
105
107
108#endif /* #if !UCONFIG_NO_FORMATTING */
109
110#endif // _GENDER
111//eof
UGender getListGender(const UGender *genders, int32_t length, UErrorCode &status) const
Determines the gender of a list as a whole given the gender of each of the elements.
static const GenderInfo * getInstance(const Locale &locale, UErrorCode &status)
Provides access to the predefined GenderInfo object for a given locale.
virtual ~GenderInfo()
Destructor.
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:185
UObject is the common ICU "boilerplate" class.
Definition uobject.h:221
C++ API: Locale ID object.
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition platform.h:848
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:28
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
Error code to replace exception handling, so that the code is compatible with all C++ compilers,...
Definition utypes.h:476
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:358
#define U_NAMESPACE_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:130
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:129