michael@0: /* michael@0: ***************************************************************************************** michael@0: * Copyright (C) 2010-2013, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ***************************************************************************************** michael@0: */ michael@0: michael@0: #ifndef UGENDER_H michael@0: #define UGENDER_H michael@0: michael@0: #include "unicode/utypes.h" michael@0: michael@0: #if !UCONFIG_NO_FORMATTING michael@0: michael@0: #include "unicode/localpointer.h" michael@0: michael@0: /** michael@0: * \file michael@0: * \brief C API: The purpose of this API is to compute the gender of a list as a michael@0: * whole given the gender of each element. michael@0: * michael@0: */ michael@0: michael@0: /** michael@0: * Genders michael@0: * @stable ICU 50 michael@0: */ michael@0: enum UGender { michael@0: /** michael@0: * Male gender. michael@0: * @stable ICU 50 michael@0: */ michael@0: UGENDER_MALE, michael@0: /** michael@0: * Female gender. michael@0: * @stable ICU 50 michael@0: */ michael@0: UGENDER_FEMALE, michael@0: /** michael@0: * Neutral gender. michael@0: * @stable ICU 50 michael@0: */ michael@0: UGENDER_OTHER michael@0: }; michael@0: /** michael@0: * @stable ICU 50 michael@0: */ michael@0: typedef enum UGender UGender; michael@0: michael@0: /** michael@0: * Opaque UGenderInfo object for use in C programs. michael@0: * @stable ICU 50 michael@0: */ michael@0: struct UGenderInfo; michael@0: typedef struct UGenderInfo UGenderInfo; michael@0: michael@0: /** michael@0: * Opens a new UGenderInfo object given locale. michael@0: * @param locale The locale for which the rules are desired. michael@0: * @param status UErrorCode pointer michael@0: * @return A UGenderInfo for the specified locale, or NULL if an error occurred. michael@0: * @stable ICU 50 michael@0: */ michael@0: U_STABLE const UGenderInfo* U_EXPORT2 michael@0: ugender_getInstance(const char *locale, UErrorCode *status); michael@0: michael@0: michael@0: /** michael@0: * Given a list, returns the gender of the list as a whole. michael@0: * @param genderInfo pointer that ugender_getInstance returns. michael@0: * @param genders the gender of each element in the list. michael@0: * @param size the size of the list. michael@0: * @param status A pointer to a UErrorCode to receive any errors. michael@0: * @return The gender of the list. michael@0: * @stable ICU 50 michael@0: */ michael@0: U_STABLE UGender U_EXPORT2 michael@0: ugender_getListGender(const UGenderInfo* genderinfo, const UGender *genders, int32_t size, UErrorCode *status); michael@0: michael@0: #endif /* #if !UCONFIG_NO_FORMATTING */ michael@0: michael@0: #endif