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
29class GenderInfoTest;
30
32
33// Forward Declaration
34void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
35
42public:
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
80private:
81 int32_t _style;
82
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
GenderInfo computes the gender of a list as a whole given the gender of each element.
Definition gender.h:41
static const GenderInfo * getInstance(const Locale &locale, UErrorCode &status)
Provides access to the predefined GenderInfo object for a given locale.
virtual ~GenderInfo()
Destructor.
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.
"Smart pointer" base class; do not use directly: use LocalPointer etc.
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:188
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
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:835
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
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:396
#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_END
This is used to end a declaration of a public ICU C++ API.
Definition uversion.h:138
#define U_NAMESPACE_BEGIN
This is used to begin a declaration of a public ICU C++ API.
Definition uversion.h:137