#include <PopObjectFactory.h>
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 SimObject * | create (RandomEngine *eng) const |
Return a pointer to a newly created SimObject using the factories number engine (use setRandomEngine to specify). | |
virtual SimObject * | create () 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 |
Definition at line 20 of file PopObjectFactory.h.
typedef map< string, FieldGeneratorPair* > PopObjectFactory::value_generators_t [protected] |
Definition at line 59 of file PopObjectFactory.h.
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] |
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().
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.
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().
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().
size_t PopObjectFactory::m_idx [protected] |
Definition at line 44 of file PopObjectFactory.h.
Definition at line 60 of file PopObjectFactory.h.
Referenced by announce(), create(), set(), and ~PopObjectFactory().