intl/icu/source/i18n/unicode/ugender.h

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

michael@0 1 /*
michael@0 2 *****************************************************************************************
michael@0 3 * Copyright (C) 2010-2013, International Business Machines
michael@0 4 * Corporation and others. All Rights Reserved.
michael@0 5 *****************************************************************************************
michael@0 6 */
michael@0 7
michael@0 8 #ifndef UGENDER_H
michael@0 9 #define UGENDER_H
michael@0 10
michael@0 11 #include "unicode/utypes.h"
michael@0 12
michael@0 13 #if !UCONFIG_NO_FORMATTING
michael@0 14
michael@0 15 #include "unicode/localpointer.h"
michael@0 16
michael@0 17 /**
michael@0 18 * \file
michael@0 19 * \brief C API: The purpose of this API is to compute the gender of a list as a
michael@0 20 * whole given the gender of each element.
michael@0 21 *
michael@0 22 */
michael@0 23
michael@0 24 /**
michael@0 25 * Genders
michael@0 26 * @stable ICU 50
michael@0 27 */
michael@0 28 enum UGender {
michael@0 29 /**
michael@0 30 * Male gender.
michael@0 31 * @stable ICU 50
michael@0 32 */
michael@0 33 UGENDER_MALE,
michael@0 34 /**
michael@0 35 * Female gender.
michael@0 36 * @stable ICU 50
michael@0 37 */
michael@0 38 UGENDER_FEMALE,
michael@0 39 /**
michael@0 40 * Neutral gender.
michael@0 41 * @stable ICU 50
michael@0 42 */
michael@0 43 UGENDER_OTHER
michael@0 44 };
michael@0 45 /**
michael@0 46 * @stable ICU 50
michael@0 47 */
michael@0 48 typedef enum UGender UGender;
michael@0 49
michael@0 50 /**
michael@0 51 * Opaque UGenderInfo object for use in C programs.
michael@0 52 * @stable ICU 50
michael@0 53 */
michael@0 54 struct UGenderInfo;
michael@0 55 typedef struct UGenderInfo UGenderInfo;
michael@0 56
michael@0 57 /**
michael@0 58 * Opens a new UGenderInfo object given locale.
michael@0 59 * @param locale The locale for which the rules are desired.
michael@0 60 * @param status UErrorCode pointer
michael@0 61 * @return A UGenderInfo for the specified locale, or NULL if an error occurred.
michael@0 62 * @stable ICU 50
michael@0 63 */
michael@0 64 U_STABLE const UGenderInfo* U_EXPORT2
michael@0 65 ugender_getInstance(const char *locale, UErrorCode *status);
michael@0 66
michael@0 67
michael@0 68 /**
michael@0 69 * Given a list, returns the gender of the list as a whole.
michael@0 70 * @param genderInfo pointer that ugender_getInstance returns.
michael@0 71 * @param genders the gender of each element in the list.
michael@0 72 * @param size the size of the list.
michael@0 73 * @param status A pointer to a UErrorCode to receive any errors.
michael@0 74 * @return The gender of the list.
michael@0 75 * @stable ICU 50
michael@0 76 */
michael@0 77 U_STABLE UGender U_EXPORT2
michael@0 78 ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders, int32_t size, UErrorCode *status);
michael@0 79
michael@0 80 #endif /* #if !UCONFIG_NO_FORMATTING */
michael@0 81
michael@0 82 #endif

mercurial