Factory for an OPENTREP_ServiceContext object. More...
#include <opentrep/factory/FacOpenTrepServiceContext.hpp>
Public Types | |
typedef std::vector< ServiceAbstract * > | ServicePool_T |
Public Member Functions | |
~FacOpenTrepServiceContext () | |
OPENTREP_ServiceContext & | create (const TravelDBFilePath_T &, const DBType &, const SQLDBConnectionString_T &, const DeploymentNumber_T &) |
OPENTREP_ServiceContext & | create (const PORFilePath_T &, const TravelDBFilePath_T &, const DBType &, const SQLDBConnectionString_T &, const DeploymentNumber_T &, const shouldIndexNonIATAPOR_T &, const shouldIndexPORInXapian_T &, const shouldAddPORInSQLDB_T &) |
void | clean () |
Static Public Member Functions | |
static FacOpenTrepServiceContext & | instance () |
Protected Member Functions | |
FacOpenTrepServiceContext () | |
Protected Attributes | |
ServicePool_T | _pool |
Factory for an OPENTREP_ServiceContext object.
Definition at line 20 of file FacOpenTrepServiceContext.hpp.
|
inherited |
Define the list (pool) of Service objects.
Definition at line 20 of file FacServiceAbstract.hpp.
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.
|
inlineprotected |
Default Constructor.
This constructor is protected in order to ensure the singleton pattern.
Definition at line 88 of file FacOpenTrepServiceContext.hpp.
Referenced by instance().
|
static |
Provide the unique instance.
The singleton is instantiated when first used
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 DBType & | iSQLDBType, | ||
const SQLDBConnectionString_T & | iSQLDBConnStr, | ||
const DeploymentNumber_T & | iDeploymentNumber ) |
Create a new OPENTREP_ServiceContext object for search-related services.
This new object is added to the list of instantiated objects.
const | TravelDBFilePath_T& File-path of the Xapian database. |
const | DBType& SQL database type (can be no database at all). |
const | SQLDBConnectionString_T& SQL DB connection string. |
const | DeploymentNumber_T& Deployment number. |
Definition at line 34 of file FacOpenTrepServiceContext.cpp.
References OPENTREP::FacServiceAbstract::_pool.
OPENTREP_ServiceContext & OPENTREP::FacOpenTrepServiceContext::create | ( | const PORFilePath_T & | iPORFilePath, |
const TravelDBFilePath_T & | iTravelDBFilePath, | ||
const DBType & | iSQLDBType, | ||
const SQLDBConnectionString_T & | iSQLDBConnStr, | ||
const DeploymentNumber_T & | iDeploymentNumber, | ||
const shouldIndexNonIATAPOR_T & | iShouldIndexNonIATAPOR, | ||
const shouldIndexPORInXapian_T & | iShouldIndexPORInXapian, | ||
const shouldAddPORInSQLDB_T & | iShouldAddPORInSQLDB ) |
Create a new OPENTREP_ServiceContext object for indexing-related services.
This new object is added to the list of instantiated objects.
const | PORFilePath_T& File-path of the POR file. |
const | TravelDBFilePath_T& File-path of the Xapian database. |
const | DBType& SQL database type (can be no database at all). |
const | SQLDBConnectionString_T& SQL DB connection string. |
const | DeploymentNumber_T& Deployment number. |
const | shouldIndexNonIATAPOR_T& Whether to include non-IATA POR. |
const | DeploymentNumber_T& Deployment number/version. |
const | shouldIndexNonIATAPOR_T& Whether to include non-IATA POR. |
Definition at line 52 of file FacOpenTrepServiceContext.cpp.
References OPENTREP::FacServiceAbstract::_pool.
|
inherited |
Destroyed all the object instantiated by this factory.
Definition at line 18 of file FacServiceAbstract.cpp.
References _pool.
Referenced by ~FacServiceAbstract().
|
protectedinherited |
List of instantiated Business Objects
Definition at line 34 of file FacServiceAbstract.hpp.
Referenced by clean(), OPENTREP::FacOpenTrepServiceContext::create(), and OPENTREP::FacOpenTrepServiceContext::create().