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