Loading...
Searching...
No Matches
ugender.h File Reference

C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each element. More...

`#include "unicode/utypes.h"`
`#include "unicode/localpointer.h"`

Go to the source code of this file.

## Typedefs

typedef enum UGender | UGender
typedef struct UGenderInfo | UGenderInfo
| Opaque UGenderInfo object for use in C programs.

## Enumerations

enum | UGender { UGENDER_MALE , UGENDER_FEMALE , UGENDER_OTHER }
| Genders. More...

## Functions

U_CAPI const UGenderInfo * | ugender_getInstance (const char *locale, UErrorCode *status)
| Opens a new UGenderInfo object given locale.
U_CAPI UGender | ugender_getListGender (const UGenderInfo *genderInfo, const UGender *genders, int32_t size, UErrorCode *status)
| Given a list, returns the gender of the list as a whole.

## Detailed Description

C API: The purpose of this API is to compute the gender of a list as a whole given the gender of each element.

Definition in file ugender.h.

## Typedef Documentation

## UGender

typedef enum UGender UGender

Stable
  ICU 50

Definition at line 52 of file ugender.h.

## UGenderInfo

typedef struct UGenderInfo UGenderInfo

Opaque UGenderInfo object for use in C programs.

Stable
  ICU 50

Definition at line 59 of file ugender.h.

## Enumeration Type Documentation

## UGender

enum UGender

Genders.

Stable
  ICU 50

Enumerator

UGENDER_MALE

Male gender.

Stable
  ICU 50

UGENDER_FEMALE

Female gender.

Stable
  ICU 50

UGENDER_OTHER

Neutral gender.

Stable
  ICU 50

Definition at line 32 of file ugender.h.

## Function Documentation

## ugender_getInstance()

U_CAPI const UGenderInfo * ugender_getInstance | ( | const char * | locale,
|  | UErrorCode * | status )

Opens a new UGenderInfo object given locale.

Parameters

  locale | The locale for which the rules are desired.
  status | UErrorCode pointer

Returns
  A UGenderInfo for the specified locale, or NULL if an error occurred.

Stable
  ICU 50

References U_CAPI.

## ugender_getListGender()

U_CAPI UGender ugender_getListGender | ( | const UGenderInfo * | genderInfo,
|  | const UGender * | genders,
|  | int32_t | size,
|  | UErrorCode * | status )

Given a list, returns the gender of the list as a whole.

Parameters

  genderInfo | pointer that ugender_getInstance returns.
  genders | the gender of each element in the list.
  size | the size of the list.
  status | A pointer to a UErrorCode to receive any errors.

Returns
  The gender of the list.

Stable
  ICU 50