Panda3D
|
Public Member Functions | |
def | __init__ |
def | getFinalName |
def | isConstructor |
def | isStatic |
def | outputCFunctionComment |
def | outputOverloadedCall |
def | outputTypeChecking |
Public Attributes | |
constructor | |
index | |
name | |
overloaded | |
typeDescriptor |
def __init__ | ( | self | ) |
Reimplemented in GlobalFunctionSpecification, and MethodSpecification.
def getFinalName | ( | self | ) |
Return the name of the function given that it might be overloaded If it is overloaded, prepend "overloaded", then append the types of each argument to make it unique. So "getChild(int)" becomes "overloaded_getChild_int(int)"
def isConstructor | ( | self | ) |
def isStatic | ( | self | ) |
def outputCFunctionComment | ( | self, | |
file, | |||
nesting | |||
) |
Output a docstring to the file describing the C++ call with type info Also output the C++ comment from interrogate.
def outputOverloadedCall | ( | self, | |
file, | |||
classTypeDesc, | |||
numArgs | |||
) |
Write the function call to call this overloaded method For example: self.overloaded_setPos_ptrNodePath_float_float_float(*_args) If it is a class (static) method, call the class method Class.overloaded_setPos_ptrNodePath_float_float_float(*_args) Constructors are not treated as static. They are special because they are not really constructors, they are instance methods that fill in the this pointer. These do not get indented because they are not the beginning of the line If classTypeDesc is None, then this is a global function and should output code as such
def outputTypeChecking | ( | self, | |
methodClass, | |||
args, | |||
file, | |||
nesting | |||
) |
Output an assert statement to check the type of each arg in this method This can be turned off with a command line parameter in generatePythonCode It is valid to pass in None for methodClass if you are not in any methodClass