1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
4 *****************************************************************************************
5 * Copyright (C) 2010-2013, International Business Machines
6 * Corporation and others. All Rights Reserved.
7 *****************************************************************************************
13 #include "unicode/utypes.h"
15 #if !UCONFIG_NO_FORMATTING
17 #if U_SHOW_CPLUSPLUS_API
18 #include "unicode/localpointer.h"
19 #endif // U_SHOW_CPLUSPLUS_API
23 * \brief C API: The purpose of this API is to compute the gender of a list as a
24 * whole given the gender of each element.
52 typedef enum UGender UGender;
56 * Opaque UGenderInfo object for use in C programs.
59 typedef struct UGenderInfo UGenderInfo;
62 * Opens a new UGenderInfo object given locale.
63 * @param locale The locale for which the rules are desired.
64 * @param status UErrorCode pointer
65 * @return A UGenderInfo for the specified locale, or NULL if an error occurred.
68 U_CAPI const UGenderInfo* U_EXPORT2
69 ugender_getInstance(const char *locale, UErrorCode *status);
73 * Given a list, returns the gender of the list as a whole.
74 * @param genderInfo pointer that ugender_getInstance returns.
75 * @param genders the gender of each element in the list.
76 * @param size the size of the list.
77 * @param status A pointer to a UErrorCode to receive any errors.
78 * @return The gender of the list.
81 U_CAPI UGender U_EXPORT2
82 ugender_getListGender(const UGenderInfo* genderInfo, const UGender *genders, int32_t size, UErrorCode *status);
84 #endif /* #if !UCONFIG_NO_FORMATTING */