gender.h
Go to the documentation of this file.
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2008-2013, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
*
* File GENDER.H
*
* Modification History:*
* Date Name Description
*
********************************************************************************
*/
#ifndef _GENDER
#define _GENDER
#include "unicode/utypes.h"
#if U_SHOW_CPLUSPLUS_API
#if !UCONFIG_NO_FORMATTING
#include "unicode/locid.h"
#include "unicode/ugender.h"
#include "unicode/uobject.h"
class GenderInfoTest;
U_NAMESPACE_BEGIN
void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
class U_I18N_API GenderInfo : public UObject {
public:
static const GenderInfo* U_EXPORT2 getInstance(const Locale& locale, UErrorCode& status);
UGender getListGender(const UGender* genders, int32_t length, UErrorCode& status) const;
virtual ~GenderInfo();
private:
int32_t _style;
GenderInfo(const GenderInfo& other) = delete;
GenderInfo& operator=(const GenderInfo&) = delete;
GenderInfo();
static const GenderInfo* getNeutralInstance();
static const GenderInfo* getMixedNeutralInstance();
static const GenderInfo* getMaleTaintsInstance();
static const GenderInfo* loadInstance(const Locale& locale, UErrorCode& status);
friend class ::GenderInfoTest;
friend void U_CALLCONV GenderInfo_initCache(UErrorCode &status);
};
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif /* U_SHOW_CPLUSPLUS_API */
#endif // _GENDER
//eof
icu::GenderInfo
GenderInfo computes the gender of a list as a whole given the gender of each element.
Definition gender.h:48
icu::GenderInfo::getInstance
static const GenderInfo * getInstance(const Locale &locale, UErrorCode &status)
Provides access to the predefined GenderInfo object for a given locale.
icu::GenderInfo::GenderInfo_initCache
friend void GenderInfo_initCache(UErrorCode &status)
icu::GenderInfo::~GenderInfo
virtual ~GenderInfo()
Destructor.
icu::GenderInfo::getListGender
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.
icu::LocalPointerBase
"Smart pointer" base class; do not use directly: use LocalPointer etc.
Definition localpointer.h:68
icu::Locale
A Locale object represents a specific geographical, political, or cultural region.
Definition locid.h:195
icu::UObject
UObject is the common ICU "boilerplate" class.
Definition uobject.h:223
locid.h
C++ API: Locale ID object.
icu::GenderInfo_initCache
void GenderInfo_initCache(UErrorCode &status)
U_CALLCONV
#define U_CALLCONV
Similar to U_CDECL_BEGIN/U_CDECL_END, this qualifier is necessary in callback function typedefs to ma...
Definition platform.h:846
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...
UGender
UGender
Genders.
Definition ugender.h:32
uobject.h
C++ API: Common ICU base class UObject.
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition utypes.h:430
U_I18N_API
#define U_I18N_API
Set to export library symbols from inside the i18n library, and to import them from outside.
Definition utypes.h:316