StdAir Logo  1.00.13
C++ Standard Airline IT Object Library
Loading...
Searching...
No Matches
BomID.hpp
Go to the documentation of this file.
1#ifndef __STDAIR_BOM_BOMID_HPP
2#define __STDAIR_BOM_BOMID_HPP
3
4// //////////////////////////////////////////////////////////////////////
5// Import section
6// //////////////////////////////////////////////////////////////////////
7// STL
8#include <iosfwd>
9#include <string>
10
11namespace stdair {
12
16 template <typename BOM>
17 struct BomID {
18
19 public:
20 // ////////// Getters ////////////
24 BOM& getObject () const;
25
26 public:
27 // ////////// Constructors and destructors /////////
31 BomID (BOM& iBOM);
32
36 BomID (const BomID&);
37
41 ~BomID();
42
43 private:
47 BomID();
48
49 private:
50 // /////////////// Attributes ////////////////
54 BOM* _id;
55 };
56
57 // ////////////////////////////////////////////////////////////////////
58 template <typename BOM> BomID<BOM>::BomID (BOM& iBOM): _id (&iBOM) { }
59
60 // ////////////////////////////////////////////////////////////////////
61 template <typename BOM> BomID<BOM>::BomID (const BomID& iBomID)
62 : _id (iBomID._id) { }
63
64 // ////////////////////////////////////////////////////////////////////
65 template <typename BOM> BomID<BOM>::~BomID () { }
66
67 // ////////////////////////////////////////////////////////////////////
68 template <typename BOM> BOM& BomID<BOM>::getObject () const {
69 assert (_id != NULL);
70 return *_id;
71 }
72}
73#endif // __STDAIR_BOM_BOMID_HPP
Handle on the StdAir library context.
Class wrapper of bom ID (e.g. pointer to object).
Definition BomID.hpp:17
BOM & getObject() const
Definition BomID.hpp:68