StdAir Logo  1.00.3
C++ Standard Airline IT Object Library
stdair::EventStruct Struct Reference

#include <stdair/bom/EventStruct.hpp>

+ Inheritance diagram for stdair::EventStruct:

Public Member Functions

const EventType::EN_EventTypegetEventType () const
 
const LongDuration_TgetEventTimeStamp () const
 
const DateTime_TgetEventTime () const
 
const BookingRequestStructgetBookingRequest () const
 
const CancellationStructgetCancellation () const
 
const OptimisationNotificationStructgetOptimisationNotificationStruct () const
 
const SnapshotStructgetSnapshotStruct () const
 
const RMEventStructgetRMEvent () const
 
const BreakPointStructgetBreakPoint () const
 
void fromStream (std::istream &ioIn)
 
const std::string describe () const
 
 EventStruct ()
 
 EventStruct (const EventType::EN_EventType &, BookingRequestPtr_T)
 
 EventStruct (const EventType::EN_EventType &, CancellationPtr_T)
 
 EventStruct (const EventType::EN_EventType &, const DateTime_T &iDCPDate, OptimisationNotificationPtr_T)
 
 EventStruct (const EventType::EN_EventType &, SnapshotPtr_T)
 
 EventStruct (const EventType::EN_EventType &, RMEventPtr_T)
 
 EventStruct (const EventType::EN_EventType &, BreakPointPtr_T)
 
 EventStruct (const EventStruct &)
 
 ~EventStruct ()
 
void incrementEventTimeStamp ()
 
void toStream (std::ostream &ioOut) const
 

Detailed Description

Structure holding the details of an event.

Note
No event should be scheduled before the date-time corresponding to the DEFAULT_EVENT_OLDEST_DATETIME constant (as of Feb. 2011, that date is set to Jan. 1, 2010). That constant is specified in the stdair/basic/BasConst.cpp file. In other words, the simulation should not specified to start before that date-time.

Definition at line 36 of file EventStruct.hpp.

Constructor & Destructor Documentation

stdair::EventStruct::EventStruct ( )

Default constructor.

Definition at line 26 of file EventStruct.cpp.

stdair::EventStruct::EventStruct ( const EventType::EN_EventType iEventType,
BookingRequestPtr_T  ioRequestPtr 
)

Constructor for events corresponding to booking requests.

Definition at line 31 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

stdair::EventStruct::EventStruct ( const EventType::EN_EventType iEventType,
CancellationPtr_T  ioCancellationPtr 
)

Constructor for events corresponding to cancellations.

Definition at line 55 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

stdair::EventStruct::EventStruct ( const EventType::EN_EventType iEventType,
const DateTime_T iDCPDate,
OptimisationNotificationPtr_T  ioOptimisationNotificationPtr 
)

Constructor for events corresponding to optimisation requests.

Definition at line 80 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

stdair::EventStruct::EventStruct ( const EventType::EN_EventType iEventType,
SnapshotPtr_T  ioSnapshotPtr 
)

Constructor for events corresponding to snapshot requests.

Definition at line 105 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

stdair::EventStruct::EventStruct ( const EventType::EN_EventType iEventType,
RMEventPtr_T  ioRMEventPtr 
)

Constructor for events corresponding to RM events.

Definition at line 130 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

stdair::EventStruct::EventStruct ( const EventType::EN_EventType iEventType,
BreakPointPtr_T  ioBreakPointPtr 
)

Constructor for events corresponding to Break Point events.

Definition at line 155 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

stdair::EventStruct::EventStruct ( const EventStruct iEventStruct)

Copy constructor.

Definition at line 180 of file EventStruct.cpp.

stdair::EventStruct::~EventStruct ( )

Destructor.

Definition at line 243 of file EventStruct.cpp.

Member Function Documentation

const EventType::EN_EventType& stdair::EventStruct::getEventType ( ) const
inline
const LongDuration_T& stdair::EventStruct::getEventTimeStamp ( ) const
inline

Get the event time stamp

Definition at line 46 of file EventStruct.hpp.

const DateTime_T & stdair::EventStruct::getEventTime ( ) const
const BookingRequestStruct& stdair::EventStruct::getBookingRequest ( ) const
inline

Get a reference on the booking request referred to by event.

Note
When that event is not of type booking request (EventType::BKG_REQ), an assertion fails.

Definition at line 59 of file EventStruct.hpp.

Referenced by stdair::BomJSONExport::jsonExportBookingRequestObject().

const CancellationStruct& stdair::EventStruct::getCancellation ( ) const
inline

Get a reference on the cancellation referred to by event.

Note
When that event is not of type cancellation (EventType::CX), an assertion fails.

Definition at line 70 of file EventStruct.hpp.

const OptimisationNotificationStruct& stdair::EventStruct::getOptimisationNotificationStruct ( ) const
inline

Get a reference on the optimisation notification referred to by event.

Note
When that event is not of type optimisation notification for optimisation notification (EventType::OPT_NOT_4_FD), an assertion fails.

Definition at line 83 of file EventStruct.hpp.

const SnapshotStruct& stdair::EventStruct::getSnapshotStruct ( ) const
inline

Get a reference on the snapshot referred to by event.

Note
When that event is not of type snapshot for snapshot (EventType::OPT_NOT_4_FD), an assertion fails.

Definition at line 95 of file EventStruct.hpp.

const RMEventStruct& stdair::EventStruct::getRMEvent ( ) const
inline

Get a reference on the RM event referred to by the generic event.

Note
When that event is not of type RM event for snapshot (EventType::OPT_NOT_4_FD), an assertion fails.

Definition at line 107 of file EventStruct.hpp.

const BreakPointStruct& stdair::EventStruct::getBreakPoint ( ) const
inline

Get a reference on the break point referred to by event.

Note
When that event is not of type booking break point (EventType::BRK_PT), an assertion fails.

Definition at line 118 of file EventStruct.hpp.

Referenced by stdair::BomJSONExport::jsonExportBreakPointObject().

void stdair::EventStruct::fromStream ( std::istream &  ioIn)
virtual

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Reimplemented from stdair::StructAbstract.

Definition at line 247 of file EventStruct.cpp.

void stdair::EventStruct::incrementEventTimeStamp ( )

Increment the date-time stamp which is counted in milliseconds.

This incrementation of one millisecond is needed when the insertion in the event queue failed, that is to say when an event with the exact same time stamp has already been inserted in the queue.

Definition at line 357 of file EventStruct.cpp.

void stdair::StructAbstract::toStream ( std::ostream &  ioOut) const
inlineinherited

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Definition at line 29 of file StructAbstract.hpp.

References stdair::StructAbstract::describe().


The documentation for this struct was generated from the following files: