From: <den...@us...> - 2010-12-03 15:09:57
|
Revision: 384 http://stdair.svn.sourceforge.net/stdair/?rev=384&view=rev Author: denis_arnaud Date: 2010-12-03 15:09:51 +0000 (Fri, 03 Dec 2010) Log Message: ----------- [API] Fixed a few compilation errors with the new API. Modified Paths: -------------- trunk/stdair/stdair/bom/TravelSolutionStruct.hpp trunk/stdair/stdair/stdair_basic_types.hpp trunk/stdair/stdair/stdair_fare_types.hpp trunk/stdair/stdair/stdair_inventory_types.hpp Modified: trunk/stdair/stdair/bom/TravelSolutionStruct.hpp =================================================================== --- trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-12-03 15:09:36 UTC (rev 383) +++ trunk/stdair/stdair/bom/TravelSolutionStruct.hpp 2010-12-03 15:09:51 UTC (rev 384) @@ -19,27 +19,38 @@ struct TravelSolutionStruct : public StructAbstract { public: // /////////// Getters /////////////// + /** Get the fare/price. */ + const Fare_T getFare() const { + return _fare; + } + /** Get the availability. */ + const Availability_T getAvailability() const { + return _availability; + } + /** Get the list of segment-date keys. */ const KeyList_T& getSegmentDateKeyList () const { return _segmentDateKeyList; } + /** Get the list of booking-class keys. */ const ClassList_String_T& getBookingClassKeyList () const { return _bookingClassKeyList; } - const Fare_T getFare() const { return _fare; } - const Availability_T getAvailability() const { return _availability; } public: // /////////// Setters /////////////// - /** Setter for some attributes. */ + /** Set the fare/price. */ void setFare (const Fare_T& iFare) { _fare = iFare; } + /** Set the availability. */ void setAvailability (const Availability_T& iAvail) { _availability=iAvail; } + /** Add a segment-date key to the dedicated list. */ void addSegmentDateKey (const std::string& iKey) { _segmentDateKeyList.push_back (iKey); } + /** Add a booking-class key to the dedicated list. */ void addBookingClassKey (const char iKey) { _bookingClassKeyList.push_back (iKey); } Modified: trunk/stdair/stdair/stdair_basic_types.hpp =================================================================== --- trunk/stdair/stdair/stdair_basic_types.hpp 2010-12-03 15:09:36 UTC (rev 383) +++ trunk/stdair/stdair/stdair_basic_types.hpp 2010-12-03 15:09:51 UTC (rev 384) @@ -96,6 +96,21 @@ (in a travel solution block). */ typedef unsigned short NbOfTravelSolutions_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 an availability. */ + typedef double Availability_T; + + /** Define the price of a travel solution. */ + typedef double Fare_T; + // ///////////// Technical //////////////// /** File or directory name. <br>It may contain paths, relative or absolute (e.g., /foo/bar Modified: trunk/stdair/stdair/stdair_fare_types.hpp =================================================================== --- trunk/stdair/stdair/stdair_fare_types.hpp 2010-12-03 15:09:36 UTC (rev 383) +++ trunk/stdair/stdair/stdair_fare_types.hpp 2010-12-03 15:09:51 UTC (rev 384) @@ -11,8 +11,5 @@ /** 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 Modified: trunk/stdair/stdair/stdair_inventory_types.hpp =================================================================== --- trunk/stdair/stdair/stdair_inventory_types.hpp 2010-12-03 15:09:36 UTC (rev 383) +++ trunk/stdair/stdair/stdair_inventory_types.hpp 2010-12-03 15:09:51 UTC (rev 384) @@ -32,15 +32,6 @@ /** 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; @@ -70,10 +61,7 @@ /** 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. */ + /** Define an availability status (AVS). */ typedef bool AvailabilityStatus_T; /** Define a list of availabilities. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |