Public Member Functions | Protected Member Functions | List of all members
openfluid::ware::SimulationDrivenWare Class Reference

#include <ware/SimulationDrivenWare.hpp>

Inheritance diagram for openfluid::ware::SimulationDrivenWare:
Inheritance graph
[legend]
Collaboration diagram for openfluid::ware::SimulationDrivenWare:
Collaboration graph
[legend]

Public Member Functions

virtual ~SimulationDrivenWare ()
 
void linkToSimulation (const openfluid::base::SimulationStatus *SimStatus)
 
void linkToSimulationLogger (openfluid::base::SimulationLogger *SimLogger)
 
void initializeWare (const WareID_t &ID)
 
void finalizeWare ()
 
void setPreviousTimeIndex (const openfluid::core::TimeIndex_t &TimeIndex)
 
- Public Member Functions inherited from openfluid::ware::PluggableWare
virtual ~PluggableWare ()
 
void linkToRunEnvironment (const openfluid::core::MapValue *Env)
 

Protected Member Functions

virtual bool isLinked () const
 
void appendToLog (openfluid::tools::FileLogger::LogType LType, const std::string &Msg) const
 
void displayToConsole (openfluid::tools::FileLogger::LogType LType, const std::string &Msg) const
 
openfluid::base::ExceptionContext computeWareContext (const std::string &CodeLoc="") const
 
openfluid::base::ExceptionContext computeFrameworkContext (const std::string &CodeLoc="") const
 
openfluid::core::DateTime OPENFLUID_GetBeginDate () const
 
openfluid::core::DateTime OPENFLUID_GetEndDate () const
 
openfluid::core::DateTime OPENFLUID_GetCurrentDate () const
 
openfluid::core::Duration_t OPENFLUID_GetSimulationDuration () const
 
openfluid::core::Duration_t OPENFLUID_GetDefaultDeltaT () const
 
openfluid::core::TimeIndex_t OPENFLUID_GetCurrentTimeIndex () const
 
openfluid::core::TimeIndex_t OPENFLUID_GetPreviousRunTimeIndex () const
 
openfluid::base::SimulationStatus::SimulationStage OPENFLUID_GetCurrentStage () const
 
std::string OPENFLUID_GetCurrentStageAsString () const
 
openfluid::base::SimulationStatus::SchedulingConstraint OPENFLUID_GetSchedulingConstraint () const
 
virtual void OPENFLUID_RaiseWarning (const std::string &Msg)
 
virtual void OPENFLUID_RaiseWarning (const std::string &Source, const std::string &Msg) OPENFLUID_DEPRECATED
 
virtual void OPENFLUID_RaiseError (const std::string &Msg)
 
virtual void OPENFLUID_RaiseError (const std::string &Source, const std::string &Msg) OPENFLUID_DEPRECATED
 
 SimulationDrivenWare (WareType WType)
 
- Protected Member Functions inherited from openfluid::ware::PluggableWare
bool OPENFLUID_GetRunEnvironment (const std::string &Key, std::string &Val)
 
bool OPENFLUID_GetRunEnvironment (const std::string &Key, bool &Val)
 
WareID_t OPENFLUID_GetWareID () const
 
WareType OPENFLUID_GetWareType () const
 
 PluggableWare (WareType WType)
 

Additional Inherited Members

- Static Public Member Functions inherited from openfluid::ware::PluggableWare
static bool isWellFormated (const openfluid::ware::WareParamKey_t &ParameterKey)
 
- Protected Attributes inherited from openfluid::ware::PluggableWare
bool m_Initialized
 

Constructor & Destructor Documentation

openfluid::ware::SimulationDrivenWare::SimulationDrivenWare ( WareType  WType)
inlineprotected
virtual openfluid::ware::SimulationDrivenWare::~SimulationDrivenWare ( )
inlinevirtual

Member Function Documentation

