]>
git.saurik.com Git - apple/icu.git/blob - icuSources/i18n/unicode/gender.h
2 *******************************************************************************
3 * Copyright (C) 2008-2013, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 *******************************************************************************
10 * Modification History:*
11 * Date Name Description
13 ********************************************************************************
19 #include "unicode/utypes.h"
21 #if !UCONFIG_NO_FORMATTING
22 #ifndef U_HIDE_DRAFT_API
24 #include "unicode/locid.h"
25 #include "unicode/ugender.h"
26 #include "unicode/uobject.h"
33 * GenderInfo computes the gender of a list as a whole given the gender of
37 class U_I18N_API GenderInfo
: public UObject
{
41 * Provides access to the predefined GenderInfo object for a given
44 * @param locale The locale for which a <code>GenderInfo</code> object is
46 * @param status Output param set to success/failure code on exit, which
47 * must not indicate a failure before the function call.
48 * @return The predefined <code>GenderInfo</code> object pointer for
49 * this locale. The returned object is immutable, so it is
50 * declared as const. Caller does not own the returned
51 * pointer, so it must not attempt to free it.
54 static const GenderInfo
* U_EXPORT2
getInstance(const Locale
& locale
, UErrorCode
& status
);
57 * Determines the gender of a list as a whole given the gender of each
60 * @param genders the gender of each element in the list.
61 * @param length the length of gender array.
62 * @param status Output param set to success/failure code on exit, which
63 * must not indicate a failure before the function call.
64 * @return the gender of the whole list.
67 UGender
getListGender(const UGender
* genders
, int32_t length
, UErrorCode
& status
) const;
74 virtual ~GenderInfo();
80 * Copy constructor. One object per locale invariant. Clients
81 * must never copy GenderInfo objects.
83 GenderInfo(const GenderInfo
& other
);
86 * Assignment operator. Not applicable to immutable objects.
88 GenderInfo
& operator=(const GenderInfo
&);
92 static const GenderInfo
* getNeutralInstance();
94 static const GenderInfo
* getMixedNeutralInstance();
96 static const GenderInfo
* getMaleTaintsInstance();
98 static const GenderInfo
* loadInstance(const Locale
& locale
, UErrorCode
& status
);
99 friend class ::GenderInfoTest
;
104 #endif /* U_HIDE_DRAFT_API */
105 #endif /* #if !UCONFIG_NO_FORMATTING */