Instance Methods | Class Methods | Properties | List of all members
GPBEnumDescriptor Class Reference

#import <GPBDescriptor.h>

Inheritance diagram for GPBEnumDescriptor:
Inheritance graph
[legend]

Instance Methods

(nullable NSString *) - enumNameForValue:
 
(nullable NSString *) - enumNameForValue:
 
(nullable NSString *) - getEnumNameForIndex:
 
(nullable NSString *) - getEnumNameForIndex:
 
(nullable NSString *) - getEnumTextFormatNameForIndex:
 
(nullable NSString *) - getEnumTextFormatNameForIndex:
 
(BOOL- getValue:forEnumName:
 
(BOOL- getValue:forEnumName:
 
(BOOL- getValue:forEnumTextFormatName:
 
(BOOL- getValue:forEnumTextFormatName:
 
(instancetype) - initWithName:valueNames:values:count:enumVerifier: [implementation]
 
(instancetype) - initWithName:valueNames:values:count:enumVerifier: [implementation]
 
(nullable NSString *) - textFormatNameForValue:
 
(nullable NSString *) - textFormatNameForValue:
 

Class Methods

(instancetype) + allocDescriptorForName:valueNames:values:count:enumVerifier: [implementation]
 
(instancetype) + allocDescriptorForName:valueNames:values:count:enumVerifier: [implementation]
 
(instancetype) + allocDescriptorForName:valueNames:values:count:enumVerifier:extraTextFormatInfo: [implementation]
 
(instancetype) + allocDescriptorForName:valueNames:values:count:enumVerifier:extraTextFormatInfo: [implementation]
 

Properties

uint32_t enumNameCount
 
GPBEnumValidationFunc enumVerifier
 
NSString * name
 

Detailed Description

Describes a proto enum.

Definition at line 216 of file bloaty/third_party/protobuf/objectivec/GPBDescriptor.h.

Method Documentation

◆ allocDescriptorForName:valueNames:values:count:enumVerifier: [1/2]

+ (instancetype) allocDescriptorForName: (NSString *)  name
valueNames: (const char *)  valueNames
values: (const int32_t *)  values
count: (uint32_t valueCount
enumVerifier: (GPBEnumValidationFunc enumVerifier 
implementation

◆ allocDescriptorForName:valueNames:values:count:enumVerifier: [2/2]

+ (instancetype) allocDescriptorForName: (NSString *)  name
valueNames: (const char *)  valueNames
values: (const int32_t *)  values
count: (uint32_t valueCount
enumVerifier: (GPBEnumValidationFunc enumVerifier 
implementation

◆ allocDescriptorForName:valueNames:values:count:enumVerifier:extraTextFormatInfo: [1/2]

+ (instancetype) allocDescriptorForName: (NSString *)  name
valueNames: (const char *)  valueNames
values: (const int32_t *)  values
count: (uint32_t valueCount
enumVerifier: (GPBEnumValidationFunc enumVerifier
extraTextFormatInfo: (const char *)  extraTextFormatInfo 
implementation

◆ allocDescriptorForName:valueNames:values:count:enumVerifier:extraTextFormatInfo: [2/2]

+ (instancetype) allocDescriptorForName: (NSString *)  name
valueNames: (const char *)  valueNames
values: (const int32_t *)  values
count: (uint32_t valueCount
enumVerifier: (GPBEnumValidationFunc enumVerifier
extraTextFormatInfo: (const char *)  extraTextFormatInfo 
implementation

◆ enumNameForValue: [1/2]

- (nullable NSString *) enumNameForValue: (int32_t number

Returns the enum value name for the given raw enum.

Note that there can be more than one name corresponding to a given value if the allow_alias option is used.

Parameters
numberThe raw enum value.
Returns
The first name that matches the enum value passed, or nil if not valid.

◆ enumNameForValue: [2/2]

- (nullable NSString *) enumNameForValue: (int32_t number

Returns the enum value name for the given raw enum.

Note that there can be more than one name corresponding to a given value if the allow_alias option is used.

Parameters
numberThe raw enum value.
Returns
The first name that matches the enum value passed, or nil if not valid.

◆ getEnumNameForIndex: [1/2]

- (nullable NSString *) getEnumNameForIndex: (uint32_t index

Gets the enum name corresponding to the given index.

Parameters
indexIndex into the available names. The defined range is from 0 to self.enumNameCount - 1.
Returns
The enum name at the given index, or nil if the index is out of range.

◆ getEnumNameForIndex: [2/2]

- (nullable NSString *) getEnumNameForIndex: (uint32_t index

Gets the enum name corresponding to the given index.

Parameters
indexIndex into the available names. The defined range is from 0 to self.enumNameCount - 1.
Returns
The enum name at the given index, or nil if the index is out of range.

◆ getEnumTextFormatNameForIndex: [1/2]

- (nullable NSString *) getEnumTextFormatNameForIndex: (uint32_t index

Gets the enum text format name corresponding to the given index.

Parameters
indexIndex into the available names. The defined range is from 0 to self.enumNameCount - 1.
Returns
The text format name at the given index, or nil if the index is out of range.

◆ getEnumTextFormatNameForIndex: [2/2]

- (nullable NSString *) getEnumTextFormatNameForIndex: (uint32_t index

Gets the enum text format name corresponding to the given index.

Parameters
indexIndex into the available names. The defined range is from 0 to self.enumNameCount - 1.
Returns
The text format name at the given index, or nil if the index is out of range.

◆ getValue:forEnumName: [1/2]

- (BOOL) getValue: (nullable int32_t *)  outValue
forEnumName: (NSString *)  name 

Gets the enum raw value for the given enum name.

Parameters
outValueA pointer where the value will be set.
nameThe enum name for which to get the raw value.
Returns
YES if a value was copied into the pointer, NO otherwise.

◆ getValue:forEnumName: [2/2]

- (BOOL) getValue: (nullable int32_t *)  outValue
forEnumName: (NSString *)  name 

Gets the enum raw value for the given enum name.

Parameters
outValueA pointer where the value will be set.
nameThe enum name for which to get the raw value.
Returns
YES if a value was copied into the pointer, NO otherwise.

◆ getValue:forEnumTextFormatName: [1/2]

- (BOOL) getValue: (nullable int32_t *)  outValue
forEnumTextFormatName: (NSString *)  textFormatName 

Gets the enum raw value for the given text format name.

Parameters
outValueA pointer where the value will be set.
textFormatNameThe text format name for which to get the raw value.
Returns
YES if a value was copied into the pointer, NO otherwise.

◆ getValue:forEnumTextFormatName: [2/2]

- (BOOL) getValue: (nullable int32_t *)  outValue
forEnumTextFormatName: (NSString *)  textFormatName 

Gets the enum raw value for the given text format name.

Parameters
outValueA pointer where the value will be set.
textFormatNameThe text format name for which to get the raw value.
Returns
YES if a value was copied into the pointer, NO otherwise.

◆ initWithName:valueNames:values:count:enumVerifier: [1/2]

- (instancetype) initWithName: (NSString *)  name
valueNames: (const char *)  valueNames
values: (const int32_t *)  values
count: (uint32_t valueCount
enumVerifier: (GPBEnumValidationFunc enumVerifier 
implementation

◆ initWithName:valueNames:values:count:enumVerifier: [2/2]

- (instancetype) initWithName: (NSString *)  name
valueNames: (const char *)  valueNames
values: (const int32_t *)  values
count: (uint32_t valueCount
enumVerifier: (GPBEnumValidationFunc enumVerifier 
implementation

◆ textFormatNameForValue: [1/2]

- (nullable NSString *) textFormatNameForValue: (int32_t number

Returns the text format for the given raw enum value.

Parameters
numberThe raw enum value.
Returns
The first text format name which matches the enum value, or nil if not valid.

◆ textFormatNameForValue: [2/2]

- (nullable NSString *) textFormatNameForValue: (int32_t number

Returns the text format for the given raw enum value.

Parameters
numberThe raw enum value.
Returns
The first text format name which matches the enum value, or nil if not valid.

Property Documentation

◆ enumNameCount

- (uint32_t) enumNameCount
readnonatomicassign

Gets the number of defined enum names.

Returns
Count of the number of enum names, including any aliases.

Definition at line 269 of file bloaty/third_party/protobuf/objectivec/GPBDescriptor.h.

◆ enumVerifier

- (GPBEnumValidationFunc) enumVerifier
readnonatomicassign

Function that validates that raw values are valid enum values.

Definition at line 221 of file bloaty/third_party/protobuf/objectivec/GPBDescriptor.h.

◆ name

- (NSString *) name
readnonatomiccopy

Name of the enum.

Definition at line 219 of file bloaty/third_party/protobuf/objectivec/GPBDescriptor.h.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:45