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

Factory for Bucket. More...

#include <opentrep/factory/FacOpenTrepServiceContext.hpp>

+ Inheritance diagram for OPENTREP::FacOpenTrepServiceContext:

Public Types

typedef std::vector
< ServiceAbstract * > 
ServicePool_T
 

Public Member Functions

 ~FacOpenTrepServiceContext ()
 
OPENTREP_ServiceContextcreate (const TravelDBFilePath_T &, const SQLiteDBFilePath_T &)
 
OPENTREP_ServiceContextcreate (const PORFilePath_T &, const TravelDBFilePath_T &, const SQLiteDBFilePath_T &)
 
void clean ()
 

Static Public Member Functions

static FacOpenTrepServiceContextinstance ()
 

Protected Member Functions

 FacOpenTrepServiceContext ()
 

Protected Attributes

ServicePool_T _pool
 

Detailed Description

Factory for Bucket.

Definition at line 19 of file FacOpenTrepServiceContext.hpp.

Member Typedef Documentation

Define the list (pool) of Service objects.

Definition at line 20 of file FacServiceAbstract.hpp.

Constructor & Destructor Documentation

OPENTREP::FacOpenTrepServiceContext::~FacOpenTrepServiceContext ( )

Destructor.

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

Definition at line 17 of file FacOpenTrepServiceContext.cpp.

OPENTREP::FacOpenTrepServiceContext::FacOpenTrepServiceContext ( )
inlineprotected

Default Constructor.

This constructor is protected in order to ensure the singleton pattern.

Definition at line 71 of file FacOpenTrepServiceContext.hpp.

Referenced by instance().

Member Function Documentation

FacOpenTrepServiceContext & OPENTREP::FacOpenTrepServiceContext::instance ( )
static

Provide the unique instance.

The singleton is instantiated when first used

Returns
FacOpentrepServiceContext&

Definition at line 22 of file FacOpenTrepServiceContext.cpp.

References FacOpenTrepServiceContext(), OPENTREP::FacSupervisor::instance(), and OPENTREP::FacSupervisor::registerServiceFactory().

OPENTREP_ServiceContext & OPENTREP::FacOpenTrepServiceContext::create ( const TravelDBFilePath_T iTravelDBFilePath,
const SQLiteDBFilePath_T iSQLiteDBFilePath 
)

Create a new OPENTREP_ServiceContext object.

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

Parameters
constTravelDBFilePath_T& File-path of the Xapian database.
constSQLiteDBFilePath_T& File-path of the SQLite3 database.
Returns
OPENTREP_ServiceContext& The newly created object.

Definition at line 35 of file FacOpenTrepServiceContext.cpp.

References OPENTREP::FacServiceAbstract::_pool.

OPENTREP_ServiceContext & OPENTREP::FacOpenTrepServiceContext::create ( const PORFilePath_T iPORFilePath,
const TravelDBFilePath_T iTravelDBFilePath,
const SQLiteDBFilePath_T iSQLiteDBFilePath 
)

Create a new OPENTREP_ServiceContext object.

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

Parameters
constPORFilePath_T& File-path of the POR file.
constTravelDBFilePath_T& File-path of the Xapian database.
constSQLiteDBFilePath_T& File-path of the SQLite3 database.
Returns
OPENTREP_ServiceContext& The newly created object.

Definition at line 51 of file FacOpenTrepServiceContext.cpp.

References OPENTREP::FacServiceAbstract::_pool.

void OPENTREP::FacServiceAbstract::clean ( )
inherited

Destroyed all the object instantiated by this factory.

Definition at line 18 of file FacServiceAbstract.cpp.

References OPENTREP::FacServiceAbstract::_pool.

Referenced by OPENTREP::FacServiceAbstract::~FacServiceAbstract().

Member Data Documentation

ServicePool_T OPENTREP::FacServiceAbstract::_pool
protectedinherited

List of instantiated Business Objects

Definition at line 34 of file FacServiceAbstract.hpp.

Referenced by OPENTREP::FacServiceAbstract::clean(), and create().


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