PopObjectFactory Class Reference

Factory for SimObjects within population. More...

#include <PopObjectFactory.h>

Inheritance diagram for PopObjectFactory:

Inheritance graph
[legend]
Collaboration diagram for PopObjectFactory:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PopObjectFactory (SimObjectFactory const &model)
 PopObjectFactory (SimObjectVariationFactory const &model)
virtual ~PopObjectFactory ()
void set (string const &fieldname, RandomDistribution const &rd)
 Set the specified RandomDistribution for the given field.
void set (string const &fieldname, PopObjectValueGenerator const &rd)
 Set the specified PopObjectValueGenerator for the given field.
virtual void announce (SimObjectPopulation &pop, size_t idx)
 Tell the factory about the population and the index with the population for which the next object hast to be created.
virtual SimObjectcreate (RandomEngine *eng) const
 Return a pointer to a newly created SimObject using the factories number engine (use setRandomEngine to specify).
virtual SimObjectcreate () const
 Return a pointer to a newly created SimObject using the factories number engine (use setRandomEngine to specify).

Protected Types

typedef map< string,
FieldGeneratorPair * > 
value_generators_t

Protected Attributes

size_t m_idx
value_generators_t m_value_generators

Classes

struct  FieldGeneratorPair


Detailed Description

Factory for SimObjects within population.

Definition at line 20 of file PopObjectFactory.h.


Member Typedef Documentation

typedef map< string, FieldGeneratorPair* > PopObjectFactory::value_generators_t [protected]

Definition at line 59 of file PopObjectFactory.h.


Constructor & Destructor Documentation

PopObjectFactory::PopObjectFactory ( SimObjectFactory const &  model  ) 

Definition at line 26 of file PopObjectFactory.cpp.

PopObjectFactory::PopObjectFactory ( SimObjectVariationFactory const &  model  ) 

Definition at line 19 of file PopObjectFactory.cpp.

PopObjectFactory::~PopObjectFactory (  )  [virtual]

Definition at line 33 of file PopObjectFactory.cpp.

References m_value_generators.


Member Function Documentation

void PopObjectFactory::set ( string const &  fieldname,
RandomDistribution const &  rd 
)

Set the specified RandomDistribution for the given field.

Reimplemented from SimObjectVariationFactory.

Definition at line 43 of file PopObjectFactory.cpp.

References SimObjectVariationFactory::set().

Here is the call graph for this function:

void PopObjectFactory::set ( string const &  fieldname,
PopObjectValueGenerator const &  rd 
)

Set the specified PopObjectValueGenerator for the given field.

Definition at line 49 of file PopObjectFactory.cpp.

References PopObjectValueGenerator::clone(), SimObject::findField(), SimObjectVariationFactory::m_base, and m_value_generators.

Here is the call graph for this function:

void PopObjectFactory::announce ( SimObjectPopulation pop,
size_t  idx 
) [virtual]

Tell the factory about the population and the index with the population for which the next object hast to be created.

Reimplemented in PopObjectAttributeFactory.

Definition at line 69 of file PopObjectFactory.cpp.

References m_value_generators, and SimObjectVariationFactory::rnd_eng.

Referenced by PopObjectAttributeFactory::announce().

SimObject * PopObjectFactory::create ( RandomEngine eng  )  const [virtual]

Return a pointer to a newly created SimObject using the factories number engine (use setRandomEngine to specify).

Reimplemented from SimObjectVariationFactory.

Definition at line 82 of file PopObjectFactory.cpp.

References SimObjectVariationFactory::create(), m_value_generators, and SimObject::setScalarField().

Here is the call graph for this function:

SimObject * PopObjectFactory::create ( void   )  const [virtual]

Return a pointer to a newly created SimObject using the factories number engine (use setRandomEngine to specify).

Reimplemented from SimObjectVariationFactory.

Definition at line 100 of file PopObjectFactory.cpp.

References SimObjectVariationFactory::rnd_eng.

Referenced by PopObjectAttributeFactory::create().


Member Data Documentation

Definition at line 44 of file PopObjectFactory.h.

Definition at line 60 of file PopObjectFactory.h.

Referenced by announce(), create(), set(), and ~PopObjectFactory().


The documentation for this class was generated from the following files:

Generated on Wed Jul 9 16:34:52 2008 for PCSIM by  doxygen 1.5.5