|
From: <den...@us...> - 2010-07-23 14:59:34
|
Revision: 105
http://dsim.svn.sourceforge.net/dsim/?rev=105&view=rev
Author: denis_arnaud
Date: 2010-07-23 14:59:27 +0000 (Fri, 23 Jul 2010)
Log Message:
-----------
[Dev] Replaced the new XXX_Service() by boost::make_shared<XXX_Service>().
Modified Paths:
--------------
trunk/dsim/dsim/command/DBManager.cpp
trunk/dsim/dsim/service/DSIM_Service.cpp
Modified: trunk/dsim/dsim/command/DBManager.cpp
===================================================================
--- trunk/dsim/dsim/command/DBManager.cpp 2010-07-20 23:45:35 UTC (rev 104)
+++ trunk/dsim/dsim/command/DBManager.cpp 2010-07-23 14:59:27 UTC (rev 105)
@@ -142,14 +142,14 @@
DBManager::prepareSelectOnAirlineCodeStatement (ioSociSession,
lSelectStatement,
iAirlineCode, ioAirline);
- const bool shouldDoReset = true;
+ //const bool shouldDoReset = true;
bool hasStillData = iterateOnStatement (lSelectStatement, ioAirline);
if (hasStillData == true) {
oHasRetrievedAirline = true;
}
// Sanity check
- const bool shouldNotDoReset = false;
+ //const bool shouldNotDoReset = false;
hasStillData = iterateOnStatement (lSelectStatement, ioAirline);
// Debug
Modified: trunk/dsim/dsim/service/DSIM_Service.cpp
===================================================================
--- trunk/dsim/dsim/service/DSIM_Service.cpp 2010-07-20 23:45:35 UTC (rev 104)
+++ trunk/dsim/dsim/service/DSIM_Service.cpp 2010-07-23 14:59:27 UTC (rev 105)
@@ -4,6 +4,8 @@
// STL
#include <cassert>
#include <ostream>
+// Boost
+#include <boost/make_shared.hpp>
// SOCI
#include <soci/core/soci.h>
// StdAir
@@ -104,8 +106,7 @@
// Note that the track on the object memory is kept thanks to the Boost
// Smart Pointers component.
stdair::STDAIR_ServicePtr_T lSTDAIR_Service_ptr =
- stdair::STDAIR_ServicePtr_T (new stdair::STDAIR_Service (iLogParams,
- iDBParams));
+ boost::make_shared<stdair::STDAIR_Service> (iLogParams, iDBParams);
// Retrieve the root of the BOM tree, on which all of the other BOM objects
// will be attached
@@ -136,17 +137,16 @@
// on the Service object, and deletes that object when it is no longer
// referenced (e.g., at the end of the process).
SIMCRS_ServicePtr_T lSIMCRS_Service =
- SIMCRS_ServicePtr_T (new SIMCRS::SIMCRS_Service (lSTDAIR_Service_ptr,
- lCRSCode,
- iScheduleInputFilename));
+ boost::make_shared<SIMCRS::SIMCRS_Service> (lSTDAIR_Service_ptr,
+ lCRSCode,
+ iScheduleInputFilename);
lDSIM_ServiceContext.setSIMCRS_Service (lSIMCRS_Service);
// TODO: do not hardcode the demand input file.
// Initialise the TRADEMGEN service handler
TRADEMGEN_ServicePtr_T lTRADEMGEN_Service =
- TRADEMGEN_ServicePtr_T (new TRADEMGEN::
- TRADEMGEN_Service (lSTDAIR_Service_ptr,
- iDemandInputFilename));
+ boost::make_shared<TRADEMGEN::TRADEMGEN_Service> (lSTDAIR_Service_ptr,
+ iDemandInputFilename);
lDSIM_ServiceContext.setTRADEMGEN_Service (lTRADEMGEN_Service);
}
@@ -195,7 +195,7 @@
throw NonInitialisedServiceException();
}
assert (_dsimServiceContext != NULL);
- DSIM_ServiceContext& lDSIM_ServiceContext = *_dsimServiceContext;
+ //DSIM_ServiceContext& lDSIM_ServiceContext = *_dsimServiceContext;
// Get the date-time for the present time
boost::posix_time::ptime lNowDateTime =
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|