OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::FacWorld Class Reference

#include <opentrep/factory/FacWorld.hpp>

+ Inheritance diagram for OPENTREP::FacWorld:

Public Types

typedef std::vector
< BomAbstract * > 
BomPool_T
 

Public Member Functions

virtual ~FacWorld ()
 
Worldcreate ()
 
Worldclone (const World &)
 

Static Public Member Functions

static FacWorldinstance ()
 
static void linkPlaceToWorld (const bool iNeedsGeneric, World &, Place &)
 
static std::size_t getID (const BomAbstract *)
 
static std::size_t getID (const BomAbstract &)
 
static std::string getIDString (const BomAbstract *)
 
static std::string getIDString (const BomAbstract &)
 

Protected Attributes

BomPool_T _pool
 

Detailed Description

Factory for World.

Definition at line 17 of file FacWorld.hpp.

Member Typedef Documentation

typedef std::vector<BomAbstract*> OPENTREP::FacBomAbstract::BomPool_T
inherited

Define the list (pool) of Bom objects.

Definition at line 22 of file FacBomAbstract.hpp.

Constructor & Destructor Documentation

OPENTREP::FacWorld::~FacWorld ( )
virtual

Destructor.
The Destruction put the _instance to NULL in order to be clean for the next FacWorld::instance()

Definition at line 21 of file FacWorld.cpp.

Member Function Documentation

FacWorld & OPENTREP::FacWorld::instance ( )
static

Provide the unique instance.
The singleton is instantiated when first used

Returns
FacWorld&

Definition at line 26 of file FacWorld.cpp.

References OPENTREP::FacSupervisor::instance(), and OPENTREP::FacSupervisor::registerBomFactory().

World & OPENTREP::FacWorld::create ( )

Create a new World object.
This new object is added to the list of instantiated objects.

Returns
World& The newly created object.

Definition at line 38 of file FacWorld.cpp.

References OPENTREP::FacBomAbstract::_pool.

void OPENTREP::FacWorld::linkPlaceToWorld ( const bool  iNeedsGeneric,
World ioWorld,
Place ioPlace 
)
static
World & OPENTREP::FacWorld::clone ( const World iWorld)

Create a copy of a World object.
This new object is added to the list of instantiated objects.

Returns
World& The newly created object.

Definition at line 90 of file FacWorld.cpp.

References OPENTREP::FacBomAbstract::_pool.

std::size_t OPENTREP::FacBomAbstract::getID ( const BomAbstract iBomAbstract_ptr)
staticinherited

Return the ID corresponding to the given object pointer.

Definition at line 36 of file FacBomAbstract.cpp.

Referenced by OPENTREP::FacBomAbstract::getID(), and OPENTREP::FacBomAbstract::getIDString().

std::size_t OPENTREP::FacBomAbstract::getID ( const BomAbstract iBomAbstract)
staticinherited

Return the ID corresponding to the given object reference.

Definition at line 44 of file FacBomAbstract.cpp.

References OPENTREP::FacBomAbstract::getID().

std::string OPENTREP::FacBomAbstract::getIDString ( const BomAbstract iBomAbstract_ptr)
staticinherited

Return the ID, as a string, corresponding to the given object pointer.

Definition at line 49 of file FacBomAbstract.cpp.

References OPENTREP::FacBomAbstract::getID().

Referenced by OPENTREP::FacBomAbstract::getIDString().

std::string OPENTREP::FacBomAbstract::getIDString ( const BomAbstract iBomAbstract)
staticinherited

Return the ID, as a string, corresponding to the given object reference.

Definition at line 57 of file FacBomAbstract.cpp.

References OPENTREP::FacBomAbstract::getIDString().

Member Data Documentation


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