TvlSim Logo  1.01.6
C++ Simulated Travel-Oriented Distribution System Library
Loading...
Searching...
No Matches
ConfigExport.cpp
Go to the documentation of this file.
1// //////////////////////////////////////////////////////////////////////
2// Import section
3// //////////////////////////////////////////////////////////////////////
4#include <stdlib.h>
5// StdAir
6#include <stdair/STDAIR_Service.hpp>
7// TVLSIM
10
11
12namespace TVLSIM {
13
14 // ////////////////////////////////////////////////////////////////////
16 updateSimulationStatus (stdair::STDAIR_Service& ioSTDAIR_Service,
17 SimulationStatus& ioSimulationStatus,
18 const stdair::Date_T& iStartDate,
19 const stdair::Date_T& iEndDate,
20 const NbOfRuns_T& iNbOfRuns) {
21
22 // Look for the start and end date in the configuration holder.
23 stdair::Date_T lStartDate (iStartDate);
24 const bool hasStartDateBeenRetrieved =
25 ioSTDAIR_Service.exportConfigValue<stdair::Date_T> (lStartDate,
26 "date.start");
27 assert (hasStartDateBeenRetrieved == true);
28 stdair::Date_T lEndDate (iEndDate);
29 const bool hasEndDateBeenRetrieved =
30 ioSTDAIR_Service.exportConfigValue<stdair::Date_T> (lEndDate,
31 "date.end");
32 assert (hasEndDateBeenRetrieved == true);
33 // Look for the number of runs in the configuration holder.
34 NbOfRuns_T lTotalNumberOfRuns (iNbOfRuns);
35 const bool hasNumberOfRunsBeenRetrieved =
36 ioSTDAIR_Service.exportConfigValue<NbOfRuns_T> (lTotalNumberOfRuns,
37 "runs.number");
38 assert (hasNumberOfRunsBeenRetrieved == true);
39
40 // Update the Simulation Status with the start date, end date and number
41 // of runs.
42 ioSimulationStatus.setSimulationPeriod (lStartDate, lEndDate);
43 ioSimulationStatus.setTotalNumberOfRuns(lTotalNumberOfRuns);
44
45
46
47 }
48}
static void updateSimulationStatus(stdair::STDAIR_Service &, SimulationStatus &, const stdair::Date_T &iStartDate, const stdair::Date_T &iEndDate, const NbOfRuns_T &)
unsigned int NbOfRuns_T
void setSimulationPeriod(const stdair::Date_T &iStartDate, const stdair::Date_T &iEndDate)
void setTotalNumberOfRuns(const NbOfRuns_T &iNbOfRuns)