void openfluid::ware::SimulationDrivenWare::appendToLog ( openfluid::tools::FileLogger::LogType  LType,
const std::string &  Msg 
) const
protected
openfluid::base::ExceptionContext openfluid::ware::SimulationDrivenWare::computeFrameworkContext ( const std::string &  CodeLoc = "") const
protected
openfluid::base::ExceptionContext openfluid::ware::SimulationDrivenWare::computeWareContext ( const std::string &  CodeLoc = "") const
protected
void openfluid::ware::SimulationDrivenWare::displayToConsole ( openfluid::tools::FileLogger::LogType  LType,
const std::string &  Msg 
) const
protected
void openfluid::ware::SimulationDrivenWare::finalizeWare ( )
virtual

Reimplemented from openfluid::ware::PluggableWare.

void openfluid::ware::SimulationDrivenWare::initializeWare ( const WareID_t ID)
virtual

Reimplemented from openfluid::ware::PluggableWare.

virtual bool openfluid::ware::SimulationDrivenWare::isLinked ( ) const
inlineprotectedvirtual
void openfluid::ware::SimulationDrivenWare::linkToSimulation ( const openfluid::base::SimulationStatus SimStatus)
void openfluid::ware::SimulationDrivenWare::linkToSimulationLogger ( openfluid::base::SimulationLogger SimLogger)
inline
openfluid::core::DateTime openfluid::ware::SimulationDrivenWare::OPENFLUID_GetBeginDate ( ) const
protected

Returns the real beginning date of the simulated period

Returns
the date
openfluid::core::DateTime openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentDate ( ) const
protected

Returns the current real date corresponding to the current time index

Returns
the date
openfluid::base::SimulationStatus::SimulationStage openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentStage ( ) const
protected

Returns the current stage of the simulation

Returns
the stage
std::string openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentStageAsString ( ) const
protected
openfluid::core::TimeIndex_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetCurrentTimeIndex ( ) const
protected

Returns the current time index of the simulation, in seconds since the simulation started. When the simulation starts, the time index is equal to zero.

Returns
the current time index in seconds
openfluid::core::Duration_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetDefaultDeltaT ( ) const
protected

Returns the default DeltaT used by the scheduler

Returns
the deltaT in seconds
openfluid::core::DateTime openfluid::ware::SimulationDrivenWare::OPENFLUID_GetEndDate ( ) const
protected

Returns the real ending date of the simulated period

Returns
the date
openfluid::core::TimeIndex_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetPreviousRunTimeIndex ( ) const
protected

Returns the time index of the simulation when the plugged ware was previously run

Returns
the time index in seconds
openfluid::base::SimulationStatus::SchedulingConstraint openfluid::ware::SimulationDrivenWare::OPENFLUID_GetSchedulingConstraint ( ) const
protected

Returns the scheduling constraint applied to the simulation (may be NONE)

Returns
the constraint type
openfluid::core::Duration_t openfluid::ware::SimulationDrivenWare::OPENFLUID_GetSimulationDuration ( ) const
protected

Returns the simulation duration in seconds

Returns
the duration in seconds
virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseError ( const std::string &  Msg)
protectedvirtual

Raises an error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters
[in]Msgthe content of the message

Reimplemented from openfluid::ware::PluggableWare.

virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseError ( const std::string &  Source,
const std::string &  Msg 
)
protectedvirtual

Raises an error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters
[in]Sourcethe source of the message
[in]Msgthe content of the message
Deprecated:
Since version 2.1.0. Use openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseError(const std::string&) instead
virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseWarning ( const std::string &  Msg)
protectedvirtual

Raises a time-marked warning message to the kernel. This does not stops the simulation

Parameters
[in]Msgthe content of the message
virtual void openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseWarning ( const std::string &  Source,
const std::string &  Msg 
)
protectedvirtual

Raises a time-marked warning message to the kernel. This does not stops the simulation

Parameters
[in]Sourcethe source of the message
[in]Msgthe content of the message
Deprecated:
Since version 2.1.0. Use openfluid::ware::SimulationDrivenWare::OPENFLUID_RaiseWarning(const std::string&) or OPENFLUID_LogWarning instead
void openfluid::ware::SimulationDrivenWare::setPreviousTimeIndex ( const openfluid::core::TimeIndex_t TimeIndex)
inline

The documentation for this class was generated from the following file: