ICU 50.2 50.2
gender.h
1/*
2*******************************************************************************
3* Copyright (C) 2008-2012, 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
36class U_I18N_API GenderInfo : public UObject {
37public:
38
53 static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status);
54
66 UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const;
67
74 virtual ~GenderInfo();
75
76private:
77 int32_t _style;
78
79
83 virtual UClassID getDynamicClassID() const;
84
89 GenderInfo(const GenderInfo& other);
90
94 GenderInfo& operator=(const GenderInfo&);
95
96 GenderInfo();
97
98 static const GenderInfo* getNeutralInstance();
99
100 static const GenderInfo* getMixedNeutralInstance();
101
102 static const GenderInfo* getMaleTaintsInstance();
103
104 static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status);
105 friend class ::GenderInfoTest;
106};
107
109
110#endif /* #if !UCONFIG_NO_FORMATTING */
111
112#endif // _GENDER
113//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:182
UObject is the common ICU "boilerplate" class.
Definition uobject.h:229
virtual UClassID getDynamicClassID() const =0
ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.
C++ API: Locale ID object.
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.
void * UClassID
UClassID is used to identify classes without using the compiler's RTTI.
Definition uobject.h:96
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