(namespace, data)
| 295 | return classname |
| 296 | |
| 297 | def outputenums(namespace, data): |
| 298 | for enum in data['enums']: |
| 299 | if(len(enum) > 0 and len(enum['enumname'])): |
| 300 | ns = getnamespace(enum['enumname']) |
| 301 | enumname = getclasswithoutnamespace(enum['enumname']) |
| 302 | if(ns == namespace or (namespace == '' and ns[:1] == 'I')): |
| 303 | print('public enum '+enumname+'\n{') |
| 304 | enumNameWithoutE = enumname |
| 305 | if( enumname.startswith( "E" ) ): |
| 306 | enumNameWithoutE = enumname[1:] |
| 307 | for enumvalue in enum['values']: |
| 308 | entry = enumvalue['name'] |
| 309 | if(entry.startswith(enumname)): entry = entry[len(enumname):] # strip off enum name |
| 310 | if(entry.startswith(enumNameWithoutE)): entry = entry[len(enumNameWithoutE):] # strip off enum name |
| 311 | if(entry.startswith('_')): entry = entry[1:] # strip off leading underscore |
| 312 | print('\t'+entry+' = '+enumvalue['value']+',') |
| 313 | print('}') |
| 314 | |
| 315 | def outputstructfields(struct, data): |
| 316 |
nothing calls this directly
no test coverage detected