OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
FacResultCombination.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4// C
5#include <cassert>
6// OpenTrep
12
13namespace OPENTREP {
14
15 FacResultCombination* FacResultCombination::_instance = NULL;
16
17 // //////////////////////////////////////////////////////////////////////
18 FacResultCombination::FacResultCombination() {
19 }
20
21 // //////////////////////////////////////////////////////////////////////
22 FacResultCombination::FacResultCombination (const FacResultCombination&) {
23 }
24
25 // //////////////////////////////////////////////////////////////////////
27 _instance = NULL;
28 }
29
30 // //////////////////////////////////////////////////////////////////////
31 FacResultCombination& FacResultCombination::instance() {
32
33 if (_instance == NULL) {
34 _instance = new FacResultCombination();
35 assert (_instance != NULL);
36
38 }
39 return *_instance;
40 }
41
42 // //////////////////////////////////////////////////////////////////////
44 create (const TravelQuery_T& iQueryString) {
45 ResultCombination* oResultCombination_ptr = NULL;
46
47 oResultCombination_ptr = new ResultCombination (iQueryString);
48 assert (oResultCombination_ptr != NULL);
49
50 // The new object is added to the Bom pool
51 _pool.push_back (oResultCombination_ptr);
52
53 return *oResultCombination_ptr;
54 }
55
56 // //////////////////////////////////////////////////////////////////////
59 ResultHolder& ioResultHolder) {
60 // Link the ResultCombination to the ResultHolder, and vice versa
61 ioResultHolder._resultCombination = &ioResultCombination;
62
63 // Add the Result to the ResultCombination internal list (of
64 // ResultHolder objects)
65 ioResultCombination._resultHolderList.push_back (&ioResultHolder);
66 }
67
68}
static void initLinkWithResultHolder(ResultCombination &, ResultHolder &)
static FacResultCombination & instance()
ResultCombination & create(const TravelQuery_T &iQueryString)
static FacSupervisor & instance()
void registerBomFactory(FacBomAbstract *)
Class wrapping functions on a list of ResultHolder objects.
Class wrapping functions on a list of Result objects.
std::string TravelQuery_T