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

Function __convert_bool

Source/cmConvertMSBuildXMLToJSON.py:264–284  ·  view source on GitHub ↗

Converts an BoolProperty node to JSON format.

(node)

Source from the content-addressed store, hash-verified

262
263
264def __convert_bool(node):
265 """Converts an BoolProperty node to JSON format."""
266 converted = __convert_node(node, default_value='true')
267
268 # Check for a switch for reversing the value
269 reverse_switch = __get_attribute(node, 'ReverseSwitch')
270
271 if reverse_switch:
272 __with_argument(node, converted)
273
274 converted_reverse = copy.deepcopy(converted)
275
276 converted_reverse['switch'] = reverse_switch
277 converted_reverse['value'] = 'false'
278
279 return [converted_reverse, converted]
280
281 # Modify flags when there is an argument child
282 __with_argument(node, converted)
283
284 return __check_for_flag(converted)
285
286
287def __convert_string_list(node):

Callers

nothing calls this directly

Calls 4

__convert_nodeFunction · 0.85
__get_attributeFunction · 0.85
__with_argumentFunction · 0.85
__check_for_flagFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…