Panda3D
Public Member Functions | Public Attributes | List of all members
FunctionSpecification Class Reference
Inheritance diagram for FunctionSpecification:
GlobalFunctionSpecification MethodSpecification

Public Member Functions

def __init__ (self)
 
def getFinalName (self)
 
def isConstructor (self)
 
def isStatic (self)
 
def outputCFunctionComment (self, file, nesting)
 
def outputOverloadedCall (self, file, classTypeDesc, numArgs)
 
def outputTypeChecking (self, methodClass, args, file, nesting)
 

Public Attributes

 constructor
 
 index
 
 name
 
 overloaded
 
 typeDescriptor
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)

Member Function Documentation

◆ getFinalName()

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)"

◆ isConstructor()

def isConstructor (   self)

◆ isStatic()

def isStatic (   self)

◆ outputCFunctionComment()

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.

◆ outputOverloadedCall()

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

◆ outputTypeChecking()

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

Member Data Documentation

◆ constructor

constructor

◆ index

index

◆ name

name

◆ overloaded

overloaded

◆ typeDescriptor

typeDescriptor