Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

FactoryParams Class Reference

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>

List of all members.

Public Member Functions

 FactoryParams ()
 ~FactoryParams ()
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.

FactoryParamget_param (int n) const
 Returns the nth parameter that has been added to the set.

FactoryParamget_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.


Private Types

typedef pvector< PointerTo<
TypedReferenceCount > > 
Params

Private Attributes

Params _params


Detailed Description

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 58 of file factoryParams.h.


Member Typedef Documentation

typedef pvector< PointerTo< TypedReferenceCount > > FactoryParams::Params [private]
 

Definition at line 72 of file factoryParams.h.


Constructor & Destructor Documentation

FactoryParams::FactoryParams  ) 
 

Definition at line 32 of file factoryParams.cxx.

FactoryParams::~FactoryParams  ) 
 

Definition at line 43 of file factoryParams.cxx.

References _params, nassertv, and NULL.


Member Function Documentation

void FactoryParams::add_param FactoryParam param  ) 
 

Definition at line 54 of file factoryParams.cxx.

References _params.

Referenced by BamReader::finalize_now().

void FactoryParams::clear void   ) 
 

Removes all parameters from the set.

Definition at line 68 of file factoryParams.cxx.

References _params.

int FactoryParams::get_num_params  )  const
 

Returns the number of parameters that have been added to the set.

Definition at line 83 of file factoryParams.cxx.

References _params.

FactoryParam * FactoryParams::get_param int  n  )  const
 

Returns the nth parameter that has been added to the set.

Definition at line 98 of file factoryParams.cxx.

Referenced by BamReader::get_current_minor_ver().

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 118 of file factoryParams.cxx.


Member Data Documentation

Params FactoryParams::_params [private]
 

Definition at line 74 of file factoryParams.h.

Referenced by add_param(), clear(), get_num_params(), and ~FactoryParams().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:50:36 2003 for Panda by doxygen1.3