You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
(51) |
Nov
(8) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(32) |
Feb
(47) |
Mar
(6) |
Apr
(19) |
May
(7) |
Jun
(19) |
Jul
(39) |
Aug
(51) |
Sep
(39) |
Oct
(18) |
Nov
(10) |
Dec
(27) |
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <den...@us...> - 2010-12-02 23:41:46
|
Revision: 370 http://stdair.svn.sourceforge.net/stdair/?rev=370&view=rev Author: denis_arnaud Date: 2010-12-02 23:41:40 +0000 (Thu, 02 Dec 2010) Log Message: ----------- [Branch 0.9.0] Prepared the branch 0.9.0 to be copied from head of the trunk. Added Paths: ----------- branches/stdair/0.9.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-12-02 23:41:42
|
Revision: 369 http://stdair.svn.sourceforge.net/stdair/?rev=369&view=rev Author: denis_arnaud Date: 2010-12-02 23:41:34 +0000 (Thu, 02 Dec 2010) Log Message: ----------- [API] First step towards a more granular API. Modified Paths: -------------- trunk/stdair/stdair/basic/BasConst_BookingClass.hpp trunk/stdair/stdair/bom/AirlineFeature.cpp trunk/stdair/stdair/bom/AirlineFeature.hpp trunk/stdair/stdair/bom/AirlineFeatureKey.cpp trunk/stdair/stdair/bom/AirlineFeatureKey.hpp trunk/stdair/stdair/bom/AirlineStruct.cpp trunk/stdair/stdair/bom/AirlineStruct.hpp trunk/stdair/stdair/bom/BookingClassKey.cpp trunk/stdair/stdair/bom/BookingClassKey.hpp trunk/stdair/stdair/bom/BookingRequestStruct.cpp trunk/stdair/stdair/bom/BookingRequestStruct.hpp trunk/stdair/stdair/bom/Bucket.cpp trunk/stdair/stdair/bom/Bucket.hpp trunk/stdair/stdair/bom/BucketKey.cpp trunk/stdair/stdair/bom/EventQueue.cpp trunk/stdair/stdair/bom/EventQueue.hpp trunk/stdair/stdair/bom/EventStruct.cpp trunk/stdair/stdair/bom/EventStruct.hpp trunk/stdair/stdair/bom/EventTypes.hpp trunk/stdair/stdair/bom/FareFamilyKey.cpp trunk/stdair/stdair/bom/FareFamilyKey.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDate.hpp trunk/stdair/stdair/bom/FlightDateKey.cpp trunk/stdair/stdair/bom/FlightDateKey.hpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/Inventory.hpp trunk/stdair/stdair/bom/InventoryKey.cpp trunk/stdair/stdair/bom/InventoryKey.hpp trunk/stdair/stdair/bom/LegCabinKey.cpp trunk/stdair/stdair/bom/LegCabinKey.hpp trunk/stdair/stdair/bom/LegDateKey.cpp trunk/stdair/stdair/bom/LegDateKey.hpp trunk/stdair/stdair/bom/SegmentCabinKey.cpp trunk/stdair/stdair/bom/SegmentCabinKey.hpp trunk/stdair/stdair/bom/SegmentDate.cpp trunk/stdair/stdair/bom/SegmentDate.hpp trunk/stdair/stdair/bom/SegmentDateKey.cpp trunk/stdair/stdair/bom/SegmentDateKey.hpp trunk/stdair/stdair/bom/SegmentPeriodKey.cpp trunk/stdair/stdair/bom/SegmentPeriodKey.hpp trunk/stdair/stdair/bom/YieldStore.cpp trunk/stdair/stdair/bom/YieldStore.hpp trunk/stdair/stdair/bom/YieldStoreKey.cpp trunk/stdair/stdair/bom/YieldStoreKey.hpp trunk/stdair/stdair/command/DBManagerForAirlines.cpp trunk/stdair/stdair/dbadaptor/DbaAirline.cpp trunk/stdair/stdair/sources.mk trunk/stdair/stdair/stdair_types.hpp trunk/stdair/test/archi_static_cast/MP2Inventory.cpp trunk/stdair/test/archi_static_cast/archi_static_cast.cpp trunk/stdair/test/architecture/MPInventory.cpp trunk/stdair/test/architecture/architecture.cpp trunk/stdair/test/stdair/StdairTestLib.cpp Added Paths: ----------- trunk/stdair/stdair/stdair_basic_types.hpp trunk/stdair/stdair/stdair_date_time_types.hpp trunk/stdair/stdair/stdair_demand_types.hpp trunk/stdair/stdair/stdair_fare_types.hpp trunk/stdair/stdair/stdair_inventory_types.hpp Modified: trunk/stdair/stdair/basic/BasConst_BookingClass.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,7 +5,10 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_inventory_types.hpp> +#include <stdair/stdair_demand_types.hpp> +#include <stdair/stdair_fare_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -3,7 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -// STDAIR +// StdAir #include <stdair/stdair_types.hpp> #include <stdair/bom/AirlineFeature.hpp> Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/AirlineFeatureKey.hpp> #include <stdair/bom/AirlineFeatureTypes.hpp> Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,9 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// +// STL +#include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/AirlineFeatureKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,10 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// +// STL +#include <string> // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineStruct.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/AirlineStruct.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -7,7 +7,6 @@ #include <ostream> #include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/AirlineStruct.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineStruct.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/AirlineStruct.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -9,6 +9,7 @@ #include <string> #include <vector> // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/basic/StructAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingClassKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/BookingClassKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -2,7 +2,6 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/BookingClassKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingClassKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/BookingClassKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingRequestStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -7,7 +7,6 @@ #include <ostream> #include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/BookingRequestStruct.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingRequestStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -8,6 +8,8 @@ #include <iosfwd> #include <string> // StdAir +#include <stdair/stdair_inventory_types.hpp> +#include <stdair/stdair_demand_types.hpp> #include <stdair/basic/StructAbstract.hpp> #include <stdair/bom/BookingRequestTypes.hpp> Modified: trunk/stdair/stdair/bom/Bucket.cpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/Bucket.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -3,8 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/Bucket.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/Bucket.hpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/Bucket.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/stdair_types.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/BucketKey.hpp> #include <stdair/bom/BucketTypes.hpp> Modified: trunk/stdair/stdair/bom/BucketKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BucketKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/BucketKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,9 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// +// STL +#include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/BucketKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/EventQueue.cpp =================================================================== --- trunk/stdair/stdair/bom/EventQueue.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/EventQueue.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/EventStruct.hpp> #include <stdair/bom/EventQueue.hpp> Modified: trunk/stdair/stdair/bom/EventQueue.hpp =================================================================== --- trunk/stdair/stdair/bom/EventQueue.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/EventQueue.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -7,6 +7,7 @@ // STL #include <iosfwd> // StdAir +#include <stdair/stdair_basic_types.hpp> #include <stdair/basic/StructAbstract.hpp> #include <stdair/bom/EventTypes.hpp> Modified: trunk/stdair/stdair/bom/EventStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/EventStruct.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/EventStruct.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/basic/BasConst_General.hpp> #include <stdair/bom/BookingRequestStruct.hpp> #include <stdair/bom/EventStruct.hpp> Modified: trunk/stdair/stdair/bom/EventStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/EventStruct.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/EventStruct.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,10 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_date_time_types.hpp> +#include <stdair/stdair_demand_types.hpp> #include <stdair/bom/BookingRequestTypes.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/EventTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/EventTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/EventTypes.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -8,6 +8,7 @@ // STL #include <map> // STDAIR +#include <stdair/stdair_date_time_types.hpp> #include <stdair/bom/key_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FareFamilyKey.cpp =================================================================== --- trunk/stdair/stdair/bom/FareFamilyKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/FareFamilyKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,9 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// +// STL +#include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/FareFamilyKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FareFamilyKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FareFamilyKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/FareFamilyKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -3,8 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/FlightDate.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDate.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/FlightDate.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/FlightDateKey.hpp> #include <stdair/bom/FlightDateTypes.hpp> Modified: trunk/stdair/stdair/bom/FlightDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/FlightDateKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -2,14 +2,13 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/FlightDateKey.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// FlightDateKey::FlightDateKey (const FlightNumber_T& iFlightNumber, - const Date_T& iFlightDate) + const Date_T& iFlightDate) : _flightNumber (iFlightNumber), _flightDate (iFlightDate) { } Modified: trunk/stdair/stdair/bom/FlightDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/FlightDateKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,9 +5,11 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { + /** Key of flight-date. */ struct FlightDateKey : public KeyAbstract { Modified: trunk/stdair/stdair/bom/Inventory.cpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/Inventory.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -3,8 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/Inventory.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/Inventory.hpp =================================================================== --- trunk/stdair/stdair/bom/Inventory.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/Inventory.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/InventoryKey.hpp> #include <stdair/bom/InventoryTypes.hpp> Modified: trunk/stdair/stdair/bom/InventoryKey.cpp =================================================================== --- trunk/stdair/stdair/bom/InventoryKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/InventoryKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,9 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// +// STL +#include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/InventoryKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/InventoryKey.hpp =================================================================== --- trunk/stdair/stdair/bom/InventoryKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/InventoryKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/LegCabinKey.cpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/LegCabinKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/LegCabinKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/LegCabinKey.hpp =================================================================== --- trunk/stdair/stdair/bom/LegCabinKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/LegCabinKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/LegDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/LegDateKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/LegDateKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/LegDateKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/LegDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/LegDateKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/LegDateKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,8 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/SegmentCabinKey.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentCabinKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/SegmentCabinKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/SegmentCabinKey.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentCabinKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/SegmentDate.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentDate.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -3,6 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> +#include <sstream> // STDAIR #include <stdair/basic/BasConst_BookingClass.hpp> #include <stdair/bom/SegmentDate.hpp> Modified: trunk/stdair/stdair/bom/SegmentDate.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDate.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentDate.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/SegmentDateKey.hpp> #include <stdair/bom/SegmentDateTypes.hpp> Modified: trunk/stdair/stdair/bom/SegmentDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentDateKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/stdair_types.hpp> +// StdAir #include <stdair/bom/SegmentDateKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/SegmentDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentDateKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentDateKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,8 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/SegmentPeriodKey.cpp =================================================================== --- trunk/stdair/stdair/bom/SegmentPeriodKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentPeriodKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -1,8 +1,9 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// +// STL +#include <sstream> // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/SegmentPeriodKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/SegmentPeriodKey.hpp =================================================================== --- trunk/stdair/stdair/bom/SegmentPeriodKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/SegmentPeriodKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_basic_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/YieldStore.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/YieldStore.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -3,8 +3,8 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -// STDAIR -#include <stdair/stdair_types.hpp> +#include <sstream> +// StdAir #include <stdair/bom/YieldStore.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/YieldStore.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStore.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/YieldStore.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,10 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// STL +#include <string> +// StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/YieldStoreKey.hpp> #include <stdair/bom/YieldStoreTypes.hpp> Modified: trunk/stdair/stdair/bom/YieldStoreKey.cpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreKey.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/YieldStoreKey.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -2,7 +2,6 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/stdair_types.hpp> #include <stdair/bom/YieldStoreKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/YieldStoreKey.hpp =================================================================== --- trunk/stdair/stdair/bom/YieldStoreKey.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/bom/YieldStoreKey.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,6 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/command/DBManagerForAirlines.cpp =================================================================== --- trunk/stdair/stdair/command/DBManagerForAirlines.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/command/DBManagerForAirlines.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -12,7 +12,7 @@ #include <mysql/soci-mysql.h> #endif // SOCI_HEADERS_BURIED // StdAir -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/AirlineStruct.hpp> #include <stdair/dbadaptor/DbaAirline.hpp> #include <stdair/command/DBManagerForAirlines.hpp> Modified: trunk/stdair/stdair/dbadaptor/DbaAirline.cpp =================================================================== --- trunk/stdair/stdair/dbadaptor/DbaAirline.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/dbadaptor/DbaAirline.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -5,7 +5,7 @@ #include <exception> #include <string> // Stdair -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/AirlineStruct.hpp> #include <stdair/dbadaptor/DbaAirline.hpp> #include <stdair/service/Logger.hpp> Modified: trunk/stdair/stdair/sources.mk =================================================================== --- trunk/stdair/stdair/sources.mk 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/sources.mk 2010-12-02 23:41:34 UTC (rev 369) @@ -2,6 +2,11 @@ $(top_srcdir)/stdair/stdair_exceptions.hpp \ $(top_srcdir)/stdair/stdair_log.hpp \ $(top_srcdir)/stdair/stdair_db.hpp \ + $(top_srcdir)/stdair/stdair_basic_types.hpp \ + $(top_srcdir)/stdair/stdair_date_time_types.hpp \ + $(top_srcdir)/stdair/stdair_inventory_types.hpp \ + $(top_srcdir)/stdair/stdair_demand_types.hpp \ + $(top_srcdir)/stdair/stdair_fare_types.hpp \ $(top_srcdir)/stdair/stdair_types.hpp \ $(top_srcdir)/stdair/stdair_service.hpp \ $(top_srcdir)/stdair/stdair.hpp Copied: trunk/stdair/stdair/stdair_basic_types.hpp (from rev 368, trunk/stdair/stdair/stdair_types.hpp) =================================================================== --- trunk/stdair/stdair/stdair_basic_types.hpp (rev 0) +++ trunk/stdair/stdair/stdair_basic_types.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -0,0 +1,75 @@ +#ifndef __STDAIR_STDAIR_BASIC_TYPES_HPP +#define __STDAIR_STDAIR_BASIC_TYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> + +namespace stdair { + + // ////////////////////////////////////////////////////////////////////// + // Basic types + /** Event type */ + typedef std::string EventType_T; + + /** Count */ + typedef int Count_T; + + /** Location code (3-letter-code, e.g., LON). */ + typedef std::string LocationCode_T; + + /** Define a distance (kilometers). */ + typedef long int Distance_T; + + /** Define the Airport Code type (3-letter-code, e.g., LHR). */ + typedef LocationCode_T AirportCode_T; + + /** City code */ + typedef LocationCode_T CityCode_T; + + /** Define a identity number. */ + typedef unsigned long Identity_T; + + /** Trip type */ + typedef std::string TripType_T; + + /** Monetary value */ + typedef double MonetaryValue_T; + + /** Real number */ + typedef double RealNumber_T; + + /** Define a percentage value (between 0 and 100%). */ + typedef double Percentage_T; + + /** Define a price value (e.g., 1000.0 Euros). */ + typedef double PriceValue_T; + + /** Define a price currency (e.g., EUR for Euros). */ + typedef std::string PriceCurrency_T; + + /** Define an amount of revenue. */ + typedef double Revenue_T; + + /** Define the name of a multiplier. */ + typedef double Multiplier_T; + + /** Define the rate of overbooking */ + typedef double OverbookingRate_T; + + /** Define the number of seats (it can be non integer, because the + overbooking can be applied at booking class or PNR level). */ + typedef double NbOfSeats_T; + + /** Define the number of seats required by a demand. */ + // typedef unsigned short NbOfSeats_T; + + // ////////////////////////////////////////////////////////////////////// + // Probability + /** Probability */ + typedef float Probability_T; + +} +#endif // __STDAIR_STDAIR_BASIC_TYPES_HPP Copied: trunk/stdair/stdair/stdair_date_time_types.hpp (from rev 368, trunk/stdair/stdair/stdair_types.hpp) =================================================================== --- trunk/stdair/stdair/stdair_date_time_types.hpp (rev 0) +++ trunk/stdair/stdair/stdair_date_time_types.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -0,0 +1,66 @@ +#ifndef __STDAIR_STDAIR_DATE_TIME_TYPES_HPP +#define __STDAIR_STDAIR_DATE_TIME_TYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +#include <vector> +#include <map> +// Boost Random +#include <boost/random/linear_congruential.hpp> +#include <boost/random/uniform_real.hpp> +#include <boost/random/variate_generator.hpp> +// Boost (Extended STL) +#include <boost/date_time/gregorian/gregorian.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/tuple/tuple.hpp> +// StdAir +#include <stdair/stdair_exceptions.hpp> +#include <stdair/stdair_log.hpp> +#include <stdair/stdair_db.hpp> +#include <stdair/stdair_inventory_types.hpp> +#include <stdair/stdair_service.hpp> + +namespace stdair { + + // //////// Type definitions ///////// + /** Define the type for durations (e.g., elapsed in-flight time). */ + typedef boost::posix_time::time_duration Duration_T; + + /** Define the type for date (e.g., departure date of a flight). */ + typedef boost::gregorian::date Date_T; + + /** Time */ + typedef boost::posix_time::time_duration Time_T; + + /** Define an accurate time (date+time). */ + typedef boost::posix_time::ptime DateTime_T; + + /** Define the Period (e.g., period during which flights depart). */ + typedef boost::gregorian::date_period DatePeriod_T; + + /** Define the Day-Of-the-Week as a string. */ + typedef std::string DOW_String_T; + + /** Define the Date Offset (e.g., -1 ). */ + typedef boost::gregorian::date_duration DateOffset_T; + + /** Define a duration in number of days. */ + typedef unsigned int DayDuration_T; + + /** Define the Saturday stay status of a travel. */ + typedef bool SaturdayStay_T; + + /** Time duration in (integer) number of seconds */ + typedef long int IntDuration_T; + + /** Time duration in (long long integer) number of milliseconds */ + typedef long long int LongDuration_T; + + /** Duration in (float) number of time units */ + typedef float FloatDuration_T; + +} +#endif // __STDAIR_STDAIR_DATE_TIME_TYPES_HPP Copied: trunk/stdair/stdair/stdair_demand_types.hpp (from rev 368, trunk/stdair/stdair/stdair_types.hpp) =================================================================== --- trunk/stdair/stdair/stdair_demand_types.hpp (rev 0) +++ trunk/stdair/stdair/stdair_demand_types.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -0,0 +1,109 @@ +#ifndef __STDAIR_STDAIR_DEMAND_TYPES_HPP +#define __STDAIR_STDAIR_DEMAND_TYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +#include <vector> +#include <map> +// Boost Random +#include <boost/random/linear_congruential.hpp> +#include <boost/random/uniform_real.hpp> +#include <boost/random/variate_generator.hpp> +// Boost (Extended STL) +#include <boost/date_time/gregorian/gregorian.hpp> +#include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/tuple/tuple.hpp> +// StdAir +#include <stdair/stdair_basic_types.hpp> + +namespace stdair { + + // //////// Type definitions ///////// + /** Define the availability option allowing the ticket change. */ + typedef bool ChangeFees_T; + + /** Define the refundable availability of a tickets. */ + typedef bool NonRefundable_T; + + /** Define the average ratio (between 0 and 100) of demand with + a saturday stay status equal to TRUE. */ + typedef unsigned int SaturdayStayRatio_T; + + /** Define the average ratio of demand with change fee + availability. */ + typedef unsigned int ChangeFeesRatio_T; + + /** Define the average ratio of demand with non-refundable + availability. */ + typedef unsigned int NonRefundableRatio_T; + + /** Define the passenger characteristics, leisure or business + for instance (1-letter-code, e.g., L or B). */ + typedef std::string PassengerType_T; + + /** Define the identifier of a distribution pattern (e.g., 1). */ + typedef std::string DistributionPatternId_T; + + /** Define the identifier of a cancellation rate curve (e.g., C1). */ + typedef std::string CancellationRateCurveId_T; + + /** Define the identifier of an airline preference set list (e.g., AP1). */ + typedef std::string AirlinePreferenceId_T; + + /** Define a cancellation & and no-show rate pair. */ + typedef std::pair<Percentage_T, Percentage_T> CancellationNoShowRatePair_T; + + /** Define the identifier of a demand characteristics pattern + (e.g. Ch12); for a customer choice model */ + typedef std::string CharacteristicsPatternId_T; + + /** Define characteristics component index (e.g. W for WTP) */ + typedef std::string CharacteristicsIndex_T; + + /** Define a Willingness-To-Pay (WTP) (e.g., 1000.0 Euros). */ + typedef double WTP_T; + + /** Number of passengers (in a group) for a booking. */ + typedef unsigned short PartySize_T; + + /** Define a number of requests. */ + typedef double NbOfRequests_T; + + /** Define a number of bookings. */ + typedef NbOfRequests_T NbOfBookings_T; + + /** Define a number of cancellations (travellers). */ + typedef NbOfRequests_T NbOfCancellations_T; + + /** Define a number of no-shows. */ + typedef NbOfRequests_T NbOfNoShows_T; + + /** Define a number of travel solutions + (in a travel solution block). */ + typedef unsigned short NbOfTravelSolutions_T; + + /** Define the name of an event. */ + typedef std::string EventName_T; + + /** Define a number of events. */ + typedef double NbOfEvents_T; + + // ////////////////////////////////////////////////////////////////////// + /** Type definition for the hashed key of the DemandStreamKey object. */ + typedef std::string DemandStreamKeyStr_T; + + /** Type of booking channel (D=direct, I=indirect, N=oNline, F=oFfline). */ + typedef std::string ChannelLabel_T; + + /** Type of trip type (RO=outbound of round-trip, RI=inbound of round-trip, + OW=one way). */ + typedef std::string TripType_T; + + /** Type of frequent flyer (P=Platinum, G=Gold, S=Silver, M=Member, N=None).*/ + typedef std::string FrequentFlyer_T; + +} +#endif // __STDAIR_STDAIR_DEMAND_TYPES_HPP Copied: trunk/stdair/stdair/stdair_fare_types.hpp (from rev 368, trunk/stdair/stdair/stdair_types.hpp) =================================================================== --- trunk/stdair/stdair/stdair_fare_types.hpp (rev 0) +++ trunk/stdair/stdair/stdair_fare_types.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -0,0 +1,18 @@ +#ifndef __STDAIR_STDAIR_FARE_TYPES_HPP +#define __STDAIR_STDAIR_FARE_TYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// + +namespace stdair { + + // //////// Type definitions ///////// + /** Define a number of fare rules. */ + typedef double NbOfFareRules_T; + + /** Define the fare of a travel solution. */ + typedef double Fare_T; + +} +#endif // __STDAIR_STDAIR_FARE_TYPES_HPP Copied: trunk/stdair/stdair/stdair_inventory_types.hpp (from rev 368, trunk/stdair/stdair/stdair_types.hpp) =================================================================== --- trunk/stdair/stdair/stdair_inventory_types.hpp (rev 0) +++ trunk/stdair/stdair/stdair_inventory_types.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -0,0 +1,126 @@ +#ifndef __STDAIR_STDAIR_INVENTORY_TYPES_HPP +#define __STDAIR_STDAIR_INVENTORY_TYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +#include <vector> +#include <map> +// StdAir +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_date_time_types.hpp> + +namespace stdair { + + // //////// Type definitions ///////// + /** Define the Airline Code type (2-letter-code, e.g., BA). */ + typedef std::string AirlineCode_T; + + /** Define a list of airline code. */ + typedef std::vector<AirlineCode_T> AirlineCodeList_T; + + /** Define the type for flight numbers. */ + typedef unsigned short FlightNumber_T; + + /** Define the cabin code (class of service, e.g., first, business, + economy). */ + typedef std::string CabinCode_T; + + /** Define the code of the fare family (e.g., 1, 2, 3, etc.). */ + typedef std::string FamilyCode_T; + + /** Define the booking class code (product segment class, e.g., H, + B, K, etc.). */ + typedef std::string ClassCode_T; + + /** Define a list of class code. */ + typedef std::vector<ClassCode_T> ClassCodeList_T; + + /** Define the sub-class code (e.g., 0, 1, 2, etc.). The subclass is + a sub-structure for the booking class, allowing to have specific + rules for some criteria like POS. */ + typedef unsigned short SubclassCode_T; + + /** Define the flight path code (code made by a suite of flight numbers). */ + typedef std::string FlightPathCode_T; + + /** Define the list of class codes as a string. */ + typedef std::string ClassList_String_T; + + /** Define a number of segment-dates (in a path). */ + typedef unsigned short NbOfSegments_T; + + /** Define a number of airlines (in a path). */ + typedef unsigned short NbOfAirlines_T; + + /** Map between the cabin codes and the booking class codes within + each cabin. */ + typedef std::map<CabinCode_T, ClassList_String_T> CabinBookingClassMap_T; + + /** Define the cabin capacity (resource, e.g., 200 seats). + <br>The capacity is expressed as a double to cope with overbooking. */ + typedef double CabinCapacity_T; + + /** Define a number of flight dates. */ + typedef double NbOfFlightDates_T; + + /** Define the commited space of a cabin. */ + typedef double CommitedSpace_T; + + /** Define the unsold protection (UPR). */ + typedef double UPR_T; + + /** Define the value of the booking limit. */ + typedef double BookingLimit_T; + + /** Define the value of the authorization level. */ + typedef double AuthorizationLevel_T; + + /** Define the value of the adjustment for cabin capacity. */ + typedef double CapacityAdjustment_T; + + /** Define the number of seat which could not be used for the booking. */ + typedef double BlockSpace_T; + + /** Define an availability. */ + typedef double Availability_T; + + /** Define an availability. */ + typedef bool AvailabilityStatus_T; + + /** Define a list of availabilities. */ + typedef std::vector<Availability_T> BucketAvailabilities_T; + + /** Define a number of yields. */ + typedef double NbOfYields_T; + + /** Define a number of InventoryControlRules. */ + typedef double NbOfInventoryControlRules_T; + + /** Define availibility of booking limit. */ + typedef bool CensorshipFlag_T; + + /** Define the list of censorship flags (une list per booking + class, one censorship flag per DCP). */ + typedef std::vector<bool> CensorshipFlagList_T; + + /** Define the bookingRatio (for instance OnD bookings + over whole class bookings). */ + typedef double BookingRatio_T; + + /** Define the yield of a virtual class. */ + typedef double Yield_T; + + /** Define the Bid-Price. */ + typedef double BidPrice_T; + + /** Define a Bid-Price Vector. */ + typedef std::vector<BidPrice_T> BidPriceVector_T; + + /** Define the current index of a Bid-Price Vector (for a given LegCabin). */ + typedef unsigned int SeatIndex_T; + +} +#endif // __STDAIR_STDAIR_INVENTORY_TYPES_HPP Modified: trunk/stdair/stdair/stdair_types.hpp =================================================================== --- trunk/stdair/stdair/stdair_types.hpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/stdair/stdair_types.hpp 2010-12-02 23:41:34 UTC (rev 369) @@ -20,6 +20,11 @@ #include <stdair/stdair_exceptions.hpp> #include <stdair/stdair_log.hpp> #include <stdair/stdair_db.hpp> +#include <stdair/stdair_basic_types.hpp> +#include <stdair/stdair_demand_types.hpp> +#include <stdair/stdair_fare_types.hpp> +#include <stdair/stdair_inventory_types.hpp> +#include <stdair/stdair_date_time_types.hpp> #include <stdair/stdair_service.hpp> namespace stdair { @@ -28,21 +33,6 @@ /** Define the type for network ID. */ typedef std::string NetworkID_T; - /** Define the Airline Code type (2-letter-code, e.g., BA). */ - typedef std::string AirlineCode_T; - - /** Define a list of airline code. */ - typedef std::vector<AirlineCode_T> AirlineCodeList_T; - - /** Location code (3-letter-code, e.g., LON). */ - typedef std::string LocationCode_T; - - /** Define the Airport Code type (3-letter-code, e.g., LHR). */ - typedef LocationCode_T AirportCode_T; - - /** Define the type for flight numbers. */ - typedef unsigned short FlightNumber_T; - /** Define the file address type (e.g. "a_directory/a_filename")*/ typedef std::string FileAddress_T; @@ -59,242 +49,18 @@ B: booked, C: cancelled, R: Rejected). */ typedef std::string RequestStatus_T; - /** Define the type for durations (e.g., elapsed in-flight time). */ - typedef boost::posix_time::time_duration Duration_T; - - /** Define the type for date (e.g., departure date of a flight). */ - typedef boost::gregorian::date Date_T; - - /** Time */ - typedef boost::posix_time::time_duration Time_T; - - /** Define an accurate time (date+time). */ - typedef boost::posix_time::ptime DateTime_T; - - /** Define a distance (kilometers). */ - typedef long int Distance_T; - - /** Define the Period (e.g., period during which flights depart). */ - typedef boost::gregorian::date_period DatePeriod_T; - - /** Define the Day-Of-the-Week as a string. */ - typedef std::string DOW_String_T; - - /** Define the Date Offset (e.g., -1 ). */ - typedef boost::gregorian::date_duration DateOffset_T; - - /** Define a duration in number of days. */ - typedef unsigned int DayDuration_T; - - /** Define the Saturday stay status of a travel. */ - typedef bool SaturdayStay_T; - - /** Define the availability option allowing the ticket change. */ - typedef bool ChangeFees_T; - - /** Define the refundable availability of a tickets. */ - typedef bool NonRefundable_T; - - /** Define the average ratio (between 0 and 100) of demand with - a saturday stay status equal to TRUE. */ - typedef unsigned int SaturdayStayRatio_T; - - /** Define the average ratio of demand with change fee - availability. */ - typedef unsigned int ChangeFeesRatio_T; - - /** Define the average ratio of demand with non-refundable - availability. */ - typedef unsigned int NonRefundableRatio_T; - - /** Define the passenger characteristics, leisure or business - for instance (1-letter-code, e.g., L or B). */ - typedef std::string PassengerType_T; - - /** Define the identifier of a distribution pattern (e.g., 1). */ - typedef std::string DistributionPatternId_T; - - /** Define the identifier of a cancellation rate curve (e.g., C1). */ - typedef std::string CancellationRateCurveId_T; - - /** Define the identifier of an airline preference set list (e.g., AP1). */ - typedef std::string AirlinePreferenceId_T; - - /** Define a percentage value (between 0 and 100%). */ - typedef double Percentage_T; - - /** Define a cancellation & and no-show rate pair. */ - typedef std::pair<Percentage_T, Percentage_T> CancellationNoShowRatePair_T; - - /** Define the identifier of a demand characteristics pattern - (e.g. Ch12); for a customer choice model */ - typedef std::string CharacteristicsPatternId_T; - - /** Define characteristics component index (e.g. W for WTP) */ - typedef std::string CharacteristicsIndex_T; - - /** Define the cabin code (class of service, e.g., first, business, - economy). */ - typedef std::string CabinCode_T; - - /** Define a price value (e.g., 1000.0 Euros). */ - typedef double PriceValue_T; - - /** Define a price currency (e.g., EUR for Euros). */ - typedef std::string PriceCurrency_T; - - /** Define a Willingness-To-Pay (WTP) (e.g., 1000.0 Euros). */ - typedef double WTP_T; - - /** Define the number of seats (it can be non integer, because the - overbooking can be applied at booking class or PNR level). */ - typedef double NbOfSeats_T; - - /** Define the number of seats required by a demand. */ - // typedef unsigned short NbOfSeats_T; - - /** Number of passengers (in a group) for a booking. */ - typedef unsigned short PartySize_T; - /** Define a mean value (e.g., 20.2). */ typedef double MeanValue_T; /** Define a standard deviation value (e.g., 1.5). */ typedef double StdDevValue_T; - /** Define the cabin capacity (resource, e.g., 200 seats). - <br>The capacity is expressed as a double to cope with overbooking. */ - typedef double CabinCapacity_T; - - /** Define the number of seat which could not be used for the booking. */ - typedef double BlockSpace_T; - - /** Define the code of the fare family (e.g., 1, 2, 3, etc.). */ - typedef std::string FamilyCode_T; - - /** Define the booking class code (product segment class, e.g., H, - B, K, etc.). */ - typedef std::string ClassCode_T; - - /** Define a list of class code. */ - typedef std::vector<ClassCode_T> ClassCodeList_T; - - /** Define the sub-class code (e.g., 0, 1, 2, etc.). The subclass is - a sub-structure for the booking class, allowing to have specific - rules for some criteria like POS. */ - typedef unsigned short SubclassCode_T; - - /** Define the flight path code (code made by a suite of flight numbers). */ - typedef std::string FlightPathCode_T; - - /** Define an availability. */ - typedef double Availability_T; - - /** Define an availability. */ - typedef bool AvailabilityStatus_T; - - /** Define a list of availabilities. */ - typedef std::vector<Availability_T> BucketAvailabilities_T; - - /** Define a identity number. */ - typedef unsigned long Identity_T; - /** Define a map between a BookingID and a TravelSolutionID. */ typedef std::map<Identity_T, Identity_T> BookingTSIDMap_T; - /** Define a number of requests. */ - typedef double NbOfRequests_T; - - /** Define a number of bookings. */ - typedef NbOfRequests_T NbOfBookings_T; - - /** Define a number of cancellations (travellers). */ - typedef NbOfRequests_T NbOfCancellations_T; - - /** Define a number of no-shows. */ - typedef NbOfRequests_T NbOfNoShows_T; - - /** Define a number of fare rules. */ - typedef double NbOfFareRules_T; - - /** Define a number of yields. */ - typedef double NbOfYields_T; - - /** Define a number of InventoryControlRules. */ - typedef double NbOfInventoryControlRules_T; - - /** Define a number of flight dates. */ - typedef double NbOfFlightDates_T; - - /** Define the commited space of a cabin. */ - typedef double CommitedSpace_T; - - /** Define the unsold protection (UPR). */ - typedef double UPR_T; - - /** Define availibility of booking limit. */ - typedef bool CensorshipFlag_T; - - /** Define the list of censorship flags (une list per booking - class, one censorship flag per DCP). */ - typedef std::vector<bool> CensorshipFlagList_T; - - /** Define the value of the booking limit. */ - typedef double BookingLimit_T; - - /** Define the value of the authorization level. */ - typedef double AuthorizationLevel_T; - - /** Define the value of the adjustment for cabin capacity. */ - typedef double CapacityAdjustment_T; - - /** Define the rate of overbooking */ - typedef double OverbookingRate_T; - - /** Define the bookingRatio (for instance OnD bookings - over whole class bookings). */ - typedef double BookingRatio_T; - - /** Define the list of class codes as a string. */ - typedef std::string ClassList_String_T; - - /** Define a number of segment-dates (in a path). */ - typedef unsigned short NbOfSegments_T; - - /** Define a number of airlines (in a path). */ - typedef unsigned short NbOfAirlines_T; - - /** Define the fare of a travel solution. */ - typedef double Fare_T; - - /** Define the yield of a virtual class. */ - typedef double Yield_T; - - /** Define the Bid-Price. */ - typedef double BidPrice_T; - - /** Define a Bid-Price Vector. */ - typedef std::vector<BidPrice_T> BidPriceVector_T; - - /** Define the current index of a Bid-Price Vector (for a given LegCabin). */ - typedef unsigned int SeatIndex_T; - - /** Define a number of travel solutions - (in a travel solution block). */ - typedef unsigned short NbOfTravelSolutions_T; - /** Define a indicator of demand to class matching. */ typedef double MatchingIndicator_T; - /** Define an amount of revenue. */ - typedef double Revenue_T; - - /** Define the name of an event. */ - typedef std::string EventName_T; - - /** Define a number of events. */ - typedef double NbOfEvents_T; - /** Frequency of the Data Collection Point description (daily, monthly or detailed). */ typedef std::string DCPModeFrequency_T; @@ -367,36 +133,6 @@ typedef float Probability_T; // ////////////////////////////////////////////////////////////////////// - // Date / Time - /** Time duration in (integer) number of seconds */ - typedef long int IntDuration_T; - - /** Time duration in (long long integer) number of milliseconds */ - typedef long long int LongDuration_T; - - /** Duration in (float) number of time units */ - typedef float FloatDuration_T; - - // ////////////////////////////////////////////////////////////////////// - // Basic types - /** Event type */ - typedef std::string EventType_T; - - /** Count */ - typedef int Count_T; - - /** City code */ - typedef LocationCode_T CityCode_T; - - /** Trip type */ - typedef std::string TripType_T; - - /** Monetary value */ - typedef double MonetaryValue_T; - - /** Real number */ - typedef double RealNumber_T; - /** Type definition for the hashed key of the DemandStreamKey object. */ typedef std::string DemandStreamKeyStr_T; @@ -410,9 +146,5 @@ /** Type of frequent flyer (P=Platinum, G=Gold, S=Silver, M=Member, N=None). */ typedef std::string FrequentFlyer_T; - /** Map between the cabin codes and the booking class codes within - each cabin. */ - typedef std::map<CabinCode_T, ClassList_String_T> CabinBookingClassMap_T; - } #endif // __STDAIR_STDAIR_TYPES_HPP Modified: trunk/stdair/test/archi_static_cast/MP2Inventory.cpp =================================================================== --- trunk/stdair/test/archi_static_cast/MP2Inventory.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/test/archi_static_cast/MP2Inventory.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,7 @@ // STL #include <cassert> // StdAir -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_inventory_types.hpp> // Local #include <test/archi_static_cast/MP2Inventory.hpp> Modified: trunk/stdair/test/archi_static_cast/archi_static_cast.cpp =================================================================== --- trunk/stdair/test/archi_static_cast/archi_static_cast.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/test/archi_static_cast/archi_static_cast.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -4,7 +4,7 @@ #include <string> #include <list> // StdAir -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_inventory_types.hpp> // Local #include <test/archi_static_cast/MP2BomRoot.hpp> #include <test/archi_static_cast/MP2Inventory.hpp> Modified: trunk/stdair/test/architecture/MPInventory.cpp =================================================================== --- trunk/stdair/test/architecture/MPInventory.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/test/architecture/MPInventory.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -8,7 +8,7 @@ // STL #include <cassert> // StdAir -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_inventory_types.hpp> // Local #include <test/architecture/MPInventory.hpp> Modified: trunk/stdair/test/architecture/architecture.cpp =================================================================== --- trunk/stdair/test/architecture/architecture.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/test/architecture/architecture.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -7,11 +7,11 @@ #include <iostream> #include <string> // StdAir +#include <stdair/stdair_inventory_types.hpp> #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/BomManager.hpp> #include <stdair/factory/FacBom.hpp> #include <stdair/factory/FacBomManager.hpp> -#include <stdair/stdair_types.hpp> // Local //#include <test/architecture/MPBomRoot.hpp> #include <test/architecture/MPInventory.hpp> Modified: trunk/stdair/test/stdair/StdairTestLib.cpp =================================================================== --- trunk/stdair/test/stdair/StdairTestLib.cpp 2010-12-02 22:17:18 UTC (rev 368) +++ trunk/stdair/test/stdair/StdairTestLib.cpp 2010-12-02 23:41:34 UTC (rev 369) @@ -12,7 +12,7 @@ #include <boost/mpl/assert.hpp> #include <boost/type_traits/is_same.hpp> // StdAir -#include <stdair/stdair_types.hpp> +#include <stdair/stdair_inventory_types.hpp> #include <stdair/stdair.hpp> #include <stdair/service/Logger.hpp> #include <test/stdair/StdairTestLib.hpp> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-12-02 22:17:27
|
Revision: 368 http://stdair.svn.sourceforge.net/stdair/?rev=368&view=rev Author: denis_arnaud Date: 2010-12-02 22:17:18 +0000 (Thu, 02 Dec 2010) Log Message: ----------- [API] First step towards a more granular API. Modified Paths: -------------- trunk/stdair/stdair/basic/BasConst.cpp trunk/stdair/stdair/basic/BasConst_BookingClass.hpp trunk/stdair/stdair/basic/BasConst_General.hpp trunk/stdair/stdair/basic/BasConst_Inventory.hpp trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp trunk/stdair/stdair/basic/BasConst_Request.hpp trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp trunk/stdair/stdair/basic/BasConst_Yield.hpp trunk/stdair/stdair/basic/BasDBParams.hpp trunk/stdair/stdair/basic/BasLogParams.hpp trunk/stdair/stdair/basic/PassengerType.cpp trunk/stdair/stdair/bom/AirlineFeature.cpp trunk/stdair/stdair/bom/AirlineFeatureKey.cpp trunk/stdair/stdair/bom/AirlineFeatureKey.hpp trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp trunk/stdair/stdair/bom/AirlineStruct.cpp trunk/stdair/stdair/bom/AirlineStruct.hpp trunk/stdair/stdair/bom/BomAbstract.hpp trunk/stdair/stdair/bom/BomHolder.hpp trunk/stdair/stdair/bom/BomHolderKey.cpp trunk/stdair/stdair/bom/BomManager.cpp trunk/stdair/stdair/bom/BomManager.hpp trunk/stdair/stdair/bom/BomRootKey.cpp trunk/stdair/stdair/bom/BookingClassKey.cpp trunk/stdair/stdair/bom/BookingClassKey.hpp trunk/stdair/stdair/bom/BookingClassTypes.hpp trunk/stdair/stdair/bom/BookingRequestStruct.cpp trunk/stdair/stdair/bom/BookingRequestStruct.hpp trunk/stdair/stdair/bom/Bucket.cpp trunk/stdair/stdair/bom/Bucket.hpp trunk/stdair/stdair/bom/BucketKey.cpp trunk/stdair/stdair/bom/BucketKey.hpp trunk/stdair/stdair/bom/BucketTypes.hpp trunk/stdair/stdair/bom/EventQueue.cpp trunk/stdair/stdair/bom/EventQueue.hpp trunk/stdair/stdair/bom/EventStruct.cpp trunk/stdair/stdair/bom/EventStruct.hpp trunk/stdair/stdair/bom/EventTypes.hpp trunk/stdair/stdair/bom/FareFamilyKey.cpp trunk/stdair/stdair/bom/FareFamilyKey.hpp trunk/stdair/stdair/bom/FareFamilyTypes.hpp trunk/stdair/stdair/bom/FlightDate.cpp trunk/stdair/stdair/bom/FlightDateKey.cpp trunk/stdair/stdair/bom/FlightDateKey.hpp trunk/stdair/stdair/bom/FlightDateTypes.hpp trunk/stdair/stdair/bom/FlightPeriodTypes.hpp trunk/stdair/stdair/bom/Inventory.cpp trunk/stdair/stdair/bom/InventoryKey.cpp trunk/stdair/stdair/bom/InventoryKey.hpp trunk/stdair/stdair/bom/InventoryTypes.hpp trunk/stdair/stdair/bom/KeyAbstract.hpp trunk/stdair/stdair/bom/LegCabinKey.cpp trunk/stdair/stdair/bom/LegCabinKey.hpp trunk/stdair/stdair/bom/LegCabinTypes.hpp trunk/stdair/stdair/bom/LegDateKey.cpp trunk/stdair/stdair/bom/LegDateKey.hpp trunk/stdair/stdair/bom/LegDateTypes.hpp trunk/stdair/stdair/bom/OptimizerStruct.cpp trunk/stdair/stdair/bom/OptimizerStruct.hpp trunk/stdair/stdair/bom/PeriodStruct.cpp trunk/stdair/stdair/bom/PeriodStruct.hpp trunk/stdair/stdair/bom/SegmentCabinKey.cpp trunk/stdair/stdair/bom/SegmentCabinKey.hpp trunk/stdair/stdair/bom/SegmentCabinTypes.hpp trunk/stdair/stdair/bom/SegmentDateKey.cpp trunk/stdair/stdair/bom/SegmentDateKey.hpp trunk/stdair/stdair/bom/SegmentDateTypes.hpp trunk/stdair/stdair/bom/SegmentPeriodKey.cpp trunk/stdair/stdair/bom/SegmentPeriodKey.hpp trunk/stdair/stdair/bom/SegmentPeriodTypes.hpp trunk/stdair/stdair/bom/TravelSolutionStruct.cpp trunk/stdair/stdair/bom/TravelSolutionStruct.hpp trunk/stdair/stdair/bom/YieldStore.cpp trunk/stdair/stdair/bom/YieldStoreKey.cpp trunk/stdair/stdair/bom/YieldStoreKey.hpp trunk/stdair/stdair/bom/YieldStoreTypes.hpp trunk/stdair/stdair/bom/sources.mk trunk/stdair/stdair/command/CmdBomManager.hpp trunk/stdair/stdair/command/DBManagerForAirlines.cpp trunk/stdair/stdair/command/DBManagerForAirlines.hpp trunk/stdair/stdair/dbadaptor/DbaAirline.cpp trunk/stdair/stdair/factory/FacBom.hpp trunk/stdair/stdair/factory/FacBomManager.cpp trunk/stdair/stdair/service/DBSessionManager.cpp trunk/stdair/stdair/service/DBSessionManager.hpp trunk/stdair/stdair/service/FacSupervisor.hpp trunk/stdair/stdair/service/Logger.cpp trunk/stdair/stdair/service/Logger.hpp trunk/stdair/stdair/service/STDAIR_Service.cpp trunk/stdair/stdair/sources.mk trunk/stdair/test/archi_static_cast/MP2BomRoot.cpp trunk/stdair/test/archi_static_cast/MP2Inventory.cpp trunk/stdair/test/archi_static_cast/archi_static_cast.cpp trunk/stdair/test/architecture/MPInventory.cpp trunk/stdair/test/architecture/architecture.cpp trunk/stdair/test/stdair/StdairTestLib.cpp Added Paths: ----------- trunk/stdair/stdair/bom/key_types.hpp trunk/stdair/stdair/stdair.hpp trunk/stdair/stdair/stdair_db.hpp trunk/stdair/stdair/stdair_exceptions.hpp trunk/stdair/stdair/stdair_log.hpp trunk/stdair/stdair/stdair_service.hpp trunk/stdair/stdair/stdair_types.hpp Removed Paths: ------------- trunk/stdair/stdair/STDAIR_Service.hpp trunk/stdair/stdair/STDAIR_Types.hpp Deleted: trunk/stdair/stdair/STDAIR_Service.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Service.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/STDAIR_Service.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,125 +0,0 @@ -/** - * @brief Handle on the StdAir library context - * @author Anh Quan Nguyen <qua...@us...> - * @date 20/01/2010 - * @detail StdAir aims at providing a clean API, and the corresponding - * C++ implementation, for the basis of Airline IT Business Object - * Model (BOM), that is, to be used by several other Open Source - * projects, such as RMOL and OpenTREP<br> - * Install the StdAir library for Airline IT Standard C++ fundaments. - */ -#ifndef __STDAIR_SVC_STDAIR_SERVICE_HPP -#define __STDAIR_SVC_STDAIR_SERVICE_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// Boost -#include <boost/shared_ptr.hpp> -// StdAir -#include <stdair/basic/BasLogParams.hpp> -#include <stdair/basic/BasDBParams.hpp> - -namespace stdair { - - /// Forward declarations - class BomRoot; - - /** - * @brief Interface for the STDAIR Services - */ - class STDAIR_Service { - public: - // ////////// Constructors and destructors ////////// - /** - * @brief Default constructor. - */ - STDAIR_Service (); - - /** - * @brief Constructor. - * <br>The init() method is called; see the corresponding - * documentation for more details. - * <br>Moreover, a reference on an output stream is given, so - * that log outputs can be directed onto that stream. - * @param[in] const BasLogParams& Parameters for the output log stream. - */ - STDAIR_Service (const BasLogParams&); - - /** - * @brief Constructor. - * <br>The init() method is called; see the corresponding - * documentation for more details. - * <br>A reference on an output stream is given, so - * that log outputs can be directed onto that stream. - * <br>Moreover, database connection parameters are given, so - * that database requests can use the corresponding access. - * @param[in] const BasLogParams& Parameters for the output log stream. - * @param[in] const BasDBParams& Parameters for the database session. - */ - STDAIR_Service (const BasLogParams&, const BasDBParams&); - - /** - * @brief Destructor. - */ - ~STDAIR_Service(); - - // ///////////////// Getters /////////////////// - /** - * @brief Get a reference on the BomRoot object. - * <br>If the service context has not been initialised, that - * method throws an exception (failing assertion). - * @param[out] BomRoot& Reference on the BomRoot. - */ - BomRoot& getBomRoot () const { - return _bomRoot; - } - - private: - // /////// Construction and Destruction helper methods /////// - /** - * @brief Default copy constructor. - * @param[in] const STDAIR_Service& Reference on the STDAIR_Service handler - * to be copied. - */ - STDAIR_Service (const STDAIR_Service&); - - /** - * @brief Initialise the log. - * @param[in] const BasLogParams& Parameters for the output log stream. - */ - void logInit (const BasLogParams&); - - /** - * @brief Initialise the database session. - * @param[in] const BasDBParams& Parameters for the database session. - */ - void dbInit (const BasDBParams&); - - /** - * @brief Initialise. - * <br>The static instance of the log service (Logger object) is created. - * <br>The static instance of the database session manager - * (DBSessionManager object) is created. - * <br>The static instance of the FacSupervisor object, itself referencing - * all the other objects (factories and BOM), is created. - * <br>As those three objects are static, there is no need to store them - * in any service context. However, some lock mechanism may be needed - * in order to secure the access to the corresponding resources. - */ - void init (); - - /** - * @brief Finalise. - */ - void finalise (); - - private: - // /////////////// Attributes /////////////// - /** - * @brief Root of the BOM tree. - */ - BomRoot& _bomRoot; - }; -} -#endif // __STDAIR_SVC_STDAIR_SERVICE_HPP Deleted: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,670 +0,0 @@ -#ifndef __STDAIR_STDAIR_TYPES_HPP -#define __STDAIR_STDAIR_TYPES_HPP - -// ////////////////////////////////////////////////////////////////////// -// Import section -// ////////////////////////////////////////////////////////////////////// -// STL -#include <string> -#include <vector> -#include <list> -#include <map> -// Boost Random -#include <boost/random/linear_congruential.hpp> -#include <boost/random/uniform_real.hpp> -#include <boost/random/variate_generator.hpp> -// Boost (Extended STL) -#include <boost/date_time/gregorian/gregorian.hpp> -#include <boost/date_time/posix_time/posix_time.hpp> -#include <boost/tuple/tuple.hpp> -#include <boost/shared_ptr.hpp> - -// Forward declarations -namespace soci { - class session; - class statement; -} - -namespace stdair { - // Forward declarations - class STDAIR_Service; - - // //////////////////////////////////////////////////////////////////// - // - // Exceptions - // - // //////////////////////////////////////////////////////////////////// - // //////////////////////////////////////////////////////////////////// - class RootException : public std::exception { - public: - /** Constructors. */ - RootException (const std::string& iWhat) : _what (iWhat) {} - RootException () : _what ("No more details") {} - /** Destructor. */ - virtual ~RootException() throw() {} - /** Give the details of the exception. */ - const char* what() const throw() { return _what.c_str(); } - protected: - /** Details for the exception. */ - std::string _what; - }; - // //////////////////////////////////////////////////////////////////// - class FileNotFoundException : public RootException { - public: - /** Constructor. */ - FileNotFoundException (const std::string& iWhat) : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class NonInitialisedLogServiceException : public RootException { - public: - /** Constructor. */ - NonInitialisedLogServiceException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class NonInitialisedDBSessionManagerException : public RootException { - public: - /** Constructor. */ - NonInitialisedDBSessionManagerException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class NonInitialisedServiceException : public RootException { - public: - /** Constructor. */ - NonInitialisedServiceException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class NonInitialisedContainerException : public RootException { - public: - /** Constructor. */ - NonInitialisedContainerException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class NonInitialisedRelationShipException : public RootException { - public: - /** Constructor. */ - NonInitialisedRelationShipException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class MemoryAllocationException : public RootException { - public: - /** Constructor. */ - MemoryAllocationException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class ObjectLinkingException : public RootException { - public: - /** Constructor. */ - ObjectLinkingException (const std::string& iWhat) : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class ParserException : public RootException { - public: - /** Constructor. */ - ParserException (const std::string& iWhat) : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class DocumentNotFoundException : public RootException { - public: - /** Constructor. */ - DocumentNotFoundException (const std::string& iWhat) - : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class CodeConversionException : public ParserException { - public: - /** Constructor. */ - CodeConversionException (const std::string& iWhat) - : ParserException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class CodeDuplicationException : public ParserException { - public: - /** Constructor. */ - CodeDuplicationException (const std::string& iWhat) - : ParserException(iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class ObjectCreationgDuplicationException : public ParserException { - public: - /** Constructor. */ - ObjectCreationgDuplicationException (const std::string& iWhat) - : ParserException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class ObjectNotFoundException : public RootException { - public: - /** Constructor. */ - ObjectNotFoundException (const std::string& iWhat) : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class SQLDatabaseException : public RootException { - public: - /** Constructor. */ - SQLDatabaseException (const std::string& iWhat) : RootException (iWhat) {} - }; - // //////////////////////////////////////////////////////////////////// - class SQLDatabaseConnectionImpossibleException : public SQLDatabaseException { - public: - /** Constructor. */ - SQLDatabaseConnectionImpossibleException (const std::string& iWhat) - : SQLDatabaseException (iWhat) {} - }; - - // /////////////// Log ///////////// - /** Level of logs. */ - namespace LOG { - typedef enum { - CRITICAL = 0, - ERROR, - NOTIFICATION, - WARNING, - DEBUG, - VERBOSE, - LAST_VALUE - } EN_LogLevel; - - static const std::string _logLevels[LAST_VALUE] = - {"C", "E", "N", "W", "D", "V"}; - } - - // //////// Type definitions ///////// - /** Database session handler. */ - typedef soci::session DBSession_T; - - /** Database request statement handler. */ - typedef soci::statement DBRequestStatement_T; - - /** Define the type for network ID. */ - typedef std::string NetworkID_T; - - /** Define the Airline Code type (2-letter-code, e.g., BA). */ - typedef std::string AirlineCode_T; - - /** Define a list of airline code. */ - typedef std::vector<AirlineCode_T> AirlineCodeList_T; - - /** Location code (3-letter-code, e.g., LON). */ - typedef std::string LocationCode_T; - - /** Define the Airport Code type (3-letter-code, e.g., LHR). */ - typedef LocationCode_T AirportCode_T; - - /** Define the type for flight numbers. */ - typedef unsigned short FlightNumber_T; - - /** Define the file address type (e.g. "a_directory/a_filename")*/ - typedef std::string FileAddress_T; - - /** Define the replication number. */ - typedef unsigned int ReplicationNumber_T; - - /** Define the seed type of an Exponential function. */ - typedef unsigned long int ExponentialSeed_T; - - /** Define the seed type of an Uniform function. */ - typedef unsigned long int UniformSeed_T; - - /** Define the Request status for booking (1-letter-code, e.g., - B: booked, C: cancelled, R: Rejected). */ - typedef std::string RequestStatus_T; - - /** Define the type for durations (e.g., elapsed in-flight time). */ - typedef boost::posix_time::time_duration Duration_T; - - /** Define the type for date (e.g., departure date of a flight). */ - typedef boost::gregorian::date Date_T; - - /** Time */ - typedef boost::posix_time::time_duration Time_T; - - /** Define an accurate time (date+time). */ - typedef boost::posix_time::ptime DateTime_T; - - /** Define a distance (kilometers). */ - typedef long int Distance_T; - - /** Define the Period (e.g., period during which flights depart). */ - typedef boost::gregorian::date_period DatePeriod_T; - - /** Define the Day-Of-the-Week as a string. */ - typedef std::string DOW_String_T; - - /** Define the Date Offset (e.g., -1 ). */ - typedef boost::gregorian::date_duration DateOffset_T; - - /** Define a duration in number of days. */ - typedef unsigned int DayDuration_T; - - /** Define the Saturday stay status of a travel. */ - typedef bool SaturdayStay_T; - - /** Define the availability option allowing the ticket change. */ - typedef bool ChangeFees_T; - - /** Define the refundable availability of a tickets. */ - typedef bool NonRefundable_T; - - /** Define the average ratio (between 0 and 100) of demand with - a saturday stay status equal to TRUE. */ - typedef unsigned int SaturdayStayRatio_T; - - /** Define the average ratio of demand with change fee - availability. */ - typedef unsigned int ChangeFeesRatio_T; - - /** Define the average ratio of demand with non-refundable - availability. */ - typedef unsigned int NonRefundableRatio_T; - - /** Define the passenger characteristics, leisure or business - for instance (1-letter-code, e.g., L or B). */ - typedef std::string PassengerType_T; - - /** Define the identifier of a distribution pattern (e.g., 1). */ - typedef std::string DistributionPatternId_T; - - /** Define the identifier of a cancellation rate curve (e.g., C1). */ - typedef std::string CancellationRateCurveId_T; - - /** Define the identifier of an airline preference set list (e.g., AP1). */ - typedef std::string AirlinePreferenceId_T; - - /** Define a percentage value (between 0 and 100%). */ - typedef double Percentage_T; - - /** Define a cancellation & and no-show rate pair. */ - typedef std::pair<Percentage_T, Percentage_T> CancellationNoShowRatePair_T; - - /** Define the identifier of a demand characteristics pattern - (e.g. Ch12); for a customer choice model */ - typedef std::string CharacteristicsPatternId_T; - - /** Define characteristics component index (e.g. W for WTP) */ - typedef std::string CharacteristicsIndex_T; - - /** Define the cabin code (class of service, e.g., first, business, - economy). */ - typedef std::string CabinCode_T; - - /** Define a price value (e.g., 1000.0 Euros). */ - typedef double PriceValue_T; - - /** Define a price currency (e.g., EUR for Euros). */ - typedef std::string PriceCurrency_T; - - /** Define a Willingness-To-Pay (WTP) (e.g., 1000.0 Euros). */ - typedef double WTP_T; - - /** Define the number of seats (it can be non integer, because the - overbooking can be applied at booking class or PNR level). */ - typedef double NbOfSeats_T; - - /** Define the number of seats required by a demand. */ - // typedef unsigned short NbOfSeats_T; - - /** Number of passengers (in a group) for a booking. */ - typedef unsigned short PartySize_T; - - /** Define a mean value (e.g., 20.2). */ - typedef double MeanValue_T; - - /** Define a standard deviation value (e.g., 1.5). */ - typedef double StdDevValue_T; - - /** Define the cabin capacity (resource, e.g., 200 seats). - <br>The capacity is expressed as a double to cope with overbooking. */ - typedef double CabinCapacity_T; - - /** Define the number of seat which could not be used for the booking. */ - typedef double BlockSpace_T; - - /** Define the code of the fare family (e.g., 1, 2, 3, etc.). */ - typedef std::string FamilyCode_T; - - /** Define the booking class code (product segment class, e.g., H, - B, K, etc.). */ - typedef std::string ClassCode_T; - - /** Define a list of class code. */ - typedef std::vector<ClassCode_T> ClassCodeList_T; - - /** Define the sub-class code (e.g., 0, 1, 2, etc.). The subclass is - a sub-structure for the booking class, allowing to have specific - rules for some criteria like POS. */ - typedef unsigned short SubclassCode_T; - - /** Define the flight path code (code made by a suite of flight numbers). */ - typedef std::string FlightPathCode_T; - - /** Define an availability. */ - typedef double Availability_T; - - /** Define an availability. */ - typedef bool AvailabilityStatus_T; - - /** Define a list of availabilities. */ - typedef std::vector<Availability_T> BucketAvailabilities_T; - - /** Define a identity number. */ - typedef unsigned long Identity_T; - - /** Define a map between a BookingID and a TravelSolutionID. */ - typedef std::map<Identity_T, Identity_T> BookingTSIDMap_T; - - /** Define a number of requests. */ - typedef double NbOfRequests_T; - - /** Define a number of bookings. */ - typedef NbOfRequests_T NbOfBookings_T; - - /** Define a number of cancellations (travellers). */ - typedef NbOfRequests_T NbOfCancellations_T; - - /** Define a number of no-shows. */ - typedef NbOfRequests_T NbOfNoShows_T; - - /** Define a number of fare rules. */ - typedef double NbOfFareRules_T; - - /** Define a number of yields. */ - typedef double NbOfYields_T; - - /** Define a number of InventoryControlRules. */ - typedef double NbOfInventoryControlRules_T; - - /** Define a number of flight dates. */ - typedef double NbOfFlightDates_T; - - /** Define the commited space of a cabin. */ - typedef double CommitedSpace_T; - - /** Define the unsold protection (UPR). */ - typedef double UPR_T; - - /** Define availibility of booking limit. */ - typedef bool CensorshipFlag_T; - - /** Define the list of censorship flags (une list per booking - class, one censorship flag per DCP). */ - typedef std::vector<bool> CensorshipFlagList_T; - - /** Define the value of the booking limit. */ - typedef double BookingLimit_T; - - /** Define the value of the authorization level. */ - typedef double AuthorizationLevel_T; - - /** Define the value of the adjustment for cabin capacity. */ - typedef double CapacityAdjustment_T; - - /** Define the rate of overbooking */ - typedef double OverbookingRate_T; - - /** Define the bookingRatio (for instance OnD bookings - over whole class bookings). */ - typedef double BookingRatio_T; - - /** Define the list of class codes as a string. */ - typedef std::string ClassList_String_T; - - /** Define a number of segment-dates (in a path). */ - typedef unsigned short NbOfSegments_T; - - /** Define a number of airlines (in a path). */ - typedef unsigned short NbOfAirlines_T; - - /** Define the fare of a travel solution. */ - typedef double Fare_T; - - /** Define the yield of a virtual class. */ - typedef double Yield_T; - - /** Define the Bid-Price. */ - typedef double BidPrice_T; - - /** Define a Bid-Price Vector. */ - typedef std::vector<BidPrice_T> BidPriceVector_T; - - /** Define the current index of a Bid-Price Vector (for a given LegCabin). */ - typedef unsigned int SeatIndex_T; - - /** Define a number of travel solutions - (in a travel solution block). */ - typedef unsigned short NbOfTravelSolutions_T; - - /** Define a indicator of demand to class matching. */ - typedef double MatchingIndicator_T; - - /** Define an amount of revenue. */ - typedef double Revenue_T; - - /** Define the name of an event. */ - typedef std::string EventName_T; - - /** Define the name of an database connection. */ - typedef std::string DBConnectionName_T; - - /** Define a number of events. */ - typedef double NbOfEvents_T; - - /** Frequency of the Data Collection Point description (daily, monthly or - detailed). */ - typedef std::string DCPModeFrequency_T; - - /** Mode of the Data Collection Point description (Forecaster only, - Optimizer only or both of them). */ - typedef std::string DCPMode_T; - - /** Mode of the forecaster. */ - typedef std::string ForecasterMode_T; - - /** Limit of similar flight-dates used in the forecaster. */ - typedef short HistoricalDataLimit_T; - - /** Mode of the forecaster. */ - typedef std::string OptimizerMode_T; - - /** Mode of the forecaster. */ - typedef std::string DicoOptimizerMode_T; - - /** Mode of inventory control. */ - typedef std::string ControlMode_T; - - /** Define the name of a multiplier. */ - typedef double Multiplier_T; - - /** Define the name of a WTP-component of characteristics pattern. */ - typedef boost::tuples::tuple<double, double> CharacteristicsWTP_tuple_T; - - /** Define the name of sell-up probability flag for RMS optimizer. */ - typedef bool SellupFlagForOptimizer_T; - - /** Define the name of sell-up probability for RMS optimizer. */ - typedef double SellupProbabilityForOptimizer_T; - - /** Define the name of sell-up probability vector for RMS optimizer. */ - typedef std::vector<SellupProbabilityForOptimizer_T> - SellupProbabilityVector_T; - - /** Define the demand for a policy. */ - typedef NbOfBookings_T PolicyDemand_T; - - /** Define the total revenue of an unconstrained policy. */ - typedef double PolicyRevenue_T; - - /** Define the total revenue of an unconstrained policy. */ - typedef double PolicyRevenue_T; - - // ///////////// Technical //////////////// - /** File or directory name. - <br>It may contain paths, relative or absolute (e.g., /foo/bar - or C:\foo\bar). */ - typedef std::string Filename_T; - - /** Pointer on the STDAIR Service handler. */ - typedef boost::shared_ptr<STDAIR_Service> STDAIR_ServicePtr_T; - - // ////////////////////////////////////////////////////////////////////// - // Random generation - /** Seed for the random generation, so that it can be reproductible. */ - typedef unsigned long int RandomSeed_T; - - /** Random number generator. */ - typedef boost::minstd_rand BaseGenerator_T; - - /** Uniform random generator. */ - typedef boost::variate_generator<stdair::BaseGenerator_T&, - boost::uniform_real<> > UniformGenerator_T; - - // ////////////////////////////////////////////////////////////////////// - // Probability - /** Probability */ - typedef float Probability_T; - - // ////////////////////////////////////////////////////////////////////// - // Date / Time - /** Time duration in (integer) number of seconds */ - typedef long int IntDuration_T; - - /** Time duration in (long long integer) number of milliseconds */ - typedef long long int LongDuration_T; - - /** Duration in (float) number of time units */ - typedef float FloatDuration_T; - - // ////////////////////////////////////////////////////////////////////// - // Basic types - /** Event type */ - typedef std::string EventType_T; - - /** Count */ - typedef int Count_T; - - /** City code */ - typedef LocationCode_T CityCode_T; - - /** Trip type */ - typedef std::string TripType_T; - - /** Monetary value */ - typedef double MonetaryValue_T; - - /** Real number */ - typedef double RealNumber_T; - - /** Type definition for the hashed key of the DemandStreamKey object. */ - typedef std::string DemandStreamKeyStr_T; - - /** Type of booking channel (D=direct, I=indirect, N=oNline, F=oFfline). */ - typedef std::string ChannelLabel_T; - - /** Type of trip type (RO=outbound of round-trip, RI=inbound of round-trip, - OW=one way). */ - typedef std::string TripType_T; - - /** Type of frequent flyer (P=Platinum, G=Gold, S=Silver, M=Member, N=None). */ - typedef std::string FrequentFlyer_T; - - /** Key of a STL map. */ - typedef std::string MapKey_T; - - /** List of keys. */ - typedef std::vector<std::string> KeyList_T; - - /** Map between the cabin codes and the booking class codes within - each cabin. */ - typedef std::map<CabinCode_T, ClassList_String_T> CabinBookingClassMap_T; - -} - -#define CATCH_ALL_EXCEPTIONS \ - catch (const stdair::FileNotFoundException& ex) { \ - std::cerr << "FileNotFoundException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedLogServiceException& ex) { \ - std::cerr << "NonInitialisedLogServiceException" \ - << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedDBSessionManagerException& ex) { \ - std::cerr << "NonInitialisedDBSessionManagerException" \ - << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedServiceException& ex) { \ - std::cerr << "NonInitialisedServiceException" \ - << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedContainerException& ex) { \ - std::cerr << "NonInitialisedContainerException" \ - << ex.what() <<std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedRelationShipException& ex) { \ - std::cerr << "NonInitialisedRelationShipException" \ - << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::MemoryAllocationException& ex) { \ - std::cerr << "MemoryAllocationException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::ObjectLinkingException& ex) { \ - std::cerr << "ObjectLinkingException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::CodeConversionException& ex) { \ - std::cerr << "CodeConversionException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::CodeDuplicationException& ex) { \ - std::cerr << "CodeDuplicationException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::ObjectCreationgDuplicationException& ex) { \ - std::cerr << "ObjectCreationgDuplicationException" \ - << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::ObjectNotFoundException& ex) { \ - std::cerr << "ObjectNotFoundException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::DocumentNotFoundException& ex) { \ - std::cerr << "DocumentNotFoundException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::SQLDatabaseConnectionImpossibleException& ex) {\ - std::cerr << "SQLDatabaseConnectionImpossibleException" \ - << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::SQLDatabaseException& ex) { \ - std::cerr << "SQLDatabaseException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::ParserException& ex) { \ - std::cerr << "ParserException" << ex.what() << std::endl; \ - return -1; \ - \ - } catch (const stdair::RootException& ex) { \ - std::cerr << "RootException" << ex.what() <<std::endl; \ - return -1; \ - \ - } catch (const std::exception& stde) { \ - std::cerr << "Standard exception: " << stde.what() << std::endl; \ - return -1; \ - \ - } catch (...) { \ - return -1; \ - } - -#endif // __STDAIR_STDAIR_TYPES_HPP Modified: trunk/stdair/stdair/basic/BasConst.cpp =================================================================== --- trunk/stdair/stdair/basic/BasConst.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -3,8 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <string> -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir #include <stdair/basic/BasConst_General.hpp> #include <stdair/basic/BasConst_Request.hpp> #include <stdair/basic/BasConst_Inventory.hpp> Modified: trunk/stdair/stdair/basic/BasConst_BookingClass.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_BookingClass.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,8 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasConst_General.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_General.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_General.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasConst_Inventory.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_Inventory.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_Inventory.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,8 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_Period_BOM.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,8 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasConst_Request.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_Request.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_Request.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -5,7 +5,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // StdAir -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_TravelSolution.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,8 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// LATUS Common -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasConst_Yield.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_Yield.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasConst_Yield.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,8 +4,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/stdair_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasDBParams.hpp =================================================================== --- trunk/stdair/stdair/basic/BasDBParams.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasDBParams.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,7 +8,7 @@ #include <iosfwd> #include <string> // Stdair -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_db.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/BasLogParams.hpp =================================================================== --- trunk/stdair/stdair/basic/BasLogParams.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/BasLogParams.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,7 +8,7 @@ #include <iosfwd> #include <string> // Stdair -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_log.hpp> namespace stdair { Modified: trunk/stdair/stdair/basic/PassengerType.cpp =================================================================== --- trunk/stdair/stdair/basic/PassengerType.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/basic/PassengerType.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -5,9 +5,7 @@ #include <cassert> #include <sstream> // StdAir -#include <stdair/service/Logger.hpp> -// Stdair -#include <stdair/STDAIR_Types.hpp> +#include <stdair/stdair_exceptions.hpp> #include <stdair/basic/PassengerType.hpp> namespace stdair { @@ -53,7 +51,8 @@ } // ////////////////////////////////////////////////////////////////////// - std::string PassengerType::getTypeLabelAsString(const EN_PassengerType& iType){ + std::string PassengerType:: + getTypeLabelAsString (const EN_PassengerType& iType) { std::ostringstream oStr; oStr << _typeLabels[iType]; return oStr.str(); Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,14 +4,13 @@ // STL #include <cassert> // STDAIR +#include <stdair/stdair_types.hpp> #include <stdair/bom/AirlineFeature.hpp> namespace stdair { // //////////////////////////////////////////////////////////////////// - AirlineFeature:: - AirlineFeature (const Key_T& iKey) - : _key (iKey) { + AirlineFeature::AirlineFeature (const Key_T& iKey) : _key (iKey) { } // //////////////////////////////////////////////////////////////////// Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/AirlineFeatureKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/AirlineFeatureKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineFeatureKey.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/AirlineFeatureKey.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,7 +4,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/AirlineFeatureTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,8 +8,8 @@ // STL #include <map> #include <list> -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/bom/key_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineStruct.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/AirlineStruct.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -7,6 +7,7 @@ #include <ostream> #include <sstream> // StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/AirlineStruct.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/AirlineStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineStruct.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/AirlineStruct.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -9,7 +9,6 @@ #include <string> #include <vector> // StdAir -#include <stdair/STDAIR_Types.hpp> #include <stdair/basic/StructAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BomAbstract.hpp =================================================================== --- trunk/stdair/stdair/bom/BomAbstract.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BomAbstract.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -14,8 +14,6 @@ #include <string> #include <map> #include <typeinfo> -// StdAir -#include <stdair/STDAIR_Types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BomHolder.hpp =================================================================== --- trunk/stdair/stdair/bom/BomHolder.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BomHolder.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -9,10 +9,12 @@ #include <list> #include <map> // StdAir +#include <stdair/bom/key_types.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/BomHolderKey.hpp> namespace stdair { + /** Class representing the holders of BOM. */ template <typename BOM> class BomHolder : public stdair::BomAbstract { Modified: trunk/stdair/stdair/bom/BomHolderKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BomHolderKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BomHolderKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,10 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// STL +#include <ostream> +#include <sstream> +// StdAir #include <stdair/bom/BomHolderKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BomManager.cpp =================================================================== --- trunk/stdair/stdair/bom/BomManager.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BomManager.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -3,9 +3,7 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <cassert> -#include <ostream> // StdAir -#include <stdair/STDAIR_Types.hpp> #include <stdair/basic/BasConst_BomManager.hpp> #include <stdair/bom/BomManager.hpp> Modified: trunk/stdair/stdair/bom/BomManager.hpp =================================================================== --- trunk/stdair/stdair/bom/BomManager.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BomManager.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -6,8 +6,8 @@ // ////////////////////////////////////////////////////////////////////// // STL #include <iosfwd> -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/stdair_exceptions.hpp> #include <stdair/bom/BomAbstract.hpp> #include <stdair/bom/BomHolder.hpp> #include <stdair/service/Logger.hpp> Modified: trunk/stdair/stdair/bom/BomRootKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRootKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BomRootKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,10 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// STL +#include <ostream> +#include <sstream> +// StdAir #include <stdair/bom/BomRootKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingClassKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BookingClassKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/BookingClassKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingClassKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassKey.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BookingClassKey.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,10 +4,11 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir #include <stdair/bom/KeyAbstract.hpp> namespace stdair { + /** Key of booking-class. */ struct BookingClassKey : public KeyAbstract { Modified: trunk/stdair/stdair/bom/BookingClassTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingClassTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BookingClassTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,8 +8,8 @@ // STL #include <map> #include <list> -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/bom/key_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingRequestStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BookingRequestStruct.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -7,6 +7,7 @@ #include <ostream> #include <sstream> // StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/BookingRequestStruct.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BookingRequestStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BookingRequestStruct.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,7 +8,6 @@ #include <iosfwd> #include <string> // StdAir -#include <stdair/STDAIR_Types.hpp> #include <stdair/basic/StructAbstract.hpp> #include <stdair/bom/BookingRequestTypes.hpp> Modified: trunk/stdair/stdair/bom/Bucket.cpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/Bucket.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,6 +4,7 @@ // STL #include <cassert> // STDAIR +#include <stdair/stdair_types.hpp> #include <stdair/bom/Bucket.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/Bucket.hpp =================================================================== --- trunk/stdair/stdair/bom/Bucket.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/Bucket.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -65,7 +65,6 @@ stdair::CabinCapacity_T _availability; stdair::NbOfSeats_T _nbOfSeats; stdair::SeatIndex_T _seatIndex; - }; } Modified: trunk/stdair/stdair/bom/BucketKey.cpp =================================================================== --- trunk/stdair/stdair/bom/BucketKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BucketKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/BucketKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/BucketKey.hpp =================================================================== --- trunk/stdair/stdair/bom/BucketKey.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BucketKey.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,6 +8,7 @@ #include <stdair/bom/KeyAbstract.hpp> namespace stdair { + /** Key of booking-class. */ struct BucketKey : public KeyAbstract { Modified: trunk/stdair/stdair/bom/BucketTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/BucketTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/BucketTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,11 +8,12 @@ // STL #include <map> #include <list> -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/bom/key_types.hpp> namespace stdair { - // Forward declarations. + + // Forward declarations class Bucket; /** Define the Inventory list. */ Modified: trunk/stdair/stdair/bom/EventQueue.cpp =================================================================== --- trunk/stdair/stdair/bom/EventQueue.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/EventQueue.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -2,6 +2,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/stdair_types.hpp> #include <stdair/bom/EventStruct.hpp> #include <stdair/bom/EventQueue.hpp> Modified: trunk/stdair/stdair/bom/EventQueue.hpp =================================================================== --- trunk/stdair/stdair/bom/EventQueue.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/EventQueue.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -7,7 +7,6 @@ // STL #include <iosfwd> // StdAir -#include <stdair/STDAIR_Types.hpp> #include <stdair/basic/StructAbstract.hpp> #include <stdair/bom/EventTypes.hpp> Modified: trunk/stdair/stdair/bom/EventStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/EventStruct.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/EventStruct.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -2,6 +2,7 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR +#include <stdair/stdair_types.hpp> #include <stdair/basic/BasConst_General.hpp> #include <stdair/bom/BookingRequestStruct.hpp> #include <stdair/bom/EventStruct.hpp> Modified: trunk/stdair/stdair/bom/EventStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/EventStruct.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/EventStruct.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -5,7 +5,6 @@ // Import section // ////////////////////////////////////////////////////////////////////// // STDAIR -#include <stdair/STDAIR_Types.hpp> #include <stdair/bom/BookingRequestTypes.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/EventTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/EventTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/EventTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,7 +8,7 @@ // STL #include <map> // STDAIR -#include <stdair/STDAIR_Types.hpp> +#include <stdair/bom/key_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FareFamilyKey.cpp =================================================================== --- trunk/stdair/stdair/bom/FareFamilyKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FareFamilyKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/FareFamilyKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FareFamilyKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FareFamilyKey.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FareFamilyKey.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,10 +4,11 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir #include <stdair/bom/KeyAbstract.hpp> namespace stdair { + /** Key of fare family. */ struct FareFamilyKey : public KeyAbstract { Modified: trunk/stdair/stdair/bom/FareFamilyTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FareFamilyTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FareFamilyTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,8 +8,8 @@ // STL #include <map> #include <list> -// STDAIR -#include <stdair/STDAIR_Types.hpp> +// StdAir +#include <stdair/bom/key_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDate.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDate.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FlightDate.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,6 +4,7 @@ // STL #include <cassert> // STDAIR +#include <stdair/stdair_types.hpp> #include <stdair/bom/FlightDate.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDateKey.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.cpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FlightDateKey.cpp 2010-12-02 22:17:18 UTC (rev 368) @@ -1,7 +1,8 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir +#include <stdair/stdair_types.hpp> #include <stdair/bom/FlightDateKey.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDateKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateKey.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FlightDateKey.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -4,7 +4,7 @@ // ////////////////////////////////////////////////////////////////////// // Import section // ////////////////////////////////////////////////////////////////////// -// STDAIR +// StdAir #include <stdair/bom/KeyAbstract.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightDateTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightDateTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FlightDateTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -9,7 +9,7 @@ #include <map> #include <list> // STDAIR -#include <stdair/STDAIR_Types.hpp> +#include <stdair/bom/key_types.hpp> namespace stdair { Modified: trunk/stdair/stdair/bom/FlightPeriodTypes.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightPeriodTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) +++ trunk/stdair/stdair/bom/FlightPeriodTypes.hpp 2010-12-02 22:17:18 UTC (rev 368) @@ -8,8 +8,8 @@ // STL #include <map> #include <list> -// STDAIR -#include <stdair/S... [truncated message content] |
From: <qua...@us...> - 2010-12-02 15:54:52
|
Revision: 367 http://stdair.svn.sourceforge.net/stdair/?rev=367&view=rev Author: quannaus Date: 2010-12-02 15:54:45 +0000 (Thu, 02 Dec 2010) Log Message: ----------- [dev] Added the basic parser types and the constructor for the exceptions. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Types.hpp trunk/stdair/stdair/basic/BasConst.cpp trunk/stdair/stdair/basic/BasConst_General.hpp trunk/stdair/stdair/basic/PassengerType.cpp trunk/stdair/stdair/basic/sources.mk trunk/stdair/stdair/bom/BomManager.hpp trunk/stdair/stdair/command/DBManagerForAirlines.cpp trunk/stdair/stdair/factory/FacBomManager.hpp trunk/stdair/stdair/service/DBSessionManager.cpp trunk/stdair/stdair/service/Logger.cpp Added Paths: ----------- trunk/stdair/stdair/basic/BasParserHelperTypes.hpp trunk/stdair/stdair/basic/BasParserTypes.hpp Modified: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-12-02 15:54:45 UTC (rev 367) @@ -26,44 +26,134 @@ } namespace stdair { - // Forward declarations class STDAIR_Service; - // ///////// Exceptions /////////// - class RootException : public std::exception { }; - - class FileNotFoundException : public RootException { }; - - class NonInitialisedLogServiceException : public RootException { }; - - class NonInitialisedDBSessionManagerException : public RootException { }; - - class NonInitialisedServiceException : public RootException { }; - - class NonInitialisedContainerException : public RootException { }; - - class NonInitialisedRelationShipException : public RootException { }; - - class MemoryAllocationException : public RootException { }; - - class ObjectLinkingException : public RootException { }; - - class ParserException : public RootException { }; - - class DocumentNotFoundException : public RootException { }; - - class CodeConversionException : public ParserException { }; - - class CodeDuplicationException : public ParserException { }; - - class ObjectCreationgDuplicationException : public ParserException { }; - - class ObjectNotFoundException : public RootException { }; - - class SQLDatabaseException : public RootException { }; - + // //////////////////////////////////////////////////////////////////// + // + // Exceptions + // + // //////////////////////////////////////////////////////////////////// + // //////////////////////////////////////////////////////////////////// + class RootException : public std::exception { + public: + /** Constructors. */ + RootException (const std::string& iWhat) : _what (iWhat) {} + RootException () : _what ("No more details") {} + /** Destructor. */ + virtual ~RootException() throw() {} + /** Give the details of the exception. */ + const char* what() const throw() { return _what.c_str(); } + protected: + /** Details for the exception. */ + std::string _what; + }; + // //////////////////////////////////////////////////////////////////// + class FileNotFoundException : public RootException { + public: + /** Constructor. */ + FileNotFoundException (const std::string& iWhat) : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class NonInitialisedLogServiceException : public RootException { + public: + /** Constructor. */ + NonInitialisedLogServiceException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class NonInitialisedDBSessionManagerException : public RootException { + public: + /** Constructor. */ + NonInitialisedDBSessionManagerException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class NonInitialisedServiceException : public RootException { + public: + /** Constructor. */ + NonInitialisedServiceException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class NonInitialisedContainerException : public RootException { + public: + /** Constructor. */ + NonInitialisedContainerException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class NonInitialisedRelationShipException : public RootException { + public: + /** Constructor. */ + NonInitialisedRelationShipException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class MemoryAllocationException : public RootException { + public: + /** Constructor. */ + MemoryAllocationException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class ObjectLinkingException : public RootException { + public: + /** Constructor. */ + ObjectLinkingException (const std::string& iWhat) : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class ParserException : public RootException { + public: + /** Constructor. */ + ParserException (const std::string& iWhat) : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class DocumentNotFoundException : public RootException { + public: + /** Constructor. */ + DocumentNotFoundException (const std::string& iWhat) + : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class CodeConversionException : public ParserException { + public: + /** Constructor. */ + CodeConversionException (const std::string& iWhat) + : ParserException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class CodeDuplicationException : public ParserException { + public: + /** Constructor. */ + CodeDuplicationException (const std::string& iWhat) + : ParserException(iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class ObjectCreationgDuplicationException : public ParserException { + public: + /** Constructor. */ + ObjectCreationgDuplicationException (const std::string& iWhat) + : ParserException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class ObjectNotFoundException : public RootException { + public: + /** Constructor. */ + ObjectNotFoundException (const std::string& iWhat) : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// + class SQLDatabaseException : public RootException { + public: + /** Constructor. */ + SQLDatabaseException (const std::string& iWhat) : RootException (iWhat) {} + }; + // //////////////////////////////////////////////////////////////////// class SQLDatabaseConnectionImpossibleException : public SQLDatabaseException { + public: + /** Constructor. */ + SQLDatabaseConnectionImpossibleException (const std::string& iWhat) + : SQLDatabaseException (iWhat) {} }; // /////////////// Log ///////////// @@ -493,81 +583,88 @@ } -#define CATCH_ALL_EXCEPTIONS \ - catch (const stdair::FileNotFoundException& ex) { \ - std::cerr << "FileNotFoundException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedLogServiceException& ex) { \ - std::cerr << "NonInitialisedLogServiceException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedDBSessionManagerException& ex) { \ - std::cerr << "NonInitialisedDBSessionManagerException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedServiceException& ex) { \ - std::cerr << "NonInitialisedServiceException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedContainerException& ex) { \ - std::cerr << "NonInitialisedContainerException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::NonInitialisedRelationShipException& ex) { \ - std::cerr << "NonInitialisedRelationShipException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::MemoryAllocationException& ex) { \ - std::cerr << "MemoryAllocationException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::ObjectLinkingException& ex) { \ - std::cerr << "ObjectLinkingException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::CodeConversionException& ex) { \ - std::cerr << "CodeConversionException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::CodeDuplicationException& ex) { \ - std::cerr << "CodeDuplicationException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::ObjectCreationgDuplicationException& ex) { \ - std::cerr << "ObjectCreationgDuplicationException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::ObjectNotFoundException& ex) { \ - std::cerr << "ObjectNotFoundException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::DocumentNotFoundException& ex) { \ - std::cerr << "DocumentNotFoundException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::SQLDatabaseConnectionImpossibleException& ex) { \ - std::cerr << "SQLDatabaseConnectionImpossibleException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::SQLDatabaseException& ex) { \ - std::cerr << "SQLDatabaseException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::ParserException& ex) { \ - std::cerr << "ParserException" << std::endl; \ - return -1; \ - \ - } catch (const stdair::RootException& ex) { \ - std::cerr << "RootException" << std::endl; \ - return -1; \ - \ - } catch (const std::exception& stde) { \ - std::cerr << "Standard exception: " << stde.what() << std::endl; \ - return -1; \ - \ - } catch (...) { \ - return -1; \ - } \ +#define CATCH_ALL_EXCEPTIONS \ + catch (const stdair::FileNotFoundException& ex) { \ + std::cerr << "FileNotFoundException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::NonInitialisedLogServiceException& ex) { \ + std::cerr << "NonInitialisedLogServiceException" \ + << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::NonInitialisedDBSessionManagerException& ex) { \ + std::cerr << "NonInitialisedDBSessionManagerException" \ + << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::NonInitialisedServiceException& ex) { \ + std::cerr << "NonInitialisedServiceException" \ + << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::NonInitialisedContainerException& ex) { \ + std::cerr << "NonInitialisedContainerException" \ + << ex.what() <<std::endl; \ + return -1; \ + \ + } catch (const stdair::NonInitialisedRelationShipException& ex) { \ + std::cerr << "NonInitialisedRelationShipException" \ + << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::MemoryAllocationException& ex) { \ + std::cerr << "MemoryAllocationException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::ObjectLinkingException& ex) { \ + std::cerr << "ObjectLinkingException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::CodeConversionException& ex) { \ + std::cerr << "CodeConversionException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::CodeDuplicationException& ex) { \ + std::cerr << "CodeDuplicationException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::ObjectCreationgDuplicationException& ex) { \ + std::cerr << "ObjectCreationgDuplicationException" \ + << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::ObjectNotFoundException& ex) { \ + std::cerr << "ObjectNotFoundException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::DocumentNotFoundException& ex) { \ + std::cerr << "DocumentNotFoundException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::SQLDatabaseConnectionImpossibleException& ex) {\ + std::cerr << "SQLDatabaseConnectionImpossibleException" \ + << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::SQLDatabaseException& ex) { \ + std::cerr << "SQLDatabaseException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::ParserException& ex) { \ + std::cerr << "ParserException" << ex.what() << std::endl; \ + return -1; \ + \ + } catch (const stdair::RootException& ex) { \ + std::cerr << "RootException" << ex.what() <<std::endl; \ + return -1; \ + \ + } catch (const std::exception& stde) { \ + std::cerr << "Standard exception: " << stde.what() << std::endl; \ + return -1; \ + \ + } catch (...) { \ + return -1; \ + } #endif // __STDAIR_STDAIR_TYPES_HPP Modified: trunk/stdair/stdair/basic/BasConst.cpp =================================================================== --- trunk/stdair/stdair/basic/BasConst.cpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/basic/BasConst.cpp 2010-12-02 15:54:45 UTC (rev 367) @@ -29,6 +29,9 @@ const Duration_T NULL_BOOST_TIME_DURATION = boost::posix_time::hours(0)+ boost::posix_time::minutes (0) + boost::posix_time::seconds (0); + + /** Default number of days in a year. */ + const unsigned int DEFAULT_NB_OF_DAYS_IN_A_YEAR = 365; // //////// (Flight-)Period-related BOM /////// /** Default number of duration days. */ Modified: trunk/stdair/stdair/basic/BasConst_General.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_General.hpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/basic/BasConst_General.hpp 2010-12-02 15:54:45 UTC (rev 367) @@ -74,6 +74,9 @@ /** Default null classCode value (''). */ extern const ClassCode_T DEFAULT_NULL_CLASS_CODE; + + /** Default number of days in a year. */ + extern const unsigned int DEFAULT_NB_OF_DAYS_IN_A_YEAR; } #endif // __STDAIR_BAS_BASCONST_GENERAL_HPP Added: trunk/stdair/stdair/basic/BasParserHelperTypes.hpp =================================================================== --- trunk/stdair/stdair/basic/BasParserHelperTypes.hpp (rev 0) +++ trunk/stdair/stdair/basic/BasParserHelperTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) @@ -0,0 +1,59 @@ +#ifndef __STDAIR_BAS_BASCOMPARSERHELPERTYPES_HPP +#define __STDAIR_BAS_BASCOMPARSERHELPERTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +#include <sstream> +// STDAIR +#include <stdair/STDAIR_Types.hpp> +#include <stdair/service/Logger.hpp> + +namespace stdair { + // //////////////////////////////////////////////////////////////////// + // + // Parser structure helper + // + // //////////////////////////////////////////////////////////////////// + /** Date & time element parser. */ + template <int MIN = 0, int MAX = 0> + struct date_time_element { + unsigned int _value; + + // Constructors. + date_time_element () { } + date_time_element (const date_time_element& t) + : _value (t._value) { } + date_time_element (int i) : _value (i) { } + // Checker. + void check () const { + if (_value < MIN || _value > MAX) { + std::ostringstream oMessage; + oMessage << "The value: " << _value << " is out of range (" + << MIN << ", " << MAX << ")"; + throw stdair::ParserException (oMessage.str()); + } + } + }; + + /** Operator overload. */ + template <int MIN, int MAX> + inline date_time_element<MIN, MAX> operator* (const date_time_element<MIN, MAX>& o1, const date_time_element<MIN, MAX>& o2) { + return date_time_element<MIN, MAX> (o1._value * o2._value); + } + template <int MIN, int MAX> + inline date_time_element<MIN, MAX> operator+ (const date_time_element<MIN, MAX>& o1, const date_time_element<MIN, MAX>& o2) { + return date_time_element<MIN, MAX> (o1._value + o2._value); + } + + /** Type definitions for the date & time elements. */ + typedef date_time_element<0, 23> hour_t; + typedef date_time_element<0, 59> minute_t; + typedef date_time_element<0, 59> second_t; + typedef date_time_element<1900, 2100> year_t; + typedef date_time_element<1, 12> month_t; + typedef date_time_element<1, 31> day_t; +} +#endif // __STDAIR_BAS_BASCOMPARSERHELPERTYPES_HPP Added: trunk/stdair/stdair/basic/BasParserTypes.hpp =================================================================== --- trunk/stdair/stdair/basic/BasParserTypes.hpp (rev 0) +++ trunk/stdair/stdair/basic/BasParserTypes.hpp 2010-12-02 15:54:45 UTC (rev 367) @@ -0,0 +1,54 @@ +#ifndef __STDAIR_BAS_BASCOMPARSERTYPES_HPP +#define __STDAIR_BAS_BASCOMPARSERTYPES_HPP + +// ////////////////////////////////////////////////////////////////////// +// Import section +// ////////////////////////////////////////////////////////////////////// +// STL +#include <string> +// Boost Spirit (Parsing) +#include <boost/spirit/include/qi.hpp> +#include <boost/spirit/include/phoenix_core.hpp> +#include <boost/spirit/include/phoenix_operator.hpp> +#include <boost/spirit/include/support_multi_pass.hpp> +// STDAIR +#include <stdair/basic/BasParserHelperTypes.hpp> + +namespace stdair { + + // //////////////////////////////////////////////////////////////////// + // + // Definition of Basic Types + // + // //////////////////////////////////////////////////////////////////// + // The types of iterator, scanner and rule are then derived from + // the parsing unit. + typedef std::istreambuf_iterator<char> base_iterator_t; + typedef boost::spirit::multi_pass<base_iterator_t> iterator_t; + + // //////////////////////////////////////////////////////////////////// + // + // Parser related types + // + // //////////////////////////////////////////////////////////////////// + /** 1-digit-integer parser */ + typedef boost::spirit::qi::int_parser<unsigned int, 10, 1, 1> int1_p_t; + + /** 2-digit-integer parser */ + typedef boost::spirit::qi::uint_parser<int, 10, 2, 2> uint2_p_t; + + /** 4-digit-integer parser */ + typedef boost::spirit::qi::uint_parser<int, 10, 4, 4> uint4_p_t; + + /** Up-to-4-digit-integer parser */ + typedef boost::spirit::qi::uint_parser<int, 10, 1, 4> uint1_4_p_t; + + /** Date & time element parsers. */ + typedef boost::spirit::qi::uint_parser<hour_t, 10, 2, 2> hour_p_t; + typedef boost::spirit::qi::uint_parser<minute_t, 10, 2, 2> minute_p_t; + typedef boost::spirit::qi::uint_parser<second_t, 10, 2, 2> second_p_t; + typedef boost::spirit::qi::uint_parser<year_t, 10, 4, 4> year_p_t; + typedef boost::spirit::qi::uint_parser<month_t, 10, 2, 2> month_p_t; + typedef boost::spirit::qi::uint_parser<day_t, 10, 2, 2> day_p_t; +} +#endif // __STDAIR_BAS_BASCOMPARSERTYPES_HPP Modified: trunk/stdair/stdair/basic/PassengerType.cpp =================================================================== --- trunk/stdair/stdair/basic/PassengerType.cpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/basic/PassengerType.cpp 2010-12-02 15:54:45 UTC (rev 367) @@ -35,9 +35,10 @@ if (_type == LAST_VALUE) { const std::string& lLabels = describeLabels(); - STDAIR_LOG_ERROR ("The passenger type '" << iType - << "' is not known. Known passenger types: " << lLabels); - throw CodeConversionException(); + std::ostringstream oMessage; + oMessage << "The passenger type '" << iType + << "' is not known. Known passenger types: " << lLabels; + throw CodeConversionException (oMessage.str()); } } Modified: trunk/stdair/stdair/basic/sources.mk =================================================================== --- trunk/stdair/stdair/basic/sources.mk 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/basic/sources.mk 2010-12-02 15:54:45 UTC (rev 367) @@ -1,5 +1,7 @@ stdair_bas_h_sources = \ $(top_srcdir)/stdair/basic/BasTypes.hpp \ + $(top_srcdir)/stdair/basic/BasParserTypes.hpp \ + $(top_srcdir)/stdair/basic/BasParserHelperTypes.hpp \ $(top_srcdir)/stdair/basic/BasConst_General.hpp \ $(top_srcdir)/stdair/basic/BasConst_Request.hpp \ $(top_srcdir)/stdair/basic/BasConst_Inventory.hpp \ Modified: trunk/stdair/stdair/bom/BomManager.hpp =================================================================== --- trunk/stdair/stdair/bom/BomManager.hpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/bom/BomManager.hpp 2010-12-02 15:54:45 UTC (rev 367) @@ -62,9 +62,10 @@ if (itHolder == lHolderMap.end()) { std::string lName (typeid (OBJECT2).name()); - STDAIR_LOG_ERROR ("Cannot find the holder of type " << lName - << " within: " << iObject1.describeKey()); - throw NonInitialisedContainerException (); + std::ostringstream oMessage; + oMessage << "Cannot find the holder of type " << lName + << " within: " << iObject1.describeKey(); + throw NonInitialisedContainerException (oMessage.str()); } const BomHolder<OBJECT2>* lBomHolder_ptr = Modified: trunk/stdair/stdair/command/DBManagerForAirlines.cpp =================================================================== --- trunk/stdair/stdair/command/DBManagerForAirlines.cpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/command/DBManagerForAirlines.cpp 2010-12-02 15:54:45 UTC (rev 367) @@ -42,8 +42,7 @@ ioSelectStatement.execute(); } catch (std::exception const& lException) { - STDAIR_LOG_ERROR ("Error: " << lException.what()); - throw SQLDatabaseException(); + throw SQLDatabaseException (lException.what()); } } @@ -73,8 +72,7 @@ ioSelectStatement.execute(); } catch (std::exception const& lException) { - STDAIR_LOG_ERROR ("Error: " << lException.what()); - throw SQLDatabaseException(); + throw SQLDatabaseException (lException.what()); } } @@ -90,8 +88,7 @@ hasStillData = ioStatement.fetch(); } catch (std::exception const& lException) { - STDAIR_LOG_ERROR ("Error: " << lException.what()); - throw SQLDatabaseException(); + throw SQLDatabaseException (lException.what()); } return hasStillData; @@ -100,9 +97,7 @@ // ////////////////////////////////////////////////////////////////////// void DBManagerForAirlines::updateAirlineInDB (DBSession_T& ioSociSession, const AirlineStruct& iAirline) { - try { - // Begin a transaction on the database ioSociSession.begin(); @@ -130,8 +125,7 @@ // STDAIR_LOG_DEBUG ("[" << lAirlineCode << "] " << iAirline); } catch (std::exception const& lException) { - STDAIR_LOG_ERROR ("Error: " << lException.what()); - throw SQLDatabaseException(); + throw SQLDatabaseException (lException.what()); } } @@ -142,7 +136,6 @@ bool oHasRetrievedAirline = false; try { - // Prepare the SQL request corresponding to the select statement DBRequestStatement_T lSelectStatement (ioSociSession); prepareSelectOnAirlineCodeStatement (ioSociSession, lSelectStatement, @@ -162,8 +155,7 @@ // STDAIR_LOG_DEBUG ("[" << iDocID << "] " << ioAirline); } catch (std::exception const& lException) { - STDAIR_LOG_ERROR ("Error: " << lException.what()); - throw SQLDatabaseException(); + throw SQLDatabaseException (lException.what()); } return oHasRetrievedAirline; Modified: trunk/stdair/stdair/factory/FacBomManager.hpp =================================================================== --- trunk/stdair/stdair/factory/FacBomManager.hpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/factory/FacBomManager.hpp 2010-12-02 15:54:45 UTC (rev 367) @@ -112,7 +112,7 @@ assert (lCurrentObject_ptr != NULL); STDAIR_LOG_DEBUG (lCurrentObject_ptr->describeKey() << "; "); } - throw ObjectLinkingException (); + throw ObjectLinkingException (""); } } @@ -142,7 +142,7 @@ assert (lCurrentObject_ptr != NULL); STDAIR_LOG_DEBUG (lCurrentObject_ptr->describeKey() << "; "); } - throw ObjectLinkingException (); + throw ObjectLinkingException (""); } lBomHolder._bomList.push_back (&ioObject2); } Modified: trunk/stdair/stdair/service/DBSessionManager.cpp =================================================================== --- trunk/stdair/stdair/service/DBSessionManager.cpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/service/DBSessionManager.cpp 2010-12-02 15:54:45 UTC (rev 367) @@ -59,19 +59,19 @@ _dbSession = new DBSession_T; try { - // Open the connection to the database _dbSession->open (soci::mysql, lDBSessionConnectionString); } catch (std::exception const& lException) { - STDAIR_LOG_ERROR ("Error while opening a connection to database: " - << lException.what()); - STDAIR_LOG_ERROR ("Database parameters used:" - << " db=" << iDBParams.getDBName() - << " user=" << iDBParams.getUser() - << " port=" << iDBParams.getPort() - << " host=" << iDBParams.getHost()); - throw SQLDatabaseConnectionImpossibleException(); + std::ostringstream oMessage; + oMessage <<"Error while opening a connection to database: " + << lException.what() << std::endl + << "Database parameters used:" + << " db=" << iDBParams.getDBName() + << " user=" << iDBParams.getUser() + << " port=" << iDBParams.getPort() + << " host=" << iDBParams.getHost(); + throw SQLDatabaseConnectionImpossibleException (oMessage.str()); } } @@ -95,7 +95,7 @@ // ////////////////////////////////////////////////////////////////////// DBSessionManager& DBSessionManager::instance() { if (_instance == NULL) { - throw NonInitialisedDBSessionManagerException(); + throw NonInitialisedDBSessionManagerException(""); } assert (_instance != NULL); return *_instance; @@ -113,7 +113,7 @@ // ////////////////////////////////////////////////////////////////////// DBSession_T& DBSessionManager::getDBSession() const { if (_dbSession == NULL) { - throw NonInitialisedDBSessionManagerException(); + throw NonInitialisedDBSessionManagerException (""); } assert (_dbSession != NULL); return *_dbSession; Modified: trunk/stdair/stdair/service/Logger.cpp =================================================================== --- trunk/stdair/stdair/service/Logger.cpp 2010-11-14 16:39:38 UTC (rev 366) +++ trunk/stdair/stdair/service/Logger.cpp 2010-12-02 15:54:45 UTC (rev 367) @@ -43,7 +43,7 @@ // ////////////////////////////////////////////////////////////////////// Logger& Logger::instance() { if (_instance == NULL) { - throw NonInitialisedLogServiceException(); + throw NonInitialisedLogServiceException(""); } assert (_instance != NULL); return *_instance; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-14 16:39:50
|
Revision: 366 http://stdair.svn.sourceforge.net/stdair/?rev=366&view=rev Author: denis_arnaud Date: 2010-11-14 16:39:38 +0000 (Sun, 14 Nov 2010) Log Message: ----------- [Doc] Started the user guide and cleaned the tutorial. Modified Paths: -------------- trunk/stdair/Makefile.am trunk/stdair/batches/stdair.cpp trunk/stdair/doc/Makefile.am trunk/stdair/doc/doxygen_html.cfg.in trunk/stdair/doc/local/users_guide.doc trunk/stdair/doc/tutorial/src/sources.mk trunk/stdair/doc/tutorial/tutorial.doc trunk/stdair/test/archi_static_cast/archi_static_cast.cpp trunk/stdair/test/archi_static_cast/sources.mk trunk/stdair/test/architecture/Makefile.am trunk/stdair/test/architecture/architecture.cpp trunk/stdair/test/architecture/sources.mk trunk/stdair/test/stdair/Makefile.am trunk/stdair/test/stdair/sources.mk Added Paths: ----------- trunk/stdair/doc/tutorial/src/architecture.ref trunk/stdair/doc/tutorial/src/stdair.ref trunk/stdair/test/archi_static_cast/MP2BomHolder.hpp trunk/stdair/test/archi_static_cast/MP2BomManager.hpp trunk/stdair/test/archi_static_cast/MP2BomRoot.cpp trunk/stdair/test/archi_static_cast/MP2BomRoot.hpp trunk/stdair/test/archi_static_cast/MP2FacBom.hpp trunk/stdair/test/archi_static_cast/MP2FacBomManager.hpp trunk/stdair/test/archi_static_cast/MP2Inventory.cpp trunk/stdair/test/archi_static_cast/MP2Inventory.hpp trunk/stdair/test/archi_static_cast/MP2Types.hpp trunk/stdair/test/architecture/MPBomRoot.cpp trunk/stdair/test/architecture/MPBomRoot.hpp trunk/stdair/test/architecture/MPInventory.cpp trunk/stdair/test/architecture/MPInventory.hpp Removed Paths: ------------- trunk/stdair/doc/tutorial/src/completeex.cpp trunk/stdair/doc/tutorial/src/completeex.ref trunk/stdair/doc/tutorial/src/invobject.cpp trunk/stdair/doc/tutorial/src/invobject.ref trunk/stdair/doc/tutorial/src/makefile.tutorial trunk/stdair/doc/tutorial/src/rootinvobject.cpp trunk/stdair/doc/tutorial/src/rootinvobject.ref trunk/stdair/doc/tutorial/src/rootobject.cpp trunk/stdair/doc/tutorial/src/rootobject.ref trunk/stdair/test/archi_static_cast/BomHolder.hpp trunk/stdair/test/archi_static_cast/BomManager.hpp trunk/stdair/test/archi_static_cast/BomRoot.cpp trunk/stdair/test/archi_static_cast/BomRoot.hpp trunk/stdair/test/archi_static_cast/FacBom.hpp trunk/stdair/test/archi_static_cast/FacBomManager.hpp trunk/stdair/test/archi_static_cast/Inventory.cpp trunk/stdair/test/archi_static_cast/Inventory.hpp trunk/stdair/test/archi_static_cast/Types.hpp trunk/stdair/test/architecture/BomRoot.cpp trunk/stdair/test/architecture/BomRoot.hpp trunk/stdair/test/architecture/Inventory.cpp trunk/stdair/test/architecture/Inventory.hpp Property Changed: ---------------- trunk/stdair/doc/tutorial/src/ Modified: trunk/stdair/Makefile.am =================================================================== --- trunk/stdair/Makefile.am 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/Makefile.am 2010-11-14 16:39:38 UTC (rev 366) @@ -60,10 +60,10 @@ $(MAKE) dist distdir=@PACKAGE_TARNAME@-`date +"%Y%m%d"` snapshot-html: - $(MAKE) -C doc dist-html html_tarname=@PACKAGE_TARNAME@-doc-`date +"%Y%m%d"` + $(MAKE) -C doc dist-html html_tarname=@PACKAGE_TARNAME@-doc-html-`date +"%Y%m%d"` snapshot-pdf: - $(MAKE) -C doc dist-pdf pdf_tarname=@PACKAGE_TARNAME@-pdf-`date +"%Y%m%d"` + $(MAKE) -C doc dist-pdf pdf_tarname=@PACKAGE_TARNAME@-doc-pdf-`date +"%Y%m%d"` upload: upload-src upload-html upload-pdf @@ -72,10 +72,10 @@ @PACKAGE_TARNAME@-@VERSION@.tar.bz2 upload-html: dist-html - @UPLOAD_COMMAND@ @PACKAGE_TARNAME@-doc-@VERSION@.tar.gz \ - @PACKAGE_TARNAME@-doc-@VERSION@.tar.bz2 + @UPLOAD_COMMAND@ @PACKAGE_TARNAME@-doc-html-@VERSION@.tar.gz \ + @PACKAGE_TARNAME@-doc-html-@VERSION@.tar.bz2 upload-pdf: dist-pdf - @UPLOAD_COMMAND@ @PACKAGE_TARNAME@-pdf-@VERSION@.tar.gz \ - @PACKAGE_TARNAME@-pdf-@VERSION@.tar.bz2 + @UPLOAD_COMMAND@ @PACKAGE_TARNAME@-doc-pdf-@VERSION@.tar.gz \ + @PACKAGE_TARNAME@-doc-pdf-@VERSION@.tar.bz2 Modified: trunk/stdair/batches/stdair.cpp =================================================================== --- trunk/stdair/batches/stdair.cpp 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/batches/stdair.cpp 2010-11-14 16:39:38 UTC (rev 366) @@ -1,3 +1,7 @@ +/*! + * \page batch_stdair_cpp Command-Line Utility to Demonstrate Typical StdAir Usage + * \code + */ // STL #include <cassert> #include <iostream> @@ -565,7 +569,7 @@ // ///////// M A I N //////////// int main (int argc, char* argv[]) { - try { + // try { // Built-in bool isBuiltin; @@ -613,6 +617,12 @@ // Close the Log outputFile logOutputFile.close(); + /* + Note: as that program is not intended to be run on a server in + production, it is better not to catch the exceptions, as when it + happens (that an exception is throwned), that way we get the + call stack. + } catch (const std::exception& stde) { std::cerr << "Standard exception: " << stde.what() << std::endl; return -1; @@ -620,6 +630,11 @@ } catch (...) { return -1; } - + */ + return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/Makefile.am =================================================================== --- trunk/stdair/doc/Makefile.am 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/Makefile.am 2010-11-14 16:39:38 UTC (rev 366) @@ -9,13 +9,16 @@ include $(top_srcdir)/stdair/command/sources.mk include $(top_srcdir)/stdair/service/sources.mk include $(top_srcdir)/stdair/sources.mk +include $(top_srcdir)/batches/sources.mk +include $(top_srcdir)/test/stdair/sources.mk +include $(top_srcdir)/test/architecture/sources.mk SUBDIRS = images tutorial local docdir = @docdir@ -html_tarname = @PACKAGE_TARNAME@-doc-@PACKAGE_VERSION@ -pdf_tarname = @PACKAGE_TARNAME@-pdf-@PACKAGE_VERSION@ +html_tarname = @PACKAGE_TARNAME@-doc-html-@PACKAGE_VERSION@ +pdf_tarname = @PACKAGE_TARNAME@-doc-pdf-@PACKAGE_VERSION@ noinst_DATA = EXTRA_DIST = $(noinst_DATA) @@ -28,14 +31,17 @@ html/index.html: doxygen_html.cfg \ $(doc_local_sources) $(html_local_sources) \ $(doc_tutorial_sources) $(cpp_tutorial_sources) \ - $(stdair_test_lib_h_sources) $(stdair_test_lib_cc_sources) \ $(stdair_service_h_sources) $(stdair_service_cc_sources) \ $(stdair_bas_h_sources) $(stdair_bas_cc_sources) \ $(stdair_bom_h_sources) $(stdair_bom_cc_sources) \ $(stdair_fac_h_sources) $(stdair_fac_cc_sources) \ $(stdair_dba_h_sources) $(stdair_dba_cc_sources) \ $(stdair_cmd_h_sources) $(stdair_cmd_cc_sources) \ - $(stdair_svc_h_sources) $(stdair_svc_cc_sources) + $(stdair_svc_h_sources) $(stdair_svc_cc_sources) \ + $(stdair_batches_h_sources) $(stdair_batches_cc_sources) \ + $(stdair_test_lib_h_sources) $(stdair_test_lib_cc_sources) \ + $(stdair_test_bin_h_sources) $(stdair_test_bin_cc_sources) \ + $(stdair_archi_h_sources) $(stdair_archi_cc_sources) doxygen $<; \ if test -d html; then \ cp $(srcdir)/images/stdair_logo.png html; \ Modified: trunk/stdair/doc/doxygen_html.cfg.in =================================================================== --- trunk/stdair/doc/doxygen_html.cfg.in 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/doxygen_html.cfg.in 2010-11-14 16:39:38 UTC (rev 366) @@ -584,7 +584,9 @@ INPUT = @top_srcdir@/@PACKAGE@ \ @top_srcdir@/doc/local \ @top_srcdir@/doc/tutorial \ - @top_srcdir@/test + @top_srcdir@/batches \ + @top_srcdir@/test/stdair \ + @top_srcdir@/test/architecture # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -645,7 +647,9 @@ # the \include command). EXAMPLE_PATH = @top_srcdir@/doc/tutorial/src \ - @top_srcdir@/test + @top_srcdir@/batches \ + @top_srcdir@/test/stdair \ + @top_srcdir@/test/architecture # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp Modified: trunk/stdair/doc/local/users_guide.doc =================================================================== --- trunk/stdair/doc/local/users_guide.doc 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/local/users_guide.doc 2010-11-14 16:39:38 UTC (rev 366) @@ -3,26 +3,16 @@ \section ug_toc Table of Contents - \ref ug_introduction -- \ref predefined_types - - \ref scalar_types - - \ref vector_types - - \ref matrix_types -- \ref using_vectors - - \ref defining_vectors - - \ref vector_manipulation - - \ref vector_converters - - \ref vector_functions -- \ref using_matrices - - \ref matrix_converters -- \ref array_class -- \ref random_variables - - \ref random_vec_mat - - \ref rng -- \ref deterministic_sources -- \ref filters -- \ref signal_processing -- \ref timer_class -- \ref itfile_class +- \ref ug_get_started + - \ref ug_get_source + - \ref ug_build_binaries + - \ref ug_build_and_run_tests + - \ref ug_install_project +- \ref ug_bom_tree + - \ref ug_bom_distribution + - \ref ug_bom_schedule + - \ref ug_bom_inventory +- \ref ug_extending_bom_tree \section ug_introduction Introduction @@ -30,587 +20,51 @@ The \c StdAir library contains classes for airline business management. This document does not cover all the aspects of the \c StdAir library. It does however explain the most important things you need to know in order - to start using \c StdAir. +to start using \c StdAir. -\section predefined_types Predefined Data Types +\section ug_get_started Get Started +\subsection ug_get_source Get the StdAir library -\subsection scalar_types Predefined Scalar Types +\subsection ug_build_binaries Build the StdAir project +To run the configuration script the first time, go to the +top directory (where the StdAir package has been un-packed), and issue +either of the following two commands, depending on whether the StdAir +project has been checked out from the Subversion repository or +downloaded as a tar-ball package from the Sourceforge Web site: + - <tt>./autogen.sh</tt> + - <tt>./configure</tt> -Apart from the standard C++ types e.g. \c char, \c short, \c int, \c long, -\c double, \c float, and \c long \c long, the following types are specific -for \c IT++: -- \c complex<double>: Contains real and imaginary parts of type \c double -- \c bin: Used for binary (0,1) data +\subsection ug_build_and_run_tests Build and Run the Tests +\subsection ug_install_project Install the StdAir Project (Binaries, Documentation) -\subsection vector_types Prepared Vector Types +\section ug_bom_tree Exploring the Predefined BOM Tree -A vector can in principle be of arbitrary type (that support addition, -subtraction, multiplication and division), since the general vector class \c -Vec<TYPE> is templated. However, the most commonly used vector types are -predefined. These predefined vector types are: +\c StdAir predefines a BOM (Business Object Model) tree specific to the +airline IT arena. -- \c vec: Basic vector type containing \c double -- \c cvec: Vector type containing \c complex<double> -- \c ivec: Vector type containing \c int -- \c bvec: Vector type containing \c bin -- \c svec: Vector type containing \c short +\subsection ug_bom_distribution Airline Distribution BOM Tree +- \c stdair::TravelSolutionStruct -The general vector class is used to define the specialized classes above. -The \c vec class is actually a \c Vec<double>. We urge you to use these -predefined classes instead of \c Vec<TYPE> when ever possible. +\subsection ug_bom_schedule Airline Network BOM Tree +- \c stdair::FlightPeriod +\subsection ug_bom_inventory Airline Inventory BOM Tree +- \c stdair::Inventory +- \c stdair::FlightDate -\subsection matrix_types Prepared Matrix Types +\subsubsection ug_bom_segment_branch Airline Inventory Marketing BOM Tree +- \c stdair::SegmentDate +- \c stdair::SegmentCabin +- \c stdair::FareFamily +- \c stdair::BookingClass -The general matrix class is called \c Mat<TYPE>. These predefined matrix -types are: +\subsubsection ug_bom_leg_branch Airline Inventory Operating BOM Tree +- \c stdair::LegDate +- \c stdair::LegCabin +- \c stdair::Bucket -- \c mat: Basic matrix type containing double -- \c cmat: Matrix type containing \c complex<double> -- \c imat: Matrix type containing \c int -- \c bmat: Matrix type containing \c bin -- \c smat: Matrix type containing \c short +\section ug_extending_bom_tree Extending the BOM Tree -As with vector, the general matrix class is used to define the specialized -classes above. The \c mat class is thus a \c Mat<double>. We urge you to use -these predefined classes instead of \c Mat<TYPE> whenever possible. - - -\section using_vectors Using Vectors - -Vectors and matrices in \c IT++ are very similar. We therefore begin to -describe the vector class in detail and then briefly explain the differences -regarding matrices in the next section. - - -\subsection defining_vectors Defining a Vector - -A vector containing elements of type \c double is defined with: - -\code -vec my_vector; -\endcode - -However, this will not assign a size (memory) to the vector. To assign size -10 to the vector we may use: - -\code -vec my_vector(10); -\endcode - -or - -\code -vec my_vector; -my_vector.set_size(10,false); -\endcode - -where the second parameter in the \c set_size call (\c true or \c false) -determines if you want to copy the contents of the old data area into the -new resized one, or not. This may be useful when down-sizing a vector, but -in this case it is not. It is also equivalent to use - -\code -my_vector.set_length(10,false); -\endcode - -instead of \c set_size. - -Observe that a declared vector (or matrix) is not cleared (the element -values are undefined). To clear a vector we simply write - -\code -my_vector.clear(); -\endcode - -or - -\code -my_vector.zeros(); -\endcode - -To fill the vector with ones we write - -\code -my_vector.ones(); -\endcode - -It is possible to retrieve the length (size) of a vector in any of the -following ways: - -\code -length_of_vector = my_vector.length(); -length_of_vector = my_vector.size(); -length_of_vector = length(my_vector); -\endcode - -To assign values to a vector - -\code -vec a = "0 0.7 5 9.3"; // that is a = [0 0.7 5 9.3] -ivec b = "0:5"; // that is b = [0 1 2 3 4 5] -vec c = "3:2.5:13"; // that is c = [3 5.5 8 10.5 13] -ivec d = "1:3:5,0:2:4"; // that is d = [1 3 5 0 2 4] -vec e("1.2,3.4,5.6"); // that is e = [1.2 3.4 5.6] -vec f; -f.set("1.0 2.0 3.0 4.0"); // that is f = [1.0 2.0 3.0 4.0] -vec g; -g = f; // that is g is a copy of f -\endcode - -A comma or a space character separates the vector elements. When assigning -or retrieving a specific vector element use - -\code -a(i) = 3.14; -a(i); -\endcode - -for element number \a i. Vector elements are numbered such that \a a(0) -denotes the first element. It is also possible to use square brackets as in -the C language, i.e. - -\code -a[i] = 3.14; -a[i]; -\endcode - -Parts or a vector are retrieved by - -\code -a.left(3); // a vector containing the first 3 elements of a -a.right(2); // a vector containing the last 2 elements of a -a.mid(1,2); // a vector containing the 2 elements starting with a(1) -a(2,4); // a vector containing all elements from a(2) to a(4) -\endcode - -If you have a vector called \a index_list containing indexes (\a ivec) you -may write - -\code -// this gives a vector containing all elements in index_list -a(index_list); -\endcode - -If you have a \c bvec called e.g. \a bin_list you may write - -\code -a.get(bin_list); // this gives a vector containing all elements a(i) - // for which bin_list(i) equals 1 -\endcode - -Have a look at the following example: - -\code -#include "itbase.h" - -int man() { - vec a = linspace(0,1,11); - ivec index_list = "3 5 2 2"; - bvec bin_list = "1 0 1 0 1 0 1 0 1 0 1"; - - cout << "a = " << a << endl; - cout << "a(index_list) = " << a(index_list) << endl; - cout << "a.get(bin_list) = " << a.get(bin_list) << endl; -} -\endcode - -When you run this program you will see - -\code -a = [0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0] -a(index_list) = [0.3 0.5 0.2 0.2] -a(bin_list) = [0.0 0.2 0.4 0.6 0.8 1.0] -\endcode - - -\subsection vector_manipulation Vector Manipulation - -Below follows a listing of the most common vector manipulation commands that -are available. All examples are given for an \c ivec denoted \a my_ivec, but -of course this will work for other vector types as well. - -- \c shift_right: -\code -// Shift in scalar data (10) at position 0 -my_ivec.shift_right(10); - -// Shift in vector at position 0 -my_ivec.shift_right("10 4"); -\endcode - -- \c shift_left: -\code -// Shift in scalar data (10) at position Size()-1 -my_ivec.shift_left(10); - -// Shift in vector at position Size()-1 -my_ivec.shift_left("10 4"); -\endcode - -- \c replace_mid: -\code -// Replace part of vector from position (10) with the vector "11 13" -my_ivec.replace_mid(10,"11 13"); -\endcode - -- \c del: -\code -// Delete element at index (10), making vector size one less -my_ivec.del(10); -\endcode - -- \c ins: -\code -// Insert element at index (10), making vector size one extra -my_ivec.ins(10); -\endcode - -- \c split: -\code -// Splits vector at pos (10). Returns first part, keep second part. -ivec first_part = my_ivec.split(10); -\endcode - -- \c elem_mult: -\code -// Multiply two vectors element wise. -ivec my_product = elem_mult(my_invec1,my_ivec2); -\endcode - -- \c elem_div: -\code -// Dividide two vectors element wise. -ivec my_product = elem_div(my_invec1,my_ivec2); -\endcode - -- Calculation: +, -, *, / -\code -a = my_ivec1 + my_ivec2; // Addition of vectors -a = my_ivec + 10; // Addition of vector and scalar -a = my_ivec1 - my_ivec2; // Subtraction of vectors -a = my_ivec - 10; // Subtraction of vector and scalar -a = my_ivec * 10; // Multiplication of vector and scalar -a = my_ivec / 10; // Division of vector and scalar -\endcode - -- Calculation: +=, -=, *=, /=, |= -\code -a += my_ivec; // Addition of vectors (a = a+my_ivec) -my_ivec += 10; // Addition of vector and scalar (10) -a -= my_ivec; // Subtraction of vectors (a = a-my_ivec) -my_ivec -= 10; // Subtraction of vector and scalar (10) -my_ivec *= 10; // Multiplication of vector and scalar (10) -my_ivec /= 10; // Divsion of vector and scalar (10) -my_ivec |= a; // Element wise division -\endcode - -- \c concat -\code -a = concat(my_ivec1, my_ivec2); // concatenation of two vectors -\endcode - - -\subsection vector_converters Vector Converters - -In order to convert e.g an \c ivec to a \c vec we can write some thing like -\c my_vec = \c to_vec(my_ivec). The following converters are available: -- \c to_bvec, -- \c to_svec, -- \c to_ivec, -- \c to_vec, -- \c to_cvec. - - -\subsection vector_functions Vector Functions - -There are several functions that operate on vectors. Some examples are: -\c max, \c max_index, \c min, \c min_index, \c product, \c energy, -\c geometric_mean, \c mean, \c median, \c norm, \c round, \c variance, -\c ceil_i, \c floor_i, \c round_i, \c find. - -Examples of functions that generate different kinds of vectors are: -\c linspace, \c ones_b, \c ones_c, \c ones_i, \c ones \c zeros_b. There -are several more than these. Please refer to the IT++ reference manual -for a description of these. - - -\section using_matrices Using Matrices - -Matrices are two-dimensional arrays, and most of their functionality is -similar to that of vectors. The predefined matrix types are: - -- \c mat, -- \c cmat, -- \c imat, -- \c smat, -- \c bmat. - -Below follows some examples that are specific for matrices only: - -<ul> -<li> Define a matrix of type \c double with 3 rows and 4 columns -\code -mat a(3,4); -\endcode -</li> - -<li> Define a matrix of type \c int with 2 rows and 3 columns. A comma (,) -or space is used to separate columns and a semicolon (;) is used to separate -rows. -\code -imat a = "1 2 3;4 5 6"; -\endcode -</li> - -<li> Access to rows and columns with \c get_row and \c get_col -\code -a.get_row(1); // Returns the second row of the matrix b -a.get_col(0); // Returns the first column of the matrix b -\endcode -</li> - -<li> Set rows and columns with \c set_row and \c set_col -\code -a.set_row(1,"9 8 7"); // Set second row to "9 8 7" -a.set_col(0,"7 2"); // Set first column to "7 2" -\endcode -</li> - -<li> The size of a matrix -\code -// Set the size. "false" means "do not copy" -a.set_size(4,5,false); -int nr_of_rows = a.rows(); // return the number of rows -int nr_of_columns = a.cols(); // return the number of columns -\endcode -</li> - -<li> Access to parts of a matrix -\code -a(r,c); // Access to a single element. -a(i); // Access to a single element. Linear addressing, by rows. - -// Returns the sub-matrix from rows r1 to r2 and columns c1 to c2. -a(r1,r2,c1,c2); -\endcode -</li> - -<li> Copy rows and columns -\code -// Copy row number "from" to row number "to" -a.copy_row(to,from) - -// Copy column number "from" to column number "to" -a.copy_col(to,from) -\endcode -</li> - -<li> Swap rows and columns -\code -// Swap rows number r1 and r2 -a.swap_row(r1,r2) - -// Swap columns number c1 and c2 -a.swap_col(c1,c2) -\endcode -</li> - -<li> Horizontal and vertical concatenation -\code -// Equivalent to the MATLAB command c = [a b] -c = concat_horizontal(a,b); - -// Equivalent to the MATLAB command c = [a;b] -c = concat_vertical(a,b); -\endcode -</li> -</ul> - - -\subsection matrix_converters Matrix Converters - -The following converters are available: - -- \c to_mat, -- \c to_imat, -- \c to_cmat, -- \c to_bmat. - - -\section array_class The Array Class - -The \c itbase library contains, among other things, the \c Array class. An -\c Array can contain any type of data. Below is an example of an \c Array -containing vectors (\c vec): - -\code -#include <itpp/itbase.h> - -using namespace itpp; -using namespace std; - -int main() { - Array<vec> my_vec_array(2); - my_vec_array(0) = linspace(0,1,4); - my_vec_array(1) = "0.1 0.2 0.3 0.4 0.3 0.2 0.1"; - cout << "my_vec_array = " << my_vec_array << endl; - - return 0; -} -\endcode - - -\section random_variables Random Vectors, Matrices, and Generators - - -\subsection random_vec_mat Random Vectors and Matrices - -Random vectors and matrices are easily obtained by using these predefined -functions: - -- \c randb: Generates a random bit vector or matrix -- \c randu: Generates a random uniform vector or matrix -- \c randi: Generates a random index vector or matrix -- \c randray: Generates a random Rayleigh vector or matrix -- \c randrice: Generates a random Rice vector or matrix -- \c randexp: Generates a random Exponential vector or matrix -- \c randn: Generates a random Gaussian vector or matrix -- \c randn_c: Generates a random complex Gaussian vector or matrix - - -\subsection rng Random Number Generators (RNG) - -The following discrete valued random number generators are available. More -information about these can be found in the IT++ reference manual. - -- \c Bernoulli_RNG -- \c I_Uniform_RNG - -The following continuous valued random number generators are available. - -- \c Uniform_RNG -- \c Exponential_RNG -- \c Normal_RNG -- \c Complex_Normal_RNG -- \c AR1_Normal_RNG -- \c Weibull_RNG -- \c Rayleigh_RNG -- \c Rice_RNG - - -\section deterministic_sources Deterministic Sources - -The following deterministic sources are available: - -- \c Sine_Source -- \c Square_Source -- \c Triangle_Source -- \c Sawtooth_Source -- \c Impulse_Source -- \c Pattern_Source - - -\section filters Filter Classes and Functions - -The following filter classes are available: - -- \c AR_Filter -- \c MA_Filter -- \c ARMA_Filter -- \c Freq_Filt - -The following filter functions are available: - -- \c filter - - -\subsection signal_processing Signal Processing Functions - -The following signal processing functions are available: - -- \c a2k, \c k2a, \c a2lar, \c k2lar, \c lpc, \c levinsson, \c lerouxguegen -- \c fft, \c ifft, \c fft_real, \c ifft_real -- \c dct, \c idct -- \c spectrum -- \c cov, \c xcorr -- \c chirp -- \c dht, \c dht2, \c dwht, \c dhwt2, \c self_dht, \c self_dwht -- \c filter_spectrum -- \c filter_whiteness - - -\section timer_class Timer Classes - -The \c Real_Timer class can be used to measure execution time of a program -as in the following example: - -\code -#include <itpp/itbase.h> - -using namespace itpp; -using namespace std; - -int main() { - long sum = 0; - Real_Timer my_timer; - - my_timer.tic(); - for (int i=0; i<10000000; i++) { - sum += i; - } - my_timer.toc_print(); - - cout << "The sum is " << sum << endl; - - return 0; -} -\endcode - - -\section itfile_class Reading and Writing to Files - -The following example saves the variable \a a to the file -\c my_file_name.it: - -\code -#include <itpp/itbase.h> - -using namespace itpp; - -int main() { - it_file my_file("my_file_name.it"); - vec a = "1.0 2.0 3.0 4.0"; - my_file << Name("a") << a; - - return 0; -} -\endcode - -The following example reads the variable \a a from the file -\c my_file_name.it and prints it: -\code -#include <itpp/itbase.h> - -using namespace itpp; -using namespace std; - -int main() { - it_file my_file("my_file_name.it"); - vec a; - my_file >> Name("a") >> a; - cout << "a = " << a << endl; - - return 0; -} -\endcode - -Note that <tt>*.it</tt> files can be read and written in Matlab/Octave by -using the \c itload.m and \c itsave.m functions. - -Also available is the class \c it_ifile that can only be used for reading of -files. - */ Property changes on: trunk/stdair/doc/tutorial/src ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in rootobject invobject rootinvobject completeex + Makefile Makefile.in Added: trunk/stdair/doc/tutorial/src/architecture.ref =================================================================== --- trunk/stdair/doc/tutorial/src/architecture.ref (rev 0) +++ trunk/stdair/doc/tutorial/src/architecture.ref 2010-11-14 16:39:38 UTC (rev 366) @@ -0,0 +1,2 @@ +Inventory: BA +Inventory: AF Deleted: trunk/stdair/doc/tutorial/src/completeex.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-14 16:39:38 UTC (rev 366) @@ -1,347 +0,0 @@ -/*! - * \page tut_completeex_cpp Tutorial Full Basic Example - * \code - */ -// STL -#include <cassert> -// StdAir -#include <stdair/bom/BomRoot.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/bom/InventoryTypes.hpp> -#include <stdair/bom/FlightDate.hpp> -#include <stdair/bom/FlightDateTypes.hpp> -#include <stdair/bom/LegDate.hpp> -#include <stdair/bom/LegDateTypes.hpp> -#include <stdair/bom/LegCabin.hpp> -#include <stdair/bom/LegCabinTypes.hpp> -#include <stdair/bom/SegmentDate.hpp> -#include <stdair/bom/SegmentDateTypes.hpp> -#include <stdair/bom/SegmentCabin.hpp> -#include <stdair/bom/SegmentCabinTypes.hpp> -#include <stdair/bom/FareFamily.hpp> -#include <stdair/bom/FareFamilyTypes.hpp> -#include <stdair/bom/BookingClass.hpp> -#include <stdair/bom/BookingClassTypes.hpp> -#include <stdair/bom/BomManager.hpp> // Utility class to display BOM objects -#include <stdair/factory/FacBomManager.hpp> - -// /////////////////////// M A I N /////////////////////////// -int main() { - - // ///////////// Step 0.0: Initialisation //////////// - // Create the root of the Bom tree (i.e., a BomRoot object) - stdair::BomRoot& lBomRoot = - stdair::FacBom<stdair::BomRoot>::instance().create(); - - // Step 0.1: Inventory level - // Create an Inventory for BA - const stdair::InventoryKey lBAKey ("BA"); - stdair::Inventory& lBAInv = - stdair::FacBom<stdair::Inventory>::instance().create (lBAKey); - stdair::FacBomManager::instance().addToList (lBomRoot, lBAInv); - - // Create an Inventory for AF - const stdair::InventoryKey lAFKey ("AF"); - stdair::Inventory& lAFInv = - stdair::FacBom<stdair::Inventory>::instance().create (lAFKey); - stdair::FacBomManager::instance().addToList (lBomRoot, lAFInv); - - // ////// BA /////// - // Step 0.2: Flight-date level - // Create a FlightDate (BA15/10-JUN-2010) for BA's Inventory - stdair::FlightNumber_T lFlightNumber = 15; - stdair::Date_T lDate (2010, 6, 10); - stdair::FlightDateKey lFlightDateKey (lFlightNumber, lDate); - - stdair::FlightDate& lBA15_20100610_FD = - stdair::FacBom<stdair::FlightDate>::instance().create (lFlightDateKey); - stdair::FacBomManager::instance().addToList (lBAInv, lBA15_20100610_FD); - - // Step 0.3: Segment-date level - // Create a first SegmentDate (LHR-SYD) for BA's Inventory - const stdair::AirportCode_T lLHR ("LHR"); - const stdair::AirportCode_T lSYD ("SYD"); - stdair::SegmentDateKey lSegmentDateKey (lLHR, lSYD); - - stdair::SegmentDate& lLHRSYDSegment = - stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); - stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, - lLHRSYDSegment); - - // Create a second SegmentDate (LHR-BKK) for BA's Inventory - const stdair::AirportCode_T lBKK ("BKK"); - lSegmentDateKey = stdair::SegmentDateKey (lLHR, lBKK); - - stdair::SegmentDate& lLHRBKKSegment = - stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); - stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, - lLHRBKKSegment); - - // Create a third SegmentDate (BKK-SYD) for BA's Inventory - lSegmentDateKey = stdair::SegmentDateKey (lBKK, lSYD); - - stdair::SegmentDate& lBKKSYDSegment = - stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); - stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, - lBKKSYDSegment); - - // Step 0.4: Leg-date level - // Create a first LegDate (LHR) for BA's Inventory - stdair::LegDateKey lLegDateKey (lLHR); - - stdair::LegDate& lLHRLeg = - stdair::FacBom<stdair::LegDate>::instance().create (lLegDateKey); - stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, lLHRLeg); - - // Create a second LegDate (BKK) - lLegDateKey = stdair::LegDateKey (lBKK); - - stdair::LegDate& lBKKLeg = - stdair::FacBom<stdair::LegDate>::instance().create (lLegDateKey); - stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, lBKKLeg); - - // Step 0.5: segment-cabin level - // Create a SegmentCabin (Y) for the Segment LHR-BKK of BA's Inventory - const stdair::CabinCode_T lY ("Y"); - stdair::SegmentCabinKey lYSegmentCabinKey (lY); - - stdair::SegmentCabin& lLHRBKKSegmentYCabin = - stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); - stdair::FacBomManager::instance().addToList (lLHRBKKSegment, - lLHRBKKSegmentYCabin); - - // Create a SegmentCabin (Y) of the Segment BKK-SYD; - stdair::SegmentCabin& lBKKSYDSegmentYCabin = - stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); - stdair::FacBomManager::instance().addToList (lBKKSYDSegment, - lBKKSYDSegmentYCabin); - - // Create a SegmentCabin (Y) of the Segment LHR-SYD; - stdair::SegmentCabin& lLHRSYDSegmentYCabin = - stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); - stdair::FacBomManager::instance().addToList (lLHRSYDSegment, - lLHRSYDSegmentYCabin); - - // Step 0.6: leg-cabin level - // Create a LegCabin (Y) for the Leg LHR-BKK on BA's Inventory - stdair::LegCabinKey lYLegCabinKey (lY); - - stdair::LegCabin& lLHRLegYCabin = - stdair::FacBom<stdair::LegCabin>::instance().create (lYLegCabinKey); - stdair::FacBomManager::instance().addToList (lLHRLeg, lLHRLegYCabin); - - // Create a LegCabin (Y) for the Leg BKK-SYD - stdair::LegCabin& lBKKLegYCabin = - stdair::FacBom<stdair::LegCabin>::instance().create (lYLegCabinKey); - stdair::FacBomManager::instance().addToList (lBKKLeg, lBKKLegYCabin); - - // Step 0.7: fare family level - // Create a FareFamily (1) for the Segment LHR-BKK, cabin Y on BA's Inv - const stdair::FamilyCode_T l1 ("1"); - stdair::FareFamilyKey l1FareFamilyKey (l1); - - stdair::FareFamily& lLHRBKKSegmentYCabin1Family = - stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); - stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin, - lLHRBKKSegmentYCabin1Family); - - // Create a FareFamily (1) for the Segment BKK-SYD, cabin Y on BA's Inv - stdair::FareFamily& lBKKSYDSegmentYCabin1Family = - stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); - stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin, - lBKKSYDSegmentYCabin1Family); - - // Create a FareFamily (1) for the Segment LHR-SYD, cabin Y on BA's Inv - stdair::FareFamily& lLHRSYDSegmentYCabin1Family = - stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); - stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin, - lLHRSYDSegmentYCabin1Family); - - // Step 0.8: booking class level - // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare - // family 1 on BA's Inv - const stdair::ClassCode_T lQ ("Q"); - stdair::BookingClassKey lQBookingClassKey (lQ); - - stdair::BookingClass& lLHRBKKSegmentYCabin1FamilyQClass = - stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin1Family, - lLHRBKKSegmentYCabin1FamilyQClass); - - // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare - // family 1 on BA's Inv - stdair::BookingClass& lBKKSYDSegmentYCabin1FamilyQClass = - stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin1Family, - lBKKSYDSegmentYCabin1FamilyQClass); - - // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare - // family 1 on BA's Inv - stdair::BookingClass& lLHRSYDSegmentYCabin1FamilyQClass = - stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin1Family, - lLHRSYDSegmentYCabin1FamilyQClass); - - // ////// AF /////// - // Step 0.2: Flight-date level - // Create a FlightDate (AF102/20-MAR-2010) for AF's Inventory - lFlightNumber = 102; - lDate = stdair::Date_T (2010, 3, 20); - lFlightDateKey = stdair::FlightDateKey (lFlightNumber, lDate); - - stdair::FlightDate& lAF102_20100320_FD = - stdair::FacBom<stdair::FlightDate>::instance().create (lFlightDateKey); - stdair::FacBomManager::instance().addToList (lAFInv, lAF102_20100320_FD); - - // Step 0.3: Segment-date level - // Create a SegmentDate (CDG-SFO) for AF's Inventory - const stdair::AirportCode_T lCDG ("CDG"); - const stdair::AirportCode_T lSFO ("SFO"); - lSegmentDateKey = stdair::SegmentDateKey (lCDG, lSFO); - - stdair::SegmentDate& lCDGSFOSegment = - stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); - stdair::FacBomManager::instance().addToList (lAF102_20100320_FD, - lCDGSFOSegment); - - // Step 0.4: Leg-date level - // Create a LegDate (CDG) for AF's Inventory - lLegDateKey = stdair::LegDateKey (lCDG); - - stdair::LegDate& lCDGLeg = - stdair::FacBom<stdair::LegDate>::instance().create (lLegDateKey); - stdair::FacBomManager::instance().addToList (lAF102_20100320_FD, lCDGLeg); - - // Step 0.5: segment-cabin level - // Create a SegmentCabin (Y) for the Segment CDG-SFO of AF's Inventory - stdair::SegmentCabin& lCDGSFOSegmentYCabin = - stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); - stdair::FacBomManager::instance().addToList (lCDGSFOSegment, - lCDGSFOSegmentYCabin); - - // Step 0.6: leg-cabin level - // Create a LegCabin (Y) for the Leg CDG-SFO on AF's Inventory - stdair::LegCabin& lCDGLegYCabin = - stdair::FacBom<stdair::LegCabin>::instance().create (lYLegCabinKey); - stdair::FacBomManager::instance().addToList (lCDGLeg, lCDGLegYCabin); - - // Step 0.7: fare family level - // Create a fareFamily (1) for the Segment CDG-SFO, cabin Y on AF's Inv - stdair::FareFamily& lCDGSFOSegmentYCabin1Family = - stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); - stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin, - lCDGSFOSegmentYCabin1Family); - - // Step 0.8: booking class level - // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare - // family 1 on AF's Inv - stdair::BookingClass& lCDGSFOSegmentYCabin1FamilyQClass = - stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin1Family, - lCDGSFOSegmentYCabin1FamilyQClass); - - - // /////////// Step 1.0: Display the BOM tree ////////// - // 1.0. Bom root level - std::cout << lBomRoot << std::endl; - - // 1.1. Inventory level - const stdair::InventoryList_T& lInventoryList = - stdair::BomManager::getList<stdair::Inventory> (lBomRoot); - for (stdair::InventoryList_T::const_iterator itInv = lInventoryList.begin(); - itInv != lInventoryList.end(); ++itInv) { - const stdair::Inventory* lInv_ptr = *itInv; - assert (lInv_ptr != NULL); - - std::cout << " " << *lInv_ptr << std::endl; - - // 1.2. FlightDate level - const stdair::FlightDateList_T& lFlightDateList = - stdair::BomManager::getList<stdair::FlightDate> (*lInv_ptr); - for (stdair::FlightDateList_T::const_iterator itFD=lFlightDateList.begin(); - itFD != lFlightDateList.end(); ++itFD) { - const stdair::FlightDate* lFD_ptr = *itFD; - assert (lFD_ptr != NULL); - - std::cout << " " << *lFD_ptr << std::endl; - - // 1.4. LegDate level - const stdair::LegDateList_T& lLegDateList = - stdair::BomManager::getList<stdair::LegDate> (*lFD_ptr); - for (stdair::LegDateList_T::const_iterator itLD = - lLegDateList.begin(); - itLD != lLegDateList.end(); ++itLD) { - const stdair::LegDate* lLD_ptr = *itLD; - assert (lLD_ptr != NULL); - - std::cout << " " << *lLD_ptr << std::endl; - - // 1.6. LegCabin level - const stdair::LegCabinList_T& lLegCabinList = - stdair::BomManager::getList<stdair::LegCabin> (*lLD_ptr); - for (stdair::LegCabinList_T::const_iterator itLC = - lLegCabinList.begin(); - itLC != lLegCabinList.end(); ++itLC) { - const stdair::LegCabin* lLC_ptr = *itLC; - assert (lLC_ptr != NULL); - - std::cout << " " << *lLC_ptr << std::endl; - } - } - - // 1.3. SegmentDate level - const stdair::SegmentDateList_T& lSegmentDateList = - stdair::BomManager::getList<stdair::SegmentDate> (*lFD_ptr); - for (stdair::SegmentDateList_T::const_iterator itSD = - lSegmentDateList.begin(); - itSD != lSegmentDateList.end(); ++itSD) { - const stdair::SegmentDate* lSD_ptr = *itSD; - assert (lSD_ptr != NULL); - - std::cout << " " << *lSD_ptr << std::endl; - - // 1.5. SegmentCabin level - const stdair::SegmentCabinList_T& lSegmentCabinList = - stdair::BomManager::getList<stdair::SegmentCabin> (*lSD_ptr); - for (stdair::SegmentCabinList_T::const_iterator itSC = - lSegmentCabinList.begin(); - itSC != lSegmentCabinList.end(); ++itSC) { - const stdair::SegmentCabin* lSC_ptr = *itSC; - assert (lSC_ptr != NULL); - - std::cout << " " << *lSC_ptr << std::endl; - - // 1.7. FareFamily level - const stdair::FareFamilyList_T& lFareFamilyList = - stdair::BomManager::getList<stdair::FareFamily> (*lSC_ptr); - for (stdair::FareFamilyList_T::const_iterator itFF = - lFareFamilyList.begin(); - itFF != lFareFamilyList.end(); ++itFF) { - const stdair::FareFamily* lFF_ptr = *itFF; - assert (lFF_ptr != NULL); - - std::cout << " " << *lFF_ptr << std::endl; - - // 1.8. BookingClass level - const stdair::BookingClassList_T& lBookingClassList = - stdair::BomManager::getList<stdair::BookingClass> (*lFF_ptr); - for (stdair::BookingClassList_T::const_iterator itBC = - lBookingClassList.begin(); - itBC != lBookingClassList.end(); ++itBC) { - const stdair::BookingClass* lBC_ptr = *itBC; - assert (lBC_ptr != NULL); - - std::cout << " " << *lBC_ptr << std::endl; - } - } - } - } - } - } - // Exit program: - return 0; -} - -/*! - * \endcode - */ Deleted: trunk/stdair/doc/tutorial/src/completeex.ref =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.ref 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/tutorial/src/completeex.ref 2010-11-14 16:39:38 UTC (rev 366) @@ -1,27 +0,0 @@ - -- ROOT -- - BA - 15, 2010-Jun-10 - LHR - Y - BKK - Y - LHR-SYD - Y - 1 - Q - LHR-BKK - Y - 1 - Q - BKK-SYD - Y - 1 - Q - AF - 102, 2010-Mar-20 - CDG - Y - CDG-SFO - Y - 1 - Q Deleted: trunk/stdair/doc/tutorial/src/invobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-14 16:39:38 UTC (rev 366) @@ -1,29 +0,0 @@ -/*! - * \page tut_invobject_cpp Tutorial for the BOM Inventory Object Creation - * \code - */ -// StdAir -#include <stdair/bom/BomRoot.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/factory/FacBomManager.hpp> - -// /////////////////////// M A I N /////////////////////////// -int main() { - - // Create an inventory key (i.e., an airline code) - const stdair::InventoryKey lBAKey ("BA"); - - // Create an inventory object whose airline code is BA - stdair::Inventory& lBAInv = - stdair::FacBom<stdair::Inventory>::instance().create (lBAKey); - - // Display the inventory object (including its key, i.e., the airline code) - std::cout << " Inventory: " << lBAInv << std::endl; - - // Exit program - return 0; -} - -/*! - * \endcode - */ Deleted: trunk/stdair/doc/tutorial/src/invobject.ref =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.ref 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/tutorial/src/invobject.ref 2010-11-14 16:39:38 UTC (rev 366) @@ -1 +0,0 @@ - Inventory: BA Deleted: trunk/stdair/doc/tutorial/src/makefile.tutorial =================================================================== --- trunk/stdair/doc/tutorial/src/makefile.tutorial 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/tutorial/src/makefile.tutorial 2010-11-14 16:39:38 UTC (rev 366) @@ -1,336 +0,0 @@ -# Makefile inspired from the makefiles generated by the GNU Autotools (autoconf -# automake, configure, libtool) -LIBDIR=`test -d '/usr/lib64' && echo '/usr/lib64' || echo '/usr/lib'` -ARCHI=`test -d '/usr/lib64' && echo 'x86_64' || echo 'x86'` - -# -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -build_triplet = $(ARCHI)-unknown-linux-gnu -host_triplet = $(ARCHI)-unknown-linux-gnu -DIST_COMMON = $(srcdir)/makefile.tutorial -bin_PROGRAMS = rootobject$(EXEEXT) invobject$(EXEEXT) rootinvobject$(EXEEXT) completeex$(EXEEXT) -subdir = tutorial/src -PROGRAMS = $(bin_PROGRAMS) -am_rootobject_OBJECTS = rootobject-rootobject.$(OBJEXT) -rootobject_OBJECTS = $(am_rootobject_OBJECTS) -rootobject_DEPENDENCIES = -rootobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(rootobject_CXXFLAGS) $(CXXFLAGS) \ - $(rootobject_LDFLAGS) $(LDFLAGS) -o $@ -am_invobject_OBJECTS = invobject-invobject.$(OBJEXT) -invobject_OBJECTS = $(am_invobject_OBJECTS) -invobject_DEPENDENCIES = -invobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(invobject_CXXFLAGS) \ - $(CXXFLAGS) $(invobject_LDFLAGS) $(LDFLAGS) -o $@ -am_rootinvobject_OBJECTS = rootinvobject-rootinvobject.$(OBJEXT) -rootinvobject_OBJECTS = $(am_rootinvobject_OBJECTS) -rootinvobject_DEPENDENCIES = -rootinvobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(rootinvobject_CXXFLAGS) \ - $(CXXFLAGS) $(rootinvobject_LDFLAGS) $(LDFLAGS) -o $@ -am_completeex_OBJECTS = completeex-completeex.$(OBJEXT) -completeex_OBJECTS = $(am_completeex_OBJECTS) -completeex_DEPENDENCIES = -completeex_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(completeex_CXXFLAGS) $(CXXFLAGS) \ - $(completeex_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I. -I$(builddir)/src -depcomp = $(SHELL) $(top_builddir)/config/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(rootobject_SOURCES) $(invobject_SOURCES) $(rootinvobject_SOURCES) \ - $(completeex_SOURCES) -AWK = gawk -BOOST_ASIO_LIB = -lboost_system -lboost_thread-mt -lboost_date_time -lboost_regex -lboost_serialization -BOOST_CFLAGS = -pthread -I/usr/include -BOOST_DATE_TIME_LIB = -lboost_date_time -BOOST_FILESYSTEM_LIB = -lboost_filesystem -BOOST_IOSTREAMS_LIB = -lboost_iostreams -BOOST_LIBS = -L$(LIBDIR) -BOOST_MPI_LIB = -lboost_mpi -lboost_serialization $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi -BOOST_MPI_PYTHON_LIB = -lboost_mpi_python -lboost_serialization -lboost_python $(BOOST_LIBS) -lpython2.6 -lpthread -ldl -lutil -lm -lboost_mpi -lboost_serialization $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi -BOOST_PROGRAM_OPTIONS_LIB = -lboost_program_options -BOOST_PYTHON_LIB = -lboost_python $(BOOST_LIBS) -lpython2.6 -lpthread -ldl -lutil -lm -BOOST_REGEX_LIB = -lboost_regex -BOOST_SERIALIZATION_LIB = -lboost_serialization -BOOST_SIGNALS_LIB = -lboost_signals -BOOST_SYSTEM_LIB = -lboost_system -BOOST_THREAD_LIB = -lboost_thread-mt -BOOST_UNIT_TEST_FRAMEWORK_LIB = -lboost_unit_test_framework -BOOST_VERSION = 1_41 -BOOST_WSERIALIZATION_LIB = -lboost_wserialization -CC = gcc -CCDEPMODE = depmode=gcc3 -CFLAGS = -g -O2 -CPP = gcc -E -CPPFLAGS = -CPPUNIT_CFLAGS = -CPPUNIT_CONFIG = /usr/bin/cppunit-config -CPPUNIT_LIBS = -lcppunit -ldl -CPPUNIT_VERSION = 1.12.1 -CXX = g++ -CXXCPP = g++ -E -CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -g -Wall -CYGPATH_W = echo -DEFS = -DHAVE_CONFIG_H -DEPDIR = .deps -DSYMUTIL = -DUMPBIN = -ECHO_C = -ECHO_N = -n -ECHO_T = -EGREP = /bin/grep -E -EXEEXT = -EXTRACC_CFLAGS = -I/home/dan/dev/deliveries/extracc-0.5.0/include -EXTRACC_EXTRACPPUNIT_INCLUDE = include /home/dan/dev/deliveries/extracc-0.5.0/share/extracc/extracppunit/Makefile.common -EXTRACC_LIBS = -L/home/dan/dev/deliveries/extracc-0.5.0/lib -lextracppunit -EXTRACC_VERSION = 0.5.0 -FGREP = /bin/grep -F -GENERIC_LIBRARY_VERSION = 99:99:99 -GREP = /bin/grep -LD = /usr/bin/ld -m elf_$(ARCHI) -LDFLAGS = -LIBOBJS = -LIBS = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -LIPO = -LN_S = ln -s -LTLIBOBJS = -MAKEINFO = ${SHELL} /home/dan/dev/sim/airinvsvn/trunk/airinv/config/missing --run makeinfo -MKDIR_P = /bin/mkdir -p -NM = /usr/bin/nm -B -NMEDIT = -OBJDUMP = objdump -OBJEXT = o -OPENMPI_CFLAGS = -I/usr/include/openmpi-$(ARCHI) -I/usr/include/openmpi-$(ARCHI)/openmpi -I/usr/include/openmpi-$(ARCHI)/64 -m64 -OPENMPI_LIBS = -L$(LIBDIR)/openmpi/lib -lmpi_cxx -lmpi -OPENMPI_VERSION = 1.4.1 -OTOOL = -OTOOL64 = -PACKAGE = airinv -PACKAGE_BUGREPORT = den...@us... -PACKAGE_NAME = AIRINV -PACKAGE_STRING = AIRINV 99.99.99 -PACKAGE_TARNAME = airinv -PACKAGE_URL = -PACKAGE_VERSION = 99.99.99 -PATH_SEPARATOR = : -PERL = /usr/bin/perl -PYTHON = /usr/bin/python -PYTHON_ADD_LIBS = -lpthread -ldl -lutil -lm -PYTHON_CFLAGS = -I/usr/include/python2.6 -PYTHON_LIBS = -L$(LIBDIR) -lpython2.6 -PYTHON_VERSION = 2.6.4 -RANLIB = ranlib -SED = /bin/sed -SET_MAKE = -SHELL = /bin/sh -STDAIR_CFLAGS = -pthread -I/usr/include -I../../.. -STDAIR_LIBS = -L$(LIBDIR) -lboost_date_time -L../../../stdair/.libs -lstdair -STDAIR_VERSION = 0.8.0 -STRIP = strip -VERSION = 99.99.99 -ac_ct_CC = gcc -ac_ct_CXX = g++ -ac_ct_DUMPBIN = -am__include = include -am__leading_dot = . -am__quote = -am__tar = ${AMTAR} chof - "$$tardir" -am__untar = ${AMTAR} xf - -bindir = ${exec_prefix}/bin -build = $(ARCHI)-unknown-linux-gnu -build_alias = -build_cpu = $(ARCHI) -build_os = linux-gnu -build_vendor = unknown -builddir = . -datadir = ${datarootdir} -datarootdir = ${prefix}/share -exec_prefix = ${prefix} -gs_ok = yes -host = $(ARCHI)-unknown-linux-gnu -host_alias = -host_cpu = $(ARCHI) -host_os = linux-gnu -host_vendor = unknown -includedir = ${prefix}/include -libdir = ${exec_prefix}/lib -libexecdir = ${exec_prefix}/libexec -lt_ECHO = echo -mkdir_p = /bin/mkdir -p -oldincludedir = /usr/include -program_transform_name = s,x,x, -psdir = ${docdir} -sbindir = ${exec_prefix}/sbin -sharedstatedir = ${prefix}/com -srcdir = . -sysconfdir = ${prefix}/etc -target_alias = -top_build_prefix = ../../.. -top_builddir = ../../.. -top_srcdir = ../../.. -AM_CPPFLAGS = -I$(top_srcdir) - -# -rootobject_SOURCES = rootobject.cpp -rootobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) -rootobject_LDADD = -rootobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) - -invobject_SOURCES = invobject.cpp -invobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) -invobject_LDADD = -invobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) - -rootinvobject_SOURCES = rootinvobject.cpp -rootinvobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) -rootinvobject_LDADD = -rootinvobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) - -completeex_SOURCES = completeex.cpp -completeex_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) -completeex_LDADD = -completeex_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .lo .o .obj -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -rootobject$(EXEEXT): $(rootobject_OBJECTS) $(rootobject_DEPENDENCIES) - @rm -f rootobject$(EXEEXT) - $(rootobject_LINK) $(rootobject_OBJECTS) $(rootobject_LDADD) $(LIBS) -invobject$(EXEEXT): $(invobject_OBJECTS) $(invobject_DEPENDENCIES) - @rm -f invobject$(EXEEXT) - $(invobject_LINK) $(invobject_OBJECTS) $(invobject_LDADD) $(LIBS) -rootinvobject$(EXEEXT): $(rootinvobject_OBJECTS) $(rootinvobject_DEPENDENCIES) - @rm -f rootinvobject$(EXEEXT) - $(rootinvobject_LINK) $(rootinvobject_OBJECTS) $(rootinvobject_LDADD) $(LIBS) -completeex$(EXEEXT): $(completeex_OBJECTS) $(completeex_DEPENDENCIES) - @rm -f completeex$(EXEEXT) - $(completeex_LINK) $(completeex_OBJECTS) $(completeex_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -.cpp.o: - source='$<' object='$@' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXXCOMPILE) -c -o $@ $< -# $(CXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ $< - -.cpp.obj: - source='$<' object='$@' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` -# $(CXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: - source='$<' object='$@' libtool=yes \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(LTCXXCOMPILE) -c -o $@ $< -# $(LTCXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ $< - -rootobject-rootobject.o: rootobject.cpp - source='rootobject.cpp' object='rootobject-rootobject.o' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -c -o rootobject-rootobject.o `test -f 'rootobject.cpp' || echo '$(srcdir)/'`rootobject.cpp -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -MT rootobject-rootobject.o -MD -MP -MF -c -o rootobject-rootobject.o `test -f 'rootobject.cpp' || echo '$(srcdir)/'`rootobject.cpp - -rootobject-rootobject.obj: rootobject.cpp - source='rootobject.cpp' object='rootobject-rootobject.obj' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -c -o rootobject-rootobject.obj `if test -f 'rootobject.cpp'; then $(CYGPATH_W) 'rootobject.cpp'; else $(CYGPATH_W) 'rootobject.cpp'; fi` -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -MT rootobject-rootobject.obj -MD -MP -MF -c -o rootobject-rootobject.obj `if test -f 'rootobject.cpp'; then $(CYGPATH_W) 'rootobject.cpp'; else $(CYGPATH_W) 'rootobject.cpp'; fi` - -invobject-invobject.o: invobject.cpp - source='invobject.cpp' object='invobject-invobject.o' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -c -o invobject-invobject.o `test -f 'invobject.cpp' || echo '$(srcdir)/'`invobject.cpp -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -MT invobject-invobject.o -MD -MP -MF -c -o invobject-invobject.o `test -f 'invobject.cpp' || echo '$(srcdir)/'`invobject.cpp - -invobject-invobject.obj: invobject.cpp - source='invobject.cpp' object='invobject-invobject.obj' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -c -o invobject-invobject.obj `if test -f 'invobject.cpp'; then $(CYGPATH_W) 'invobject.cpp'; else $(CYGPATH_W) '$(srcdir)/invobject.cpp'; fi` -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -MT invobject-invobject.obj -MD -MP -MF -c -o invobject-invobject.obj `if test -f 'invobject.cpp'; then $(CYGPATH_W) 'invobject.cpp'; else $(CYGPATH_W) '$(srcdir)/invobject.cpp'; fi` - -rootinvobject-rootinvobject.o: rootinvobject.cpp - source='rootinvobject.cpp' object='rootinvobject-rootinvobject.o' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -c -o rootinvobject-rootinvobject.o `test -f 'rootinvobject.cpp' || echo '$(srcdir)/'`rootinvobject.cpp -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -MT rootinvobject-rootinvobject.o -MD -MP -MF -c -o rootinvobject-rootinvobject.o `test -f 'rootinvobject.cpp' || echo '$(srcdir)/'`rootinvobject.cpp - -rootinvobject-rootinvobject.obj: rootinvobject.cpp - source='rootinvobject.cpp' object='rootinvobject-rootinvobject.obj' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -c -o rootinvobject-rootinvobject.obj `if test -f 'rootinvobject.cpp'; then $(CYGPATH_W) 'rootinvobject.cpp'; else $(CYGPATH_W) '$(srcdir)/rootinvobject.cpp'; fi` -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -MT rootinvobject-rootinvobject.obj -MD -MP -MF -c -o rootinvobject-rootinvobject.obj `if test -f 'rootinvobject.cpp'; then $(CYGPATH_W) 'rootinvobject.cpp'; else $(CYGPATH_W) '$(srcdir)/rootinvobject.cpp'; fi` - -completeex-completeex.o: completeex.cpp - source='completeex.cpp' object='completeex-completeex.o' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -c -o completeex-completeex.o `test -f 'completeex.cpp' || echo '$(srcdir)/'`completeex.cpp -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -MT completeex-completeex.o -MD -MP -MF -c -o completeex-completeex.o `test -f 'completeex.cpp' || echo '$(srcdir)/'`completeex.cpp - -completeex-completeex.obj: completeex.cpp - source='completeex.cpp' object='completeex-completeex.obj' libtool=no \ - DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ - $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -c -o completeex-completeex.obj `if test -f 'completeex.cpp'; then $(CYGPATH_W) 'completeex.cpp'; else $(CYGPATH_W) 'completeex.cpp'; fi` -# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -MT completeex-completeex.obj -MD -MP -MF -c -o completeex-completeex.obj `if test -f 'completeex.cpp'; then $(CYGPATH_W) 'completeex.cpp'; else $(CYGPATH_W) 'completeex.cpp'; fi` - -mostlyclean-deps: - -rm -f $(DEPDIR)/*.Po - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -all-am: Makefile $(PROGRAMS) - -mostlyclean-generic: - -clean-generic: - -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-deps - -.MAKE: - -.PHONY: all all-am clean clean-binPROGRAMS \ - clean-generic clean-libtool mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: -# DO NOT DELETE Deleted: trunk/stdair/doc/tutorial/src/rootinvobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 21:47:26 UTC (rev 365) +++ trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-14 16:39:38 UTC (rev 366) @@ -1,50 +0,0 @@ -/*! - * \page tut_rootinvobject_cpp Tutorial for the BOM Root and Inventory Objects Creation - * \code - */ -// STL -#include <cassert> -// StdAir -#include <stdair/bom/BomRoot.hpp> -#include <stdair/bom/Inventory.hpp> -#include <stdair/factory/FacBomManager.hpp> - -// /////////////////////// M A I N /////////////////////////// -int main() { - - // Create the root of the Bom tree (i.e., a BomRoot object) - stdair::BomRoot& lBomRoot = - stdair::FacBom<stdair::BomRoot>::instance().create(); - - // Create an Inventory for the Airline BA - const stdair::InventoryKey lBAKey ("BA"); - stdair::Inventory& lBAInv = - stdair::FacBom<stdair::... [truncated message content] |
From: <den...@us...> - 2010-11-07 21:47:32
|
Revision: 365 http://stdair.svn.sourceforge.net/stdair/?rev=365&view=rev Author: denis_arnaud Date: 2010-11-07 21:47:26 +0000 (Sun, 07 Nov 2010) Log Message: ----------- [Doc] Improved the tutorial section layout. Modified Paths: -------------- trunk/stdair/doc/local/help_wanted.doc trunk/stdair/doc/local/sources.mk trunk/stdair/doc/local/users_guide.doc trunk/stdair/doc/tutorial/sources.mk trunk/stdair/doc/tutorial/src/completeex.cpp trunk/stdair/doc/tutorial/src/invobject.cpp trunk/stdair/doc/tutorial/src/rootinvobject.cpp trunk/stdair/doc/tutorial/src/rootobject.cpp trunk/stdair/doc/tutorial/tutorial.doc Removed Paths: ------------- trunk/stdair/doc/tutorial/01_rootobject.doc trunk/stdair/doc/tutorial/02_invobject.doc trunk/stdair/doc/tutorial/03_rootinvobject.doc trunk/stdair/doc/tutorial/04_completeex.doc Modified: trunk/stdair/doc/local/help_wanted.doc =================================================================== --- trunk/stdair/doc/local/help_wanted.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/local/help_wanted.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -3,27 +3,30 @@ <b>Do not ask what StdAir can do for you. Ask what you can do for StdAir.</b> -You can help us to develop the StdAir library. There are always a lot of things -you can do: +You can help us to develop the StdAir library. There are always a lot +of things you can do: - Start using StdAir - Tell your friends about StdAir and help them to get started using it -- If you find a bug, report it to us. Without your help we can never hope to -produce a bug free code. +- If you find a bug, report it to us (on the <a +href="https://sourceforge.net/apps/trac/stdair/newticket">dedicated +Sourceforge's Trac Web site</a>). Without your help we can never hope +to produce a bug free code. - Help us to improve the documentation by providing information about documentation bugs -- Answer support requests in the StdAir discussion forums on SourceForge. If -you know the answer to a question, help others to overcome their StdAir -problems. -- Help us to improve our algorithms. If you know of a better way (e.g. that -is faster or requires less memory) to implement some of our algorithms, then -let us know. -- Help us to port StdAir to new platforms. If you manage to compile StdAir on a -new platform, then tell us how you did it. -- Send us your code. If you have a good StdAir compatible code, which you can -release under the LGPL, and you think it should be included in StdAir, then -send it to us. -- Become an StdAir developer. Send us (see the \ref authors page) an e-mail and tell what you can do for -StdAir. +- Answer support requests in the StdAir <a +href="https://sourceforge.net/apps/phpbb/stdair/">discussion +forums</a> on SourceForge. If you know the answer to a question, help +others to overcome their StdAir problems. +- Help us to improve our algorithms. If you know of a better way +(e.g., that is faster or requires less memory) to implement some of our +algorithms, then let us know. +- Help to port StdAir to new platforms. If you manage to compile +StdAir on a new platform, then tell how you did it. +- Send your code. If you have a good StdAir compatible code, which +you can release under the LGPL, and you think it should be included in +StdAir, then send it to the communauty. +- Become an StdAir developer. Send us (see the \ref authors page) an +e-mail and tell what you can do for StdAir. */ Modified: trunk/stdair/doc/local/sources.mk =================================================================== --- trunk/stdair/doc/local/sources.mk 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/local/sources.mk 2010-11-07 21:47:26 UTC (rev 365) @@ -9,9 +9,9 @@ $(top_srcdir)/doc/local/howto_release.doc \ $(top_srcdir)/doc/local/installation.doc \ $(top_srcdir)/doc/local/linking.doc \ + $(top_srcdir)/doc/local/verification.doc \ $(top_srcdir)/doc/local/test.doc \ - $(top_srcdir)/doc/local/users_guide.doc \ - $(top_srcdir)/doc/local/verification.doc + $(top_srcdir)/doc/local/users_guide.doc html_local_sources = \ $(top_srcdir)/doc/local/stdair_footer.html \ Modified: trunk/stdair/doc/local/users_guide.doc =================================================================== --- trunk/stdair/doc/local/users_guide.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/local/users_guide.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,8 +1,8 @@ /*! \page users_guide Users Guide -\section toc Table of Contents -- \ref introduction +\section ug_toc Table of Contents +- \ref ug_introduction - \ref predefined_types - \ref scalar_types - \ref vector_types @@ -25,7 +25,7 @@ - \ref itfile_class -\section introduction Introduction +\section ug_introduction Introduction The \c StdAir library contains classes for airline business management. This document does not cover all the aspects of the \c StdAir library. It Deleted: trunk/stdair/doc/tutorial/01_rootobject.doc =================================================================== --- trunk/stdair/doc/tutorial/01_rootobject.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/01_rootobject.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,13 +0,0 @@ -/*! -\page tutorial01_rootobject Creating a BOM root object - -In this example we are constructing a BOM root object (i.e., a root for -all the classes in the project): - -\include rootobject.cpp - -When you run this program, the output will look: - -\include rootobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/02_invobject.doc =================================================================== --- trunk/stdair/doc/tutorial/02_invobject.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/02_invobject.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,12 +0,0 @@ -/*! -\page tutorial02_invobject Creating an Inventory object - -In this example we are constructing an airline inventory whose code is "BA": - -\include invobject.cpp - -When you run this program, the output will look: - -\include invobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/03_rootinvobject.doc =================================================================== --- trunk/stdair/doc/tutorial/03_rootinvobject.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/03_rootinvobject.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,13 +0,0 @@ -/*! -\page tutorial03_rootinvobject Linking an inventory object with the BOM root object - -In this example we are linking an airline inventory whose code is "BA" -with the BOM root object. - -\include rootinvobject.cpp - -When you run this program, the output will look: - -\include rootinvobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/04_completeex.doc =================================================================== --- trunk/stdair/doc/tutorial/04_completeex.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/04_completeex.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,12 +0,0 @@ -/*! -\page tutorial04_completeex Constructing a complete BOM tree - -In this example we are constructing a complete BOM tree: - -\include completeex.cpp - -When you run this program, the output will look: - -\include completeex.ref - -*/ Modified: trunk/stdair/doc/tutorial/sources.mk =================================================================== --- trunk/stdair/doc/tutorial/sources.mk 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/sources.mk 2010-11-07 21:47:26 UTC (rev 365) @@ -1,6 +1,2 @@ doc_tutorial_sources = \ - $(top_srcdir)/doc/tutorial/tutorial.doc \ - $(top_srcdir)/doc/tutorial/01_rootobject.doc \ - $(top_srcdir)/doc/tutorial/02_invobject.doc \ - $(top_srcdir)/doc/tutorial/03_rootinvobject.doc \ - $(top_srcdir)/doc/tutorial/04_completeex.doc + $(top_srcdir)/doc/tutorial/tutorial.doc Modified: trunk/stdair/doc/tutorial/src/completeex.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_completeex_cpp Tutorial Full Basic Example + * \code + */ // STL #include <cassert> // StdAir @@ -337,3 +341,7 @@ // Exit program: return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/src/invobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_invobject_cpp Tutorial for the BOM Inventory Object Creation + * \code + */ // StdAir #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Inventory.hpp> @@ -19,3 +23,7 @@ // Exit program return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/src/rootinvobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_rootinvobject_cpp Tutorial for the BOM Root and Inventory Objects Creation + * \code + */ // STL #include <cassert> // StdAir @@ -7,6 +11,7 @@ // /////////////////////// M A I N /////////////////////////// int main() { + // Create the root of the Bom tree (i.e., a BomRoot object) stdair::BomRoot& lBomRoot = stdair::FacBom<stdair::BomRoot>::instance().create(); @@ -39,3 +44,7 @@ // Exit program return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/src/rootobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-07 21:47:26 UTC (rev 365) @@ -1,3 +1,7 @@ +/*! + * \page tut_rootobject_cpp Tutorial for the BOM Root Object Creation + * \code + */ // StdAir #include <stdair/bom/BomRoot.hpp> #include <stdair/factory/FacBomManager.hpp> @@ -15,3 +19,7 @@ // Exit program: return 0; } + +/*! + * \endcode + */ Modified: trunk/stdair/doc/tutorial/tutorial.doc =================================================================== --- trunk/stdair/doc/tutorial/tutorial.doc 2010-11-07 13:29:26 UTC (rev 364) +++ trunk/stdair/doc/tutorial/tutorial.doc 2010-11-07 21:47:26 UTC (rev 365) @@ -1,40 +1,137 @@ /*! \page tutorials Tutorials -\addindex Tutorial +\section tut_toc Table of Contents +- \ref tut_introduction + - \ref tut_intro_configuration + - \ref tut_intro_building +- \ref tut_short_examples + - \ref tut01_rootobject + - \ref tut02_invobject + - \ref tut03_rootinvobject +- \ref tut_full_examples + - \ref tut04_completeex + +\section tut_introduction Introduction This page contains some tutorial examples that will help you getting started using StdAir. Most examples show how to construct some simple business objects, i.e., instances of the so-named Business Object Model (BOM). +\subsection tut_intro_configuration Preparing the StdAir Project for Development + +The configuration script must have already been launched (at +least) once. To run the configuration script the first time, go to the +top directory (where the StdAir package has been un-packed), and issue +either of the following two commands, depending on whether the StdAir +project has been checked out from the Subversion repository or +downloaded as a tar-ball package from the Sourceforge Web site: + - <tt>./autogen.sh</tt> + - <tt>./configure</tt> + +\subsection tut_intro_building Building the Tutorials + The source code for these examples can be found in the <tt>doc/tutorial/src</tt> directory. In that directory, there is also a Make-file, named <tt>makefile.tutorial</tt>, allowing compiling all -the examples. Hence (\ref N), just go to the tutorial source +the examples. Hence, just go to the tutorial source directory, and issue the following command: \verbatim make -f makefile.tutorial \endverbatim +\section tut_short_examples Short Examples Examples of basic functionality: -- \ref tutorial01_rootobject -- \ref tutorial02_invobject -- \ref tutorial03_rootinvobject +- \ref tut01_rootobject +- \ref tut02_invobject +- \ref tut03_rootinvobject +\subsection tut01_rootobject Creating a BOM root object + +In this example we are constructing a BOM root object (i.e., a root for +all the classes in the project). + +\dontinclude rootobject.cpp +First, we create an object \c lBomRoot of the class <tt>stdair::BomRoot</tt>. +\skipline lBomRoot +\line FacBom +Then, the content of that object is displayed on the standard output +(<tt>std::cout</tt>). +\skipline cout + +When this program is run, the output should look like: + +\include rootobject.ref + +See the corresponding full program (\ref tut_rootobject_cpp) for more details. + +\subsection tut02_invobject Creating an Inventory object + +In this example we are constructing an airline inventory object whose +code is "BA": + +\dontinclude invobject.cpp +First, we create an object \c lBAKey of the class <tt>stdair::InventoryKey</tt>. +\skipline lBAKey +Thanks to that key, an object \c lBAInv of the class +<tt>stdair::InventoryKey</tt> can be created. +\skipline lBAInv +\line FacBom +Then, the content of that object is displayed on the standard output +(<tt>std::cout</tt>). +\skipline cout + +When this program is run, the output should look like: + +\include invobject.ref + +See the corresponding full program (\ref tut_invobject_cpp) for more details. + +\subsection tut03_rootinvobject Linking an inventory object with the BOM root object + +In this example we are linking an airline inventory object with the +root of the BOM tree. + +\dontinclude rootinvobject.cpp + +Now that we are able to build both a stdair::BomRoot and +stdair::Inventory objects, we shall see how to link them. +That operation is as simple as using the +<tt>stdair::FacBomManager::addToList()</tt> method: +\skipline addToList + +From the BomRoot object instance, the list of inventories can then be +retrieved... +\skipline lInventoryList +\line getList + +... and browsed: +\skipline const_iterator +\until } + +When this program is run, the output should look like: + +\include rootinvobject.ref + +See the corresponding full program (\ref tut_rootinvobject_cpp) for more +details. + +\section tut_full_examples Full Examples + More complete examples: -- \ref tutorial04_completeex +- \ref tut04_completeex -\note -\anchor N +\subsection tut04_completeex Constructing a complete BOM tree -(N) - The configuration script must have already been launched (at -least) once. To run the configuration script the first time, go to the -top directory (where the StdAir package has been un-packed), and issue -either of the following two commands, depending on whether the StdAir -project has been checked out from the Subversion repository or -downloaded as a tar-ball package from the Sourceforge Web site: - - <tt>./autogen.sh</tt> - - <tt>./configure</tt> +In this example we are constructing a complete BOM tree. +\dontinclude completeex.cpp + +When this program is run, the output should look like: + +\include completeex.ref + +See the corresponding full program (\ref tut_completeex_cpp) for more details. + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-07 13:29:33
|
Revision: 364 http://stdair.svn.sourceforge.net/stdair/?rev=364&view=rev Author: denis_arnaud Date: 2010-11-07 13:29:26 +0000 (Sun, 07 Nov 2010) Log Message: ----------- [Doc] Improved the tutorials. Modified Paths: -------------- trunk/stdair/doc/local/authors.doc trunk/stdair/doc/local/help_wanted.doc trunk/stdair/doc/local/howto_release.doc trunk/stdair/doc/local/index.doc trunk/stdair/doc/tutorial/sources.mk trunk/stdair/doc/tutorial/src/completeex.cpp trunk/stdair/doc/tutorial/src/invobject.cpp trunk/stdair/doc/tutorial/src/rootinvobject.cpp trunk/stdair/doc/tutorial/src/rootobject.cpp trunk/stdair/doc/tutorial/tutorial.doc Added Paths: ----------- trunk/stdair/doc/tutorial/01_rootobject.doc trunk/stdair/doc/tutorial/02_invobject.doc trunk/stdair/doc/tutorial/03_rootinvobject.doc trunk/stdair/doc/tutorial/04_completeex.doc trunk/stdair/doc/tutorial/src/.deps/ trunk/stdair/doc/tutorial/src/makefile.tutorial Removed Paths: ------------- trunk/stdair/doc/tutorial/completeex.doc trunk/stdair/doc/tutorial/invobject.doc trunk/stdair/doc/tutorial/rootinvobject.doc trunk/stdair/doc/tutorial/rootobject.doc Property Changed: ---------------- trunk/stdair/doc/tutorial/src/ Modified: trunk/stdair/doc/local/authors.doc =================================================================== --- trunk/stdair/doc/local/authors.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/local/authors.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -2,14 +2,11 @@ \page authors People -\section admins Project Admins +\section admins Project Admins (and Developers) - Denis Arnaud <den...@us...> (\ref N) - Anh Quan Nguyen <qua...@us...> (\ref N) - - -\section developers Developers - +- Gabrielle Sabatier <gsa...@us...> (\ref N) - Christophe Lacombe <dd...@us...> (\ref N) Modified: trunk/stdair/doc/local/help_wanted.doc =================================================================== --- trunk/stdair/doc/local/help_wanted.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/local/help_wanted.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -23,7 +23,7 @@ - Send us your code. If you have a good StdAir compatible code, which you can release under the LGPL, and you think it should be included in StdAir, then send it to us. -- Become an StdAir developer. Send us an e-mail and tell what you can do for +- Become an StdAir developer. Send us (see the \ref authors page) an e-mail and tell what you can do for StdAir. */ Modified: trunk/stdair/doc/local/howto_release.doc =================================================================== --- trunk/stdair/doc/local/howto_release.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/local/howto_release.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -41,23 +41,23 @@ \verbatim cd ~/dev cd stdairsvn/branches/stdair -mkdir 0.2.0 -svn add 0.2.0 -svn ci -m "[Branch 0.2.0] Prepared the branch 0.2.0 to be copied from head of the trunk." +mkdir 0.8.0 +svn add 0.8.0 +svn ci -m "[Branch 0.8.0] Prepared the branch 0.8.0 to be copied from head of the trunk." \endverbatim \section check_release_revision Check Subversion revision for the release Check to which Subversion revision the release corresponds to. For instance -the <a href="http://sourceforge.net/apps/trac/stdair/changeset/233/">StdAir - release 0.2.0 corresponds to Subversion revision r233</a>. +the <a href="http://sourceforge.net/apps/trac/stdair/changeset/360/">StdAir + release 0.8.0 corresponds to Subversion revision r360</a>. The trunk <tt>configure.ac</tt> file specifies a fake release number, namely 99.99.99, for current (head) development. When a release is made, two Subversion revisions are committed with, as the sole change, the release number within the <tt>configure.ac</tt> file: - one revision is committed with the to-be-released version number (e.g., - 0.2.0) and commit message prefixed with "[Release x.y.z]", + 0.8.0) and commit message prefixed with "[Release x.y.z]", - and another one with the release number back to 99.99.99 and message stating "[Release] Back to working version (99.99.99)." . @@ -75,18 +75,18 @@ Create a release branch by copying the <a href="https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair">source tree</a> to be released, from the found revision (e.g., -<a href="http://sourceforge.net/apps/trac/stdair/changeset/233">r233</a>) +<a href="http://sourceforge.net/apps/trac/stdair/changeset/360">r360</a>) into the dedicated -<a href="https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.2.0">'branches' sub-directory of the Subversion repository</a>, e.g.: +<a href="https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.8.0">'branches' sub-directory of the Subversion repository</a>, e.g.: \verbatim -svn copy -r233 \ +svn copy -r360 \ https://stdair.svn.sourceforge.net/svnroot/stdair/trunk/stdair \ - https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.2.0/main \ - -m "[Release] Created the main 0.2.0 release branch, from revision r233." + https://stdair.svn.sourceforge.net/svnroot/stdair/branches/stdair/0.8.0/main \ + -m "[Release] Created the main 0.8.0 release branch, from revision r360." \endverbatim Check the results:<br> -\c firefox -new-tab \"<a href="http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.2.0/main">http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.2.0/main</a>\" +\c firefox -new-tab \"<a href="http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.8.0/main">http://sourceforge.net/apps/trac/stdair/browser/branches/stdair/0.8.0/main</a>\" \section checkout_new_release Check-out the new release @@ -95,7 +95,7 @@ may be made (for instance, on the RPM specification file): \verbatim cd ~/dev -cd stdairsvn/branches/stdair/0.2.0 +cd stdairsvn/branches/stdair/0.8.0 svn up cd main \endverbatim @@ -121,14 +121,14 @@ Create the distribution packages using the following command:<br> \verbatim cd ~/dev -cd stdairsvn/branches/stdair/0.2.0/main +cd stdairsvn/branches/stdair/0.8.0/main ./autogen.sh && make distcheck \endverbatim This will configure, compile and check the package. The output packages will -be named, for instance, <tt>stdair-0.2.0.tar.gz</tt> and -<tt>stdair-0.2.0.tar.bz2</tt>. +be named, for instance, <tt>stdair-0.8.0.tar.gz</tt> and +<tt>stdair-0.8.0.tar.bz2</tt>. \section generate_rpm_packages Generation the RPM packages @@ -137,7 +137,7 @@ <a href="http://fedoraproject.org">Fedora</a>/<a href="http://www.redhat.com">RedHat</a>): \verbatim cd ~/dev -cd stdairsvn/branches/stdair/0.2.0/main +cd stdairsvn/branches/stdair/0.8.0/main ./autogen.sh && make dist \endverbatim @@ -145,10 +145,10 @@ available in the system. \verbatim cp stdair.spec ~/dev/packages/SPECS \ - && cp stdair-0.2.0.tar.bz2 ~/dev/packages/SOURCES + && cp stdair-0.8.0.tar.bz2 ~/dev/packages/SOURCES cd ~/dev/packages/SPECS rpmbuild -ba stdair.spec -rpmlint -i ../SPECS/stdair.spec ../SRPMS/stdair-0.2.0-1.fc13.src.rpm \ +rpmlint -i ../SPECS/stdair.spec ../SRPMS/stdair-0.8.0-1.fc13.src.rpm \ ../RPMS/i686/stdair-* \endverbatim @@ -168,9 +168,9 @@ <tt>make dist-html</tt> and <tt>make dist-tex</tt> The output documentation packages will be named, for instance: -- <tt>stdair-doc-0.2.0.tar.gz</tt> and <tt>stdair-doc-0.2.0.tar.bz2</tt> +- <tt>stdair-doc-0.8.0.tar.gz</tt> and <tt>stdair-doc-0.8.0.tar.bz2</tt> for the HTML documentation. -- <tt>stdair-pdf-0.2.0.tar.gz</tt> and <tt>stdair-pdf-0.2.0.tar.bz2</tt> +- <tt>stdair-pdf-0.8.0.tar.gz</tt> and <tt>stdair-pdf-0.8.0.tar.bz2</tt> for the PDF documentation. @@ -187,7 +187,7 @@ - <a href="https://sourceforge.net/apps/trac/sourceforge/wiki/Shell%20service#Accessingyourfileswithothertools">synchronise them with rsync and SSH</a>: \verbatim cd ~/dev -cd stdairsvn/branches/stdair/0.2.0/main +cd stdairsvn/branches/stdair/0.8.0/main rsync -aiv doc/html/ joe,st...@we...:htdocs/ \endverbatim where \c -aiv options mean: Modified: trunk/stdair/doc/local/index.doc =================================================================== --- trunk/stdair/doc/local/index.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/local/index.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -16,7 +16,7 @@ - \ref installation - \ref linking - \ref users_guide -- \ref tutorial +- \ref tutorials - \ref verification - \ref copyright - \ref help_wanted Copied: trunk/stdair/doc/tutorial/01_rootobject.doc (from rev 359, trunk/stdair/doc/tutorial/rootobject.doc) =================================================================== --- trunk/stdair/doc/tutorial/01_rootobject.doc (rev 0) +++ trunk/stdair/doc/tutorial/01_rootobject.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -0,0 +1,13 @@ +/*! +\page tutorial01_rootobject Creating a BOM root object + +In this example we are constructing a BOM root object (i.e., a root for +all the classes in the project): + +\include rootobject.cpp + +When you run this program, the output will look: + +\include rootobject.ref + +*/ Copied: trunk/stdair/doc/tutorial/02_invobject.doc (from rev 359, trunk/stdair/doc/tutorial/invobject.doc) =================================================================== --- trunk/stdair/doc/tutorial/02_invobject.doc (rev 0) +++ trunk/stdair/doc/tutorial/02_invobject.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -0,0 +1,12 @@ +/*! +\page tutorial02_invobject Creating an Inventory object + +In this example we are constructing an airline inventory whose code is "BA": + +\include invobject.cpp + +When you run this program, the output will look: + +\include invobject.ref + +*/ Copied: trunk/stdair/doc/tutorial/03_rootinvobject.doc (from rev 359, trunk/stdair/doc/tutorial/rootinvobject.doc) =================================================================== --- trunk/stdair/doc/tutorial/03_rootinvobject.doc (rev 0) +++ trunk/stdair/doc/tutorial/03_rootinvobject.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -0,0 +1,13 @@ +/*! +\page tutorial03_rootinvobject Linking an inventory object with the BOM root object + +In this example we are linking an airline inventory whose code is "BA" +with the BOM root object. + +\include rootinvobject.cpp + +When you run this program, the output will look: + +\include rootinvobject.ref + +*/ Copied: trunk/stdair/doc/tutorial/04_completeex.doc (from rev 359, trunk/stdair/doc/tutorial/completeex.doc) =================================================================== --- trunk/stdair/doc/tutorial/04_completeex.doc (rev 0) +++ trunk/stdair/doc/tutorial/04_completeex.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -0,0 +1,12 @@ +/*! +\page tutorial04_completeex Constructing a complete BOM tree + +In this example we are constructing a complete BOM tree: + +\include completeex.cpp + +When you run this program, the output will look: + +\include completeex.ref + +*/ Deleted: trunk/stdair/doc/tutorial/completeex.doc =================================================================== --- trunk/stdair/doc/tutorial/completeex.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/completeex.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -1,12 +0,0 @@ -/*! -\page completeex Constructing a complete Bom tree - -In this example we are constructing a complete Bom tree: - -\include completeex.cpp - -When you run this program, the output will look: - -\include completeex.ref - -*/ Deleted: trunk/stdair/doc/tutorial/invobject.doc =================================================================== --- trunk/stdair/doc/tutorial/invobject.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/invobject.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -1,12 +0,0 @@ -/*! -\page invobject Creating an Inventory object - -In this example we are constructing an airline inventory whose code is "BA": - -\include invobject.cpp - -When you run this program, the output will look: - -\include invobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/rootinvobject.doc =================================================================== --- trunk/stdair/doc/tutorial/rootinvobject.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/rootinvobject.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -1,12 +0,0 @@ -/*! -\page rootinvobject Linking an inventory object with the Bom root object - -In this example we are linking an airline inventory whose code is "BA" with the Bom root object. - -\include rootinvobject.cpp - -When you run this program, the output will look: - -\include rootinvobject.ref - -*/ Deleted: trunk/stdair/doc/tutorial/rootobject.doc =================================================================== --- trunk/stdair/doc/tutorial/rootobject.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/rootobject.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -1,12 +0,0 @@ -/*! -\page rootobject Creating a Bom root object - -In this example we are constructing a Bom root object (i,e a root for all classes in the project): - -\include rootobject.cpp - -When you run this program, the output will look: - -\include rootobject.ref - -*/ Modified: trunk/stdair/doc/tutorial/sources.mk =================================================================== --- trunk/stdair/doc/tutorial/sources.mk 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/sources.mk 2010-11-07 13:29:26 UTC (rev 364) @@ -1,5 +1,6 @@ doc_tutorial_sources = \ - $(top_srcdir)/doc/tutorial/invobject.doc \ - $(top_srcdir)/doc/tutorial/rootobject.doc \ - $(top_srcdir)/doc/tutorial/rootinvobject.doc \ - $(top_srcdir)/doc/tutorial/completeex.doc + $(top_srcdir)/doc/tutorial/tutorial.doc \ + $(top_srcdir)/doc/tutorial/01_rootobject.doc \ + $(top_srcdir)/doc/tutorial/02_invobject.doc \ + $(top_srcdir)/doc/tutorial/03_rootinvobject.doc \ + $(top_srcdir)/doc/tutorial/04_completeex.doc Property changes on: trunk/stdair/doc/tutorial/src ___________________________________________________________________ Modified: svn:ignore - Makefile Makefile.in + Makefile Makefile.in rootobject invobject rootinvobject completeex Property changes on: trunk/stdair/doc/tutorial/src/.deps ___________________________________________________________________ Added: svn:ignore + *.Po Modified: trunk/stdair/doc/tutorial/src/completeex.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/src/completeex.cpp 2010-11-07 13:29:26 UTC (rev 364) @@ -1,5 +1,6 @@ +// STL +#include <cassert> // StdAir -#include <stdair/bom/BomManager.hpp> #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Inventory.hpp> #include <stdair/bom/InventoryTypes.hpp> @@ -17,14 +18,12 @@ #include <stdair/bom/FareFamilyTypes.hpp> #include <stdair/bom/BookingClass.hpp> #include <stdair/bom/BookingClassTypes.hpp> +#include <stdair/bom/BomManager.hpp> // Utility class to display BOM objects #include <stdair/factory/FacBomManager.hpp> -//These lines are needed for use of cout and endl -using std::cout; -using std::endl; +// /////////////////////// M A I N /////////////////////////// +int main() { -int main() -{ // ///////////// Step 0.0: Initialisation //////////// // Create the root of the Bom tree (i.e., a BomRoot object) stdair::BomRoot& lBomRoot = @@ -63,7 +62,7 @@ stdair::SegmentDate& lLHRSYDSegment = stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, - lLHRSYDSegment); + lLHRSYDSegment); // Create a second SegmentDate (LHR-BKK) for BA's Inventory const stdair::AirportCode_T lBKK ("BKK"); @@ -72,7 +71,7 @@ stdair::SegmentDate& lLHRBKKSegment = stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, - lLHRBKKSegment); + lLHRBKKSegment); // Create a third SegmentDate (BKK-SYD) for BA's Inventory lSegmentDateKey = stdair::SegmentDateKey (lBKK, lSYD); @@ -80,7 +79,7 @@ stdair::SegmentDate& lBKKSYDSegment = stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, - lBKKSYDSegment); + lBKKSYDSegment); // Step 0.4: Leg-date level // Create a first LegDate (LHR) for BA's Inventory @@ -105,19 +104,19 @@ stdair::SegmentCabin& lLHRBKKSegmentYCabin = stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); stdair::FacBomManager::instance().addToList (lLHRBKKSegment, - lLHRBKKSegmentYCabin); + lLHRBKKSegmentYCabin); // Create a SegmentCabin (Y) of the Segment BKK-SYD; stdair::SegmentCabin& lBKKSYDSegmentYCabin = stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); stdair::FacBomManager::instance().addToList (lBKKSYDSegment, - lBKKSYDSegmentYCabin); + lBKKSYDSegmentYCabin); // Create a SegmentCabin (Y) of the Segment LHR-SYD; stdair::SegmentCabin& lLHRSYDSegmentYCabin = stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); stdair::FacBomManager::instance().addToList (lLHRSYDSegment, - lLHRSYDSegmentYCabin); + lLHRSYDSegmentYCabin); // Step 0.6: leg-cabin level // Create a LegCabin (Y) for the Leg LHR-BKK on BA's Inventory @@ -140,41 +139,44 @@ stdair::FareFamily& lLHRBKKSegmentYCabin1Family = stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin, - lLHRBKKSegmentYCabin1Family); + lLHRBKKSegmentYCabin1Family); // Create a FareFamily (1) for the Segment BKK-SYD, cabin Y on BA's Inv stdair::FareFamily& lBKKSYDSegmentYCabin1Family = stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin, - lBKKSYDSegmentYCabin1Family); + lBKKSYDSegmentYCabin1Family); // Create a FareFamily (1) for the Segment LHR-SYD, cabin Y on BA's Inv stdair::FareFamily& lLHRSYDSegmentYCabin1Family = stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin, - lLHRSYDSegmentYCabin1Family); + lLHRSYDSegmentYCabin1Family); // Step 0.8: booking class level - // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare family 1 on BA's Inv + // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare + // family 1 on BA's Inv const stdair::ClassCode_T lQ ("Q"); stdair::BookingClassKey lQBookingClassKey (lQ); stdair::BookingClass& lLHRBKKSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin1Family, - lLHRBKKSegmentYCabin1FamilyQClass); + lLHRBKKSegmentYCabin1FamilyQClass); - // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare family 1 on BA's Inv + // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare + // family 1 on BA's Inv stdair::BookingClass& lBKKSYDSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin1Family, - lBKKSYDSegmentYCabin1FamilyQClass); + lBKKSYDSegmentYCabin1FamilyQClass); - // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare family 1 on BA's Inv + // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare + // family 1 on BA's Inv stdair::BookingClass& lLHRSYDSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin1Family, - lLHRSYDSegmentYCabin1FamilyQClass); + lLHRSYDSegmentYCabin1FamilyQClass); // ////// AF /////// // Step 0.2: Flight-date level @@ -196,7 +198,7 @@ stdair::SegmentDate& lCDGSFOSegment = stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); stdair::FacBomManager::instance().addToList (lAF102_20100320_FD, - lCDGSFOSegment); + lCDGSFOSegment); // Step 0.4: Leg-date level // Create a LegDate (CDG) for AF's Inventory @@ -211,7 +213,7 @@ stdair::SegmentCabin& lCDGSFOSegmentYCabin = stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); stdair::FacBomManager::instance().addToList (lCDGSFOSegment, - lCDGSFOSegmentYCabin); + lCDGSFOSegmentYCabin); // Step 0.6: leg-cabin level // Create a LegCabin (Y) for the Leg CDG-SFO on AF's Inventory @@ -224,19 +226,20 @@ stdair::FareFamily& lCDGSFOSegmentYCabin1Family = stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin, - lCDGSFOSegmentYCabin1Family); + lCDGSFOSegmentYCabin1Family); // Step 0.8: booking class level - // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare family 1 on AF's Inv + // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare + // family 1 on AF's Inv stdair::BookingClass& lCDGSFOSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin1Family, - lCDGSFOSegmentYCabin1FamilyQClass); + lCDGSFOSegmentYCabin1FamilyQClass); // /////////// Step 1.0: Display the BOM tree ////////// // 1.0. Bom root level - cout << lBomRoot.describeKey() << endl; + std::cout << lBomRoot << std::endl; // 1.1. Inventory level const stdair::InventoryList_T& lInventoryList = @@ -244,8 +247,9 @@ for (stdair::InventoryList_T::const_iterator itInv = lInventoryList.begin(); itInv != lInventoryList.end(); ++itInv) { const stdair::Inventory* lInv_ptr = *itInv; + assert (lInv_ptr != NULL); - cout << " " <<lInv_ptr->describeKey() << endl; + std::cout << " " << *lInv_ptr << std::endl; // 1.2. FlightDate level const stdair::FlightDateList_T& lFlightDateList = @@ -253,8 +257,9 @@ for (stdair::FlightDateList_T::const_iterator itFD=lFlightDateList.begin(); itFD != lFlightDateList.end(); ++itFD) { const stdair::FlightDate* lFD_ptr = *itFD; + assert (lFD_ptr != NULL); - cout << " " << lFD_ptr->toString() << endl; + std::cout << " " << *lFD_ptr << std::endl; // 1.4. LegDate level const stdair::LegDateList_T& lLegDateList = @@ -263,18 +268,20 @@ lLegDateList.begin(); itLD != lLegDateList.end(); ++itLD) { const stdair::LegDate* lLD_ptr = *itLD; + assert (lLD_ptr != NULL); - cout << " " << lLD_ptr->toString() << endl; + std::cout << " " << *lLD_ptr << std::endl; // 1.6. LegCabin level const stdair::LegCabinList_T& lLegCabinList = - stdair::BomManager::getList<stdair::LegCabin> (*lLD_ptr); + stdair::BomManager::getList<stdair::LegCabin> (*lLD_ptr); for (stdair::LegCabinList_T::const_iterator itLC = lLegCabinList.begin(); itLC != lLegCabinList.end(); ++itLC) { const stdair::LegCabin* lLC_ptr = *itLC; - - cout << " " << lLC_ptr->toString() << endl; + assert (lLC_ptr != NULL); + + std::cout << " " << *lLC_ptr << std::endl; } } @@ -285,8 +292,9 @@ lSegmentDateList.begin(); itSD != lSegmentDateList.end(); ++itSD) { const stdair::SegmentDate* lSD_ptr = *itSD; + assert (lSD_ptr != NULL); - cout << " " << lSD_ptr->toString() << endl; + std::cout << " " << *lSD_ptr << std::endl; // 1.5. SegmentCabin level const stdair::SegmentCabinList_T& lSegmentCabinList = @@ -295,8 +303,9 @@ lSegmentCabinList.begin(); itSC != lSegmentCabinList.end(); ++itSC) { const stdair::SegmentCabin* lSC_ptr = *itSC; + assert (lSC_ptr != NULL); - cout << " " << lSC_ptr->toString() << endl; + std::cout << " " << *lSC_ptr << std::endl; // 1.7. FareFamily level const stdair::FareFamilyList_T& lFareFamilyList = @@ -305,8 +314,9 @@ lFareFamilyList.begin(); itFF != lFareFamilyList.end(); ++itFF) { const stdair::FareFamily* lFF_ptr = *itFF; + assert (lFF_ptr != NULL); - cout << " " << lFF_ptr->toString() << endl; + std::cout << " " << *lFF_ptr << std::endl; // 1.8. BookingClass level const stdair::BookingClassList_T& lBookingClassList = @@ -315,8 +325,9 @@ lBookingClassList.begin(); itBC != lBookingClassList.end(); ++itBC) { const stdair::BookingClass* lBC_ptr = *itBC; + assert (lBC_ptr != NULL); - cout << " " << lBC_ptr->toString() << endl; + std::cout << " " << *lBC_ptr << std::endl; } } } Modified: trunk/stdair/doc/tutorial/src/invobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/src/invobject.cpp 2010-11-07 13:29:26 UTC (rev 364) @@ -1,24 +1,21 @@ // StdAir -#include <stdair/factory/FacBomManager.hpp> #include <stdair/bom/BomRoot.hpp> #include <stdair/bom/Inventory.hpp> +#include <stdair/factory/FacBomManager.hpp> -// These lines are needed for use of cout and endl -using std::cout; -using std::endl; +// /////////////////////// M A I N /////////////////////////// +int main() { -int main() -{ - // Create an inventory Key (i,e an airline code) + // Create an inventory key (i.e., an airline code) const stdair::InventoryKey lBAKey ("BA"); // Create an inventory object whose airline code is BA stdair::Inventory& lBAInv = stdair::FacBom<stdair::Inventory>::instance().create (lBAKey); - // Display the airline code - cout << " Inventory: " << lBAInv.describeKey() << endl; + // Display the inventory object (including its key, i.e., the airline code) + std::cout << " Inventory: " << lBAInv << std::endl; - // Exit program: + // Exit program return 0; } Added: trunk/stdair/doc/tutorial/src/makefile.tutorial =================================================================== --- trunk/stdair/doc/tutorial/src/makefile.tutorial (rev 0) +++ trunk/stdair/doc/tutorial/src/makefile.tutorial 2010-11-07 13:29:26 UTC (rev 364) @@ -0,0 +1,336 @@ +# Makefile inspired from the makefiles generated by the GNU Autotools (autoconf +# automake, configure, libtool) +LIBDIR=`test -d '/usr/lib64' && echo '/usr/lib64' || echo '/usr/lib'` +ARCHI=`test -d '/usr/lib64' && echo 'x86_64' || echo 'x86'` + +# +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +build_triplet = $(ARCHI)-unknown-linux-gnu +host_triplet = $(ARCHI)-unknown-linux-gnu +DIST_COMMON = $(srcdir)/makefile.tutorial +bin_PROGRAMS = rootobject$(EXEEXT) invobject$(EXEEXT) rootinvobject$(EXEEXT) completeex$(EXEEXT) +subdir = tutorial/src +PROGRAMS = $(bin_PROGRAMS) +am_rootobject_OBJECTS = rootobject-rootobject.$(OBJEXT) +rootobject_OBJECTS = $(am_rootobject_OBJECTS) +rootobject_DEPENDENCIES = +rootobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(rootobject_CXXFLAGS) $(CXXFLAGS) \ + $(rootobject_LDFLAGS) $(LDFLAGS) -o $@ +am_invobject_OBJECTS = invobject-invobject.$(OBJEXT) +invobject_OBJECTS = $(am_invobject_OBJECTS) +invobject_DEPENDENCIES = +invobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(invobject_CXXFLAGS) \ + $(CXXFLAGS) $(invobject_LDFLAGS) $(LDFLAGS) -o $@ +am_rootinvobject_OBJECTS = rootinvobject-rootinvobject.$(OBJEXT) +rootinvobject_OBJECTS = $(am_rootinvobject_OBJECTS) +rootinvobject_DEPENDENCIES = +rootinvobject_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(rootinvobject_CXXFLAGS) \ + $(CXXFLAGS) $(rootinvobject_LDFLAGS) $(LDFLAGS) -o $@ +am_completeex_OBJECTS = completeex-completeex.$(OBJEXT) +completeex_OBJECTS = $(am_completeex_OBJECTS) +completeex_DEPENDENCIES = +completeex_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(completeex_CXXFLAGS) $(CXXFLAGS) \ + $(completeex_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I. -I$(builddir)/src +depcomp = $(SHELL) $(top_builddir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(rootobject_SOURCES) $(invobject_SOURCES) $(rootinvobject_SOURCES) \ + $(completeex_SOURCES) +AWK = gawk +BOOST_ASIO_LIB = -lboost_system -lboost_thread-mt -lboost_date_time -lboost_regex -lboost_serialization +BOOST_CFLAGS = -pthread -I/usr/include +BOOST_DATE_TIME_LIB = -lboost_date_time +BOOST_FILESYSTEM_LIB = -lboost_filesystem +BOOST_IOSTREAMS_LIB = -lboost_iostreams +BOOST_LIBS = -L$(LIBDIR) +BOOST_MPI_LIB = -lboost_mpi -lboost_serialization $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi +BOOST_MPI_PYTHON_LIB = -lboost_mpi_python -lboost_serialization -lboost_python $(BOOST_LIBS) -lpython2.6 -lpthread -ldl -lutil -lm -lboost_mpi -lboost_serialization $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi $(BOOST_LIBS)/openmpi/lib -lmpi_cxx -lmpi +BOOST_PROGRAM_OPTIONS_LIB = -lboost_program_options +BOOST_PYTHON_LIB = -lboost_python $(BOOST_LIBS) -lpython2.6 -lpthread -ldl -lutil -lm +BOOST_REGEX_LIB = -lboost_regex +BOOST_SERIALIZATION_LIB = -lboost_serialization +BOOST_SIGNALS_LIB = -lboost_signals +BOOST_SYSTEM_LIB = -lboost_system +BOOST_THREAD_LIB = -lboost_thread-mt +BOOST_UNIT_TEST_FRAMEWORK_LIB = -lboost_unit_test_framework +BOOST_VERSION = 1_41 +BOOST_WSERIALIZATION_LIB = -lboost_wserialization +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CPPUNIT_CFLAGS = +CPPUNIT_CONFIG = /usr/bin/cppunit-config +CPPUNIT_LIBS = -lcppunit -ldl +CPPUNIT_VERSION = 1.12.1 +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -Wall +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +EXTRACC_CFLAGS = -I/home/dan/dev/deliveries/extracc-0.5.0/include +EXTRACC_EXTRACPPUNIT_INCLUDE = include /home/dan/dev/deliveries/extracc-0.5.0/share/extracc/extracppunit/Makefile.common +EXTRACC_LIBS = -L/home/dan/dev/deliveries/extracc-0.5.0/lib -lextracppunit +EXTRACC_VERSION = 0.5.0 +FGREP = /bin/grep -F +GENERIC_LIBRARY_VERSION = 99:99:99 +GREP = /bin/grep +LD = /usr/bin/ld -m elf_$(ARCHI) +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/dan/dev/sim/airinvsvn/trunk/airinv/config/missing --run makeinfo +MKDIR_P = /bin/mkdir -p +NM = /usr/bin/nm -B +NMEDIT = +OBJDUMP = objdump +OBJEXT = o +OPENMPI_CFLAGS = -I/usr/include/openmpi-$(ARCHI) -I/usr/include/openmpi-$(ARCHI)/openmpi -I/usr/include/openmpi-$(ARCHI)/64 -m64 +OPENMPI_LIBS = -L$(LIBDIR)/openmpi/lib -lmpi_cxx -lmpi +OPENMPI_VERSION = 1.4.1 +OTOOL = +OTOOL64 = +PACKAGE = airinv +PACKAGE_BUGREPORT = den...@us... +PACKAGE_NAME = AIRINV +PACKAGE_STRING = AIRINV 99.99.99 +PACKAGE_TARNAME = airinv +PACKAGE_URL = +PACKAGE_VERSION = 99.99.99 +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PYTHON = /usr/bin/python +PYTHON_ADD_LIBS = -lpthread -ldl -lutil -lm +PYTHON_CFLAGS = -I/usr/include/python2.6 +PYTHON_LIBS = -L$(LIBDIR) -lpython2.6 +PYTHON_VERSION = 2.6.4 +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STDAIR_CFLAGS = -pthread -I/usr/include -I../../.. +STDAIR_LIBS = -L$(LIBDIR) -lboost_date_time -L../../../stdair/.libs -lstdair +STDAIR_VERSION = 0.8.0 +STRIP = strip +VERSION = 99.99.99 +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = $(ARCHI)-unknown-linux-gnu +build_alias = +build_cpu = $(ARCHI) +build_os = linux-gnu +build_vendor = unknown +builddir = . +datadir = ${datarootdir} +datarootdir = ${prefix}/share +exec_prefix = ${prefix} +gs_ok = yes +host = $(ARCHI)-unknown-linux-gnu +host_alias = +host_cpu = $(ARCHI) +host_os = linux-gnu +host_vendor = unknown +includedir = ${prefix}/include +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +lt_ECHO = echo +mkdir_p = /bin/mkdir -p +oldincludedir = /usr/include +program_transform_name = s,x,x, +psdir = ${docdir} +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +sysconfdir = ${prefix}/etc +target_alias = +top_build_prefix = ../../.. +top_builddir = ../../.. +top_srcdir = ../../.. +AM_CPPFLAGS = -I$(top_srcdir) + +# +rootobject_SOURCES = rootobject.cpp +rootobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) +rootobject_LDADD = +rootobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) + +invobject_SOURCES = invobject.cpp +invobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) +invobject_LDADD = +invobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) + +rootinvobject_SOURCES = rootinvobject.cpp +rootinvobject_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) +rootinvobject_LDADD = +rootinvobject_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) + +completeex_SOURCES = completeex.cpp +completeex_CXXFLAGS = $(BOOST_CFLAGS) $(STDAIR_CFLAGS) +completeex_LDADD = +completeex_LDFLAGS = $(BOOST_PROGRAM_OPTIONS_LIB) $(STDAIR_LIBS) + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .lo .o .obj +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +rootobject$(EXEEXT): $(rootobject_OBJECTS) $(rootobject_DEPENDENCIES) + @rm -f rootobject$(EXEEXT) + $(rootobject_LINK) $(rootobject_OBJECTS) $(rootobject_LDADD) $(LIBS) +invobject$(EXEEXT): $(invobject_OBJECTS) $(invobject_DEPENDENCIES) + @rm -f invobject$(EXEEXT) + $(invobject_LINK) $(invobject_OBJECTS) $(invobject_LDADD) $(LIBS) +rootinvobject$(EXEEXT): $(rootinvobject_OBJECTS) $(rootinvobject_DEPENDENCIES) + @rm -f rootinvobject$(EXEEXT) + $(rootinvobject_LINK) $(rootinvobject_OBJECTS) $(rootinvobject_LDADD) $(LIBS) +completeex$(EXEEXT): $(completeex_OBJECTS) $(completeex_DEPENDENCIES) + @rm -f completeex$(EXEEXT) + $(completeex_LINK) $(completeex_OBJECTS) $(completeex_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +.cpp.o: + source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXXCOMPILE) -c -o $@ $< +# $(CXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ $< + +.cpp.obj: + source='$<' object='$@' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +# $(CXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: + source='$<' object='$@' libtool=yes \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(LTCXXCOMPILE) -c -o $@ $< +# $(LTCXXCOMPILE) -MT $@ -MD -MP -MF -c -o $@ $< + +rootobject-rootobject.o: rootobject.cpp + source='rootobject.cpp' object='rootobject-rootobject.o' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -c -o rootobject-rootobject.o `test -f 'rootobject.cpp' || echo '$(srcdir)/'`rootobject.cpp +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -MT rootobject-rootobject.o -MD -MP -MF -c -o rootobject-rootobject.o `test -f 'rootobject.cpp' || echo '$(srcdir)/'`rootobject.cpp + +rootobject-rootobject.obj: rootobject.cpp + source='rootobject.cpp' object='rootobject-rootobject.obj' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -c -o rootobject-rootobject.obj `if test -f 'rootobject.cpp'; then $(CYGPATH_W) 'rootobject.cpp'; else $(CYGPATH_W) 'rootobject.cpp'; fi` +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootobject_CXXFLAGS) $(CXXFLAGS) -MT rootobject-rootobject.obj -MD -MP -MF -c -o rootobject-rootobject.obj `if test -f 'rootobject.cpp'; then $(CYGPATH_W) 'rootobject.cpp'; else $(CYGPATH_W) 'rootobject.cpp'; fi` + +invobject-invobject.o: invobject.cpp + source='invobject.cpp' object='invobject-invobject.o' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -c -o invobject-invobject.o `test -f 'invobject.cpp' || echo '$(srcdir)/'`invobject.cpp +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -MT invobject-invobject.o -MD -MP -MF -c -o invobject-invobject.o `test -f 'invobject.cpp' || echo '$(srcdir)/'`invobject.cpp + +invobject-invobject.obj: invobject.cpp + source='invobject.cpp' object='invobject-invobject.obj' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -c -o invobject-invobject.obj `if test -f 'invobject.cpp'; then $(CYGPATH_W) 'invobject.cpp'; else $(CYGPATH_W) '$(srcdir)/invobject.cpp'; fi` +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(invobject_CXXFLAGS) $(CXXFLAGS) -MT invobject-invobject.obj -MD -MP -MF -c -o invobject-invobject.obj `if test -f 'invobject.cpp'; then $(CYGPATH_W) 'invobject.cpp'; else $(CYGPATH_W) '$(srcdir)/invobject.cpp'; fi` + +rootinvobject-rootinvobject.o: rootinvobject.cpp + source='rootinvobject.cpp' object='rootinvobject-rootinvobject.o' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -c -o rootinvobject-rootinvobject.o `test -f 'rootinvobject.cpp' || echo '$(srcdir)/'`rootinvobject.cpp +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -MT rootinvobject-rootinvobject.o -MD -MP -MF -c -o rootinvobject-rootinvobject.o `test -f 'rootinvobject.cpp' || echo '$(srcdir)/'`rootinvobject.cpp + +rootinvobject-rootinvobject.obj: rootinvobject.cpp + source='rootinvobject.cpp' object='rootinvobject-rootinvobject.obj' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -c -o rootinvobject-rootinvobject.obj `if test -f 'rootinvobject.cpp'; then $(CYGPATH_W) 'rootinvobject.cpp'; else $(CYGPATH_W) '$(srcdir)/rootinvobject.cpp'; fi` +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rootinvobject_CXXFLAGS) $(CXXFLAGS) -MT rootinvobject-rootinvobject.obj -MD -MP -MF -c -o rootinvobject-rootinvobject.obj `if test -f 'rootinvobject.cpp'; then $(CYGPATH_W) 'rootinvobject.cpp'; else $(CYGPATH_W) '$(srcdir)/rootinvobject.cpp'; fi` + +completeex-completeex.o: completeex.cpp + source='completeex.cpp' object='completeex-completeex.o' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -c -o completeex-completeex.o `test -f 'completeex.cpp' || echo '$(srcdir)/'`completeex.cpp +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -MT completeex-completeex.o -MD -MP -MF -c -o completeex-completeex.o `test -f 'completeex.cpp' || echo '$(srcdir)/'`completeex.cpp + +completeex-completeex.obj: completeex.cpp + source='completeex.cpp' object='completeex-completeex.obj' libtool=no \ + DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \ + $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -c -o completeex-completeex.obj `if test -f 'completeex.cpp'; then $(CYGPATH_W) 'completeex.cpp'; else $(CYGPATH_W) 'completeex.cpp'; fi` +# $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(completeex_CXXFLAGS) $(CXXFLAGS) -MT completeex-completeex.obj -MD -MP -MF -c -o completeex-completeex.obj `if test -f 'completeex.cpp'; then $(CYGPATH_W) 'completeex.cpp'; else $(CYGPATH_W) 'completeex.cpp'; fi` + +mostlyclean-deps: + -rm -f $(DEPDIR)/*.Po + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +all-am: Makefile $(PROGRAMS) + +mostlyclean-generic: + +clean-generic: + +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-deps + +.MAKE: + +.PHONY: all all-am clean clean-binPROGRAMS \ + clean-generic clean-libtool mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: +# DO NOT DELETE Modified: trunk/stdair/doc/tutorial/src/rootinvobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/src/rootinvobject.cpp 2010-11-07 13:29:26 UTC (rev 364) @@ -1,13 +1,12 @@ +// STL +#include <cassert> // StdAir +#include <stdair/bom/BomRoot.hpp> +#include <stdair/bom/Inventory.hpp> #include <stdair/factory/FacBomManager.hpp> -#include <stdair/bom/BomRoot.hpp> -// These lines are needed for use of cout and endl -using std::cout; -using std::endl; - -int main() -{ +// /////////////////////// M A I N /////////////////////////// +int main() { // Create the root of the Bom tree (i.e., a BomRoot object) stdair::BomRoot& lBomRoot = stdair::FacBom<stdair::BomRoot>::instance().create(); @@ -20,20 +19,23 @@ // Link the inventory for the Airline BA with the root of the Bom tree stdair::FacBomManager::instance().addToList (lBomRoot, lBAInv); - // Display the Bomroot object code - cout << lBomRoot.describeKey() << endl; + // Display the Bomroot object + std::cout << lBomRoot << std::endl; // Store the list of airline inventory const stdair::InventoryList_T& lInventoryList = stdair::BomManager::getList<stdair::Inventory> (lBomRoot); - // Skim through the airline inventory list + + // Browse through the airline inventory list for (stdair::InventoryList_T::const_iterator itInv = lInventoryList.begin(); - itInv != lInventoryList.end(); ++itInv) { - const stdair::Inventory* lInv_ptr = *itInv; - // Display the airline code - cout << " Inventory: " << lInv_ptr->describeKey() << endl; + itInv != lInventoryList.end(); ++itInv) { + const stdair::Inventory* lInv_ptr = *itInv; + assert (lInv_ptr != NULL); + + // Display the airline code + std::cout << " Inventory: " << *lInv_ptr << std::endl; } - // Exit program: + // Exit program return 0; } Modified: trunk/stdair/doc/tutorial/src/rootobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/src/rootobject.cpp 2010-11-07 13:29:26 UTC (rev 364) @@ -1,19 +1,16 @@ // StdAir -#include <stdair/factory/FacBomManager.hpp> #include <stdair/bom/BomRoot.hpp> +#include <stdair/factory/FacBomManager.hpp> -// These lines are needed for use of cout and endl -using std::cout; -using std::endl; +// /////////////////////// M A I N /////////////////////////// +int main() { -int main() -{ - // Create the root of the Bom tree (i.e., a BomRoot object) + // Create the root of the BOM tree (i.e., a BomRoot object) stdair::BomRoot& lBomRoot = stdair::FacBom<stdair::BomRoot>::instance().create(); - // Display the Bomroot object code - cout << lBomRoot.describeKey() << endl; + // Display the Bomroot object + std::cout << lBomRoot << std::endl; // Exit program: return 0; Modified: trunk/stdair/doc/tutorial/tutorial.doc =================================================================== --- trunk/stdair/doc/tutorial/tutorial.doc 2010-11-06 12:49:07 UTC (rev 363) +++ trunk/stdair/doc/tutorial/tutorial.doc 2010-11-07 13:29:26 UTC (rev 364) @@ -1,18 +1,40 @@ /*! -\page tutorial Tutorials +\page tutorials Tutorials \addindex Tutorial This page contains some tutorial examples that will help you getting started using StdAir. Most examples show how to construct some simple -business managment objects. The source codes for these examples -can be found in doc/tutorial/src. +business objects, i.e., instances of the so-named Business Object +Model (BOM). +The source code for these examples can be found in the +<tt>doc/tutorial/src</tt> directory. In that directory, there is also +a Make-file, named <tt>makefile.tutorial</tt>, allowing compiling all +the examples. Hence (\ref N), just go to the tutorial source +directory, and issue the following command: + +\verbatim +make -f makefile.tutorial +\endverbatim + Examples of basic functionality: -- \ref rootobject -- \ref invobject -- \ref rootinvobject +- \ref tutorial01_rootobject +- \ref tutorial02_invobject +- \ref tutorial03_rootinvobject More complete examples: -- \ref completeex +- \ref tutorial04_completeex +\note +\anchor N + +(N) - The configuration script must have already been launched (at +least) once. To run the configuration script the first time, go to the +top directory (where the StdAir package has been un-packed), and issue +either of the following two commands, depending on whether the StdAir +project has been checked out from the Subversion repository or +downloaded as a tar-ball package from the Sourceforge Web site: + - <tt>./autogen.sh</tt> + - <tt>./configure</tt> + */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-06 12:49:12
|
Revision: 363 http://stdair.svn.sourceforge.net/stdair/?rev=363&view=rev Author: denis_arnaud Date: 2010-11-06 12:49:07 +0000 (Sat, 06 Nov 2010) Log Message: ----------- [Release] Created the main 0.8.0 release branch, from revision r360. Added Paths: ----------- branches/stdair/0.8.0/main/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-06 12:47:34
|
Revision: 362 http://stdair.svn.sourceforge.net/stdair/?rev=362&view=rev Author: denis_arnaud Date: 2010-11-06 12:47:28 +0000 (Sat, 06 Nov 2010) Log Message: ----------- [Branch 0.8.0] Prepared the branch 0.8.0 to be copied from head of the trunk. Added Paths: ----------- branches/stdair/0.8.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-06 12:46:29
|
Revision: 361 http://stdair.svn.sourceforge.net/stdair/?rev=361&view=rev Author: denis_arnaud Date: 2010-11-06 12:46:23 +0000 (Sat, 06 Nov 2010) Log Message: ----------- [Release] Back to working version (99.99.99). Modified Paths: -------------- trunk/stdair/configure.ac trunk/stdair/stdair.spec Modified: trunk/stdair/configure.ac =================================================================== --- trunk/stdair/configure.ac 2010-11-06 12:45:28 UTC (rev 360) +++ trunk/stdair/configure.ac 2010-11-06 12:46:23 UTC (rev 361) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2010 Denis Arnaud <den...@us...>]) -AC_INIT([STDAIR],[0.8.0],[den...@us...],[stdair]) +AC_INIT([STDAIR],[99.99.99],[den...@us...],[stdair]) AC_CONFIG_HEADER([stdair/config.h]) AC_CONFIG_SRCDIR([stdair/bom/BomRoot.hpp]) AC_CONFIG_AUX_DIR([config]) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # Shared library versioning -GENERIC_LIBRARY_VERSION="0:8:0" +GENERIC_LIBRARY_VERSION="99:99:99" # | | | # +------+ | +---+ # | | | Modified: trunk/stdair/stdair.spec =================================================================== --- trunk/stdair/stdair.spec 2010-11-06 12:45:28 UTC (rev 360) +++ trunk/stdair/stdair.spec 2010-11-06 12:46:23 UTC (rev 361) @@ -2,7 +2,7 @@ %global mydocs __tmp_docdir # Name: stdair -Version: 0.8.0 +Version: 99.99.99 Release: 1%{?dist} Summary: C++ Standard Airline IT Object Library @@ -111,9 +111,12 @@ %changelog -* Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.8.0-1 +* Sat Nov 06 2010 Son Nguyen Kim <ngu...@gm...> 99.99.99-1 - Upstream update +* Sat Nov 06 2010 Son Nguyen Kim <ngu...@gm...> 0.8.0-1 +- Upstream update + * Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.7.0-1 - Upstream update This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-06 12:45:34
|
Revision: 360 http://stdair.svn.sourceforge.net/stdair/?rev=360&view=rev Author: denis_arnaud Date: 2010-11-06 12:45:28 +0000 (Sat, 06 Nov 2010) Log Message: ----------- [Release 0.8.0] Release of version 0.8.0. Modified Paths: -------------- trunk/stdair/configure.ac trunk/stdair/stdair.spec Modified: trunk/stdair/configure.ac =================================================================== --- trunk/stdair/configure.ac 2010-11-04 17:30:55 UTC (rev 359) +++ trunk/stdair/configure.ac 2010-11-06 12:45:28 UTC (rev 360) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2010 Denis Arnaud <den...@us...>]) -AC_INIT([STDAIR],[99.99.99],[den...@us...],[stdair]) +AC_INIT([STDAIR],[0.8.0],[den...@us...],[stdair]) AC_CONFIG_HEADER([stdair/config.h]) AC_CONFIG_SRCDIR([stdair/bom/BomRoot.hpp]) AC_CONFIG_AUX_DIR([config]) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # Shared library versioning -GENERIC_LIBRARY_VERSION="99:99:99" +GENERIC_LIBRARY_VERSION="0:8:0" # | | | # +------+ | +---+ # | | | Modified: trunk/stdair/stdair.spec =================================================================== --- trunk/stdair/stdair.spec 2010-11-04 17:30:55 UTC (rev 359) +++ trunk/stdair/stdair.spec 2010-11-06 12:45:28 UTC (rev 360) @@ -2,7 +2,7 @@ %global mydocs __tmp_docdir # Name: stdair -Version: 99.99.99 +Version: 0.8.0 Release: 1%{?dist} Summary: C++ Standard Airline IT Object Library @@ -111,7 +111,7 @@ %changelog -* Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 99.99.99-1 +* Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.8.0-1 - Upstream update * Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.7.0-1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-11-04 17:31:01
|
Revision: 359 http://stdair.svn.sourceforge.net/stdair/?rev=359&view=rev Author: quannaus Date: 2010-11-04 17:30:55 +0000 (Thu, 04 Nov 2010) Log Message: ----------- Removed the seed generator for trademgen in BomRoot. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Types.hpp trunk/stdair/stdair/bom/BomRoot.cpp trunk/stdair/stdair/bom/BomRoot.hpp Modified: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-11-02 17:39:46 UTC (rev 358) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-11-04 17:30:55 UTC (rev 359) @@ -11,6 +11,8 @@ #include <map> // Boost Random #include <boost/random/linear_congruential.hpp> +#include <boost/random/uniform_real.hpp> +#include <boost/random/variate_generator.hpp> // Boost (Extended STL) #include <boost/date_time/gregorian/gregorian.hpp> #include <boost/date_time/posix_time/posix_time.hpp> @@ -426,6 +428,10 @@ /** Random number generator. */ typedef boost::minstd_rand BaseGenerator_T; + /** Uniform random generator. */ + typedef boost::variate_generator<stdair::BaseGenerator_T&, + boost::uniform_real<> > UniformGenerator_T; + // ////////////////////////////////////////////////////////////////////// // Probability /** Probability */ Modified: trunk/stdair/stdair/bom/BomRoot.cpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.cpp 2010-11-02 17:39:46 UTC (rev 358) +++ trunk/stdair/stdair/bom/BomRoot.cpp 2010-11-04 17:30:55 UTC (rev 359) @@ -11,8 +11,7 @@ // //////////////////////////////////////////////////////////////////// BomRoot::BomRoot (const Key_T& iKey) - : _key (iKey), _seed (DEFAULT_RANDOM_SEED), _generator (_seed), - _uniformGenerator (_generator, boost::uniform_real<> (0, 1)) { + : _key (iKey) { } // //////////////////////////////////////////////////////////////////// @@ -26,11 +25,4 @@ return oStr.str(); } - // //////////////////////////////////////////////////////////////////// - RandomSeed_T BomRoot::generateSeed () { - RealNumber_T lVariateUnif = _uniformGenerator() * 1e9; - RandomSeed_T oSeed = static_cast<RandomSeed_T> (lVariateUnif); - return oSeed; - } - } Modified: trunk/stdair/stdair/bom/BomRoot.hpp =================================================================== --- trunk/stdair/stdair/bom/BomRoot.hpp 2010-11-02 17:39:46 UTC (rev 358) +++ trunk/stdair/stdair/bom/BomRoot.hpp 2010-11-04 17:30:55 UTC (rev 359) @@ -54,14 +54,6 @@ // Attributes Key_T _key; HolderMap_T _holderMap; - - // TEST - stdair::RandomSeed_T _seed; - stdair::BaseGenerator_T _generator; - boost::variate_generator<stdair::BaseGenerator_T&, - boost::uniform_real<> > _uniformGenerator; - public: - RandomSeed_T generateSeed (); }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-11-02 17:39:52
|
Revision: 358 http://stdair.svn.sourceforge.net/stdair/?rev=358&view=rev Author: denis_arnaud Date: 2010-11-02 17:39:46 +0000 (Tue, 02 Nov 2010) Log Message: ----------- [DB] Fixed a few SQL scripts for the DSim database. Modified Paths: -------------- trunk/stdair/db/admin/clean_all_tables.sh trunk/stdair/db/admin/count_all_tables.sh trunk/stdair/db/admin/create_dsim_db.sh trunk/stdair/db/admin/create_dsim_tables.sql trunk/stdair/db/admin/dump_dsim_db_structure.sh trunk/stdair/db/admin/load_dsim_data.sh Property Changed: ---------------- trunk/stdair/db/admin/ Property changes on: trunk/stdair/db/admin ___________________________________________________________________ Added: svn:ignore + sim_dsim.sql Modified: trunk/stdair/db/admin/clean_all_tables.sh =================================================================== --- trunk/stdair/db/admin/clean_all_tables.sh 2010-11-02 16:03:06 UTC (rev 357) +++ trunk/stdair/db/admin/clean_all_tables.sh 2010-11-02 17:39:46 UTC (rev 358) @@ -34,7 +34,7 @@ DB_PASSWD="${DB_USER}" # Database Name -DB_NAME="dsim" +DB_NAME="sim_dsim" # Count the number of elements of a given database table function countElements() { Modified: trunk/stdair/db/admin/count_all_tables.sh =================================================================== --- trunk/stdair/db/admin/count_all_tables.sh 2010-11-02 16:03:06 UTC (rev 357) +++ trunk/stdair/db/admin/count_all_tables.sh 2010-11-02 17:39:46 UTC (rev 358) @@ -34,7 +34,7 @@ DB_PASSWD="${DB_USER}" # Database Name -DB_NAME="dsim" +DB_NAME="sim_dsim" # Count the number of elements of a given database table function countElements() { Modified: trunk/stdair/db/admin/create_dsim_db.sh =================================================================== --- trunk/stdair/db/admin/create_dsim_db.sh 2010-11-02 16:03:06 UTC (rev 357) +++ trunk/stdair/db/admin/create_dsim_db.sh 2010-11-02 17:39:46 UTC (rev 358) @@ -7,7 +7,7 @@ # # Database Name -DB_NAME="dsim" +DB_NAME="sim_dsim" # Database server (host) DB_HOST="localhost" Modified: trunk/stdair/db/admin/create_dsim_tables.sql =================================================================== --- trunk/stdair/db/admin/create_dsim_tables.sql 2010-11-02 16:03:06 UTC (rev 357) +++ trunk/stdair/db/admin/create_dsim_tables.sql 2010-11-02 17:39:46 UTC (rev 358) @@ -1,6 +1,6 @@ -- MySQL dump 10.11 -- --- Host: localhost Database: dsim +-- Host: localhost Database: sim_dsim -- ------------------------------------------------------ -- Server version 5.0.67 Modified: trunk/stdair/db/admin/dump_dsim_db_structure.sh =================================================================== --- trunk/stdair/db/admin/dump_dsim_db_structure.sh 2010-11-02 16:03:06 UTC (rev 357) +++ trunk/stdair/db/admin/dump_dsim_db_structure.sh 2010-11-02 17:39:46 UTC (rev 358) @@ -38,13 +38,13 @@ DB_PASSWD="$2" # Database Name -DB_NAME="geo_geonames" +DB_NAME="sim_dsim" # Export Tool EXPORTER=mysqldump # Dump file -DUMP_FILE="geo_geonames.sql" +DUMP_FILE="sim_dsim.sql" # ${EXPORTER} -u ${DB_USER} --password=${DB_PASSWD} -P ${DB_PORT} -h ${DB_HOST} \ Modified: trunk/stdair/db/admin/load_dsim_data.sh =================================================================== --- trunk/stdair/db/admin/load_dsim_data.sh 2010-11-02 16:03:06 UTC (rev 357) +++ trunk/stdair/db/admin/load_dsim_data.sh 2010-11-02 17:39:46 UTC (rev 358) @@ -34,7 +34,7 @@ DB_PASSWD="dsim" # Database Name -DB_NAME="dsim" +DB_NAME="sim_dsim" # Create the tables SQL_FILE="create_dsim_tables.sql" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gsa...@us...> - 2010-11-02 16:03:12
|
Revision: 357 http://stdair.svn.sourceforge.net/stdair/?rev=357&view=rev Author: gsabatier Date: 2010-11-02 16:03:06 +0000 (Tue, 02 Nov 2010) Log Message: ----------- [test] added a fare input file sample. Modified Paths: -------------- trunk/stdair/test/samples/fare01.csv Modified: trunk/stdair/test/samples/fare01.csv =================================================================== --- trunk/stdair/test/samples/fare01.csv 2010-10-22 15:39:46 UTC (rev 356) +++ trunk/stdair/test/samples/fare01.csv 2010-11-02 16:03:06 UTC (rev 357) @@ -0,0 +1,4 @@ +// Fares: fare ID; OriginCity; DestinationCity; DateRangeStart; DateRangeEnd; DepartureTimeRangeStart; DepartureTimeRangeEnd; POS; Channel; AdvancePurchase; SaturdayNight; ChangeFees; NonRefundable; MinimumStay; Price; nb Segments +// Segment: AirlineCode; Class; +1; LHR; JFK; 2008-06-01; 2009-12-31; 00:00; 23:59; LHR; IN; 7; T; T; T; 3; 3200.0; BA; A; AA; A; +2; LHR; JFK; 2008-06-01; 2009-12-31; 00:00; 23:59; LHR; IF; 7; T; T; T; 3; 3200.0; AF; A; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-10-22 15:39:52
|
Revision: 356 http://stdair.svn.sourceforge.net/stdair/?rev=356&view=rev Author: quannaus Date: 2010-10-22 15:39:46 +0000 (Fri, 22 Oct 2010) Log Message: ----------- [samples] Adapt the demand01.csv to the new parser standard. Modified Paths: -------------- trunk/stdair/test/samples/demand01.csv Modified: trunk/stdair/test/samples/demand01.csv =================================================================== --- trunk/stdair/test/samples/demand01.csv 2010-10-22 15:38:51 UTC (rev 355) +++ trunk/stdair/test/samples/demand01.csv 2010-10-22 15:39:46 UTC (rev 356) @@ -30,5 +30,5 @@ // For example, normal with mean 10.0 and standard deviation 1.0 is specified as // N, 10.0, 1.0 // -2010-02-08; SIN; BKK; Y; SIN:0.7, BKK:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; L:0.002, T:0.015, Q:0.019, G:0.037, S:0.042, K:0.155, N:0.73; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 100:0, 500:0.8, 2000:1; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 10.0, 1.0; -2010-02-08; SIN; HND; Y; SIN:0.5, HND:0.4, row:0.1; DF:0.2, DN:0.2, IF:0.5, IN:0.1; RO:0.5, RI:0.4, OW:0.1; 1:0.9, 2:0.1; L:0.002, T:0.015, Q:0.019, G:0.037, S:0.042, K:0.155, N:0.73; 06:0, 07:0.1, 09:0.8, 12:0.9, 22:1; 300:0, 800:0.8, 3000:1; 15:0, 60:1; 330:0, 1:1; N, 10.0, 2.0; +2010-02-08; SIN; BKK; Y; SIN:0.7, BKK:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; P:0.01, G:0.05, S:0.15, M:0.3, N:0.49; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 200; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 10.0, 1.0; +2010-02-08; SIN; HND; Y; SIN:0.5, HND:0.4, row:0.1; DF:0.2, DN:0.2, IF:0.5, IN:0.1; RO:0.5, RI:0.4, OW:0.1; 1:0.9, 2:0.1; P:0.1, G:0.01, S:0.09, M:0.4, N:0.4; 06:0, 07:0.1, 09:0.8, 12:0.9, 22:1; 300; 15:0, 60:1; 330:0, 1:1; N, 10.0, 2.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-10-22 15:38:57
|
Revision: 355 http://stdair.svn.sourceforge.net/stdair/?rev=355&view=rev Author: quannaus Date: 2010-10-22 15:38:51 +0000 (Fri, 22 Oct 2010) Log Message: ----------- [samples] Added O&D and fare input files. Modified Paths: -------------- trunk/stdair/test/samples/demand09.csv trunk/stdair/test/samples/ond01.csv Added Paths: ----------- trunk/stdair/test/samples/RDS01/ trunk/stdair/test/samples/RDS01/demand.csv trunk/stdair/test/samples/RDS01/schedule.csv trunk/stdair/test/samples/fare01.csv Copied: trunk/stdair/test/samples/RDS01/demand.csv (from rev 340, trunk/stdair/test/samples/demand01.csv) =================================================================== --- trunk/stdair/test/samples/RDS01/demand.csv (rev 0) +++ trunk/stdair/test/samples/RDS01/demand.csv 2010-10-22 15:38:51 UTC (rev 355) @@ -0,0 +1,34 @@ +// Demand: +// Fixed: +// Prefered departure date (yyyy-mm-dd) +// Origin (3-char airport code) +// Destination (3-char airport code) +// Preferred cabin ('F' for First, 'C' for Club/Business, 'Y' for Economy) +// Distribution with Probability Masses: +// POS +// Channel (D=direct, I=indirect, N=oNline, F=oFfline) +// Trip type (RO=outbound of round-trip, RI=inbound of round-trip,OW=one way) +// Stay duration (number of days) +// Frequent flyer (P=Platinum, G=Gold, S=Silver, M=Member, N=None) +// Continuous cumulative distribution: +// Preferred departure time (hh.mm) +// WTP (moneraty value) +// Preferred arrival date (equal to prefered departure date) +// Preferred arrival time (equal to prefered departure time) +// Value of time +// Arrival pattern (DTD as a positive value) +// Distribution of number of requests (distribution and parameters) +// The main fields are separated by ';' +// Probability mass distributions are defined by comma-separated +// 'value:probability' pairs +// Continuous cumulative distribution are defined by comma-separated +// 'value:probability' pairs, sorted in increasing order of values. +// The meaning of probability is P(random variable <= value) = probability. +// The distribution of number of requests is specified using comma-separated +// values: +// distribution, parameter1, parameter2, ... +// For example, normal with mean 10.0 and standard deviation 1.0 is specified as +// N, 10.0, 1.0 +// +2010-02-08; BKK; SIN; Y; BKK:0.7, SIN:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; P:0.01, G:0.05, S:0.15, M:0.3, N:0.49; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 100:0, 500:0.8, 2000:1; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 10.0, 1.0; +2010-02-08; SIN; HND; Y; SIN:0.5, HND:0.4, row:0.1; DF:0.2, DN:0.2, IF:0.5, IN:0.1; RO:0.5, RI:0.4, OW:0.1; 1:0.9, 2:0.1; P:0.1, G:0.01, S:0.09, M:0.4, N:0.4; 06:0, 07:0.1, 09:0.8, 12:0.9, 22:1; 300:0, 800:0.8, 3000:1; 15:0, 60:1; 330:0, 1:1; N, 10.0, 2.0; Copied: trunk/stdair/test/samples/RDS01/schedule.csv (from rev 340, trunk/stdair/test/samples/schedule01.csv) =================================================================== --- trunk/stdair/test/samples/RDS01/schedule.csv (rev 0) +++ trunk/stdair/test/samples/RDS01/schedule.csv 2010-10-22 15:38:51 UTC (rev 355) @@ -0,0 +1,7 @@ +// Flights: AirlineCode; FlightNumber; Date-Range; ; DOW; Legs; Segments; +// Legs: BoardPoint; OffPoint; BoardTime; ArrivalDateOffSet; ArrivalTime; +// ElapsedTime; LegCabins; +// LegCabins: CabinCode; Capacity; +// Segments: Specific; +SQ; 11; 2010-01-15; 2010-02-28; 1111111; BKK; SIN; 08:20; 11:00; 03:40; Y; 300; 0; Y; YM; +SQ; 12; 2010-01-15; 2010-02-28; 1111111; SIN; HND; 12:20; 15:00; 07:40; Y; 200; 0; Y; YM; \ No newline at end of file Modified: trunk/stdair/test/samples/demand09.csv =================================================================== --- trunk/stdair/test/samples/demand09.csv 2010-10-20 14:23:22 UTC (rev 354) +++ trunk/stdair/test/samples/demand09.csv 2010-10-22 15:38:51 UTC (rev 355) @@ -1 +1 @@ -2009-01-01; SEA; DAY; Y; SEA:0.7, DAY:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; P:0.01, G:0.05, S:0.15, M:0.3, N:0.49; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 100:0, 500:0.8, 2000:1; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 10000.0, 1.0; \ No newline at end of file +2009-01-01; SEA; DAY; Y; SEA:0.7, DAY:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; P:0.01, G:0.05, S:0.15, M:0.3, N:0.49; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 100:0, 500:0.8, 2000:1; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 100000.0, 1.0; \ No newline at end of file Added: trunk/stdair/test/samples/fare01.csv =================================================================== Modified: trunk/stdair/test/samples/ond01.csv =================================================================== --- trunk/stdair/test/samples/ond01.csv 2010-10-20 14:23:22 UTC (rev 354) +++ trunk/stdair/test/samples/ond01.csv 2010-10-22 15:38:51 UTC (rev 355) @@ -0,0 +1 @@ +1; NCE; SYD; 2007-01-01; 2007-12-31; 00:00; 23:59; BA; Y; BA; Y; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gsa...@us...> - 2010-10-20 14:23:31
|
Revision: 354 http://stdair.svn.sourceforge.net/stdair/?rev=354&view=rev Author: gsabatier Date: 2010-10-20 14:23:22 +0000 (Wed, 20 Oct 2010) Log Message: ----------- First step in tutorial writting Modified Paths: -------------- trunk/stdair/doc/local/users_guide.doc trunk/stdair/doc/tutorial/sources.mk trunk/stdair/doc/tutorial/src/sources.mk trunk/stdair/doc/tutorial/tutorial.doc Added Paths: ----------- trunk/stdair/doc/tutorial/completeex.doc trunk/stdair/doc/tutorial/invobject.doc trunk/stdair/doc/tutorial/rootinvobject.doc trunk/stdair/doc/tutorial/rootobject.doc trunk/stdair/doc/tutorial/src/completeex.cpp trunk/stdair/doc/tutorial/src/completeex.ref trunk/stdair/doc/tutorial/src/invobject.cpp trunk/stdair/doc/tutorial/src/invobject.ref trunk/stdair/doc/tutorial/src/rootinvobject.cpp trunk/stdair/doc/tutorial/src/rootinvobject.ref trunk/stdair/doc/tutorial/src/rootobject.cpp trunk/stdair/doc/tutorial/src/rootobject.ref Removed Paths: ------------- trunk/stdair/doc/tutorial/bpsk.doc trunk/stdair/doc/tutorial/convcode.doc trunk/stdair/doc/tutorial/interleaver.doc trunk/stdair/doc/tutorial/itfile.doc trunk/stdair/doc/tutorial/ldpc_bersim_awgn.doc trunk/stdair/doc/tutorial/ldpc_gen_codes.doc trunk/stdair/doc/tutorial/matlab_itpp.doc trunk/stdair/doc/tutorial/mimoconv.doc trunk/stdair/doc/tutorial/mog.doc trunk/stdair/doc/tutorial/qpsk_simulation.doc trunk/stdair/doc/tutorial/rayleigh.doc trunk/stdair/doc/tutorial/reedsolomon.doc trunk/stdair/doc/tutorial/spread.doc trunk/stdair/doc/tutorial/src/bpsk.cpp trunk/stdair/doc/tutorial/src/bpsk.ref trunk/stdair/doc/tutorial/src/convcode.cpp trunk/stdair/doc/tutorial/src/convcode.ref trunk/stdair/doc/tutorial/src/interleaver.cpp trunk/stdair/doc/tutorial/src/interleaver.ref trunk/stdair/doc/tutorial/src/ldpc_bersim_awgn.cpp trunk/stdair/doc/tutorial/src/ldpc_gen_codes.cpp trunk/stdair/doc/tutorial/src/mimoconv.cpp trunk/stdair/doc/tutorial/src/mog.cpp trunk/stdair/doc/tutorial/src/qpsk_simulation.cpp trunk/stdair/doc/tutorial/src/qpsk_simulation.ref trunk/stdair/doc/tutorial/src/rayleigh.cpp trunk/stdair/doc/tutorial/src/read_it_file.cpp trunk/stdair/doc/tutorial/src/reedsolomon.cpp trunk/stdair/doc/tutorial/src/reedsolomon.ref trunk/stdair/doc/tutorial/src/spread.cpp trunk/stdair/doc/tutorial/src/spread.ref trunk/stdair/doc/tutorial/src/timer.cpp trunk/stdair/doc/tutorial/src/timer.ref trunk/stdair/doc/tutorial/src/vector_and_matrix.cpp trunk/stdair/doc/tutorial/src/vector_and_matrix.ref trunk/stdair/doc/tutorial/src/write_it_file.cpp trunk/stdair/doc/tutorial/timer.doc trunk/stdair/doc/tutorial/vector_and_matrix.doc Modified: trunk/stdair/doc/local/users_guide.doc =================================================================== --- trunk/stdair/doc/local/users_guide.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/local/users_guide.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -27,14 +27,11 @@ \section introduction Introduction -The \c itbase library is the core of \c IT++ and it contains classes and -functions for mathematics with scalars, vectors, and matrices. This document -does not cover all the aspects of the \c itbase library. It does however -explain the most important things you need to know in order to start using -IT++. Once you are more familiar with the \c itbase library you will find -the online reference manual more useful. +The \c StdAir library contains classes for airline business management. +This document does not cover all the aspects of the \c StdAir library. It +does however explain the most important things you need to know in order + to start using \c StdAir. - \section predefined_types Predefined Data Types Deleted: trunk/stdair/doc/tutorial/bpsk.doc =================================================================== --- trunk/stdair/doc/tutorial/bpsk.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/bpsk.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,15 +0,0 @@ -/*! -\page bpsk BPSK modulation over an AWGN channel - -As a first example we will generate a sequence of 500000 random bits {0,1} and -BPSK modulate these. Thereafter the BPSK signals will be transmitted over -an AWGN channel with a signal-to-noise ratio \f$E_b/N_0 = 0\f$ dB. The received signal -is then decoded and the number of bit errors are calculated. - -\include bpsk.cpp - -When you run this program, the output will look something like this: - -\include bpsk.ref - -*/ Added: trunk/stdair/doc/tutorial/completeex.doc =================================================================== --- trunk/stdair/doc/tutorial/completeex.doc (rev 0) +++ trunk/stdair/doc/tutorial/completeex.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,12 @@ +/*! +\page completeex Constructing a complete Bom tree + +In this example we are constructing a complete Bom tree: + +\include completeex.cpp + +When you run this program, the output will look: + +\include completeex.ref + +*/ Deleted: trunk/stdair/doc/tutorial/convcode.doc =================================================================== --- trunk/stdair/doc/tutorial/convcode.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/convcode.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,12 +0,0 @@ -/*! -\page convcode Simulation of a convolutional encoder and decoder - -In this example we will show how to use the convolutional encoder/decoder class in it++. The Viterbi decoder uses the soft received values. - -\include convcode.cpp - -When you run this program, the output will look something like this: - -\include convcode.ref - -*/ Deleted: trunk/stdair/doc/tutorial/interleaver.doc =================================================================== --- trunk/stdair/doc/tutorial/interleaver.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/interleaver.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,12 +0,0 @@ -/*! -\page interleaver Interleaving and de-interleaving of data - -This example shows how to use one of the interleaving classes. - -\include interleaver.cpp - -When you run this program, the output will look like this: - -\include interleaver.ref - -*/ Added: trunk/stdair/doc/tutorial/invobject.doc =================================================================== --- trunk/stdair/doc/tutorial/invobject.doc (rev 0) +++ trunk/stdair/doc/tutorial/invobject.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,12 @@ +/*! +\page invobject Creating an Inventory object + +In this example we are constructing an airline inventory whose code is "BA": + +\include invobject.cpp + +When you run this program, the output will look: + +\include invobject.ref + +*/ Deleted: trunk/stdair/doc/tutorial/itfile.doc =================================================================== --- trunk/stdair/doc/tutorial/itfile.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/itfile.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,34 +0,0 @@ -/*! -\page itfile Writing and reading data from files - -Here we will use the \c it_file class to store some data. The program \c -write_it_file.cpp looks as follows: - -\include write_it_file.cpp - -When you run this program you will obtain a file called \c it_file_test.it -in your current directory. You can read the file into Matlab/Octave to view -the data by using the following commands: - -\code -itload('it_file_test.it') -figure(1); clf; -plot(a) -\endcode - -Note: Make sure that <tt>$PREFIX/share/itpp</tt> is in your Matlab/Octave -path and that you run the code above from the directory where \c -it_file_test.it is located (\c $PREFIX is the IT++ installation prefix; -<tt>/usr/local</tt> by default). - -The IT++ program \c read_it_file.cpp that reads the file and prints its -content can look like this: - -\include read_it_file.cpp - -Here is the output of the program: - -\verbatim -a = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] -\endverbatim -*/ Deleted: trunk/stdair/doc/tutorial/ldpc_bersim_awgn.doc =================================================================== --- trunk/stdair/doc/tutorial/ldpc_bersim_awgn.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/ldpc_bersim_awgn.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,16 +0,0 @@ -/*! -\page ldpc_bersim_awgn Simulation of LDPC codes the AWGN channel - -This program simulates the performance of LDPC codes on the AWGN channel. Since the channel is symmetric, the zero codeword is used. - -\include ldpc_bersim_awgn.cpp -To simulate the code "RU_10000.it" over a range of SNR (see \ref ldpc_gen_codes for how to generate codec) -\code -./ldpc_bersim_awgn RU_10000.it -\endcode - -To simulate at Eb/N0=1.1 dB -\code -./ldpc_bersim_awgn RU_10000.it 1.1 -\endcode -*/ Deleted: trunk/stdair/doc/tutorial/ldpc_gen_codes.doc =================================================================== --- trunk/stdair/doc/tutorial/ldpc_gen_codes.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/ldpc_gen_codes.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,6 +0,0 @@ -/*! -\page ldpc_gen_codes Generation of LDPC codes - -\include ldpc_gen_codes.cpp - -*/ Deleted: trunk/stdair/doc/tutorial/matlab_itpp.doc =================================================================== --- trunk/stdair/doc/tutorial/matlab_itpp.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/matlab_itpp.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,89 +0,0 @@ -/*! -\page matlab_itpp Conversion table between IT++ syntax and Matlab/Octave - -Here we provide a conversion table between Matlab/Octave and IT++ -syntax. This table is intended to help with the transition from -Matlab/Octave programming to IT++, but it is not an exhaustive list of -possible operations. - -<br><br> -In what follows, -<ul> -<li>a, b denote vectors (assumed to be column vectors in Matlab/Octave notation),</li> -<li>A, B denote matrices, </li> -<li>x is a scalar,</li> -<li>k, l, n are indices</li> -</ul> -<br> -<b>Vector indexing and manipulation:</b> -\code -a.length() // length(a) -a(0) // a(1) -a(1) // a(2) -a(k-1) // a(k) -a(k-1)=x; or a.set(k-1,x); // a(k)=x; -a.left(k) // a(1:k) -a.right(k) // a(end-k+1:end) -a.mid(k,l) // a(k:k+l-1) -a.del(k); // a=[a(1:k-1); a(k+1:end)]; -concat(a,b) // [a; b] (or [a.' b.'].') -a.clear(); // a=zeros(size(a)); (or a=complex(zeros(size(a)));) -to_cmat(a) // complex(a) (assuming a real-valued) -\endcode -Note that indexing in IT++ starts at 0, whereas indexing in Matlab starts at 1. Also -note that Matlab/Octave does distinguish between column and row -vectors, whereas IT++ does not. -<br><br> -<b>Matrix indexing and manipulation:</b> -\code -A.rows() // size(A,1) -A.cols() // size(A,2) -A(k-1,l-1) // A(k,l) -A.set(k-1,l-1,x); // A(k,l)=x; -A.get_col(k-1) // A(:,k) -A.get_row(k-1) // A(k,:) -A.set_col(k-1,a); // A(:,k)=a; -A.set_row(k-1,a); // A(k,:)=a; -A.append_row(a); // A=[A; a.']; -A.append_col(a); // A=[A a]; -A.transpose() // A.' -A.hermitian_transpose() // A' -A.clear(); // A=zeros(size(A)); (or A=complex(zeros(size(A)));) -to_cmat(A) // complex(A) (assuming a real-valued) -\endcode -<br><br> -<b>Some vector and matrix algebra:</b> -\code -a+b // a+b -a-b // a-b -elem_mult(a,b) // a.*b (elementwise product) -a*b // a.'*b (inner product) -conj(a)*b // a'*b (inner product) -outer_product(a,b) // a*b.' (outer product) -elem_div(a,b) // a./b -A+B; // A+B; -A-B; // A-B; -A*B; // A*B; -elem_mul(A,B) // A.*B -elem_div(A,B) // A./B -A\b; // ls_solve_od(A,b); (assuming the system is overdetermined) -\endcode -<br><br> -<b>Special matrices and vectors:</b> -\code -zeros(n,n) // zeros(n,n) -zeros_c(n,n) // complex(zeros(n,n)) -eye(n) // eye(n) -eye_c(n) // complex(eye(n)) -linspace(alpha,beta,n) // linspace(alpha,beta,n) -\endcode -<br><br> -<b>Hardcoded initializations:</b> -\code -mat X="1.1 1.2; 2.1; 2.2"; // X=[1.1 1.2; 2.1 2.2]; -ivec a="1 2 3 4 5"; // a=[1; 2; 3; 4; 5]; (or a=[1 2 3 4 5].';) -ivec a="1:-3:-8"; // a=1:-3:-8; -\endcode - - -*/ Deleted: trunk/stdair/doc/tutorial/mimoconv.doc =================================================================== --- trunk/stdair/doc/tutorial/mimoconv.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/mimoconv.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,24 +0,0 @@ -/*! -\page mimoconv MIMO (spatial multiplexing) with convolutional coding - -This example demonstrates how to use the \c Modulator_ND (MIMO) class -for soft-output demodulation. The program simulates a simple -convolutionally coded spatial-multiplexing (V-BLAST style) MIMO system -with maximum-likelihood, alternatively zero-forcing, demodulation and -soft Viterbi decoding, but no iteration between the demodulator and -the decoder. - -\include mimoconv.cpp - -To run the program, - -\code -mimoconv nTx nRx nC Tc -\endcode -where -- nTx=number of transmit antennas -- nRx=number of receive antennas -- nC=constellation (1=QPSK, 2=16-QAM, 3=64-QAM) -- Tc=coherence time (channel uses) - -*/ Deleted: trunk/stdair/doc/tutorial/mog.doc =================================================================== --- trunk/stdair/doc/tutorial/mog.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/mog.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,11 +0,0 @@ -/*! -\page mog Using Mixture of Gaussians (MOG) module to model data - -This example demonstrates how to find the parameters of -a MOG model via using the kmeans and EM based optimisers. -Synthetic data is utilised. - -\include mog.cpp - - -*/ Deleted: trunk/stdair/doc/tutorial/qpsk_simulation.doc =================================================================== --- trunk/stdair/doc/tutorial/qpsk_simulation.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/qpsk_simulation.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,32 +0,0 @@ -/*! -\page qpsk_simulation Simulation of QPSK modulation on an AWGN channel - -In this example we will introduce a few new features compared to the BPSK example. We will use the it_ifile class to store the results of the simulation. We will use the Real_Timer class to measure the execution time of our program. Furthermore we will use one of the channel classes, the AWGN_Channel. We will also show how to read the results in to Matlab with the load_it function. The program is as follows: - -\include qpsk_simulation.cpp - -When you run this program, the output will look something like this: - -\include qpsk_simulation.ref - -Now it is time to plot the simulation results in Matlab and compare with theory using the Matlab code below. -The results will be stored in a file called "qpsk_result_file.it". Make sure load_it.m is in your Matlab path -(look in $(ITXX_HOME)/matlab) and that you run the example code below from the directory where qpsk_result_file.it is located - -\code -figure(1); clf; -load_it qpsk_result_file.it -h1 = semilogy(EbN0dB,ber,'*-r'); hold on -ebn0db = 0:.1:10; -ebn0 = 10.^(ebn0db/10); -Pb = 0.5 * erfc(sqrt(ebn0)); -h2 = semilogy(ebn0db,Pb); -set(gca,'fontname','times','fontsize',16); -xlabel('{\it E_b} / {\it N}_0 [dB]'); -ylabel('BER') -title('QPSK on an AWGN Channel'); -legend([h1 h2],'Simulation','Theory'); -grid on; -\endcode - -*/ Deleted: trunk/stdair/doc/tutorial/rayleigh.doc =================================================================== --- trunk/stdair/doc/tutorial/rayleigh.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/rayleigh.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,24 +0,0 @@ -/*! -\page rayleigh Generating a correlated Rayleigh fading process - -In this example we will generate a correlated Rayleigh fading process with a -normaized Doppler frequency equal to 0.1. The normalized Doppler is defined -as the multiplication of the maximum Doppler frequency by the sampling time -(i.e. \f$f_d = F_d T_s\f$). - -\include rayleigh.cpp - -You can use Matlab or Octave to examine the channel fading process that is -stored int the output file \c rayleigh_test.it. Try the followigh code to -view a part of the fading process: - -\code -itload("rayleigh_test.it") -figure(1); clf; -semilogy(abs(ch_coeffs(1:200))) -\endcode - -Note: Make sure that the folder <tt>$PREFIX/share/itpp</tt> is included your -Matlab/Octave path variable (\c $PREFIX is the IT++ installation prefix: -<tt>/usr/local</tt> by default). -*/ Deleted: trunk/stdair/doc/tutorial/reedsolomon.doc =================================================================== --- trunk/stdair/doc/tutorial/reedsolomon.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/reedsolomon.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,12 +0,0 @@ -/*! -\page reedsolomon Simulation of a Reed-Solomon Block Code - -A Reed-Solomon code is a \f$q^m\f$-ary BCH code of length \f$q^m-1\f$. The generator polynomial for a \f$t\f$-error correcting code is \f$g(x) = (x-\alpha) (x-\alpha^1) \ldots (x-\alpha^{2t-1})\f$. The decoder uses the Berlkamp-Massey algorithm for decoding as described in: S. B. Wicker, "Error Control Systems for digital communication and storage," Prentice Hall. The following example simulates a binary (i.e. \f$q=2\f$) Reed-Solomon code with parameters \f$m\f$ and \f$t\f$: - -\include reedsolomon.cpp - -A typical run of this program can look like this: - -\include reedsolomon.ref - -*/ Added: trunk/stdair/doc/tutorial/rootinvobject.doc =================================================================== --- trunk/stdair/doc/tutorial/rootinvobject.doc (rev 0) +++ trunk/stdair/doc/tutorial/rootinvobject.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,12 @@ +/*! +\page rootinvobject Linking an inventory object with the Bom root object + +In this example we are linking an airline inventory whose code is "BA" with the Bom root object. + +\include rootinvobject.cpp + +When you run this program, the output will look: + +\include rootinvobject.ref + +*/ Added: trunk/stdair/doc/tutorial/rootobject.doc =================================================================== --- trunk/stdair/doc/tutorial/rootobject.doc (rev 0) +++ trunk/stdair/doc/tutorial/rootobject.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,12 @@ +/*! +\page rootobject Creating a Bom root object + +In this example we are constructing a Bom root object (i,e a root for all classes in the project): + +\include rootobject.cpp + +When you run this program, the output will look: + +\include rootobject.ref + +*/ Modified: trunk/stdair/doc/tutorial/sources.mk =================================================================== --- trunk/stdair/doc/tutorial/sources.mk 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/sources.mk 2010-10-20 14:23:22 UTC (rev 354) @@ -1,17 +1,5 @@ doc_tutorial_sources = \ - $(top_srcdir)/doc/tutorial/bpsk.doc \ - $(top_srcdir)/doc/tutorial/convcode.doc \ - $(top_srcdir)/doc/tutorial/interleaver.doc \ - $(top_srcdir)/doc/tutorial/itfile.doc \ - $(top_srcdir)/doc/tutorial/qpsk_simulation.doc \ - $(top_srcdir)/doc/tutorial/rayleigh.doc \ - $(top_srcdir)/doc/tutorial/reedsolomon.doc \ - $(top_srcdir)/doc/tutorial/spread.doc \ - $(top_srcdir)/doc/tutorial/timer.doc \ - $(top_srcdir)/doc/tutorial/tutorial.doc \ - $(top_srcdir)/doc/tutorial/vector_and_matrix.doc \ - $(top_srcdir)/doc/tutorial/mimoconv.doc \ - $(top_srcdir)/doc/tutorial/matlab_itpp.doc \ - $(top_srcdir)/doc/tutorial/mog.doc \ - $(top_srcdir)/doc/tutorial/ldpc_gen_codes.doc \ - $(top_srcdir)/doc/tutorial/ldpc_bersim_awgn.doc + $(top_srcdir)/doc/tutorial/invobject.doc \ + $(top_srcdir)/doc/tutorial/rootobject.doc \ + $(top_srcdir)/doc/tutorial/rootinvobject.doc \ + $(top_srcdir)/doc/tutorial/completeex.doc Deleted: trunk/stdair/doc/tutorial/spread.doc =================================================================== --- trunk/stdair/doc/tutorial/spread.doc 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/spread.doc 2010-10-20 14:23:22 UTC (rev 354) @@ -1,14 +0,0 @@ -/*! -\page spread Simulation of a Multicode CDMA system on an AWGN channel - -In this example we will introduce the multi-code spreading class \c Multicode_Spread_2d. This is the most general spreading class availiable in it++. Different spreading codes may be assigned to the I and Q branches. The number of multiple spreading codes and the spreading factor is determined by the number of rows and collumns respectively that is used when calling the member function set_codes. In this example we will use four Hadamard sequenced of length four, and the same spreading sequences will be used for the I and Q brances. - -\include spread.cpp - -A typical run of this program will look like this: - -\include spread.ref - -Use copy-and-paste to insert the variables \c EbN0dB and \c ber into Matlab and plot the result. - -*/ Deleted: trunk/stdair/doc/tutorial/src/bpsk.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/bpsk.cpp 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/bpsk.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -1,54 +0,0 @@ -#include <itpp/itcomm.h> - -using namespace itpp; - -//These lines are needed for use of cout and endl -using std::cout; -using std::endl; - -int main() -{ - //Scalars - int N; - double N0; - - //Vectors - bvec bits, dec_bits; - vec symbols, rec; - - //Classes - BPSK bpsk; //The BPSK modulator/debodulator class - BERC berc; //The Bit Error Rate Counter class - - //Init - N = 500000; //The number of bits to simulate - N0 = 1; //0 dB SNR - - //Randomize the random number generator - RNG_randomize(); - - //Generate the bits: - bits = randb(N); - - //Do the BPSK modulation - bpsk.modulate_bits(bits, symbols); - - //Add the AWGN - rec = symbols + sqrt(N0/2)* randn(N); - - //Decode the received bits - bpsk.demodulate_bits(rec, dec_bits); - - //Count the number of errors - berc.count(bits,dec_bits); - - //Print the results - cout << "There were " << berc.get_errors() << " received bits in error." << endl; - cout << "There were " << berc.get_corrects() << " correctly received bits." << endl; - cout << "The error probability was " << berc.get_errorrate() << endl; - cout << "The theoretical error probability is " << 0.5*erfc(1.0) << endl; - - //Exit program: - return 0; - -} Deleted: trunk/stdair/doc/tutorial/src/bpsk.ref =================================================================== --- trunk/stdair/doc/tutorial/src/bpsk.ref 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/bpsk.ref 2010-10-20 14:23:22 UTC (rev 354) @@ -1,4 +0,0 @@ -There were 39224 received bits in error. -There were 460776 correctly received bits. -The error probability was 0.078448 -The theoretical error probability is 0.0786496 Added: trunk/stdair/doc/tutorial/src/completeex.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.cpp (rev 0) +++ trunk/stdair/doc/tutorial/src/completeex.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,328 @@ +// StdAir +#include <stdair/bom/BomManager.hpp> +#include <stdair/bom/BomRoot.hpp> +#include <stdair/bom/Inventory.hpp> +#include <stdair/bom/InventoryTypes.hpp> +#include <stdair/bom/FlightDate.hpp> +#include <stdair/bom/FlightDateTypes.hpp> +#include <stdair/bom/LegDate.hpp> +#include <stdair/bom/LegDateTypes.hpp> +#include <stdair/bom/LegCabin.hpp> +#include <stdair/bom/LegCabinTypes.hpp> +#include <stdair/bom/SegmentDate.hpp> +#include <stdair/bom/SegmentDateTypes.hpp> +#include <stdair/bom/SegmentCabin.hpp> +#include <stdair/bom/SegmentCabinTypes.hpp> +#include <stdair/bom/FareFamily.hpp> +#include <stdair/bom/FareFamilyTypes.hpp> +#include <stdair/bom/BookingClass.hpp> +#include <stdair/bom/BookingClassTypes.hpp> +#include <stdair/factory/FacBomManager.hpp> + +//These lines are needed for use of cout and endl +using std::cout; +using std::endl; + +int main() +{ + // ///////////// Step 0.0: Initialisation //////////// + // Create the root of the Bom tree (i.e., a BomRoot object) + stdair::BomRoot& lBomRoot = + stdair::FacBom<stdair::BomRoot>::instance().create(); + + // Step 0.1: Inventory level + // Create an Inventory for BA + const stdair::InventoryKey lBAKey ("BA"); + stdair::Inventory& lBAInv = + stdair::FacBom<stdair::Inventory>::instance().create (lBAKey); + stdair::FacBomManager::instance().addToList (lBomRoot, lBAInv); + + // Create an Inventory for AF + const stdair::InventoryKey lAFKey ("AF"); + stdair::Inventory& lAFInv = + stdair::FacBom<stdair::Inventory>::instance().create (lAFKey); + stdair::FacBomManager::instance().addToList (lBomRoot, lAFInv); + + // ////// BA /////// + // Step 0.2: Flight-date level + // Create a FlightDate (BA15/10-JUN-2010) for BA's Inventory + stdair::FlightNumber_T lFlightNumber = 15; + stdair::Date_T lDate (2010, 6, 10); + stdair::FlightDateKey lFlightDateKey (lFlightNumber, lDate); + + stdair::FlightDate& lBA15_20100610_FD = + stdair::FacBom<stdair::FlightDate>::instance().create (lFlightDateKey); + stdair::FacBomManager::instance().addToList (lBAInv, lBA15_20100610_FD); + + // Step 0.3: Segment-date level + // Create a first SegmentDate (LHR-SYD) for BA's Inventory + const stdair::AirportCode_T lLHR ("LHR"); + const stdair::AirportCode_T lSYD ("SYD"); + stdair::SegmentDateKey lSegmentDateKey (lLHR, lSYD); + + stdair::SegmentDate& lLHRSYDSegment = + stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); + stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, + lLHRSYDSegment); + + // Create a second SegmentDate (LHR-BKK) for BA's Inventory + const stdair::AirportCode_T lBKK ("BKK"); + lSegmentDateKey = stdair::SegmentDateKey (lLHR, lBKK); + + stdair::SegmentDate& lLHRBKKSegment = + stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); + stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, + lLHRBKKSegment); + + // Create a third SegmentDate (BKK-SYD) for BA's Inventory + lSegmentDateKey = stdair::SegmentDateKey (lBKK, lSYD); + + stdair::SegmentDate& lBKKSYDSegment = + stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); + stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, + lBKKSYDSegment); + + // Step 0.4: Leg-date level + // Create a first LegDate (LHR) for BA's Inventory + stdair::LegDateKey lLegDateKey (lLHR); + + stdair::LegDate& lLHRLeg = + stdair::FacBom<stdair::LegDate>::instance().create (lLegDateKey); + stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, lLHRLeg); + + // Create a second LegDate (BKK) + lLegDateKey = stdair::LegDateKey (lBKK); + + stdair::LegDate& lBKKLeg = + stdair::FacBom<stdair::LegDate>::instance().create (lLegDateKey); + stdair::FacBomManager::instance().addToList (lBA15_20100610_FD, lBKKLeg); + + // Step 0.5: segment-cabin level + // Create a SegmentCabin (Y) for the Segment LHR-BKK of BA's Inventory + const stdair::CabinCode_T lY ("Y"); + stdair::SegmentCabinKey lYSegmentCabinKey (lY); + + stdair::SegmentCabin& lLHRBKKSegmentYCabin = + stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); + stdair::FacBomManager::instance().addToList (lLHRBKKSegment, + lLHRBKKSegmentYCabin); + + // Create a SegmentCabin (Y) of the Segment BKK-SYD; + stdair::SegmentCabin& lBKKSYDSegmentYCabin = + stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); + stdair::FacBomManager::instance().addToList (lBKKSYDSegment, + lBKKSYDSegmentYCabin); + + // Create a SegmentCabin (Y) of the Segment LHR-SYD; + stdair::SegmentCabin& lLHRSYDSegmentYCabin = + stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); + stdair::FacBomManager::instance().addToList (lLHRSYDSegment, + lLHRSYDSegmentYCabin); + + // Step 0.6: leg-cabin level + // Create a LegCabin (Y) for the Leg LHR-BKK on BA's Inventory + stdair::LegCabinKey lYLegCabinKey (lY); + + stdair::LegCabin& lLHRLegYCabin = + stdair::FacBom<stdair::LegCabin>::instance().create (lYLegCabinKey); + stdair::FacBomManager::instance().addToList (lLHRLeg, lLHRLegYCabin); + + // Create a LegCabin (Y) for the Leg BKK-SYD + stdair::LegCabin& lBKKLegYCabin = + stdair::FacBom<stdair::LegCabin>::instance().create (lYLegCabinKey); + stdair::FacBomManager::instance().addToList (lBKKLeg, lBKKLegYCabin); + + // Step 0.7: fare family level + // Create a FareFamily (1) for the Segment LHR-BKK, cabin Y on BA's Inv + const stdair::FamilyCode_T l1 ("1"); + stdair::FareFamilyKey l1FareFamilyKey (l1); + + stdair::FareFamily& lLHRBKKSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin, + lLHRBKKSegmentYCabin1Family); + + // Create a FareFamily (1) for the Segment BKK-SYD, cabin Y on BA's Inv + stdair::FareFamily& lBKKSYDSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin, + lBKKSYDSegmentYCabin1Family); + + // Create a FareFamily (1) for the Segment LHR-SYD, cabin Y on BA's Inv + stdair::FareFamily& lLHRSYDSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin, + lLHRSYDSegmentYCabin1Family); + + // Step 0.8: booking class level + // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare family 1 on BA's Inv + const stdair::ClassCode_T lQ ("Q"); + stdair::BookingClassKey lQBookingClassKey (lQ); + + stdair::BookingClass& lLHRBKKSegmentYCabin1FamilyQClass = + stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); + stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin1Family, + lLHRBKKSegmentYCabin1FamilyQClass); + + // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare family 1 on BA's Inv + stdair::BookingClass& lBKKSYDSegmentYCabin1FamilyQClass = + stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); + stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin1Family, + lBKKSYDSegmentYCabin1FamilyQClass); + + // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare family 1 on BA's Inv + stdair::BookingClass& lLHRSYDSegmentYCabin1FamilyQClass = + stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); + stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin1Family, + lLHRSYDSegmentYCabin1FamilyQClass); + + // ////// AF /////// + // Step 0.2: Flight-date level + // Create a FlightDate (AF102/20-MAR-2010) for AF's Inventory + lFlightNumber = 102; + lDate = stdair::Date_T (2010, 3, 20); + lFlightDateKey = stdair::FlightDateKey (lFlightNumber, lDate); + + stdair::FlightDate& lAF102_20100320_FD = + stdair::FacBom<stdair::FlightDate>::instance().create (lFlightDateKey); + stdair::FacBomManager::instance().addToList (lAFInv, lAF102_20100320_FD); + + // Step 0.3: Segment-date level + // Create a SegmentDate (CDG-SFO) for AF's Inventory + const stdair::AirportCode_T lCDG ("CDG"); + const stdair::AirportCode_T lSFO ("SFO"); + lSegmentDateKey = stdair::SegmentDateKey (lCDG, lSFO); + + stdair::SegmentDate& lCDGSFOSegment = + stdair::FacBom<stdair::SegmentDate>::instance().create (lSegmentDateKey); + stdair::FacBomManager::instance().addToList (lAF102_20100320_FD, + lCDGSFOSegment); + + // Step 0.4: Leg-date level + // Create a LegDate (CDG) for AF's Inventory + lLegDateKey = stdair::LegDateKey (lCDG); + + stdair::LegDate& lCDGLeg = + stdair::FacBom<stdair::LegDate>::instance().create (lLegDateKey); + stdair::FacBomManager::instance().addToList (lAF102_20100320_FD, lCDGLeg); + + // Step 0.5: segment-cabin level + // Create a SegmentCabin (Y) for the Segment CDG-SFO of AF's Inventory + stdair::SegmentCabin& lCDGSFOSegmentYCabin = + stdair::FacBom<stdair::SegmentCabin>::instance().create(lYSegmentCabinKey); + stdair::FacBomManager::instance().addToList (lCDGSFOSegment, + lCDGSFOSegmentYCabin); + + // Step 0.6: leg-cabin level + // Create a LegCabin (Y) for the Leg CDG-SFO on AF's Inventory + stdair::LegCabin& lCDGLegYCabin = + stdair::FacBom<stdair::LegCabin>::instance().create (lYLegCabinKey); + stdair::FacBomManager::instance().addToList (lCDGLeg, lCDGLegYCabin); + + // Step 0.7: fare family level + // Create a fareFamily (1) for the Segment CDG-SFO, cabin Y on AF's Inv + stdair::FareFamily& lCDGSFOSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin, + lCDGSFOSegmentYCabin1Family); + + // Step 0.8: booking class level + // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare family 1 on AF's Inv + stdair::BookingClass& lCDGSFOSegmentYCabin1FamilyQClass = + stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); + stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin1Family, + lCDGSFOSegmentYCabin1FamilyQClass); + + + // /////////// Step 1.0: Display the BOM tree ////////// + // 1.0. Bom root level + cout << lBomRoot.describeKey() << endl; + + // 1.1. Inventory level + const stdair::InventoryList_T& lInventoryList = + stdair::BomManager::getList<stdair::Inventory> (lBomRoot); + for (stdair::InventoryList_T::const_iterator itInv = lInventoryList.begin(); + itInv != lInventoryList.end(); ++itInv) { + const stdair::Inventory* lInv_ptr = *itInv; + + cout << " " <<lInv_ptr->describeKey() << endl; + + // 1.2. FlightDate level + const stdair::FlightDateList_T& lFlightDateList = + stdair::BomManager::getList<stdair::FlightDate> (*lInv_ptr); + for (stdair::FlightDateList_T::const_iterator itFD=lFlightDateList.begin(); + itFD != lFlightDateList.end(); ++itFD) { + const stdair::FlightDate* lFD_ptr = *itFD; + + cout << " " << lFD_ptr->toString() << endl; + + // 1.4. LegDate level + const stdair::LegDateList_T& lLegDateList = + stdair::BomManager::getList<stdair::LegDate> (*lFD_ptr); + for (stdair::LegDateList_T::const_iterator itLD = + lLegDateList.begin(); + itLD != lLegDateList.end(); ++itLD) { + const stdair::LegDate* lLD_ptr = *itLD; + + cout << " " << lLD_ptr->toString() << endl; + + // 1.6. LegCabin level + const stdair::LegCabinList_T& lLegCabinList = + stdair::BomManager::getList<stdair::LegCabin> (*lLD_ptr); + for (stdair::LegCabinList_T::const_iterator itLC = + lLegCabinList.begin(); + itLC != lLegCabinList.end(); ++itLC) { + const stdair::LegCabin* lLC_ptr = *itLC; + + cout << " " << lLC_ptr->toString() << endl; + } + } + + // 1.3. SegmentDate level + const stdair::SegmentDateList_T& lSegmentDateList = + stdair::BomManager::getList<stdair::SegmentDate> (*lFD_ptr); + for (stdair::SegmentDateList_T::const_iterator itSD = + lSegmentDateList.begin(); + itSD != lSegmentDateList.end(); ++itSD) { + const stdair::SegmentDate* lSD_ptr = *itSD; + + cout << " " << lSD_ptr->toString() << endl; + + // 1.5. SegmentCabin level + const stdair::SegmentCabinList_T& lSegmentCabinList = + stdair::BomManager::getList<stdair::SegmentCabin> (*lSD_ptr); + for (stdair::SegmentCabinList_T::const_iterator itSC = + lSegmentCabinList.begin(); + itSC != lSegmentCabinList.end(); ++itSC) { + const stdair::SegmentCabin* lSC_ptr = *itSC; + + cout << " " << lSC_ptr->toString() << endl; + + // 1.7. FareFamily level + const stdair::FareFamilyList_T& lFareFamilyList = + stdair::BomManager::getList<stdair::FareFamily> (*lSC_ptr); + for (stdair::FareFamilyList_T::const_iterator itFF = + lFareFamilyList.begin(); + itFF != lFareFamilyList.end(); ++itFF) { + const stdair::FareFamily* lFF_ptr = *itFF; + + cout << " " << lFF_ptr->toString() << endl; + + // 1.8. BookingClass level + const stdair::BookingClassList_T& lBookingClassList = + stdair::BomManager::getList<stdair::BookingClass> (*lFF_ptr); + for (stdair::BookingClassList_T::const_iterator itBC = + lBookingClassList.begin(); + itBC != lBookingClassList.end(); ++itBC) { + const stdair::BookingClass* lBC_ptr = *itBC; + + cout << " " << lBC_ptr->toString() << endl; + } + } + } + } + } + } + // Exit program: + return 0; +} Added: trunk/stdair/doc/tutorial/src/completeex.ref =================================================================== --- trunk/stdair/doc/tutorial/src/completeex.ref (rev 0) +++ trunk/stdair/doc/tutorial/src/completeex.ref 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,27 @@ + -- ROOT -- + BA + 15, 2010-Jun-10 + LHR + Y + BKK + Y + LHR-SYD + Y + 1 + Q + LHR-BKK + Y + 1 + Q + BKK-SYD + Y + 1 + Q + AF + 102, 2010-Mar-20 + CDG + Y + CDG-SFO + Y + 1 + Q Deleted: trunk/stdair/doc/tutorial/src/convcode.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/convcode.cpp 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/convcode.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -1,85 +0,0 @@ -#include <itpp/itcomm.h> - -using namespace itpp; - -//These lines are needed for use of cout and endl -using std::cout; -using std::endl; - -int main() -{ - //Scalars - int constraint_length, MaxNrofErrors, Nobits, MaxIterations, p, i; - double Ec, Eb; - - //Vectors - ivec generators; - vec EbN0dB, EbN0, N0, ber, trans_symbols, rec_symbols; - bvec uncoded_bits, coded_bits, decoded_bits; - - //Classes - BPSK bpsk; - BERC berc; - Convolutional_Code conv_code; - AWGN_Channel channel; - - /* - Set up the convolutional encoder/decoder class: - The generators are given in octal form by adding a zero in front of the numbers. - In this example we will simulate a rate 1/3 code that is listed in J. G. Proakis, - "Digital communications". The encoder has constraint length 7. - */ - generators.set_size(3,false); - generators(0) = 0133; - generators(1) = 0145; - generators(2) = 0175; - constraint_length = 7; - conv_code.set_generator_polynomials(generators, constraint_length); - - //Init: Calculate some simulation specific parameters: - Ec = 1.0; - EbN0dB = linspace(-2,6,5); - EbN0 = inv_dB(EbN0dB); - Eb = Ec / conv_code.get_rate(); - N0 = Eb * pow(EbN0,-1); - MaxNrofErrors = 100; - Nobits = 10000; - MaxIterations = 10; - ber.set_size(EbN0dB.length(),false); - ber.clear(); - - //Randomize the random number generators. - RNG_randomize(); - - for (p=0; p<EbN0dB.length(); p++) { - - cout << "Now simulating point " << p+1 << " out of " << EbN0dB.length() << endl; - berc.clear(); //Clear the bit error rate counter. - channel.set_noise(N0(p)/2.0); //Set the noise value of the AWGN channel. - - for (i=0; i<MaxIterations; i++) { - - uncoded_bits = randb(Nobits); //The uncoded bits. - coded_bits = conv_code.encode(uncoded_bits); //The convolutional encoder function. - bpsk.modulate_bits(coded_bits, trans_symbols); //The BPSK modulator. - rec_symbols = channel( trans_symbols ); //The AWGN channel. - decoded_bits = conv_code.decode(rec_symbols); //The Viterbi decoder function. - berc.count(uncoded_bits,decoded_bits); //Count the errors. - ber(p) = berc.get_errorrate(); - - //Break the simulation on this point if sufficient number of bit errors were observed: - if (berc.get_errors()>MaxNrofErrors) { - cout << "Breaking on point " << p+1 << " with " << berc.get_errors() << " errors." << endl; break; - } - - } - } - - //Print the results: - cout << "BER = " << ber << endl; - cout << "EbN0dB = " << EbN0dB << endl; - - //Exit program: - return 0; - -} Deleted: trunk/stdair/doc/tutorial/src/convcode.ref =================================================================== --- trunk/stdair/doc/tutorial/src/convcode.ref 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/convcode.ref 2010-10-20 14:23:22 UTC (rev 354) @@ -1,10 +0,0 @@ -Now simulating point 1 out of 5 -Breaking on point 1 with 3297 errors. -Now simulating point 2 out of 5 -Breaking on point 2 with 781 errors. -Now simulating point 3 out of 5 -Breaking on point 3 with 112 errors. -Now simulating point 4 out of 5 -Now simulating point 5 out of 5 -BER = [0.330858 0.0783743 0.00280983 0 0] -EbN0dB = [-2 0 2 4 6] Deleted: trunk/stdair/doc/tutorial/src/interleaver.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/interleaver.cpp 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/interleaver.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -1,43 +0,0 @@ -#include <itpp/itcomm.h> - -using namespace itpp; - -//These lines are needed for use of cout and endl -using std::cout; -using std::endl; - -int main() -{ - //Declare scalars and vectors: - int rows, cols; - ivec input, output, deinterleaved; - - //Declare the interleaver. The interleaver classes are templated, and therefore we must specify - //the type of the data elements. In this example we are using integers: - Block_Interleaver<int> my_interleaver; - - //Initialize the interleaver class. Note that this can be done already in the declaration by writing - //Block_Interleaver<int> my_interleaver(rows,cols); - rows = 4; - cols = 5; - my_interleaver.set_rows(rows); - my_interleaver.set_cols(cols); - - //Define the input to the interleaver: - input = "1:20"; - - //Do the interleaving: - output = my_interleaver.interleave(input); - - //Do the de-interleaving: - deinterleaved = my_interleaver.deinterleave(output); - - //Print the results: - cout << "input = " << input << endl; - cout << "output = " << output << endl; - cout << "deinterleaved = " << deinterleaved << endl; - - //Exit program: - return 0; - -} Deleted: trunk/stdair/doc/tutorial/src/interleaver.ref =================================================================== --- trunk/stdair/doc/tutorial/src/interleaver.ref 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/interleaver.ref 2010-10-20 14:23:22 UTC (rev 354) @@ -1,3 +0,0 @@ -input = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] -output = [1 5 9 13 17 2 6 10 14 18 3 7 11 15 19 4 8 12 16 20] -deinterleaved = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20] Added: trunk/stdair/doc/tutorial/src/invobject.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.cpp (rev 0) +++ trunk/stdair/doc/tutorial/src/invobject.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1,24 @@ +// StdAir +#include <stdair/factory/FacBomManager.hpp> +#include <stdair/bom/BomRoot.hpp> +#include <stdair/bom/Inventory.hpp> + +// These lines are needed for use of cout and endl +using std::cout; +using std::endl; + +int main() +{ + // Create an inventory Key (i,e an airline code) + const stdair::InventoryKey lBAKey ("BA"); + + // Create an inventory object whose airline code is BA + stdair::Inventory& lBAInv = + stdair::FacBom<stdair::Inventory>::instance().create (lBAKey); + + // Display the airline code + cout << " Inventory: " << lBAInv.describeKey() << endl; + + // Exit program: + return 0; +} Added: trunk/stdair/doc/tutorial/src/invobject.ref =================================================================== --- trunk/stdair/doc/tutorial/src/invobject.ref (rev 0) +++ trunk/stdair/doc/tutorial/src/invobject.ref 2010-10-20 14:23:22 UTC (rev 354) @@ -0,0 +1 @@ + Inventory: BA Deleted: trunk/stdair/doc/tutorial/src/ldpc_bersim_awgn.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/ldpc_bersim_awgn.cpp 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/ldpc_bersim_awgn.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -1,83 +0,0 @@ -#include <itpp/itcomm.h> - -using namespace std; -using namespace itpp; - -extern int main(int argc, char **argv) -{ - int Nbits=1000*1000*5000; // maximum number of bits simulated for any SNR point - int Nbers=2000; // target number of bit errors per SNR point - double BERmin=1e-6; // BER at which to terminate simulation - vec EbN0db = "0.6:0.2:5"; - - LDPC_Code C(argv[1]); - bool single_snr_mode=false; - if (argc==3) { - double x; - sscanf(argv[2],"%lf",&x); - EbN0db.set_size(1); - EbN0db(0)=x; - single_snr_mode=true; - } - - cout << "Running with Eb/N0: " << EbN0db << endl; - - // High performance: 2500 iterations, high resolution LLR algebra - C.setup_decoder("bp","2500 1 0"); - - // Alt. setting -- High speed: 50 iterations, logmax approximation - // C.setup_decoder("bp","50 1 0",LLR_calc_unit(12,0,7)); - - cout << C << endl; - - int N = C.get_nvar(); // number of bits per codeword - BPSK Mod; - bvec bitsin = zeros_b(N); - vec s = Mod.modulate_bits(bitsin); - - RNG_randomize(); - for (int j=0; j<length(EbN0db); j++) { - // noise variance is N0/2 per dimension - double N0 = pow(10.0,-EbN0db(j)/10.0) / C.get_rate(); - AWGN_Channel chan(N0/2); - BERC berc; // counters for coded and uncoded BER - BLERC ferc; // counter for coded FER - ferc.set_blocksize(N); - for (long int i=0; i<Nbits; i+=C.get_nvar()) { - // Received data - vec x = chan(s); - - // Demodulate - vec softbits=Mod.demodulate_soft_bits(x,N0); - - //Decode the received bits - bvec bitsout=C.decode(softbits); - - //Count the number of errors - berc.count(bitsin,bitsout); - ferc.count(bitsin,bitsout); - - if (single_snr_mode) { - cout << "Eb/N0=" << EbN0db(j) << " Simulated " - << ferc.get_total_blocks() << " frames and " - << berc.get_total_bits() << " bits. " - << "Obtained " << berc.get_errors() << " bit errors. " - << " BER: " << berc.get_errorrate() - << " FER: " << ferc.get_errorrate() << endl; - cout.flush(); - } else { - if (berc.get_errors()>Nbers) { break;} - } - } - - cout << "Eb/N0=" << EbN0db(j) << " Simulated " - << ferc.get_total_blocks() << " frames and " - << berc.get_total_bits() << " bits. " - << "Obtained " << berc.get_errors() << " bit errors. " - << " BER: " << berc.get_errorrate() - << " FER: " << ferc.get_errorrate() << endl; - cout.flush(); - if (berc.get_errorrate()<BERmin) { break; } - } - return 0; -} Deleted: trunk/stdair/doc/tutorial/src/ldpc_gen_codes.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/ldpc_gen_codes.cpp 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/ldpc_gen_codes.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -1,97 +0,0 @@ -// Generate some example LDPC codes - -#include <itpp/itcomm.h> - -using namespace itpp; -using namespace std; - -extern int main(int argc, char **argv) -{ - { // This generates a random regular (3,6) code with 500 bits - cout << "========= RANDOM (3,6) CODE ==========" << endl; - LDPC_Parity_Matrix H; - H.generate_regular_ldpc(500,3,6, - "rand", // random unstructured matrix - "500 10"); // optimize girth - H.display_stats(); - LDPC_Code C1(H); - C1.save_to_file("random_3_6_code.it"); - } - - { // This is the code "204.33.484 (N=204,K=102,M=102,R=0.5)" from - // David MacKay's database over sparse-graph code. It can be - // obtained with "wget - // http://www.inference.phy.cam.ac.uk/mackay/codes/EN/C/204.33.484" - cout << "========= MACKAY CODE ==========" << endl; - LDPC_Parity_Matrix H("204.33.484","alist"); - H.display_stats(); - LDPC_Generator_Matrix G(H); - LDPC_Code C(H,G); - C.save_to_file("mackay_204.33.484.it"); - - // Now produce a girth-optimized version of this code by removing - // cycles. This slightly improves the performance at high SNR. - H.cycle_removal_MGW(12); - LDPC_Generator_Matrix G1(H); - LDPC_Code C1(H,G1); - C1.save_to_file("mackay_204.33.484_opt.it"); - } - - // Irregular 1/2-rate codes optimized for the AWGN channel. The - // degree distributions are taken from Richardson & Urbanke, - // Trans. IT 2001. - - { // 1000 bits - cout << "========= IRREGULAR CODE 1000 BITS ==========" << endl; - LDPC_Parity_Matrix H; - H.generate_irregular_ldpc(1000, - "0 0.27684 0.28342 0 0 0 0 0 0.43974", - "0 0 0 0 0 0.01568 0.85244 0.13188", - "rand", // random unstructured matrix - "500 8"); // optimize girth - LDPC_Code C(H); - C.save_to_file("RU_1000.it"); - } - - { // 10000 bits (takes a few minutes to run) - cout << "========= IRREGULAR CODE 10000 BITS ==========" << endl; - LDPC_Parity_Matrix H; - H.generate_irregular_ldpc(10000,"0 0.21991 0.23328 0.02058 0 0.08543 0.06540 0.04767 \ - 0.01912 0 0 0 0 0 0 0 0 0 0.08064 0.22798", - "0 0 0 0 0 0 0 0.64854 0.34747 0.00399", - "rand", // random unstructured matrix - "150 8"); // optimize - LDPC_Code C(H); - C.save_to_file("RU_10000.it"); - } - - { // 100000 bits (takes a while to run) - cout << "========= IRREGULAR CODE 100000 BITS ==========" << endl; - LDPC_Parity_Matrix H; - H.generate_irregular_ldpc(100000,"0 0.1712 0.21053 0.00273 0 0 0.00009 0.15269 0.09227 \ - 0.02802 0 0 0 0 0.01206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.07212 0 0 0 0 \ - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25830", - "0 0 0 0 0 0 0 0 0.33620 0.08883 0.57497", - "rand", - "40 4"); // less aggressive optimization - LDPC_Code C(H); - C.save_to_file("RU_100000.it"); - } - - exit(0); - - { // 1000000 bits (THIS CODE REQUIRES ABOUT 450 MB TO STORE AND 2GB - // INTERNAL MEMORY TO GENERATE) - cout << "========= IRREGULAR CODE 1000000 BITS ==========" << endl; - LDPC_Parity_Matrix H; - H.generate_irregular_ldpc(1000000,"0 0.1712 0.21053 0.00273 0 0 0.00009 0.15269 0.09227 \ - 0.02802 0 0 0 0 0.01206 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.07212 0 0 0 0 \ - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25830", - "0 0 0 0 0 0 0 0 0.33620 0.08883 0.57497", - "rand", - "0 0"); // no optimization here - LDPC_Code C(H); - C.save_to_file("RU_1000000.it"); - } - -} Deleted: trunk/stdair/doc/tutorial/src/mimoconv.cpp =================================================================== --- trunk/stdair/doc/tutorial/src/mimoconv.cpp 2010-10-18 11:37:53 UTC (rev 353) +++ trunk/stdair/doc/tutorial/src/mimoconv.cpp 2010-10-20 14:23:22 UTC (rev 354) @@ -1,241 +0,0 @@ - -#include <itpp/itcomm.h> - -using std::cout; -using std::endl; -using namespace itpp; -using namespace std; - -/* Zero-forcing detector with ad hoc soft information. This function - applies the ZF (pseudoinverse) linear filter to the received - data. This results in effective noise with covariance matrix - inv(H'H)*sigma2. The diagonal elements of this noise covariance - matrix are taken as noise variances per component in the processed - received data but the noise correlation is ignored. - - */ - -void ZF_demod(ND_UQAM &channel, ivec &LLR_apr, ivec &LLR_apost, double sigma2, cmat &H, cvec &y) -{ - it_assert(H.rows()>=H.cols(),"ZF_demod() - underdetermined systems not tolerated"); - cvec shat=ls_solve_od(H,y); // the ZF solution - vec Sigma2=real(diag(inv(H.hermitian_transpose()*H)))*sigma2; // noise covariance of shat - cvec h(length(shat)); - for (int i=0; i<length(shat); i++) { - shat(i) = shat(i)/sqrt(Sigma2(i)); - h(i) = 1.0/sqrt(Sigma2(i)); - } - channel.map_demod(LLR_apr,LLR_apost,1.0,h,shat); -} - - -extern int main(int argc, char **argv) -{ - // -- modulation and channel parameters (taken from command line input) -- - int nC; // type of constellation (1=QPSK, 2=16-QAM, 3=64-QAM) - int nRx; // number of receive antennas - int nTx; // number of transmit antennas - int Tc; // coherence time (number of channel vectors with same H) - - if (argc!=5) { - cout << "Usage: cm nTx nRx nC Tc" << endl << "Example: cm 2 2 1 100000 (2x2 QPSK MIMO on slow fading channel)" << endl; - exit(1); - } else { - sscanf(argv[1],"%i",&nTx); - sscanf(argv[2],"%i",&nRx); - sscanf(argv[3],"%i",&nC); - sscanf(argv[4],"%i",&Tc); - } - - cout << "Initializing.. " << nTx << " TX antennas, " << nRx << " RX antennas, " - << (1<<nC) << "-PAM per dimension, coherence time " << Tc << endl; - - // -- simulation control parameters -- - const vec EbN0db = "-5:0.5:50"; // SNR range - const int Nmethods =2; // number of demodulators to try - const long int Nbitsmax=50*1000*1000; // maximum number of bits to ever simulate per SNR point - const int Nu = 1000; // length of data packet (before applying channel coding) - - int Nbers, Nfers; // target number of bit/frame errors per SNR point - double BERmin, FERmin; // BER/FER at which to terminate simulation - if (Tc==1) { // Fast fading channel, BER is of primary interest - BERmin = 0.001; // stop simulating a given method if BER<this value - FERmin = 1.0e-10; // stop simulating a given method if FER<this value - Nbers = 1000; // move to next SNR point after counting 1000 bit errors - Nfers = 200; // do not stop on this condition - } else { // Slow fading channel, FER is of primary interest here - BERmin = 1.0e-15; // stop simulating a given method if BER<this value - FERmin = 0.01; // stop simulating a given method if FER<this value - Nbers = -1; // do not stop on this condition - Nfers = 200; // move to next SNR point after counting 200 frame errors - } - - // -- Channel code parameters -- - Convolutional_Code code; - ivec generator(3); - generator(0)=0133; // use rate 1/3 code - generator(1)=0165; - generator(2)=0171; - double rate=1.0/3.0; - code.set_generator_polynomials(generator, 7); - bvec dummy; - code.encode_tail(randb(Nu),dummy); - const int Nc = length(dummy); // find out how long the coded blocks are - - // ============= Initialize ==================================== - - const int Nctx = (int) (2*nC*nTx*ceil(double(Nc)/double(2*nC*nTx))); // Total number of bits to transmit - const int Nvec = Nctx/(2*nC*nTx); // Number of channel vectors to transmit - const int Nbitspvec = 2*nC*nTx; // Number of bits per channel vector - - // initialize MIMO channel with uniform QAM per complex dimension and Gray coding - ND_UQAM chan; - chan.set_Gray_QAM(nTx,1<<(2*nC)); - cout << chan << endl; - - // initialize interleaver - Sequence_Interleaver<bin> sequence_interleaver_b(Nctx); - Sequence_Interleaver<int> sequence_interleaver_i(Nctx); - sequence_interleaver_b.randomize_interleaver_sequence(); - sequence_interleaver_i.set_interleaver_sequence(sequence_interleaver_b.get_interleaver_sequence()); - - // RNG_randomize(); - - Array<cvec> Y(Nvec); // received data - Array<cmat> H(Nvec/Tc+1); // channel matrix (new matrix for each coherence interval) - - ivec Contflag = ones_i(Nmethods); // flag to determine whether to run a given demodulator - if (pow(2.0,nC*2.0*nTx)>256) { // ML decoder too complex.. - Contflag(1)=0; - } - if (nTx>nRx) { - Contflag(0)=0; // ZF not for underdetermined systems - } - cout << "Running methods: " << Contflag << endl; - - cout.setf(ios::fixed, ios::floatfield); - cout.setf(ios::showpoint); - cout.precision(5); - - // ================== Run simulation ======================= - for (int nsnr=0; nsnr<length(EbN0db); nsnr++) { - const double Eb=1.0; // transmitted energy per information bit - const double N0 = pow(10.0,-EbN0db(nsnr)/10.0); - const double sigma2=N0; // Variance of each scalar complex noise sample - const double Es=rate*2*nC*Eb; // Energy per complex scalar symbol - // (Each transmitted scalar complex symbol contains rate*2*nC - // information bits.) - const double Ess=sqrt(Es); - - Array<BERC> berc(Nmethods); // counter for coded BER - Array<BERC> bercu(Nmethods); // counter for uncoded BER - Array<BLERC> ferc(Nmethods); // counter for coded FER - - for (int i=0; i<Nmethods; i++) { - ferc(i).set_blocksize(Nu); - } - - long int nbits=0; - while (nbits<Nbitsmax) { - nbits += Nu; - - // generate and encode random data - bvec inputbits = randb(Nu); - bvec txbits; - code.encode_tail(inputbits, txbits); - // coded block length is not always a multiple of the number of - // bits per channel vector - txbits=concat(txbits,randb(Nctx-Nc)); - txbits = sequence_interleaver_b.interleave(txbits); - - // -- generate channel and data ---- - for (int k=0; k<Nvec; k++) { - /* A complex valued channel matrix is used here. An - alternative (with equivalent result) would be to use a - real-valued (structured) channel matrix of twice the - dimension. - */ - if (k%Tc==0) { // generate a new channel realization every Tc intervals - H(k/Tc) = Ess*randn_c(nRx,nTx); - } - - // modulate and transmit bits - bvec bitstmp = txbits(k*2*nTx*nC,(k+1)*2*nTx*nC-1); - cvec x=chan.modulate_bits(bitstmp); - cvec e=sqrt(sigma2)*randn_c(nRx); - Y(k) = H(k/Tc)*x+e; - } - - // -- demodulate -- - Array<QLLRvec> LLRin(Nmethods); - for (i... [truncated message content] |
From: <gsa...@us...> - 2010-10-18 11:37:59
|
Revision: 353 http://stdair.svn.sourceforge.net/stdair/?rev=353&view=rev Author: gsabatier Date: 2010-10-18 11:37:53 +0000 (Mon, 18 Oct 2010) Log Message: ----------- Create test for fare families Modified Paths: -------------- trunk/stdair/test/samples/demand01.csv trunk/stdair/test/samples/schedule01.csv Added Paths: ----------- trunk/stdair/test/samples/ond01.csv Modified: trunk/stdair/test/samples/demand01.csv =================================================================== --- trunk/stdair/test/samples/demand01.csv 2010-10-14 17:19:58 UTC (rev 352) +++ trunk/stdair/test/samples/demand01.csv 2010-10-18 11:37:53 UTC (rev 353) @@ -30,5 +30,5 @@ // For example, normal with mean 10.0 and standard deviation 1.0 is specified as // N, 10.0, 1.0 // -2010-02-08; SIN; BKK; Y; SIN:0.7, BKK:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; P:0.01, G:0.05, S:0.15, M:0.3, N:0.49; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 100:0, 500:0.8, 2000:1; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 10.0, 1.0; -2010-02-08; SIN; HND; Y; SIN:0.5, HND:0.4, row:0.1; DF:0.2, DN:0.2, IF:0.5, IN:0.1; RO:0.5, RI:0.4, OW:0.1; 1:0.9, 2:0.1; P:0.1, G:0.01, S:0.09, M:0.4, N:0.4; 06:0, 07:0.1, 09:0.8, 12:0.9, 22:1; 300:0, 800:0.8, 3000:1; 15:0, 60:1; 330:0, 1:1; N, 10.0, 2.0; +2010-02-08; SIN; BKK; Y; SIN:0.7, BKK:0.2, row:0.1; DF:0.1, DN:0.3, IF:0.4, IN:0.2; RO:0.6, RI:0.2, OW:0.2; 0:0.1, 1:0.1, 2:0.15, 3:0.15, 4:0.15, 5:0.35; L:0.002, T:0.015, Q:0.019, G:0.037, S:0.042, K:0.155, N:0.73; 06:0, 07:0.1, 09:0.3, 17:0.4, 19:0.8, 20:0.95, 22:1; 100:0, 500:0.8, 2000:1; 15:0, 60:1; 330:0, 40:0.2, 20:0.6, 1:1; N, 10.0, 1.0; +2010-02-08; SIN; HND; Y; SIN:0.5, HND:0.4, row:0.1; DF:0.2, DN:0.2, IF:0.5, IN:0.1; RO:0.5, RI:0.4, OW:0.1; 1:0.9, 2:0.1; L:0.002, T:0.015, Q:0.019, G:0.037, S:0.042, K:0.155, N:0.73; 06:0, 07:0.1, 09:0.8, 12:0.9, 22:1; 300:0, 800:0.8, 3000:1; 15:0, 60:1; 330:0, 1:1; N, 10.0, 2.0; Added: trunk/stdair/test/samples/ond01.csv =================================================================== Modified: trunk/stdair/test/samples/schedule01.csv =================================================================== --- trunk/stdair/test/samples/schedule01.csv 2010-10-14 17:19:58 UTC (rev 352) +++ trunk/stdair/test/samples/schedule01.csv 2010-10-18 11:37:53 UTC (rev 353) @@ -3,5 +3,5 @@ // ElapsedTime; LegCabins; // LegCabins: CabinCode; Capacity; // Segments: Specific; -SQ; 11; 2010-01-15; 2010-02-28; 1111111; SIN; BKK; 08:20; 11:00; 07:40; Y; 300; 0; Y; YM; -SQ; 12; 2010-01-15; 2010-02-28; 1111111; SIN; HND; 09:20; 12:00; 07:40; Y; 200; 0; Y; YM; \ No newline at end of file +SQ; 11; 2010-01-15; 2010-02-28; 1111111; SIN; BKK; 08:20; 11:00; 07:40; Y; 300; 0; Y; YM; 1; Y; 2; M; +SQ; 12; 2010-01-15; 2010-02-28; 1111111; SIN; HND; 09:20; 12:00; 07:40; Y; 200; 0; Y; YM; 1; Y; 2; M; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-10-14 17:20:04
|
Revision: 352 http://stdair.svn.sourceforge.net/stdair/?rev=352&view=rev Author: denis_arnaud Date: 2010-10-14 17:19:58 +0000 (Thu, 14 Oct 2010) Log Message: ----------- [Release] Created the main 0.7.0 release branch, from revision r349. Added Paths: ----------- branches/stdair/0.7.0/main/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-10-14 17:19:00
|
Revision: 351 http://stdair.svn.sourceforge.net/stdair/?rev=351&view=rev Author: denis_arnaud Date: 2010-10-14 17:18:52 +0000 (Thu, 14 Oct 2010) Log Message: ----------- [Release] Back to working version (99.99.99). Modified Paths: -------------- trunk/stdair/configure.ac trunk/stdair/stdair.spec Modified: trunk/stdair/configure.ac =================================================================== --- trunk/stdair/configure.ac 2010-10-14 17:17:29 UTC (rev 350) +++ trunk/stdair/configure.ac 2010-10-14 17:18:52 UTC (rev 351) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2010 Denis Arnaud <den...@us...>]) -AC_INIT([STDAIR],[0.7.0],[den...@us...],[stdair]) +AC_INIT([STDAIR],[99.99.99],[den...@us...],[stdair]) AC_CONFIG_HEADER([stdair/config.h]) AC_CONFIG_SRCDIR([stdair/bom/BomRoot.hpp]) AC_CONFIG_AUX_DIR([config]) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # Shared library versioning -GENERIC_LIBRARY_VERSION="0:7:0" +GENERIC_LIBRARY_VERSION="99:99:99" # | | | # +------+ | +---+ # | | | Modified: trunk/stdair/stdair.spec =================================================================== --- trunk/stdair/stdair.spec 2010-10-14 17:17:29 UTC (rev 350) +++ trunk/stdair/stdair.spec 2010-10-14 17:18:52 UTC (rev 351) @@ -2,7 +2,7 @@ %global mydocs __tmp_docdir # Name: stdair -Version: 0.7.0 +Version: 99.99.99 Release: 1%{?dist} Summary: C++ Standard Airline IT Object Library @@ -111,6 +111,9 @@ %changelog +* Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 99.99.99-1 +- Upstream update + * Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.7.0-1 - Upstream update This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-10-14 17:17:35
|
Revision: 350 http://stdair.svn.sourceforge.net/stdair/?rev=350&view=rev Author: denis_arnaud Date: 2010-10-14 17:17:29 +0000 (Thu, 14 Oct 2010) Log Message: ----------- [Branch 0.7.0] Prepared the branch 0.7.0 to be copied from head of the trunk. Added Paths: ----------- branches/stdair/0.7.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-10-14 17:16:50
|
Revision: 349 http://stdair.svn.sourceforge.net/stdair/?rev=349&view=rev Author: denis_arnaud Date: 2010-10-14 17:16:42 +0000 (Thu, 14 Oct 2010) Log Message: ----------- [Release 0.7.0] Release of version 0.7.0. Modified Paths: -------------- trunk/stdair/configure.ac trunk/stdair/stdair.spec Modified: trunk/stdair/configure.ac =================================================================== --- trunk/stdair/configure.ac 2010-10-14 16:40:17 UTC (rev 348) +++ trunk/stdair/configure.ac 2010-10-14 17:16:42 UTC (rev 349) @@ -2,7 +2,7 @@ #------------------------------------------------------------------- AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (C) 2007-2010 Denis Arnaud <den...@us...>]) -AC_INIT([STDAIR],[99.99.99],[den...@us...],[stdair]) +AC_INIT([STDAIR],[0.7.0],[den...@us...],[stdair]) AC_CONFIG_HEADER([stdair/config.h]) AC_CONFIG_SRCDIR([stdair/bom/BomRoot.hpp]) AC_CONFIG_AUX_DIR([config]) @@ -11,7 +11,7 @@ AM_CONDITIONAL([HAVE_CPPUNIT], [test "x$CPPUNIT_LIBS" != x]) # Shared library versioning -GENERIC_LIBRARY_VERSION="99:99:99" +GENERIC_LIBRARY_VERSION="0:7:0" # | | | # +------+ | +---+ # | | | Modified: trunk/stdair/stdair.spec =================================================================== --- trunk/stdair/stdair.spec 2010-10-14 16:40:17 UTC (rev 348) +++ trunk/stdair/stdair.spec 2010-10-14 17:16:42 UTC (rev 349) @@ -2,7 +2,7 @@ %global mydocs __tmp_docdir # Name: stdair -Version: 99.99.99 +Version: 0.7.0 Release: 1%{?dist} Summary: C++ Standard Airline IT Object Library @@ -111,7 +111,7 @@ %changelog -* Thu Oct 21 2010 Son Nguyen Kim <ngu...@gm...> 99.99.99-1 +* Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.7.0-1 - Upstream update * Thu Oct 14 2010 Son Nguyen Kim <ngu...@gm...> 0.6.0-1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <qua...@us...> - 2010-10-14 16:40:24
|
Revision: 348 http://stdair.svn.sourceforge.net/stdair/?rev=348&view=rev Author: quannaus Date: 2010-10-14 16:40:17 +0000 (Thu, 14 Oct 2010) Log Message: ----------- [dev] Removed '_T' from 'Struct_T' - not a typedef. Modified Paths: -------------- trunk/stdair/stdair/STDAIR_Types.hpp trunk/stdair/stdair/basic/BasConst.cpp trunk/stdair/stdair/basic/BasConst_General.hpp trunk/stdair/stdair/bom/AirlineFeature.cpp trunk/stdair/stdair/bom/AirlineFeature.hpp trunk/stdair/stdair/bom/DoWStruct.cpp trunk/stdair/stdair/bom/DoWStruct.hpp trunk/stdair/stdair/bom/FlightPeriod.hpp trunk/stdair/stdair/bom/FlightPeriodKey.cpp trunk/stdair/stdair/bom/FlightPeriodKey.hpp trunk/stdair/stdair/bom/OptimizerStruct.cpp trunk/stdair/stdair/bom/OptimizerStruct.hpp trunk/stdair/stdair/bom/PeriodStruct.cpp trunk/stdair/stdair/bom/PeriodStruct.hpp Modified: trunk/stdair/stdair/STDAIR_Types.hpp =================================================================== --- trunk/stdair/stdair/STDAIR_Types.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/STDAIR_Types.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -94,6 +94,9 @@ /** Define the Airline Code type (2-letter-code, e.g., BA). */ typedef std::string AirlineCode_T; + /** Define a list of airline code. */ + typedef std::vector<AirlineCode_T> AirlineCodeList_T; + /** Location code (3-letter-code, e.g., LON). */ typedef std::string LocationCode_T; @@ -236,6 +239,9 @@ B, K, etc.). */ typedef std::string ClassCode_T; + /** Define a list of class code. */ + typedef std::vector<ClassCode_T> ClassCodeList_T; + /** Define the sub-class code (e.g., 0, 1, 2, etc.). The subclass is a sub-structure for the booking class, allowing to have specific rules for some criteria like POS. */ Modified: trunk/stdair/stdair/basic/BasConst.cpp =================================================================== --- trunk/stdair/stdair/basic/BasConst.cpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/basic/BasConst.cpp 2010-10-14 16:40:17 UTC (rev 348) @@ -29,8 +29,7 @@ const Duration_T NULL_BOOST_TIME_DURATION = boost::posix_time::hours(0)+ boost::posix_time::minutes (0) + boost::posix_time::seconds (0); - - + // //////// (Flight-)Period-related BOM /////// /** Default number of duration days. */ const DayDuration_T DEFAULT_DAY_DURATION (0); Modified: trunk/stdair/stdair/basic/BasConst_General.hpp =================================================================== --- trunk/stdair/stdair/basic/BasConst_General.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/basic/BasConst_General.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -53,5 +53,27 @@ /** Default random seed. */ extern const RandomSeed_T DEFAULT_RANDOM_SEED; + + /** Null time duration (in boost::time_duration unit).*/ + extern const Duration_T NULL_BOOST_TIME_DURATION; + + /** Default value of Availability. */ + extern const Fare_T DEFAULT_CLASS_FARE_VALUE; + + /** Default number of airlines. */ + extern const NbOfAirlines_T DEFAULT_NBOFAIRLINES; + + /** Default airlineCode value ('XX'). */ + extern const AirlineCode_T DEFAULT_AIRLINE_CODE; + + /** Default airlineCode value (''). */ + extern const AirlineCode_T DEFAULT_NULL_AIRLINE_CODE; + + /** Default classCode value ('X'). */ + extern const ClassCode_T DEFAULT_CLASS_CODE; + + /** Default null classCode value (''). */ + extern const ClassCode_T DEFAULT_NULL_CLASS_CODE; + } #endif // __STDAIR_BAS_BASCONST_GENERAL_HPP Modified: trunk/stdair/stdair/bom/AirlineFeature.cpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/AirlineFeature.cpp 2010-10-14 16:40:17 UTC (rev 348) @@ -21,7 +21,7 @@ // //////////////////////////////////////////////////////////////////// void AirlineFeature::init (const ForecasterMode_T& iForecastMode, const HistoricalDataLimit_T& iHistoricalDataLimit, - const OptimizerStruct_T& iOptimizerStruct, + const OptimizerStruct& iOptimizerStruct, const ControlMode_T& iControlMode) { _forecasterMode = iForecastMode; _historicalDataLimit = iHistoricalDataLimit; Modified: trunk/stdair/stdair/bom/AirlineFeature.hpp =================================================================== --- trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/AirlineFeature.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -32,7 +32,7 @@ // //////////// Setters ////////// /** Intialization method. */ void init (const ForecasterMode_T&, const HistoricalDataLimit_T&, - const OptimizerStruct_T&, const ControlMode_T&); + const OptimizerStruct&, const ControlMode_T&); public: // /////////// Display support methods ///////// @@ -70,7 +70,7 @@ HistoricalDataLimit_T _historicalDataLimit; /** The type of optimizer. */ - OptimizerStruct_T _optimizerStruct; + OptimizerStruct _optimizerStruct; /** The type of inventory control. */ ControlMode_T _controlMode; Modified: trunk/stdair/stdair/bom/DoWStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/DoWStruct.cpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/DoWStruct.cpp 2010-10-14 16:40:17 UTC (rev 348) @@ -11,14 +11,14 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - DoWStruct_T::DoWStruct_T () { + DoWStruct::DoWStruct () { for (unsigned short i = 0; i < 7; ++i) { _dowList.push_back (false); } } // //////////////////////////////////////////////////////////////////// - DoWStruct_T::DoWStruct_T (const std::string& iDowString) { + DoWStruct::DoWStruct (const std::string& iDowString) { const unsigned short lDowStringSize = iDowString.size(); assert (lDowStringSize == 7); @@ -31,13 +31,13 @@ } // //////////////////////////////////////////////////////////////////// - DoWStruct_T::DoWStruct_T (const DoWStruct_T& iDowStruct) : + DoWStruct::DoWStruct (const DoWStruct& iDowStruct) : _dowList (iDowStruct._dowList) { } // //////////////////////////////////////////////////////////////////// - const std::string DoWStruct_T::describeShort() const { + const std::string DoWStruct::describeShort() const { std::ostringstream ostr; short i = 0; for (BooleanList_T::const_iterator itDoW = _dowList.begin(); @@ -49,7 +49,7 @@ } // //////////////////////////////////////////////////////////////////// - const std::string DoWStruct_T::describe() const { + const std::string DoWStruct::describe() const { std::ostringstream ostr; short i = 0; for (BooleanList_T::const_iterator itDoW = _dowList.begin(); @@ -63,12 +63,12 @@ } // //////////////////////////////////////////////////////////////////// - bool DoWStruct_T::getDayOfWeek (const unsigned short i) const { + bool DoWStruct::getDayOfWeek (const unsigned short i) const { return _dowList.at (i); } // //////////////////////////////////////////////////////////////////// - bool DoWStruct_T::getStandardDayOfWeek (const unsigned short i) const { + bool DoWStruct::getStandardDayOfWeek (const unsigned short i) const { unsigned short iStd = i; if (iStd == 0) { iStd = 6; @@ -79,14 +79,14 @@ } // //////////////////////////////////////////////////////////////////// - void DoWStruct_T::setDayOfWeek (const unsigned short i, const bool iBool) { + void DoWStruct::setDayOfWeek (const unsigned short i, const bool iBool) { assert (i < 7); _dowList.at (i) = iBool; } // //////////////////////////////////////////////////////////////////// - DoWStruct_T DoWStruct_T::shift (const long& iNbOfDays) const { - DoWStruct_T oDoW (DEFAULT_DOW_STRING); + DoWStruct DoWStruct::shift (const long& iNbOfDays) const { + DoWStruct oDoW (DEFAULT_DOW_STRING); for (short i = 0; i < 7; ++i) { const bool lDoWBool = _dowList.at (i); @@ -101,8 +101,8 @@ } // //////////////////////////////////////////////////////////////////// - DoWStruct_T DoWStruct_T::intersection (const DoWStruct_T& iDoW) const { - DoWStruct_T oDoW (DEFAULT_DOW_STRING); + DoWStruct DoWStruct::intersection (const DoWStruct& iDoW) const { + DoWStruct oDoW (DEFAULT_DOW_STRING); for (unsigned short i = 0; i < 7; ++i) { if (getDayOfWeek(i) && iDoW.getDayOfWeek(i)) { oDoW.setDayOfWeek (i, true); @@ -114,7 +114,7 @@ } // //////////////////////////////////////////////////////////////////// - const bool DoWStruct_T::isValid () const { + const bool DoWStruct::isValid () const { for (unsigned short i = 0; i < 7; ++i) { if (getDayOfWeek(i)) { return true; Modified: trunk/stdair/stdair/bom/DoWStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/DoWStruct.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/DoWStruct.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -15,7 +15,7 @@ /** Define a Day Of the Week (DoW) sequence. <br>For instance, 1..11.1 means that the period is active on Mon., Thu., Fri. and Sun. */ - struct DoWStruct_T : public StructAbstract { + struct DoWStruct : public StructAbstract { public: /** Define the bit set representing the DoW. */ typedef std::vector<bool> BooleanList_T; @@ -44,10 +44,10 @@ public: // ///////////////// Business Methods //////////////// /** Build a new DoW struct by shifting the current DoW by a given number. */ - DoWStruct_T shift (const long&) const; + DoWStruct shift (const long&) const; /** Build a new DoW struct by intersecting two DoW structs. */ - DoWStruct_T intersection (const DoWStruct_T&) const; + DoWStruct intersection (const DoWStruct&) const; /** Return if the DoW struct is valid (i.e., has at least one "true"). */ const bool isValid () const; @@ -55,12 +55,12 @@ public: /** Constructor from a given bit set (e.g., "0000011" for the week-ends). */ - DoWStruct_T (const std::string& iDowString); + DoWStruct (const std::string& iDowString); /** Default constructors. */ - DoWStruct_T (); - DoWStruct_T (const DoWStruct_T&); + DoWStruct (); + DoWStruct (const DoWStruct&); /** Default destructor. */ - ~DoWStruct_T () { } + ~DoWStruct () { } private: /** Attributes. */ Modified: trunk/stdair/stdair/bom/FlightPeriod.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightPeriod.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/FlightPeriod.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -35,7 +35,7 @@ } /** Get the departure period (part of the key). */ - const PeriodStruct_T& getPeriod () const { return _key.getPeriod(); } + const PeriodStruct& getPeriod () const { return _key.getPeriod(); } /** Get the map of children holders. */ const HolderMap_T& getHolderMap() const { return _holderMap; } Modified: trunk/stdair/stdair/bom/FlightPeriodKey.cpp =================================================================== --- trunk/stdair/stdair/bom/FlightPeriodKey.cpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/FlightPeriodKey.cpp 2010-10-14 16:40:17 UTC (rev 348) @@ -8,7 +8,7 @@ // //////////////////////////////////////////////////////////////////// FlightPeriodKey::FlightPeriodKey (const FlightNumber_T& iFlightNumber, - const PeriodStruct_T& iPeriod) + const PeriodStruct& iPeriod) : _flightNumber (iFlightNumber), _period (iPeriod) { } Modified: trunk/stdair/stdair/bom/FlightPeriodKey.hpp =================================================================== --- trunk/stdair/stdair/bom/FlightPeriodKey.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/FlightPeriodKey.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -18,7 +18,7 @@ public: // /////////// Construction /////////// /** Constructors. */ - FlightPeriodKey (const FlightNumber_T&, const PeriodStruct_T&); + FlightPeriodKey (const FlightNumber_T&, const PeriodStruct&); FlightPeriodKey (const FlightPeriodKey&); /** Destructor. */ ~FlightPeriodKey (); @@ -30,7 +30,7 @@ } /** Get the active days-of-week. */ - const PeriodStruct_T& getPeriod () const { + const PeriodStruct& getPeriod () const { return _period; } @@ -56,7 +56,7 @@ FlightNumber_T _flightNumber; /** Period during the departure period. */ - PeriodStruct_T _period; + PeriodStruct _period; }; Modified: trunk/stdair/stdair/bom/OptimizerStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/OptimizerStruct.cpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/OptimizerStruct.cpp 2010-10-14 16:40:17 UTC (rev 348) @@ -11,11 +11,11 @@ namespace stdair { // /////////////////////////////////////////////////////////////////// - OptimizerStruct_T::OptimizerStruct_T () { + OptimizerStruct::OptimizerStruct () { } // /////////////////////////////////////////////////////////////////// - OptimizerStruct_T::OptimizerStruct_T + OptimizerStruct::OptimizerStruct (const OptimizerMode_T& iOptimizerMode, const SellupFlagForOptimizer_T& iSellupFlagForOptimizer, const SellupProbabilityVector_T& iSellupProbabilityVectorForOptimizer) @@ -25,19 +25,19 @@ } // /////////////////////////////////////////////////////////////////// - OptimizerStruct_T::OptimizerStruct_T - (const OptimizerStruct_T& iOptimizerStruct) + OptimizerStruct::OptimizerStruct + (const OptimizerStruct& iOptimizerStruct) : _optimizerMode(iOptimizerStruct._optimizerMode), _sellupFlagForOptimizer(iOptimizerStruct._sellupFlagForOptimizer), _sellupProbabilityVectorForOptimizer(iOptimizerStruct._sellupProbabilityVectorForOptimizer) { } // //////////////////////////////////////////////////////////////////// - OptimizerStruct_T::~OptimizerStruct_T () { + OptimizerStruct::~OptimizerStruct () { } // //////////////////////////////////////////////////////////////////// - void OptimizerStruct_T:: + void OptimizerStruct:: init (const OptimizerMode_T& iOptimizerMode, const SellupFlagForOptimizer_T& iSellupFlagForOptimizer, const SellupProbabilityVector_T& iSellupProbabilityVectorForOptimizer) { @@ -47,7 +47,7 @@ } // //////////////////////////////////////////////////////////////////// - const std::string OptimizerStruct_T::describe() const { + const std::string OptimizerStruct::describe() const { std::ostringstream ostr; ostr << _optimizerMode << "," << _sellupFlagForOptimizer @@ -56,7 +56,7 @@ } // ////////////////////////////////////////////////////////////////////// - const std::string OptimizerStruct_T::describeSellupProbabilityVector() const { + const std::string OptimizerStruct::describeSellupProbabilityVector() const { std::ostringstream ostr; for (SellupProbabilityVector_T::const_iterator itValue = _sellupProbabilityVectorForOptimizer.begin(); Modified: trunk/stdair/stdair/bom/OptimizerStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/OptimizerStruct.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/OptimizerStruct.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -10,7 +10,7 @@ namespace stdair { /** Utility structure for parsing optimizer setting. */ - struct OptimizerStruct_T { + struct OptimizerStruct { public: // /////////// Getters //////////////// /** Get the optimizer mode. */ @@ -43,16 +43,16 @@ public: /** Default constructor. */ - OptimizerStruct_T (); + OptimizerStruct (); /** Constructor. */ - OptimizerStruct_T (const OptimizerMode_T&, + OptimizerStruct (const OptimizerMode_T&, const SellupFlagForOptimizer_T&, const SellupProbabilityVector_T&); /** Default copy constructor. */ - OptimizerStruct_T (const OptimizerStruct_T&); + OptimizerStruct (const OptimizerStruct&); /** Defaut destructor. */ - ~OptimizerStruct_T (); + ~OptimizerStruct (); private: // /////////////// Attributes ////////// Modified: trunk/stdair/stdair/bom/PeriodStruct.cpp =================================================================== --- trunk/stdair/stdair/bom/PeriodStruct.cpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/PeriodStruct.cpp 2010-10-14 16:40:17 UTC (rev 348) @@ -10,38 +10,38 @@ namespace stdair { // //////////////////////////////////////////////////////////////////// - PeriodStruct_T::PeriodStruct_T () + PeriodStruct::PeriodStruct () : _dateRange (BOOST_DEFAULT_DATE_PERIOD), _dow () { } // //////////////////////////////////////////////////////////////////// - PeriodStruct_T::PeriodStruct_T (const DatePeriod_T& iDateRange, - const DoWStruct_T& iDoW) + PeriodStruct::PeriodStruct (const DatePeriod_T& iDateRange, + const DoWStruct& iDoW) : _dateRange (iDateRange), _dow (iDoW) { } // //////////////////////////////////////////////////////////////////// - PeriodStruct_T::PeriodStruct_T (const PeriodStruct_T& iPeriodStruct) + PeriodStruct::PeriodStruct (const PeriodStruct& iPeriodStruct) : _dateRange (iPeriodStruct._dateRange), _dow (iPeriodStruct._dow) { } // //////////////////////////////////////////////////////////////////// - const std::string PeriodStruct_T::describeShort() const { + const std::string PeriodStruct::describeShort() const { std::ostringstream ostr; ostr << _dateRange << ", " << _dow.describeShort (); return ostr.str(); } // //////////////////////////////////////////////////////////////////// - const std::string PeriodStruct_T::describe() const { + const std::string PeriodStruct::describe() const { std::ostringstream ostr; ostr << _dateRange << ", " << _dow.describe (); return ostr.str(); } // //////////////////////////////////////////////////////////////////// - PeriodStruct_T PeriodStruct_T:: + PeriodStruct PeriodStruct:: addDateOffset (const DateOffset_T& iDateOffset) const { // Create a new date range by shifting the date range of this object with // iDateOffset. @@ -51,24 +51,24 @@ // Create a new DoWStruct by shifting the DoWStruct of this object with // iDateOffset. const long lNbOfDaysOffset = iDateOffset.days(); - const DoWStruct_T& lDoW = getDoW(); - const DoWStruct_T lNewDoW = lDoW.shift (lNbOfDaysOffset); + const DoWStruct& lDoW = getDoW(); + const DoWStruct lNewDoW = lDoW.shift (lNbOfDaysOffset); - return PeriodStruct_T (lNewDateRange, lNewDoW); + return PeriodStruct (lNewDateRange, lNewDoW); } // //////////////////////////////////////////////////////////////////// - PeriodStruct_T PeriodStruct_T:: - intersection (const PeriodStruct_T& iPeriodStruct) const { + PeriodStruct PeriodStruct:: + intersection (const PeriodStruct& iPeriodStruct) const { const DatePeriod_T lNewDateRange = _dateRange.intersection (iPeriodStruct._dateRange); - const DoWStruct_T lNewDoW = _dow.intersection (iPeriodStruct._dow); + const DoWStruct lNewDoW = _dow.intersection (iPeriodStruct._dow); - return PeriodStruct_T (lNewDateRange, lNewDoW); + return PeriodStruct (lNewDateRange, lNewDoW); } // //////////////////////////////////////////////////////////////////// - const bool PeriodStruct_T::isValid () const { + const bool PeriodStruct::isValid () const { if (_dateRange.is_null() == false && _dow.isValid()) { return true; } Modified: trunk/stdair/stdair/bom/PeriodStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/PeriodStruct.hpp 2010-10-14 13:37:06 UTC (rev 347) +++ trunk/stdair/stdair/bom/PeriodStruct.hpp 2010-10-14 16:40:17 UTC (rev 348) @@ -15,14 +15,14 @@ /** Define a departure period <br> A period is defined by a date range and a day-of-week struct. */ - struct PeriodStruct_T : public StructAbstract { + struct PeriodStruct : public StructAbstract { public: // ////////// Getters ///////////// /** Retrieve the attributes. */ const DatePeriod_T& getDateRange () const { return _dateRange; } - const DoWStruct_T& getDoW () const { + const DoWStruct& getDoW () const { return _dow; } @@ -32,7 +32,7 @@ void setDateRange (const DatePeriod_T& iDateRange) { _dateRange = iDateRange; } - void setDoW (const DoWStruct_T& iDoW) { _dow = iDoW; } + void setDoW (const DoWStruct& iDoW) { _dow = iDoW; } public: /** Display explicitly (e.g., "Mon.Tue.Wed.Thu.Fri."). */ @@ -44,28 +44,28 @@ public: // /////////// Business Methods ///////////// /** Build a period struct from this period struct by adding a date offset. */ - PeriodStruct_T addDateOffset (const DateOffset_T&) const; + PeriodStruct addDateOffset (const DateOffset_T&) const; /** Build a new period struct which is the intersection of two period structs. */ - PeriodStruct_T intersection (const PeriodStruct_T&) const; + PeriodStruct intersection (const PeriodStruct&) const; /** Return if the period is valid (i.e., valid date range and valid DoW). */ const bool isValid () const; public: /** Constructor. */ - PeriodStruct_T (const DatePeriod_T&, const DoWStruct_T&); + PeriodStruct (const DatePeriod_T&, const DoWStruct&); /** Default constructors. */ - PeriodStruct_T (); - PeriodStruct_T (const PeriodStruct_T&); + PeriodStruct (); + PeriodStruct (const PeriodStruct&); /** Default destructor. */ - ~PeriodStruct_T () { } + ~PeriodStruct () { } private: // Attributes DatePeriod_T _dateRange; - DoWStruct_T _dow; + DoWStruct _dow; }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gsa...@us...> - 2010-10-14 13:37:13
|
Revision: 347 http://stdair.svn.sourceforge.net/stdair/?rev=347&view=rev Author: gsabatier Date: 2010-10-14 13:37:06 +0000 (Thu, 14 Oct 2010) Log Message: ----------- Added a sample for the FareFamily Modified Paths: -------------- trunk/stdair/batches/stdair.cpp Modified: trunk/stdair/batches/stdair.cpp =================================================================== --- trunk/stdair/batches/stdair.cpp 2010-10-14 11:16:22 UTC (rev 346) +++ trunk/stdair/batches/stdair.cpp 2010-10-14 13:37:06 UTC (rev 347) @@ -27,6 +27,8 @@ #include <stdair/bom/SegmentDateTypes.hpp> #include <stdair/bom/SegmentCabin.hpp> #include <stdair/bom/SegmentCabinTypes.hpp> +#include <stdair/bom/FareFamily.hpp> +#include <stdair/bom/FareFamilyTypes.hpp> #include <stdair/bom/BookingClass.hpp> #include <stdair/bom/BookingClassTypes.hpp> #include <stdair/factory/FacBomManager.hpp> @@ -72,6 +74,7 @@ // Declare a group of options that will be allowed both on command // line and in config file + boost::program_options::options_description config ("Configuration"); config.add_options() ("builtin,b", @@ -298,39 +301,74 @@ // Display the leg-cabin // STDAIR_LOG_DEBUG ("LegCabin: " << lBKKLegYCabin.toString()); - // Step 0.7: booking class level - // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y on BA's Inv + // Step 0.7: fare family level + // Create a FareFamily (1) for the Segment LHR-BKK, cabin Y on BA's Inv + const stdair::FamilyCode_T l1 ("1"); + stdair::FareFamilyKey l1FareFamilyKey (l1); + + stdair::FareFamily& lLHRBKKSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin, + lLHRBKKSegmentYCabin1Family); + + // Display the booking class + // STDAIR_LOG_DEBUG ("FareFamily: " + // << lLHRBKKSegmentYCabin1Family.toString()); + + // Create a FareFamily (1) for the Segment BKK-SYD, cabin Y on BA's Inv + stdair::FareFamily& lBKKSYDSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin, + lBKKSYDSegmentYCabin1Family); + + // Display the booking class + // STDAIR_LOG_DEBUG ("FareFamily: " + // << lLHRBKKSegmentYCabin1Family.toString()); + + // Create a FareFamily (1) for the Segment LHR-SYD, cabin Y on BA's Inv + stdair::FareFamily& lLHRSYDSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); + stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin, + lLHRSYDSegmentYCabin1Family); + + // Display the booking class + // STDAIR_LOG_DEBUG ("FareFamily: " + // << lLHRBKKSegmentYCabin1Family.toString()); + + + // Step 0.8: booking class level + // Create a BookingClass (Q) for the Segment LHR-BKK, cabin Y, fare family 1 on BA's Inv const stdair::ClassCode_T lQ ("Q"); stdair::BookingClassKey lQBookingClassKey (lQ); - stdair::BookingClass& lLHRBKKSegmentYCabinQClass = + stdair::BookingClass& lLHRBKKSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin, - lLHRBKKSegmentYCabinQClass); + stdair::FacBomManager::instance().addToList (lLHRBKKSegmentYCabin1Family, + lLHRBKKSegmentYCabin1FamilyQClass); // Display the booking class // STDAIR_LOG_DEBUG ("BookingClass: " - // << lLHRBKKSegmentYCabinQClass.toString()); + // << lLHRBKKSegmentYCabin1FamilyQClass.toString()); - // Create a BookingClass (Q) for the Segment BKK-LHR, cabin Y - stdair::BookingClass& lBKKSYDSegmentYCabinQClass = + // Create a BookingClass (Q) for the Segment BKK-SYD, cabin Y, fare family 1 on BA's Inv + stdair::BookingClass& lBKKSYDSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin, - lBKKSYDSegmentYCabinQClass); + stdair::FacBomManager::instance().addToList (lBKKSYDSegmentYCabin1Family, + lBKKSYDSegmentYCabin1FamilyQClass); // Display the booking class // STDAIR_LOG_DEBUG ("BookingClass: " - // << lLHRBKKSegmentYCabinQClass.toString()); + // << lLHRBKKSegmentYCabin1FamilyQClass.toString()); - // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y - stdair::BookingClass& lLHRSYDSegmentYCabinQClass = + // Create a BookingClass (Q) for the Segment LHR-SYD, cabin Y, fare family 1 on BA's Inv + stdair::BookingClass& lLHRSYDSegmentYCabin1FamilyQClass = stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); - stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin, - lLHRSYDSegmentYCabinQClass); + stdair::FacBomManager::instance().addToList (lLHRSYDSegmentYCabin1Family, + lLHRSYDSegmentYCabin1FamilyQClass); // Display the booking class // STDAIR_LOG_DEBUG ("BookingClass: " - // << lLHRBKKSegmentYCabinQClass.toString()); + // << lLHRBKKSegmentYCabin1FamilyQClass.toString()); // ////// AF /////// @@ -391,16 +429,29 @@ // Display the leg-cabin // STDAIR_LOG_DEBUG ("LegCabin: " << lLHRLegYCabin.toString()); - // Step 0.7: booking class level - // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y on AF's Inv - stdair::BookingClass& lCDGSFOSegmentYCabinQClass = - stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); + + // Step 0.7: fare family level + // Create a fareFamily (1) for the Segment CDG-SFO, cabin Y on AF's Inv + stdair::FareFamily& lCDGSFOSegmentYCabin1Family = + stdair::FacBom<stdair::FareFamily>::instance().create(l1FareFamilyKey); stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin, - lCDGSFOSegmentYCabinQClass); + lCDGSFOSegmentYCabin1Family); + // Display the fare family + // STDAIR_LOG_DEBUG ("fareFamily: " + // + // << lCDGSFOSegmentYCabin1Family.toString()); + + // Step 0.8: booking class level + // Create a BookingClass (Q) for the Segment CDG-SFO, cabin Y, fare family 1 on AF's Inv + stdair::BookingClass& lCDGSFOSegmentYCabin1FamilyQClass = + stdair::FacBom<stdair::BookingClass>::instance().create(lQBookingClassKey); + stdair::FacBomManager::instance().addToList (lCDGSFOSegmentYCabin1Family, + lCDGSFOSegmentYCabin1FamilyQClass); + // Display the booking class // STDAIR_LOG_DEBUG ("BookingClass: " - // << lCDGSFOSegmentYCabinQClass.toString()); + // << lCDGSFOSegmentYCabin1FamilyQClass.toString()); // /////////// Step 1.0: Display the BOM tree ////////// @@ -435,7 +486,7 @@ const stdair::LegDate* lLD_ptr = *itLD; assert (lLD_ptr != NULL); - // STDAIR_LOG_DEBUG ("LegDate: " << lLD_ptr->toString()); + // STDAIR_LOG_DEBUG ("LegDate: " <<f9 lLD_ptr->toString()); STDAIR_LOG_DEBUG (" " << lLD_ptr->toString()); // 1.6. LegCabin level @@ -476,17 +527,30 @@ // STDAIR_LOG_DEBUG ("SegmentCabin: " << lSC_ptr->toString()); STDAIR_LOG_DEBUG (" " << lSC_ptr->toString()); - // 1.7. BookingClass level - const stdair::BookingClassList_T& lBookingClassList = - stdair::BomManager::getList<stdair::BookingClass> (*lSC_ptr); - for (stdair::BookingClassList_T::const_iterator itBC = - lBookingClassList.begin(); - itBC != lBookingClassList.end(); ++itBC) { - const stdair::BookingClass* lBC_ptr = *itBC; - assert (lBC_ptr != NULL); + // 1.7. FareFamily level + const stdair::FareFamilyList_T& lFareFamilyList = + stdair::BomManager::getList<stdair::FareFamily> (*lSC_ptr); + for (stdair::FareFamilyList_T::const_iterator itFF = + lFareFamilyList.begin(); + itFF != lFareFamilyList.end(); ++itFF) { + const stdair::FareFamily* lFF_ptr = *itFF; + assert (lFF_ptr != NULL); - // STDAIR_LOG_DEBUG ("BookingClass: " << lBC_ptr->toString()); - STDAIR_LOG_DEBUG (" " << lBC_ptr->toString()); + // STDAIR_LOG_DEBUG ("FareFamily: " << lFF_ptr->toString()); + STDAIR_LOG_DEBUG (" " << lFF_ptr->toString()); + + // 1.8. BookingClass level + const stdair::BookingClassList_T& lBookingClassList = + stdair::BomManager::getList<stdair::BookingClass> (*lFF_ptr); + for (stdair::BookingClassList_T::const_iterator itBC = + lBookingClassList.begin(); + itBC != lBookingClassList.end(); ++itBC) { + const stdair::BookingClass* lBC_ptr = *itBC; + assert (lBC_ptr != NULL); + + // STDAIR_LOG_DEBUG ("BookingClass: " << lBC_ptr->toString()); + STDAIR_LOG_DEBUG (" " << lBC_ptr->toString()); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <den...@us...> - 2010-10-14 11:16:28
|
Revision: 346 http://stdair.svn.sourceforge.net/stdair/?rev=346&view=rev Author: denis_arnaud Date: 2010-10-14 11:16:22 +0000 (Thu, 14 Oct 2010) Log Message: ----------- [Release] Created the main 0.6.0 release branch, from revision r344. Added Paths: ----------- branches/stdair/0.6.0/main/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |