Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Factory Class Reference

Public Member Functions

 __init__ (self)
 
 create (self, type, *args, **kwArgs)
 
 nullCtor (self, *args, **kwArgs)
 

Static Public Attributes

 notify = directNotify.newCategory('Factory')
 

Protected Member Functions

 _registerType (self, type, ctor)
 
 _registerTypes (self, type2ctor)
 

Protected Attributes

 _type2ctor
 

Detailed Description

This class manages a list of object types and their corresponding constructors.
Objects may be created on-demand from their type. Object types may be any hashable
piece of unique data (such as a string).

This class is intended to be derived from. Subclasses should call self._registerTypes
to set up type constructors.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self)

Member Function Documentation

◆ _registerType()

_registerType ( self,
type,
ctor )
protected

◆ _registerTypes()

_registerTypes ( self,
type2ctor )
protected

◆ create()

create ( self,
type,
* args,
** kwArgs )

◆ nullCtor()

nullCtor ( self,
* args,
** kwArgs )

Member Data Documentation

◆ _type2ctor

_type2ctor
protected

◆ notify

notify = directNotify.newCategory('Factory')
static