MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / loadfile

Function loadfile

codegen/api_shared.py:18–38  ·  view source on GitHub ↗
(filename, ns)

Source from the content-addressed store, hash-verified

16structindices = {}
17
18def loadfile(filename, ns):
19 with open(filename) as data_file:
20 data = json.load(data_file)
21
22 i = 0
23 for struct in data['structs']:
24 if(len(struct) > 0 and len(struct['struct'])):
25 structname = struct['struct']
26 structlist[structname] = 'struct'
27 structindices[getclasswithoutnamespace(structname)] = i
28 i += 1
29
30 for typedef in data['typedefs']:
31 if(len(typedef) > 0 and len(typedef['typedef'])):
32 typedeflist[typedef['typedef']] = typedef['type']
33 for enum in data['enums']:
34 enumname = enum['enumname']
35 namespace = getnamespace(enumname)
36 if(len(enum) > 0 and len(enum['enumname'])):
37 enumlist[enum['enumname'].replace('::','_')] = enum['enumname']
38 return data
39
40
41def paramshavelength(params, paramname):

Callers

nothing calls this directly

Calls 2

getclasswithoutnamespaceFunction · 0.85
getnamespaceFunction · 0.85

Tested by

no test coverage detected