OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
OPENTREP::FacPlace Class Reference

#include <opentrep/factory/FacPlace.hpp>

+ Inheritance diagram for OPENTREP::FacPlace:

Public Types

typedef std::vector< BomAbstract * > BomPool_T
 

Public Member Functions

virtual ~FacPlace ()
 
Placecreate ()
 
Placecreate (const LocationKey &)
 
Placecreate (const Location &)
 
Placeclone (const Place &)
 

Static Public Member Functions

static FacPlaceinstance ()
 
static void initLinkWithExtraPlace (Place &, Place &)
 
static void initLinkWithAlternatePlace (Place &, 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 Place.

Definition at line 20 of file FacPlace.hpp.

Member Typedef Documentation

◆ BomPool_T

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

◆ ~FacPlace()

OPENTREP::FacPlace::~FacPlace ( )
virtual

Destructor.

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

Definition at line 24 of file FacPlace.cpp.

Member Function Documentation

◆ instance()

FacPlace & OPENTREP::FacPlace::instance ( )
static

Provide the unique instance.

The singleton is instantiated when first used

Returns
FacPlace&

Definition at line 29 of file FacPlace.cpp.

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

Referenced by OPENTREP::createPlaces().

◆ create() [1/3]

Place & OPENTREP::FacPlace::create ( )

Create a new Place object.

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

Returns
Place& The newly created object.

Definition at line 41 of file FacPlace.cpp.

References OPENTREP::FacBomAbstract::_pool.

Referenced by OPENTREP::createPlaces().

◆ create() [2/3]

Place & OPENTREP::FacPlace::create ( const LocationKey & iLocationKey)

Create a new Place object.

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

Parameters
constLocationKey& The primary key (IATA and ICAO codes, Geonames ID) of the place
Returns
Place& The newly created object.

Definition at line 54 of file FacPlace.cpp.

References OPENTREP::FacBomAbstract::_pool.

◆ create() [3/3]

Place & OPENTREP::FacPlace::create ( const Location & iLocation)

Create a new Place object.

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

Parameters
constLocation& The primary key (IATA and ICAO codes, Geonames ID) of the place
Returns
Place& The newly created object.

Definition at line 67 of file FacPlace.cpp.

References OPENTREP::FacBomAbstract::_pool.

◆ clone()

Place & OPENTREP::FacPlace::clone ( const Place & iPlace)

Create a copy of a Place object.

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

Returns
Place& The newly created object.

Definition at line 80 of file FacPlace.cpp.

References OPENTREP::FacBomAbstract::_pool.

◆ initLinkWithExtraPlace()

void OPENTREP::FacPlace::initLinkWithExtraPlace ( Place & ioMainPlace,
Place & ioExtraPlace )
static

Initialise the link between a Place and an extra Place.

Parameters
Place&Main Place object.
Place&Extra Place object.
Exceptions
FacExceptionNullPointer
FacException.

Definition at line 93 of file FacPlace.cpp.

◆ initLinkWithAlternatePlace()

void OPENTREP::FacPlace::initLinkWithAlternatePlace ( Place & ioMainPlace,
Place & ioAlternatePlace )
static

Initialise the link between a Place and an alternate Place.

Parameters
Place&Main Place object.
Place&Alternate Place object.
Exceptions
FacExceptionNullPointer
FacException.

Definition at line 104 of file FacPlace.cpp.

◆ getID() [1/2]

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 getID(), and getIDString().

◆ getID() [2/2]

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 getID().

◆ getIDString() [1/2]

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 getID().

Referenced by getIDString().

◆ getIDString() [2/2]

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 getIDString().

Member Data Documentation

◆ _pool


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