StdAir Logo  0.45.1
C++ Standard Airline IT Object Library
StdairTestLib.hpp
Go to the documentation of this file.
00001 #ifndef __STDAIR_TST_STDAIR_TEST_LIB_HPP
00002 #define __STDAIR_TST_STDAIR_TEST_LIB_HPP
00003 
00004 // //////////////////////////////////////////////////////////////////////
00005 // Import section
00006 // //////////////////////////////////////////////////////////////////////
00007 #include <string>
00008 #include <sstream>
00009 
00013 namespace stdair_test {
00014   
00016   struct BookingClass {
00017     std::string _classCode;
00019     BookingClass (const std::string& iClassCode)
00020       : _classCode (iClassCode) {
00021     }
00022     
00024     std::string toString() const {
00025       std::ostringstream oStr;
00026       oStr << _classCode;
00027       return oStr.str();
00028     }
00029   };
00030   
00032   struct Cabin {
00033     BookingClass _bookingClass;
00034     Cabin (const BookingClass& iBkgClass)
00035       : _bookingClass (iBkgClass) {
00036     }
00037     
00039     std::string toString() const {
00040       std::ostringstream oStr;
00041       oStr << _bookingClass._classCode;
00042       return oStr.str();
00043     }
00044     
00046     typedef BookingClass child;
00047   };
00048 }
00049 
00050 #endif // __STDAIR_TST_STDAIR_TEST_LIB_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines