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

#include <stdair/bom/EventStruct.hpp>

Inheritance diagram for stdair::EventStruct:

List of all members.

Public Member Functions

const EventType::EN_EventTypegetEventType () const
const BookingRequestStructgetBookingRequest () const
const CancellationStructgetCancellation () const
const
OptimisationNotificationStruct
getOptimisationNotificationStruct () const
const SnapshotStructgetSnapshotStruct () const
const RMEventStructgetRMEvent () 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 EventStruct &)
 ~EventStruct ()
void toStream (std::ostream &ioOut) const

Friends

struct EventQueue

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 35 of file EventStruct.hpp.


Constructor & Destructor Documentation

stdair::EventStruct::EventStruct ( )

Default constructor.

Definition at line 25 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 30 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 54 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 79 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 104 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 129 of file EventStruct.cpp.

References stdair::DEFAULT_EVENT_OLDEST_DATETIME.

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

Copy constructor.

Definition at line 154 of file EventStruct.cpp.

stdair::EventStruct::~EventStruct ( )

Destructor.

Definition at line 208 of file EventStruct.cpp.


Member Function Documentation

const EventType::EN_EventType& stdair::EventStruct::getEventType ( ) const [inline]

Get the event type

Definition at line 42 of file EventStruct.hpp.

Referenced by stdair::EventQueue::popEvent().

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 52 of file EventStruct.hpp.

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 63 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 76 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 88 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 100 of file EventStruct.hpp.

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 212 of file EventStruct.cpp.

const std::string stdair::EventStruct::describe ( ) const [virtual]
void stdair::StructAbstract::toStream ( std::ostream &  ioOut) const [inline, inherited]

Friends And Related Function Documentation

friend struct EventQueue [friend]

Definition at line 37 of file EventStruct.hpp.


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