MCPcopy Create free account
hub / github.com/apache/fory / get_enum_value_names

Method get_enum_value_names

compiler/fory_compiler/generators/cpp.py:516–521  ·  view source on GitHub ↗

Get enum value names without the enum prefix.

(self, enum: Enum)

Source from the content-addressed store, hash-verified

514 return False
515
516 def get_enum_value_names(self, enum: Enum) -> List[str]:
517 """Get enum value names without the enum prefix."""
518 stripped_names = []
519 for value in enum.values:
520 stripped_names.append(self.strip_enum_prefix(enum.name, value.name))
521 return stripped_names
522
523 def generate_enum_definition(self, enum: Enum, indent: str = "") -> List[str]:
524 """Generate a C++ enum class definition."""

Callers 1

generate_enum_macroMethod · 0.95

Calls 2

strip_enum_prefixMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected