Panda3D
|
An instance of this class is passed to the Factory when requesting it to do its business and construct a new something. More...
#include "factoryParams.h"
Public Member Functions | |
void | add_param (FactoryParam *param) |
void | clear () |
Removes all parameters from the set. | |
int | get_num_params () const |
Returns the number of parameters that have been added to the set. | |
FactoryParam * | get_param (int n) const |
Returns the nth parameter that has been added to the set. | |
FactoryParam * | get_param_of_type (TypeHandle type) const |
Returns the first parameter that matches exactly the indicated type, or if there are no exact matches, returns the first one that derives from the indicated type. |
An instance of this class is passed to the Factory when requesting it to do its business and construct a new something.
It can be filled with optional parameters to the CreateFunc for the particular subclass the Factory will be creating.
This is just a vector of pointers to *something*; it will be up to the individual CreateFuncs to interpret this meaningfully.
Definition at line 40 of file factoryParams.h.
void FactoryParams::clear | ( | ) |
Removes all parameters from the set.
Definition at line 52 of file factoryParams.cxx.
int FactoryParams::get_num_params | ( | ) | const |
Returns the number of parameters that have been added to the set.
Definition at line 63 of file factoryParams.cxx.
FactoryParam * FactoryParams::get_param | ( | int | n | ) | const |
Returns the nth parameter that has been added to the set.
Definition at line 74 of file factoryParams.cxx.
FactoryParam * FactoryParams::get_param_of_type | ( | TypeHandle | type | ) | const |
Returns the first parameter that matches exactly the indicated type, or if there are no exact matches, returns the first one that derives from the indicated type.
If no parameters match at all, returns NULL.
Definition at line 88 of file factoryParams.cxx.
References TypedObject::is_exact_type(), and TypedObject::is_of_type().