OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
World.hpp
Go to the documentation of this file.
1 #ifndef __OPENTREP_BOM_WORLD_HPP
2 #define __OPENTREP_BOM_WORLD_HPP
3 
4 // //////////////////////////////////////////////////////////////////////
5 // Import section
6 // //////////////////////////////////////////////////////////////////////
7 // STL
8 #include <ostream>
9 #include <istream>
10 #include <string>
11 // OpenTrep
16 
17 namespace OPENTREP {
18 
20  class World : public BomAbstract {
21  friend class FacWorld;
22  friend class DbaWorld;
23  public:
24  // //////////// Getters /////////////
33  return _placeOrderedList;
34  }
35 
36  // //////////// Setters /////////////
37 
38 
39  // ///////// Display methods ////////
42  void toStream (std::ostream&) const;
43 
46  void fromStream (std::istream&);
47 
49  std::string toString() const;
50 
53  std::string describeKey() const;
54 
57  std::string describeShortKey() const;
58 
60  std::string display() const;
61 
63  std::string shortDisplay() const;
64 
66  GenericBom_T getGenericBom (const XapianDocID_T& iDocID) const;
67 
68  private:
70  World ();
71  World (const World&);
72 
74  virtual ~World();
75 
76  private:
78  GenericBomList_T _genericBomList;
79 
83  // PlaceDirectList_T _placeList;
84 
88  PlaceOrderedList_T _placeOrderedList;
89  };
90 
91  // ///////////// Type definitions ////////////////////
92  typedef std::size_t WorldID_T;
93 
94 }
95 #endif // __OPENTREP_BOM_WORLD_HPP
std::pair< BomType::EN_BomType, BomAbstract * > GenericBom_T
Definition: GenericBom.hpp:15
const PlaceOrderedList_T & getSimplePlaceList() const
Definition: World.hpp:32
GenericBom_T getGenericBom(const XapianDocID_T &iDocID) const
Definition: World.cpp:77
std::string describeShortKey() const
Definition: World.cpp:28
std::size_t WorldID_T
Definition: World.hpp:92
std::string describeKey() const
Definition: World.cpp:34
std::map< std::size_t, GenericBom_T > GenericBomList_T
Definition: GenericBom.hpp:22
void fromStream(std::istream &)
Definition: World.cpp:49
void toStream(std::ostream &) const
Definition: World.cpp:44
friend class DbaWorld
Definition: World.hpp:22
Base class for the Business Object Model (BOM) layer.
Definition: BomAbstract.hpp:17
std::list< Place * > PlaceOrderedList_T
Definition: PlaceList.hpp:21
std::string display() const
Definition: World.cpp:60
std::string toString() const
Definition: World.cpp:39
std::string shortDisplay() const
Definition: World.cpp:53