(namespace, data)
| 578 | print("};\n"); |
| 579 | |
| 580 | def outputfntabledecls(namespace, data): |
| 581 | lastclass = '' |
| 582 | lastmethod = '' |
| 583 | fntablename = '' |
| 584 | for method in data['methods']: |
| 585 | if (len(method) > 0): |
| 586 | returntype = method['returntype'] |
| 587 | if(returntype == 'class CSteamID'): |
| 588 | returntype = 'uint64' |
| 589 | methodname = method['methodname'] |
| 590 | if(methodname == lastmethod): |
| 591 | methodname = methodname + repr(count) |
| 592 | count = count + 1 |
| 593 | else: |
| 594 | count = 0 |
| 595 | lastmethod = method['methodname'] |
| 596 | |
| 597 | classname = method['classname'] |
| 598 | |
| 599 | if(namespace != getnamespace(classname)): |
| 600 | continue |
| 601 | |
| 602 | # Skip over destructors, we don't use any aside from dummy ones, and |
| 603 | # destroying our interfaces would be broken anyway. |
| 604 | if(methodname[:8] == 'Destruct'): |
| 605 | continue |
| 606 | |
| 607 | classname = getclasswithoutnamespace(classname) |
| 608 | if(classname != lastclass): |
| 609 | if(lastclass != ''): |
| 610 | print("};\n\n"); |
| 611 | |
| 612 | fntablename = method['classname'].replace('vr::', 'VR::').replace('::', '_') + '_FnTable' |
| 613 | print("static " + fntablename + " g_" + fntablename + " =\n{") |
| 614 | lastclass = classname |
| 615 | |
| 616 | print('\t&' + fntablename + '_' + methodname + ',') |
| 617 | |
| 618 | print("};\n\n"); |
| 619 | |
| 620 | def outputfntableinit(namespace, data): |
| 621 | print("extern void *FindInterface( const char *pchInterfaceName );\n") |
nothing calls this directly
no test coverage detected