#include <RndmGenSvc.h>
Inheritance diagram for RndmGenSvc:

Public Methods | |
| StatusCode | queryInterface (const IID& riid, void** ppvInterface) |
| Query interface. More... | |
| virtual StatusCode | initialize () |
| Service override: initialisation. More... | |
| virtual StatusCode | finalize () |
| Service override: finalisation. More... | |
| virtual StreamBuffer& | serialize (StreamBuffer& str) |
| Input serialisation from stream buffer. Restores the status of the generator engine. More... | |
| virtual StreamBuffer& | serialize (StreamBuffer& str) const |
| Output serialisation to stream buffer. Saves the status of the generator engine. More... | |
| virtual IRndmEngine* | engine () |
| Retrieve engine. More... | |
| virtual StatusCode | addFactory (const IRndmGenFactory* fac) |
| Add a Generator factory. More... | |
| virtual StatusCode | removeFactory (const IID& type) |
| Remove a Generator factory. More... | |
| virtual StatusCode | generator (const IRndmGen::Param& par, IRndmGen*& refpGen) |
| Retrieve a valid generator from the service. More... | |
| virtual double | rndm () const |
| Single shot returning single random number. More... | |
| virtual StatusCode | rndmArray ( std::vector<double>& array, long howmany, long start = 0) const |
| Multiple shots returning vector with flat random numbers. More... | |
| virtual StatusCode | setSeeds (const std::vector<long>& seeds) |
| Allow to set new seeds. More... | |
| virtual StatusCode | seeds (std::vector<long>& seeds) const |
| Allow to get seeds. More... | |
Protected Methods | |
| RndmGenSvc (const std::string& name, ISvcLocator* svc) | |
| Standard Service constructor. More... | |
| virtual | ~RndmGenSvc () |
| Standard Service destructor. More... | |
| StatusCode | createGenerator (const IRndmGenFactory* pFactory, const IRndmGen::Param& par, IRndmGen*& refpGen) |
| Create new Generator from known factory. More... | |
| const IRndmGenFactory* | factory (const IID& type) |
| StatusCode | requestFactory (const IID& type, const IRndmGenFactory*& refpFactory) |
Private Types | |
| typedef std::vector<const IRndmGenFactory*> | FactoryContainer |
| Container definition. More... | |
Private Attributes | |
| IRndmEngine* | m_engine |
| Random number engine. More... | |
| ISerialize* | m_serialize |
| Serialization interface of random number engine. More... | |
| FactoryContainer | m_factories |
| Container with factories. More... | |
| std::string | m_engineName |
| Engine name. More... | |
Friends | |
| class | SvcFactory< RndmGenSvc > |
Description: Definition of a interface for a service to access random generators according to predefined distributions. For more detailed explanations please see the interface definition.
Dependencies:
History :
+---------+----------------------------------------------+--------+
| Date | Comment | Who |
+---------+----------------------------------------------+--------+
| 21/04/99| Initial version. | MF |
+---------+----------------------------------------------+--------+
Author: M.Frank Version: 1.0
Definition at line 52 of file RndmGenSvc.h.
|
|
Container definition.
Definition at line 58 of file RndmGenSvc.h. |
|
|
Standard Service constructor.
Definition at line 39 of file RndmGenSvc.cpp. |
|
|
Standard Service destructor.
Definition at line 46 of file RndmGenSvc.cpp. |
|
|
Add a Generator factory.
Definition at line 146 of file RndmGenSvc.cpp. Referenced by generator(). |
|
|
Create new Generator from known factory.
Definition at line 230 of file RndmGenSvc.cpp. Referenced by generator(). |
|
|
Retrieve engine.
Definition at line 141 of file RndmGenSvc.cpp. Referenced by initialize(). |
|
|
Definition at line 195 of file RndmGenSvc.cpp. Referenced by generator(). |
|
|
Service override: finalisation.
Definition at line 106 of file RndmGenSvc.cpp. |
|
|
Retrieve a valid generator from the service.
Definition at line 173 of file RndmGenSvc.cpp. |
|
|
Service override: initialisation.
Definition at line 68 of file RndmGenSvc.cpp. |
|
|
Query interface.
Definition at line 50 of file RndmGenSvc.cpp. |
|
|
Remove a Generator factory.
Definition at line 162 of file RndmGenSvc.cpp. |
|
|
Definition at line 205 of file RndmGenSvc.cpp. Referenced by generator(). |
|
|
Single shot returning single random number.
Definition at line 250 of file RndmGenSvc.cpp. |
|
|
Multiple shots returning vector with flat random numbers.
Definition at line 263 of file RndmGenSvc.cpp. |
|
|
Allow to get seeds.
Definition at line 279 of file RndmGenSvc.cpp. |
|
|
Output serialisation to stream buffer. Saves the status of the generator engine.
Definition at line 131 of file RndmGenSvc.cpp. |
|
|
Input serialisation from stream buffer. Restores the status of the generator engine.
Definition at line 121 of file RndmGenSvc.cpp. |
|
|
Allow to set new seeds.
Definition at line 271 of file RndmGenSvc.cpp. |
|
|
Only the factory is allowed to create this service.
Definition at line 55 of file RndmGenSvc.h. |
|
|
Random number engine.
Definition at line 60 of file RndmGenSvc.h. |
|
|
Engine name.
Definition at line 66 of file RndmGenSvc.h. |
|
|
Container with factories.
Definition at line 64 of file RndmGenSvc.h. |
|
|
Serialization interface of random number engine.
Definition at line 62 of file RndmGenSvc.h. |
1.2.3 written by Dimitri van Heesch,
© 1997-2000