|
From: <qua...@us...> - 2010-02-03 14:58:09
|
Revision: 59
http://dsim.svn.sourceforge.net/dsim/?rev=59&view=rev
Author: quannaus
Date: 2010-02-03 14:57:56 +0000 (Wed, 03 Feb 2010)
Log Message:
-----------
[dev] Implemented a sale.
Modified Paths:
--------------
trunk/dsim/dsim/command/Simulator.cpp
Modified: trunk/dsim/dsim/command/Simulator.cpp
===================================================================
--- trunk/dsim/dsim/command/Simulator.cpp 2010-01-29 16:02:46 UTC (rev 58)
+++ trunk/dsim/dsim/command/Simulator.cpp 2010-02-03 14:57:56 UTC (rev 59)
@@ -10,6 +10,7 @@
#include <stdair/STDAIR_Types.hpp>
#include <stdair/bom/OutboundPathTypes.hpp>
#include <stdair/bom/BookingRequestStruct.hpp>
+#include <stdair/bom/TravelSolutionStruct.hpp>
#include <stdair/service/Logger.hpp>
// Distribution
#include <simcrs/SIMCRS_Service.hpp>
@@ -64,19 +65,24 @@
const stdair::BookingRequestStruct& iBookingRequest) {
// Retrieve a list of travel solutions corresponding the given
// booking request.
- stdair::OutboundPathLightList_T lOutboundPathList =
+ stdair::TravelSolutionList_T lTravelSolutionList =
ioSIMCRS_Service.getTravelSolutions (iBookingRequest);
// Hardcode a travel solution choice.
- if (lOutboundPathList.empty() == false) {
- stdair::OutboundPath* lChosenTravelSolution_ptr = lOutboundPathList.at(0);
-
+ if (lTravelSolutionList.empty() == false) {
+ // DEBUG
+ STDAIR_LOG_DEBUG ("A travel solution is chosen.");
+
+ stdair::TravelSolutionStruct lChosenTravelSolution =
+ lTravelSolutionList.at(0);
// Get the number of seats in the request.
const stdair::NbOfSeats_T& lNbOfSeats = iBookingRequest.getPartySize();
+ // Make a sale.
+ ioSIMCRS_Service.sell (lChosenTravelSolution, lNbOfSeats);
- // Make a sale.
- assert (lChosenTravelSolution_ptr != NULL);
- ioSIMCRS_Service.sell (*lChosenTravelSolution_ptr, lNbOfSeats);
+ } else {
+ // DEBUG
+ STDAIR_LOG_DEBUG ("No travel solution is chosen.");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|