MCPcopy Create free account
hub / github.com/Kitware/CMake / __convert_enum

Function __convert_enum

Source/cmConvertMSBuildXMLToJSON.py:243–261  ·  view source on GitHub ↗

Converts an EnumProperty node to JSON format.

(node)

Source from the content-addressed store, hash-verified

241
242
243def __convert_enum(node):
244 """Converts an EnumProperty node to JSON format."""
245 name = __get_attribute(node, 'Name')
246 logging.debug('Found EnumProperty named %s', name)
247
248 converted_values = []
249
250 for value in node.getElementsByTagName('EnumValue'):
251 converted = __convert_node(value)
252
253 converted['value'] = converted['name']
254 converted['name'] = name
255
256 # Modify flags when there is an argument child
257 __with_argument(value, converted)
258
259 converted_values.append(converted)
260
261 return converted_values
262
263
264def __convert_bool(node):

Callers

nothing calls this directly

Calls 4

__get_attributeFunction · 0.85
__convert_nodeFunction · 0.85
__with_argumentFunction · 0.85
appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…