From: <qua...@us...> - 2009-10-20 14:04:56
|
Revision: 51 http://stdair.svn.sourceforge.net/stdair/?rev=51&view=rev Author: quannaus Date: 2009-10-20 14:04:45 +0000 (Tue, 20 Oct 2009) Log Message: ----------- [Dev] Changed the key from class template to struct. Modified Paths: -------------- trunk/stdair/stdair/bom/BomKey.hpp trunk/stdair/stdair/bom/BomRoot.hpp trunk/stdair/stdair/bom/BomRootKey.hpp trunk/stdair/stdair/bom/BomRootStructure.hpp trunk/stdair/stdair/bom/BomRootTypes.hpp trunk/stdair/stdair/bom/BomStructureDummy.hpp trunk/stdair/stdair/bom/BookingClass.hpp trunk/stdair/stdair/bom/BookingClassKey.hpp trunk/stdair/stdair/bom/BookingClassStructure.hpp trunk/stdair/stdair/bom/BookingClassTypes.hpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/FlightDateKey.hpp trunk/stdair/stdair/bom/FlightDateStructure.hpp trunk/stdair/stdair/bom/FlightDateTypes.hpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/InventoryKey.hpp trunk/stdair/stdair/bom/InventoryStructure.hpp trunk/stdair/stdair/bom/InventoryTypes.hpp trunk/stdair/stdair/bom/LegCabin.hpp trunk/stdair/stdair/bom/LegCabinKey.hpp trunk/stdair/stdair/bom/LegCabinStructure.hpp trunk/stdair/stdair/bom/LegCabinTypes.hpp trunk/stdair/stdair/bom/LegDate.hpp trunk/stdair/stdair/bom/LegDateKey.hpp trunk/stdair/stdair/bom/LegDateStructure.hpp trunk/stdair/stdair/bom/LegDateTypes.hpp trunk/stdair/stdair/bom/SegmentCabin.hpp trunk/stdair/stdair/bom/SegmentCabinKey.hpp trunk/stdair/stdair/bom/SegmentCabinStructure.hpp trunk/stdair/stdair/bom/SegmentCabinTypes.hpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/SegmentDateKey.hpp trunk/stdair/stdair/bom/SegmentDateStructure.hpp trunk/stdair/stdair/bom/SegmentDateTypes.hpp trunk/stdair/stdair/bom/sources.mk trunk/stdair/stdair/factory/FacBomContent.hpp trunk/stdair/stdair/factory/FacBomStructure.hpp Added Paths: ----------- trunk/stdair/stdair/bom/BomRootKey.cpp trunk/stdair/stdair/bom/BookingClassKey.cpp trunk/stdair/stdair/bom/FlightDateKey.cpp trunk/stdair/stdair/bom/InventoryKey.cpp trunk/stdair/stdair/bom/LegCabinKey.cpp trunk/stdair/stdair/bom/LegDateKey.cpp trunk/stdair/stdair/bom/SegmentCabinKey.cpp trunk/stdair/stdair/bom/SegmentDateKey.cpp Modified: trunk/stdair/stdair/bom/BomKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BomKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BomKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -17,7 +17,7 @@ at the same level only. For instance, the segment-date key allows to differentiate two segment-dates under a given flight-date, but does not allow to differentiate two segemnt-dates in general. */ - class BomKey { + struct BomKey_T { public: // /////////// Display support methods ///////// @@ -48,7 +48,7 @@ inline std::basic_ostream<charT, traits>& operator<< (std::basic_ostream<charT, traits>& ioOut, - const stdair::BomKey& iBom) { + const stdair::BomKey_T& iBom) { /** string stream: - with same format @@ -76,7 +76,7 @@ inline std::basic_istream<charT, traits>& operator>> (std::basic_istream<charT, traits>& ioIn, - stdair::BomKey& ioBom) { + stdair::BomKey_T& ioBom) { // Fill Bom object with input stream ioBom.fromStream (ioIn); return ioIn; Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,6 +13,7 @@ namespace stdair { // Forward declarations. class FacBomContent; + struct BomRootKey_T; struct InventoryList_T; struct InventoryMap_T; Added: trunk/stdair/stdair/bom/BomRootKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRootKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/BomRootKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,33 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BomRootKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BomRootKey_T::BomRootKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + BomRootKey_T::~BomRootKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void BomRootKey_T::toStream (std::ostream& ioOut) const { + ioOut << "BomRootStructureKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void BomRootKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string BomRootKey_T::toString() const { + std::ostringstream oStr; + oStr << " -- ROOT -- "; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/BomRootKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BomRootKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,53 +9,33 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class BomRootStructure; - /** Key of the BOM structure root. */ - template <typename BOM_CONTENT> - class BomRootKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef BomRootStructure<BOM_CONTENT> BomStructure_T; + struct BomRootKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - BomRootKey () {} + BomRootKey_T (); /** Destructor. */ - ~BomRootKey () {} + ~BomRootKey_T (); // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "BomRootStructureKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same segment-date. */ - std::string toString() const { - std::ostringstream oStr; - oStr << " -- ROOT -- "; - return oStr.str(); - } - + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/BomRootStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BomRootStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -35,7 +35,7 @@ private: // Type definitions /** Definition allowing to retrieve the associated BOM key type. */ - typedef BomRootKey<BOM_CONTENT> BomKey_T; + typedef BomRootKey_T BomKey_T; /** Definition allowing to retrieve the associated children type. */ typedef boost::mpl::vector<InventoryStructure<ContentChild_T>, BomStructureDummy> ChildrenBomTypeList_T; Modified: trunk/stdair/stdair/bom/BomRootTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BomRootTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,15 +9,11 @@ namespace stdair { // Forward declarations. template <typename BOM_CONTENT> class BomRootStructure; - template <typename BOM_CONTENT> class BomRootKey; class BomRoot; /** Define the BomRootStructure. */ typedef BomRootStructure<BomRoot> BomRootStructure_T; - /** Define the BomRootStructureKey. */ - typedef BomRootKey<BomRoot> BomRootKey_T; - } #endif // __STDAIR_BOM_BOMROOTTYPES_HPP Modified: trunk/stdair/stdair/bom/BomStructureDummy.hpp =================================================================== --- trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BomStructureDummy.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -26,9 +26,6 @@ /** Definition allowing to retrieve the associated BOM content type. */ typedef BomContentDummy Content_T; - /** Definition allowing to retrieve the associated BOM key type. */ - typedef BomKey BomKey_T; - /** Definition allowing to retrieve the associated children type. */ typedef boost::mpl::vector<> ChildrenBomTypeList_T; Modified: trunk/stdair/stdair/bom/BookingClass.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BookingClass.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -14,6 +14,7 @@ // Forward declarations class FacBomContent; class SegmentCabin; + struct BookingClassKey_T; struct BookingClassList_T; struct BookingClassMap_T; Added: trunk/stdair/stdair/bom/BookingClassKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/BookingClassKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,34 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/BookingClassKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + BookingClassKey_T::BookingClassKey_T (const ClassCode_T& iClassCode) + : _classCode (iClassCode) { + } + + // //////////////////////////////////////////////////////////////////// + BookingClassKey_T::~BookingClassKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void BookingClassKey_T::toStream (std::ostream& ioOut) const { + ioOut << "BookingClassKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void BookingClassKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string BookingClassKey_T::toString() const { + std::ostringstream oStr; + oStr << _classCode; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/BookingClassKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BookingClassKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,60 +9,36 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class BookingClassStructure; - /** Key of segment-cabin. */ - template <typename BOM_CONTENT> - class BookingClassKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef BookingClassStructure<BOM_CONTENT> BomStructure_T; + struct BookingClassKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - BookingClassKey (const ClassCode_T& iClassCode) - : _classCode (iClassCode) { - } + BookingClassKey_T (const ClassCode_T& iClassCode); /** Destructor. */ - ~BookingClassKey () { } + ~BookingClassKey_T (); // /////////// Getters ////////// /** Get the cabin code. */ - const ClassCode_T& getClassCode () const { - return _classCode; - } + const ClassCode_T& getClassCode () const; // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "BookingClassKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same segment-cabin. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _classCode; - return oStr.str(); - } - + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/BookingClassStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BookingClassStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -27,7 +27,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef BookingClassKey<BOM_CONTENT> BomKey_T; + typedef BookingClassKey_T BomKey_T; /** Definition allowing to retrieve the associated parent BOM structure type. */ Modified: trunk/stdair/stdair/bom/BookingClassTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/BookingClassTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class BookingClassStructure; - template <typename BOM_CONTENT> class BookingClassKey; class BookingClass; /** Define the BookingClass structure. */ typedef BookingClassStructure<BookingClass> BookingClassStructure_T; - /** Define the BookingClass key. */ - typedef BookingClassKey<BookingClass> BookingClassKey_T; - /** Define the segment-cabin structure list. */ typedef std::vector<BookingClassStructure_T*> BookingClassStructureList_T; Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -15,6 +15,7 @@ // Forward declarations class FacBomContent; class Inventory; + struct FlightDateKey_T; struct SegmentDateList_T; struct SegmentDateMap_T; struct LegDateList_T; Added: trunk/stdair/stdair/bom/FlightDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/FlightDateKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,35 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/FlightDateKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + FlightDateKey_T::FlightDateKey_T (const FlightNumber_T& iFlightNumber, + const Date_T& iFlightDate) + : _flightNumber (iFlightNumber), _flightDate (iFlightDate) { + } + + // //////////////////////////////////////////////////////////////////// + FlightDateKey_T::~FlightDateKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void FlightDateKey_T::toStream (std::ostream& ioOut) const { + ioOut << "FlightDateKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void FlightDateKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string FlightDateKey_T::toString() const { + std::ostringstream oStr; + oStr << _flightNumber << ", " << _flightDate; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/FlightDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/FlightDateKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,32 +9,16 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class FlightDateStructure; - /** Key of flight-date. */ - template <typename BOM_CONTENT> - class FlightDateKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef FlightDateStructure<BOM_CONTENT> BomStructure_T; + struct FlightDateKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - FlightDateKey (const FlightNumber_T& iFlightNumber, - const Date_T& iFlightDate) - : _flightNumber (iFlightNumber), _flightDate (iFlightDate) { - } + FlightDateKey_T (const FlightNumber_T&, const Date_T&); /** Destructor. */ - ~FlightDateKey () { } + ~FlightDateKey_T (); // /////////// Getters ////////// /** Get the flight number. */ @@ -50,24 +34,18 @@ // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "FlightDateKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same segment-date. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _flightNumber << ", " << _flightDate; - return oStr.str(); - } + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/FlightDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/FlightDateStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -29,7 +29,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef FlightDateKey<BOM_CONTENT> BomKey_T; + typedef FlightDateKey_T BomKey_T; /** Definition allowing to retrieve the associated parent BOM structure type. */ Modified: trunk/stdair/stdair/bom/FlightDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class FlightDateStructure; - template <typename BOM_CONTENT> class FlightDateKey; class FlightDate; /** Define the FlightDate structure. */ typedef FlightDateStructure<FlightDate> FlightDateStructure_T; - /** Define the FlightDate key. */ - typedef FlightDateKey<FlightDate> FlightDateKey_T; - /** Define the flight-date structure list. */ typedef std::vector<FlightDateStructure_T*> FlightDateStructureList_T; Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/Inventory.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -14,6 +14,7 @@ // Forward declarations class FacBomContent; class BomRoot; + struct InventoryKey_T; struct FlightDateList_T; struct FlightDateMap_T; Added: trunk/stdair/stdair/bom/InventoryKey.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/InventoryKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,34 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/InventoryKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + InventoryKey_T::InventoryKey_T (const AirlineCode_T& iAirlineCode) + : _airlineCode (iAirlineCode) { + } + + // //////////////////////////////////////////////////////////////////// + InventoryKey_T::~InventoryKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void InventoryKey_T::toStream (std::ostream& ioOut) const { + ioOut << "InventoryKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void InventoryKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string InventoryKey_T::toString() const { + std::ostringstream oStr; + oStr << _airlineCode; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/InventoryKey.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/InventoryKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,58 +9,36 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { + /** Key of inventory. */ + struct InventoryKey_T : public BomKey_T { - // Forward declarations - template<typename BOM_CONTENT> class InventoryStructure; - - /** Key of flight-date. */ - template <typename BOM_CONTENT> - class InventoryKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef InventoryStructure<BOM_CONTENT> BomStructure_T; - public: // /////////// Construction /////////// /** Constructor. */ - InventoryKey (const AirlineCode_T& iAirlineCode) - : _airlineCode (iAirlineCode) { - } + InventoryKey_T (const AirlineCode_T& iAirlineCode); /** Destructor. */ - ~InventoryKey () { } + ~InventoryKey_T (); // /////////// Getters ////////// /** Get the airline code. */ - const AirlineCode_T& getAirlineCode() const { - return _airlineCode; - } + const AirlineCode_T& getAirlineCode() const; // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "InventoryKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } - + void fromStream (std::istream& ioIn); + /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same segment-date. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _airlineCode; - return oStr.str(); - } + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/InventoryStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/InventoryStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -30,7 +30,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef InventoryKey<BOM_CONTENT> BomKey_T; + typedef InventoryKey_T BomKey_T; /** Definition allowing to retrieve the children type of the BOM_CONTENT. */ Modified: trunk/stdair/stdair/bom/InventoryTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/InventoryTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class InventoryStructure; - template <typename BOM_CONTENT> class InventoryKey; class Inventory; /** Define the Inventory structure. */ typedef InventoryStructure<Inventory> InventoryStructure_T; - /** Define the Inventory key. */ - typedef InventoryKey<Inventory> InventoryKey_T; - /** Define the Inventory structure list. */ typedef std::vector<InventoryStructure_T*> InventoryStructureList_T; Modified: trunk/stdair/stdair/bom/LegCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegCabin.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,7 +13,8 @@ // Forward declarations class FacBomContent; class LegDate; - + struct LegCabinKey_T; + /** Class representing the actual functional/business content for a leg-date. */ class LegCabin : public LegCabinContent { Added: trunk/stdair/stdair/bom/LegCabinKey.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegCabinKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,34 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/LegCabinKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegCabinKey_T::LegCabinKey_T (const CabinCode_T& iCabinCode) + : _cabinCode (iCabinCode) { + } + + // //////////////////////////////////////////////////////////////////// + LegCabinKey_T::~LegCabinKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void LegCabinKey_T::toStream (std::ostream& ioOut) const { + ioOut << "LegCabinKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void LegCabinKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string LegCabinKey_T::toString() const { + std::ostringstream oStr; + oStr << _cabinCode; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/LegCabinKey.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegCabinKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,31 +9,16 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class LegCabinStructure; - /** Key of leg-cabin. */ - template <typename BOM_CONTENT> - class LegCabinKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef LegCabinStructure<BOM_CONTENT> BomStructure_T; + struct LegCabinKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - LegCabinKey (const CabinCode_T& iCabinCode) - : _cabinCode (iCabinCode) { - } + LegCabinKey_T (const CabinCode_T& iCabinCode); /** Destructor. */ - ~LegCabinKey () { } + ~LegCabinKey_T (); // /////////// Getters ////////// /** Get the cabin code. */ @@ -44,25 +29,18 @@ // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "LegCabinKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same leg-cabin. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _cabinCode; - return oStr.str(); - } - + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/LegCabinStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegCabinStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -28,7 +28,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef LegCabinKey<BOM_CONTENT> BomKey_T; + typedef LegCabinKey_T BomKey_T; /** Definition allowing to retrieve the associated parent BOM structure type. */ Modified: trunk/stdair/stdair/bom/LegCabinTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegCabinTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class LegCabinStructure; - template <typename BOM_CONTENT> class LegCabinKey; class LegCabin; /** Define the LegCabin structure. */ typedef LegCabinStructure<LegCabin> LegCabinStructure_T; - /** Define the LegCabin key. */ - typedef LegCabinKey<LegCabin> LegCabinKey_T; - /** Define the leg-cabin structure list. */ typedef std::vector<LegCabinStructure_T*> LegCabinStructureList_T; Modified: trunk/stdair/stdair/bom/LegDate.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegDate.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -14,6 +14,7 @@ // Forward declarations class FacBomContent; class FlightDate; + struct LegDateKey_T; struct LegCabinList_T; struct LegCabinMap_T; Added: trunk/stdair/stdair/bom/LegDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/LegDateKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,34 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/LegDateKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + LegDateKey_T::LegDateKey_T (const AirportCode_T& iBoardPoint) + : _boardPoint (iBoardPoint) { + } + + // //////////////////////////////////////////////////////////////////// + LegDateKey_T::~LegDateKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void LegDateKey_T::toStream (std::ostream& ioOut) const { + ioOut << "LegDateKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void LegDateKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string LegDateKey_T::toString() const { + std::ostringstream oStr; + oStr << _boardPoint; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/LegDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegDateKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,30 +9,16 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class LegDateStructure; - /** Key of leg-date. */ - template <typename BOM_CONTENT> - class LegDateKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef LegDateStructure<BOM_CONTENT> BomStructure_T; + struct LegDateKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - LegDateKey (const AirportCode_T& iBoardPoint) : _boardPoint (iBoardPoint) { - } + LegDateKey_T (const AirportCode_T& iBoardPoint); /** Destructor. */ - ~LegDateKey () { } + ~LegDateKey_T (); // /////////// Getters ////////// /** Get the boarding point. */ @@ -43,24 +29,18 @@ // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "LegDateKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same leg-date. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _boardPoint; - return oStr.str(); - } + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/LegDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegDateStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -28,7 +28,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef LegDateKey<BOM_CONTENT> BomKey_T; + typedef LegDateKey_T BomKey_T; /** Definition allowing to retrieve the associated parent BOM structure type. */ Modified: trunk/stdair/stdair/bom/LegDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/LegDateTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class LegDateStructure; - template <typename BOM_CONTENT> class LegDateKey; class LegDate; /** Define the LegDate structure. */ typedef LegDateStructure<LegDate> LegDateStructure_T; - /** Define the LegDate key. */ - typedef LegDateKey<LegDate> LegDateKey_T; - /** Define the leg-date structure list. */ typedef std::vector<LegDateStructure_T*> LegDateStructureList_T; Modified: trunk/stdair/stdair/bom/SegmentCabin.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentCabin.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -14,6 +14,7 @@ // Forward declarations class FacBomContent; class SegmentDate; + struct SegmentCabinKey_T; struct BookingClassList_T; struct BookingClassMap_T; Added: trunk/stdair/stdair/bom/SegmentCabinKey.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentCabinKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,34 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/SegmentCabinKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + SegmentCabinKey_T::SegmentCabinKey_T (const CabinCode_T& iCabinCode) + : _cabinCode (iCabinCode) { + } + + // //////////////////////////////////////////////////////////////////// + SegmentCabinKey_T::~SegmentCabinKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void SegmentCabinKey_T::toStream (std::ostream& ioOut) const { + ioOut << "SegmentCabinKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void SegmentCabinKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string SegmentCabinKey_T::toString() const { + std::ostringstream oStr; + oStr << _cabinCode; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/SegmentCabinKey.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,31 +9,16 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class SegmentCabinStructure; - /** Key of segment-cabin. */ - template <typename BOM_CONTENT> - class SegmentCabinKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef SegmentCabinStructure<BOM_CONTENT> BomStructure_T; + struct SegmentCabinKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - SegmentCabinKey (const CabinCode_T& iCabinCode) - : _cabinCode (iCabinCode) { - } + SegmentCabinKey_T (const CabinCode_T& iCabinCode); /** Destructor. */ - ~SegmentCabinKey () { } + ~SegmentCabinKey_T (); // /////////// Getters ////////// /** Get the cabin code. */ @@ -44,25 +29,18 @@ // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "SegmentCabinKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same segment-cabin. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _cabinCode; - return oStr.str(); - } - + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/SegmentCabinStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentCabinStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -28,7 +28,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef SegmentCabinKey<BOM_CONTENT> BomKey_T; + typedef SegmentCabinKey_T BomKey_T; /** Definition allowing to retrieve the associated parent BOM structure type. */ Modified: trunk/stdair/stdair/bom/SegmentCabinTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentCabinTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class SegmentCabinStructure; - template <typename BOM_CONTENT> class SegmentCabinKey; class SegmentCabin; /** Define the SegmentCabin structure. */ typedef SegmentCabinStructure<SegmentCabin> SegmentCabinStructure_T; - /** Define the SegmentCabin key. */ - typedef SegmentCabinKey<SegmentCabin> SegmentCabinKey_T; - /** Define the segment-cabin structure list. */ typedef std::vector<SegmentCabinStructure_T*> SegmentCabinStructureList_T; Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -14,6 +14,7 @@ // Forward declarations class FacBomContent; class FlightDate; + struct SegmentDateKey_T; struct SegmentCabinList_T; struct SegmentCabinMap_T; Added: trunk/stdair/stdair/bom/SegmentDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateKey.cpp (rev 0) +++ trunk/stdair/stdair/bom/SegmentDateKey.cpp 2009-10-20 14:04:45 UTC (rev 51) @@ -0,0 +1,35 @@ +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STDAIR +#include <stdair/bom/SegmentDateKey.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + SegmentDateKey_T::SegmentDateKey_T (const AirportCode_T& iBoardPoint, + const AirportCode_T& iOffPoint) + : _boardPoint (iBoardPoint), _offPoint (iOffPoint) { + } + + // //////////////////////////////////////////////////////////////////// + SegmentDateKey_T::~SegmentDateKey_T () { + } + + // //////////////////////////////////////////////////////////////////// + void SegmentDateKey_T::toStream (std::ostream& ioOut) const { + ioOut << "SegmentDateKey: " << toString() << std::endl; + } + + // //////////////////////////////////////////////////////////////////// + void SegmentDateKey_T::fromStream (std::istream& ioIn) { + } + + // //////////////////////////////////////////////////////////////////// + std::string SegmentDateKey_T::toString() const { + std::ostringstream oStr; + oStr << _boardPoint << "-" << _offPoint; + return oStr.str(); + } + +} Modified: trunk/stdair/stdair/bom/SegmentDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentDateKey.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -9,32 +9,16 @@ #include <stdair/bom/BomKey.hpp> namespace stdair { - - // Forward declarations - template <typename BOM_CONTENT> - class SegmentDateStructure; - /** Key of segment-date. */ - template <typename BOM_CONTENT> - class SegmentDateKey : public BomKey { - friend class FacBomStructure; - friend class FacBomContent; - - private: - // Type definitions - /** Definition allowing to retrieve the associated BOM structure type. */ - typedef SegmentDateStructure<BOM_CONTENT> BomStructure_T; + struct SegmentDateKey_T : public BomKey_T { public: // /////////// Construction /////////// /** Constructor. */ - SegmentDateKey (const AirportCode_T& iBoardPoint, - const AirportCode_T& iOffPoint) - : _boardPoint (iBoardPoint), _offPoint (iOffPoint) { - } + SegmentDateKey_T (const AirportCode_T&, const AirportCode_T&); /** Destructor. */ - ~SegmentDateKey () { } + ~SegmentDateKey_T (); // /////////// Getters ////////// /** Get the boarding point. */ @@ -50,25 +34,18 @@ // /////////// Display support methods ///////// /** Dump a Business Object Key into an output stream. @param ostream& the output stream. */ - void toStream (std::ostream& ioOut) const { - ioOut << "SegmentDateKey: " << toString() << std::endl; - } + void toStream (std::ostream& ioOut) const; /** Read a Business Object Key from an input stream. @param istream& the input stream. */ - void fromStream (std::istream& ioIn) { } + void fromStream (std::istream& ioIn); /** Get the serialised version of the Business Object Key. <br>That string is unique, at the level of a given Business Object, when among children of a given parent Business Object. <br>For instance, "H" and "K" allow to differentiate among two marketing classes for the same segment-date. */ - std::string toString() const { - std::ostringstream oStr; - oStr << _boardPoint << "-" << _offPoint; - return oStr.str(); - } - + std::string toString() const; private: // Attributes Modified: trunk/stdair/stdair/bom/SegmentDateStructure.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentDateStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -28,7 +28,7 @@ typedef BOM_CONTENT Content_T; /** Definition allowing to retrieve the associated BOM key type. */ - typedef SegmentDateKey<BOM_CONTENT> BomKey_T; + typedef SegmentDateKey_T BomKey_T; /** Definition allowing to retrieve the associated parent BOM structure type. */ Modified: trunk/stdair/stdair/bom/SegmentDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateTypes.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/SegmentDateTypes.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -13,15 +13,11 @@ // Forward declarations. template <typename BOM_CONTENT> class SegmentDateStructure; - template <typename BOM_CONTENT> class SegmentDateKey; class SegmentDate; /** Define the SegmentDate structure. */ typedef SegmentDateStructure<SegmentDate> SegmentDateStructure_T; - /** Define the SegmentDate key. */ - typedef SegmentDateKey<SegmentDate> SegmentDateKey_T; - /** Define the segment-date structure list. */ typedef std::vector<SegmentDateStructure_T*> SegmentDateStructureList_T; Modified: trunk/stdair/stdair/bom/sources.mk =================================================================== --- trunk/stdair/stdair/bom/sources.mk 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/bom/sources.mk 2009-10-20 14:04:45 UTC (rev 51) @@ -61,6 +61,13 @@ $(top_srcdir)/stdair/bom/BomChildrenHolderImp.hpp \ $(top_srcdir)/stdair/bom/BomIterator.hpp bom_cc_sources = \ + $(top_srcdir)/stdair/bom/BomRootKey.cpp \ + $(top_srcdir)/stdair/bom/InventoryKey.cpp \ + $(top_srcdir)/stdair/bom/FlightDateKey.cpp \ + $(top_srcdir)/stdair/bom/LegDateKey.cpp \ + $(top_srcdir)/stdair/bom/SegmentDateKey.cpp \ + $(top_srcdir)/stdair/bom/SegmentCabinKey.cpp \ + $(top_srcdir)/stdair/bom/BookingClassKey.cpp \ $(top_srcdir)/stdair/bom/BomRoot.cpp \ $(top_srcdir)/stdair/bom/BomRootContent.cpp \ $(top_srcdir)/stdair/bom/Inventory.cpp \ Modified: trunk/stdair/stdair/factory/FacBomContent.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/factory/FacBomContent.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -89,7 +89,7 @@ typedef typename BOM_CONTENT::BomStructure_T BOM_STRUCTURE_T; BOM_STRUCTURE_T& lBomStructure = FacBomStructure::instance(). - create<typename BOM_CONTENT::BomKey_T> (iKey); + create<typename BOM_CONTENT::BomKey_T, BOM_STRUCTURE_T> (iKey); // The created flight-date content (BomContent) object gets a constant // reference on its corresponding flight-date structure/holder object Modified: trunk/stdair/stdair/factory/FacBomStructure.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-10-20 09:41:29 UTC (rev 50) +++ trunk/stdair/stdair/factory/FacBomStructure.hpp 2009-10-20 14:04:45 UTC (rev 51) @@ -51,18 +51,15 @@ static FacBomStructure& instance(); /** Create a structure object with the given key. */ - template <typename BOM_KEY> - typename BOM_KEY::BomStructure_T& create (const BOM_KEY& iKey) { - // Type for the BOM structure. - typedef typename BOM_KEY::BomStructure_T BOM_STRUCTURE_T; + template <typename BOM_KEY, typename BOM_STRUCTURE> + BOM_STRUCTURE& create (const BOM_KEY& iKey) { + BOM_STRUCTURE* aBomStructure_ptr = NULL; - BOM_STRUCTURE_T* aBomStructure_ptr = NULL; - - aBomStructure_ptr = new BOM_STRUCTURE_T (iKey); + aBomStructure_ptr = new BOM_STRUCTURE (iKey); assert (aBomStructure_ptr != NULL); // Initialise the children list of the BOM structure. - initChildrenList<BOM_STRUCTURE_T> (*aBomStructure_ptr); + initChildrenList<BOM_STRUCTURE> (*aBomStructure_ptr); // The new object is added to the pool of structure objects _structurePool.push_back (aBomStructure_ptr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |