ConnObjectFactory Class Reference

#include <ConnObjectFactory.h>

Inheritance diagram for ConnObjectFactory:

Inheritance graph
[legend]
Collaboration diagram for ConnObjectFactory:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConnObjectFactory (SimObjectFactory const &model)
 ConnObjectFactory (SimObjectVariationFactory const &model)
virtual ~ConnObjectFactory ()
void set (string const &fieldname, RandomDistribution const &rd)
 Set the specified RandomDistribution for the given field.
void set (string const &fieldname, ConnObjectValueGenerator const &val_gen)
 Set the specified ConnObjectValueGenerator for the given field.
virtual void init (const SimObjectPopulation &src_pop, size_t src_idx, const SimObjectPopulation &dst_pop, size_t dst_idx)
 Tell the factory about the poulation and the index with the population for which the next object hast to be created.
virtual SimObjectcreate () const
 Return a pointer to a newly created SimObject using the factory.
virtual SimObjectcreate (RandomEngine *eng) 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_src_idx
size_t m_dst_idx
value_generators_t m_value_generators

Classes

struct  FieldGeneratorPair


Detailed Description

Definition at line 20 of file ConnObjectFactory.h.


Member Typedef Documentation

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

Definition at line 61 of file ConnObjectFactory.h.


Constructor & Destructor Documentation

ConnObjectFactory::ConnObjectFactory ( SimObjectFactory const &  model  ) 

Definition at line 19 of file ConnObjectFactory.cpp.

ConnObjectFactory::ConnObjectFactory ( SimObjectVariationFactory const &  model  ) 

Definition at line 24 of file ConnObjectFactory.cpp.

ConnObjectFactory::~ConnObjectFactory (  )  [virtual]

Definition at line 29 of file ConnObjectFactory.cpp.

References m_value_generators.


Member Function Documentation

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

Set the specified RandomDistribution for the given field.

Associates the field named fieldname of the SimObject with the RandomDistribution object, such that values for this parameter are generated from the RandomDistribution.

Reimplemented from SimObjectVariationFactory.

Definition at line 38 of file ConnObjectFactory.cpp.

References SimObjectVariationFactory::set().

Here is the call graph for this function:

void ConnObjectFactory::set ( string const &  fieldname,
ConnObjectValueGenerator const &  val_gen 
)

Set the specified ConnObjectValueGenerator for the given field.

Definition at line 43 of file ConnObjectFactory.cpp.

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

Here is the call graph for this function:

void ConnObjectFactory::init ( const SimObjectPopulation src_pop,
size_t  src_idx,
const SimObjectPopulation dst_pop,
size_t  dst_idx 
) [virtual]

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

Definition at line 61 of file ConnObjectFactory.cpp.

References m_dst_idx, m_src_idx, m_value_generators, and SimObjectVariationFactory::rnd_eng.

Referenced by SimpleAllToAllWiringMethod::connect(), OneToOneWiringMethod::connect(), and DistributedSyncWiringMethod::connect().

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

Return a pointer to a newly created SimObject using the factory.

Reimplemented from SimObjectVariationFactory.

Definition at line 94 of file ConnObjectFactory.cpp.

References SimObjectVariationFactory::rnd_eng.

SimObject * ConnObjectFactory::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 77 of file ConnObjectFactory.cpp.

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

Here is the call graph for this function:


Member Data Documentation

Definition at line 45 of file ConnObjectFactory.h.

Referenced by create(), and init().

Definition at line 46 of file ConnObjectFactory.h.

Referenced by create(), and init().

Definition at line 62 of file ConnObjectFactory.h.

Referenced by create(), init(), set(), and ~ConnObjectFactory().


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

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