openfluid::base::PluggableFunction Class Reference

Abstract class for plugin interface. More...

Inheritance diagram for openfluid::base::PluggableFunction:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 PluggableFunction ()
virtual ~PluggableFunction ()
void setDataRepository (openfluid::core::CoreRepository *CoreData)
void setExecutionMessages (openfluid::base::ExecutionMessages *ExecMsgs)
void setFunctionEnvironment (openfluid::base::EnvironmentProperties *FuncEnv)
void setFunctionID (const openfluid::base::FuncID_t &FuncID)
void initLogger ()
virtual bool initParams (openfluid::core::FuncParamsMap_t Params)=0
virtual bool prepareData ()=0
virtual bool checkConsistency ()=0
virtual bool initializeRun (const SimulationInfo *SimInfo)=0
virtual bool runStep (const SimulationStatus *SimStatus)=0
virtual bool finalizeRun (const SimulationInfo *SimInfo)=0

Protected Member Functions

void OPENFLUID_GetVariable (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step, openfluid::core::ScalarValue *Value)
void OPENFLUID_GetVariable (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step, openfluid::core::VectorValue *Value)
void OPENFLUID_GetInputData (openfluid::core::Unit *UnitPtr, openfluid::core::InputDataName_t InputName, double *Value)
void OPENFLUID_GetInputData (openfluid::core::Unit *UnitPtr, openfluid::core::InputDataName_t InputName, long *Value)
void OPENFLUID_GetInputData (openfluid::core::Unit *UnitPtr, openfluid::core::InputDataName_t InputName, std::string *Value)
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const double &Value)
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const long &Value)
void OPENFLUID_SetInputData (openfluid::core::Unit *UnitPtr, const openfluid::core::InputDataName_t &InputName, const std::string &Value)
bool OPENFLUID_IsInputDataExist (openfluid::core::Unit *UnitPtr, openfluid::core::InputDataName_t InputName)
bool OPENFLUID_IsVariableExist (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName)
bool OPENFLUID_IsScalarVariableExist (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName)
bool OPENFLUID_IsVectorVariableExist (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName)
bool OPENFLUID_IsVariableExist (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step)
bool OPENFLUID_IsScalarVariableExist (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step)
bool OPENFLUID_IsVectorVariableExist (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step)
void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::ScalarValue Value)
void OPENFLUID_AppendVariable (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::VectorValue &Value)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step, openfluid::core::ScalarValue Value)
void OPENFLUID_SetVariable (openfluid::core::Unit *UnitPtr, openfluid::core::VariableName_t VarName, openfluid::core::TimeStep_t Step, openfluid::core::VectorValue Value)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, double *Value)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, long *Value)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, float *Value)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, int *Value)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, std::string *Value)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, std::vector< std::string > *Values)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, std::vector< double > *Values)
bool OPENFLUID_GetFunctionParameter (openfluid::core::FuncParamsMap_t Params, openfluid::core::FuncParamKey_t ParamName, std::vector< long > *Values)
void OPENFLUID_GetEvents (openfluid::core::Unit *UnitPtr, openfluid::core::DateTime BeginDate, openfluid::core::DateTime EndDate, openfluid::core::EventsCollection *Events)
void OPENFLUID_AppendEvent (openfluid::core::Unit *UnitPtr, openfluid::core::Event &Ev)
bool OPENFLUID_IsUnitClassExist (openfluid::core::UnitClass_t ClassName)
bool OPENFLUID_IsUnitExist (openfluid::core::UnitClass_t ClassName, openfluid::core::UnitID_t ID)
void OPENFLUID_GetUnitsCount (unsigned int &UnitsCount)
bool OPENFLUID_GetUnitsCount (const openfluid::core::UnitClass_t ClassName, unsigned int &UnitsCount)
bool OPENFLUID_GetUnit (const openfluid::core::UnitClass_t &ClassName, const openfluid::core::UnitID_t &ID, openfluid::core::Unit *aUnit)
openfluid::core::UnitOPENFLUID_GetUnit (const openfluid::core::UnitClass_t &ClassName, const openfluid::core::UnitID_t &ID)
void OPENFLUID_AddUnit (openfluid::core::UnitClass_t ClassName, openfluid::core::UnitID_t ID, openfluid::core::PcsOrd_t PcsOrder)
void OPENFLUID_DeleteUnit (openfluid::core::UnitClass_t ClassName, openfluid::core::UnitID_t ID)
bool OPENFLUID_AddFromToConnection (openfluid::core::UnitClass_t ClassNameFrom, openfluid::core::UnitID_t IDFrom, openfluid::core::UnitClass_t ClassNameTo, openfluid::core::UnitID_t IDTo)
bool OPENFLUID_AddFromToConnection (openfluid::core::Unit *FromUnit, openfluid::core::Unit *ToUnit)
bool OPENFLUID_RemoveFromToConnection (openfluid::core::UnitClass_t ClassNameFrom, openfluid::core::UnitID_t IDFrom, openfluid::core::UnitClass_t ClassNameTo, openfluid::core::UnitID_t IDTo)
bool OPENFLUID_RemoveFromToConnection (openfluid::core::Unit *FromUnit, openfluid::core::Unit *ToUnit)
bool OPENFLUID_AddChildParentConnection (openfluid::core::UnitClass_t ClassNameChild, openfluid::core::UnitID_t IDChild, openfluid::core::UnitClass_t ClassNameParent, openfluid::core::UnitID_t IDParent)
bool OPENFLUID_AddChildParentConnection (openfluid::core::Unit *ChildUnit, openfluid::core::Unit *ParentUnit)
bool OPENFLUID_RemoveChildParentConnection (openfluid::core::UnitClass_t ClassNameChild, openfluid::core::UnitID_t IDChild, openfluid::core::UnitClass_t ClassNameParent, openfluid::core::UnitID_t IDParent)
bool OPENFLUID_RemoveChildParentConnection (openfluid::core::Unit *ChildUnit, openfluid::core::Unit *ParentUnit)
bool OPENFLUID_IsUnitConnectedTo (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameTo, const openfluid::core::UnitID_t &IDTo)
bool OPENFLUID_IsUnitConnectedFrom (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameFrom, const openfluid::core::UnitID_t &IDFrom)
bool OPENFLUID_IsUnitChildOf (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameParent, const openfluid::core::UnitID_t &IDParent)
bool OPENFLUID_IsUnitParentOf (openfluid::core::Unit *aUnit, const openfluid::core::UnitClass_t &ClassNameChild, const openfluid::core::UnitID_t &IDChild)
void OPENFLUID_BuildUnitsMatrix (const openfluid::core::UnitClass_t &UnitsClass, const unsigned int &ColsNbr, const unsigned int &RowsNbr)
void OPENFLUID_ExportUnitsGraphAsDotFile (const std::string &Filename)
void OPENFLUID_RaiseWarning (std::string Sender, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseWarning (std::string Sender, std::string Msg)
void OPENFLUID_RaiseWarning (std::string Sender, std::string Source, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseWarning (std::string Sender, std::string Source, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, std::string Source, openfluid::core::TimeStep_t TimeStep, std::string Msg)
void OPENFLUID_RaiseError (std::string Sender, std::string Source, std::string Msg)
bool OPENFLUID_GetRunEnvironment (std::string Key, std::string *Value)
bool OPENFLUID_GetRunEnvironment (std::string Key, bool *Value)

Protected Attributes

openfluid::core::CoreRepositorymp_CoreData
StdoutAndFileOutputStream OPENFLUID_Logger

Detailed Description

Abstract class for plugin interface.

Abstract class for plugin interface, defining the minimal structure for a simulation function
All simulation functions must inherit from this class.

Author:
Jean-Christophe FABRE <fabrejc@supagro.inra.fr>

Constructor & Destructor Documentation

openfluid::base::PluggableFunction::PluggableFunction (  ) 

Constructor

virtual openfluid::base::PluggableFunction::~PluggableFunction (  )  [virtual]

Virtual destructor


Member Function Documentation

virtual bool openfluid::base::PluggableFunction::checkConsistency (  )  [pure virtual]

Checks the function consistency. Called by the kernel.

Implemented in openfluid::machine::FixedGenerator, openfluid::machine::InterpGenerator, and openfluid::machine::RandomGenerator.

virtual bool openfluid::base::PluggableFunction::finalizeRun ( const SimulationInfo SimInfo  )  [pure virtual]
virtual bool openfluid::base::PluggableFunction::initializeRun ( const SimulationInfo SimInfo  )  [pure virtual]
void openfluid::base::PluggableFunction::initLogger (  ) 
virtual bool openfluid::base::PluggableFunction::initParams ( openfluid::core::FuncParamsMap_t  Params  )  [pure virtual]

Initializes function parameters of the function, given as a hash map. Called by the kernel.

Implemented in openfluid::machine::Generator.

bool openfluid::base::PluggableFunction::OPENFLUID_AddChildParentConnection ( openfluid::core::Unit ChildUnit,
openfluid::core::Unit ParentUnit 
) [protected]

Adds a child-parent connection between two units

Parameters:
[in] ChildUnit pointer to the "child" unit
[in] ToUnit pointer to the "parent" unit
Returns:
false if the connection already exists
bool openfluid::base::PluggableFunction::OPENFLUID_AddChildParentConnection ( openfluid::core::UnitClass_t  ClassNameChild,
openfluid::core::UnitID_t  IDChild,
openfluid::core::UnitClass_t  ClassNameParent,
openfluid::core::UnitID_t  IDParent 
) [protected]

Adds a child-parent connection between two units

Parameters:
[in] ClassNameFrom class name of the "child" unit
[in] IDFrom ID of the "child" unit
[in] ClassNameFrom class name of the "parent" unit
[in] IDFrom ID of the "parent" unit
Returns:
false if the connection already exists
bool openfluid::base::PluggableFunction::OPENFLUID_AddFromToConnection ( openfluid::core::Unit FromUnit,
openfluid::core::Unit ToUnit 
) [protected]

Adds a from-to connection between two units

Parameters:
[in] FromUnit pointer to the "from" unit
[in] ToUnit pointer to the "to" unit
Returns:
false if the connection already exists
bool openfluid::base::PluggableFunction::OPENFLUID_AddFromToConnection ( openfluid::core::UnitClass_t  ClassNameFrom,
openfluid::core::UnitID_t  IDFrom,
openfluid::core::UnitClass_t  ClassNameTo,
openfluid::core::UnitID_t  IDTo 
) [protected]

Adds a from-to connection between two units

Parameters:
[in] ClassNameFrom class name of the "from" unit
[in] IDFrom ID of the "from" unit
[in] ClassNameFrom class name of the "to" unit
[in] IDFrom ID of the "to" unit
Returns:
false if the unit connection already exists
void openfluid::base::PluggableFunction::OPENFLUID_AddUnit ( openfluid::core::UnitClass_t  ClassName,
openfluid::core::UnitID_t  ID,
openfluid::core::PcsOrd_t  PcsOrder 
) [protected]

Adds a unit to the set of units if not already exists

Parameters:
[in] ClassName class name of the added unit
[in] ID ID of the added unit
void openfluid::base::PluggableFunction::OPENFLUID_AppendEvent ( openfluid::core::Unit UnitPtr,
openfluid::core::Event Ev 
) [protected]

Appends an event on a unit

Parameters:
[in] UnitPtr a Unit
[in] Ev the event to append
void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::VectorValue Value 
) [protected]

Appends a distributed vector variable value for a unit at the end of the previously added values for this variable

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the variable
[in] Value the added value of the variable
void openfluid::base::PluggableFunction::OPENFLUID_AppendVariable ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::ScalarValue  Value 
) [protected]

Appends a distributed scalar variable value for a unit at the end of the previously added values for this variable

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the variable
[in] Value the added value of the variable
void openfluid::base::PluggableFunction::OPENFLUID_BuildUnitsMatrix ( const openfluid::core::UnitClass_t UnitsClass,
const unsigned int &  ColsNbr,
const unsigned int &  RowsNbr 
) [protected]

Builds a ColsNbr x RowsNbr unix matrix with bi-directionnal connections

Parameters:
[in] UnitsClass the name of units class
[in] ColsNbr the number of units on the X axis
[in] RowsNbr the number of units on the Y axis
void openfluid::base::PluggableFunction::OPENFLUID_DeleteUnit ( openfluid::core::UnitClass_t  ClassName,
openfluid::core::UnitID_t  ID 
) [protected]

Deletes a unit from the set of units if exists

Parameters:
[in] ClassName class name of the removed unit
[in] ID ID of the added unit
Returns:
true if the unit has been correctly deleted
void openfluid::base::PluggableFunction::OPENFLUID_ExportUnitsGraphAsDotFile ( const std::string &  Filename  )  [protected]

Exports the graph of the landscape representation as a graphviz dot file. The file is saved in the output directory of the simulation.

Parameters:
[in] Filename the name of the export file
void openfluid::base::PluggableFunction::OPENFLUID_GetEvents ( openfluid::core::Unit UnitPtr,
openfluid::core::DateTime  BeginDate,
openfluid::core::DateTime  EndDate,
openfluid::core::EventsCollection Events 
) [protected]

Gets discrete events happening on a unit during a time period

Parameters:
[in] UnitPtr a Unit
[in] BeginDate the beginning of the time period
[in] EndDate the ending of the time period
[out] Events the collection of event corresponding to the request
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
std::vector< long > *  Values 
) [protected]

Gets a function parameter vector of values from the parameters set, as a vector of long ints

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Values the vector of values of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
std::vector< double > *  Values 
) [protected]

Gets a function parameter vector of values from the parameters set, as a vector of doubles

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Values the vector of values of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
std::vector< std::string > *  Values 
) [protected]

Gets a function parameter vector of values from the parameters set, as a vector of strings

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Values the vector of values of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
std::string *  Value 
) [protected]

Gets a function parameter value from the parameters set, as a string

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Value the value of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
int *  Value 
) [protected]

Gets a function parameter value from the parameters set, as an int

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Value the value of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
float *  Value 
) [protected]

Gets a function parameter from the parameters set, as a float

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Value the value of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
long *  Value 
) [protected]

Gets a function parameter value from the parameters set, as a long int

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Value the value of the requested parameter
bool openfluid::base::PluggableFunction::OPENFLUID_GetFunctionParameter ( openfluid::core::FuncParamsMap_t  Params,
openfluid::core::FuncParamKey_t  ParamName,
double *  Value 
) [protected]

Gets a function parameter from the parameters set, as a double

Parameters:
[in] Params the parameters set for the simulation function
[in] ParamName the name of the requested parameter
[out] Value the value of the requested parameter
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( openfluid::core::Unit UnitPtr,
openfluid::core::InputDataName_t  InputName,
std::string *  Value 
) [protected]

Gets input data for a unit, as a string

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the requested property
[out] Value the value of the requested property
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( openfluid::core::Unit UnitPtr,
openfluid::core::InputDataName_t  InputName,
long *  Value 
) [protected]

Gets input data for a unit, as a long integer

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the requested property
[out] Value the value of the requested property
void openfluid::base::PluggableFunction::OPENFLUID_GetInputData ( openfluid::core::Unit UnitPtr,
openfluid::core::InputDataName_t  InputName,
double *  Value 
) [protected]

Gets input data for a unit, as a double

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the requested property
[out] Value the value of the requested property
bool openfluid::base::PluggableFunction::OPENFLUID_GetRunEnvironment ( std::string  Key,
bool *  Value 
) [protected]

Gets an environment boolean value associated to a Key

Parameters:
[in] Key the sender of the message
[out] Value the value associated with the environment key
bool openfluid::base::PluggableFunction::OPENFLUID_GetRunEnvironment ( std::string  Key,
std::string *  Value 
) [protected]

Gets an environment string value associated to a Key

Parameters:
[in] Key the sender of the message
[out] Value the value associated with the environment key
openfluid::core::Unit* openfluid::base::PluggableFunction::OPENFLUID_GetUnit ( const openfluid::core::UnitClass_t ClassName,
const openfluid::core::UnitID_t ID 
) [protected]
bool openfluid::base::PluggableFunction::OPENFLUID_GetUnit ( const openfluid::core::UnitClass_t ClassName,
const openfluid::core::UnitID_t ID,
openfluid::core::Unit aUnit 
) [protected]

Returns a pointer to the queried unit if exists

Parameters:
[in] ClassName the queried class name
[in] ID the queried unit ID
[out] UnitPtr a pointer to the requested Unit, NULL if the unit does not exist
Returns:
false if the unit does not exist
bool openfluid::base::PluggableFunction::OPENFLUID_GetUnitsCount ( const openfluid::core::UnitClass_t  ClassName,
unsigned int &  UnitsCount 
) [protected]

Returns the number of units of the class if the queried unit class exists

Parameters:
[in] ClassName the queried class name
[out] UnitsCount the queried class name
Returns:
false if the unit class does not exist
void openfluid::base::PluggableFunction::OPENFLUID_GetUnitsCount ( unsigned int &  UnitsCount  )  [protected]

Returns the total number of units

Parameters:
[out] UnitsCount the queried class name
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step,
openfluid::core::VectorValue Value 
) [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
[in] Step the time step for the value of the requested variable
[out] Value the value of the requested variable (vector)
void openfluid::base::PluggableFunction::OPENFLUID_GetVariable ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step,
openfluid::core::ScalarValue Value 
) [protected]

Gets the distributed variable value for a unit at a time step

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
[in] Step the time step for the value of the requested variable
[out] Value the value of the requested variable (scalar)
bool openfluid::base::PluggableFunction::OPENFLUID_IsInputDataExist ( openfluid::core::Unit UnitPtr,
openfluid::core::InputDataName_t  InputName 
) [protected]

Returns true if a distributed input data exists, false otherwise

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the queried variable
bool openfluid::base::PluggableFunction::OPENFLUID_IsScalarVariableExist ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step 
) [protected]

Returns true if a distributed scalar variable exists and if a value has been set for the given step, false otherwise

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
[in] Step the time step for the value of the variable
bool openfluid::base::PluggableFunction::OPENFLUID_IsScalarVariableExist ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName 
) [protected]

Returns true if a distributed scalar variable exists, false otherwise

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitChildOf ( openfluid::core::Unit aUnit,
const openfluid::core::UnitClass_t ClassNameParent,
const openfluid::core::UnitID_t IDParent 
) [protected]

Returns true if a given unit is "a child of" another unit

Parameters:
[in] aUnit the given unit
[in] ClassNameParent the class name of the other unit to test
[in] IDParent the ID of the other unit to test
Returns:
true if the given unit is "a child of" the other unit
bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitClassExist ( openfluid::core::UnitClass_t  ClassName  )  [protected]

Returns true if the queried unit class exists

Parameters:
[in] ClassName the queried class name
bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitConnectedFrom ( openfluid::core::Unit aUnit,
const openfluid::core::UnitClass_t ClassNameFrom,
const openfluid::core::UnitID_t IDFrom 
) [protected]

Returns true if a given unit is connected "from" another unit

Parameters:
[in] aUnit the given unit
[in] ClassNameFrom the class name of the other unit to test
[in] IDFrom the ID of the other unit to test
Returns:
true if the given unit is connected "from" the other unit
bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitConnectedTo ( openfluid::core::Unit aUnit,
const openfluid::core::UnitClass_t ClassNameTo,
const openfluid::core::UnitID_t IDTo 
) [protected]

Returns true if a given unit is connected "to" another unit

Parameters:
[in] aUnit the given unit
[in] ClassNameTo the class name of the other unit to test
[in] IDTo the ID of the other unit to test
Returns:
true if the given unit is connected "to" the other unit
bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitExist ( openfluid::core::UnitClass_t  ClassName,
openfluid::core::UnitID_t  ID 
) [protected]

Returns true if the queried unit exists

Parameters:
[in] ClassName the class of the queried unit
[in] ID the ID of the queried unit
bool openfluid::base::PluggableFunction::OPENFLUID_IsUnitParentOf ( openfluid::core::Unit aUnit,
const openfluid::core::UnitClass_t ClassNameChild,
const openfluid::core::UnitID_t IDChild 
) [protected]

Returns true if a given unit is "parent of" another unit

Parameters:
[in] aUnit the given unit
[in] ClassNameChild the class name of the other unit to test
[in] IDChild the ID of the other unit to test
Returns:
true if the given unit is "parent of" the other unit
bool openfluid::base::PluggableFunction::OPENFLUID_IsVariableExist ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step 
) [protected]

Returns true if a distributed variable exists and if a value has been set for the given step, false otherwise (searches both scalar and vector variables)

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
[in] Step the time step for the value of the variable
bool openfluid::base::PluggableFunction::OPENFLUID_IsVariableExist ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName 
) [protected]

Returns true if a distributed variable exists, false otherwise (searches both scalar and vector variables)

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
bool openfluid::base::PluggableFunction::OPENFLUID_IsVectorVariableExist ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step 
) [protected]

Returns true if a distributed vector variable exists and if a value has been set for the given step, false otherwise

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
[in] Step the time step for the value of the variable
bool openfluid::base::PluggableFunction::OPENFLUID_IsVectorVariableExist ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName 
) [protected]

Returns true if a distributed vector variable exists, false otherwise

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the requested variable
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
std::string  Source,
std::string  Msg 
) [protected]

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

Parameters:
[in] Sender the sender of the message
[in] Source of the message (location in the sender)
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
std::string  Source,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

Raises a time-marked error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters:
[in] Sender the sender of the message
[in] Source of the message (location in the sender)
[in] TimeStep the time step number when the message occurred
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
std::string  Msg 
) [protected]

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

Parameters:
[in] Sender the sender of the message
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseError ( std::string  Sender,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

Raises a time-marked error message to the kernel. This stops the simulation the next time the kernel has the control

Parameters:
[in] Sender the sender of the message
[in] TimeStep the time step number when the message occurred
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
std::string  Source,
std::string  Msg 
) [protected]

Raises a warning message to the kernel. This do not stops the simulation

Parameters:
[in] Sender the sender of the message
[in] Source the source of the message
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
std::string  Source,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

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

Parameters:
[in] Sender the sender of the message
[in] Source the source of the message
[in] TimeStep the time step number when the message occurred
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
std::string  Msg 
) [protected]

Raises a warning message to the kernel. This do not stops the simulation

Parameters:
[in] Sender the sender of the message
[in] Msg the content of the message
void openfluid::base::PluggableFunction::OPENFLUID_RaiseWarning ( std::string  Sender,
openfluid::core::TimeStep_t  TimeStep,
std::string  Msg 
) [protected]

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

Parameters:
[in] Sender the sender of the message
[in] TimeStep the time step number when the message occurred
[in] Msg the content of the message
bool openfluid::base::PluggableFunction::OPENFLUID_RemoveChildParentConnection ( openfluid::core::Unit ChildUnit,
openfluid::core::Unit ParentUnit 
) [protected]

Removes a child-parent connection between two units

Parameters:
[in] ChildUnit pointer to the "child" unit
[in] ToUnit pointer to the "parent" unit
Returns:
false if the connection does not exist
bool openfluid::base::PluggableFunction::OPENFLUID_RemoveChildParentConnection ( openfluid::core::UnitClass_t  ClassNameChild,
openfluid::core::UnitID_t  IDChild,
openfluid::core::UnitClass_t  ClassNameParent,
openfluid::core::UnitID_t  IDParent 
) [protected]

Removes a child-parent connection between two units

Parameters:
[in] ClassNameFrom class name of the "child" unit
[in] IDFrom ID of the "child" unit
[in] ClassNameFrom class name of the "parent" unit
[in] IDFrom ID of the "parent" unit
Returns:
false if the connection does not exist
bool openfluid::base::PluggableFunction::OPENFLUID_RemoveFromToConnection ( openfluid::core::Unit FromUnit,
openfluid::core::Unit ToUnit 
) [protected]

Removes a from-to connection between two units

Parameters:
[in] FromUnit pointer to the "from" unit
[in] ToUnit pointer to the "to" unit
Returns:
false if the connection does not exist
bool openfluid::base::PluggableFunction::OPENFLUID_RemoveFromToConnection ( openfluid::core::UnitClass_t  ClassNameFrom,
openfluid::core::UnitID_t  IDFrom,
openfluid::core::UnitClass_t  ClassNameTo,
openfluid::core::UnitID_t  IDTo 
) [protected]

Removes a from-to connection between two units

Parameters:
[in] ClassNameFrom class name of the "from" unit
[in] IDFrom ID of the "from" unit
[in] ClassNameFrom class name of the "to" unit
[in] IDFrom ID of the "to" unit
Returns:
false if the unit connection does not exist
void openfluid::base::PluggableFunction::OPENFLUID_SetInputData ( openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t InputName,
const std::string &  Value 
) [protected]

Sets input data for a unit, as a string

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the set property
[out] Value the value of the set property
void openfluid::base::PluggableFunction::OPENFLUID_SetInputData ( openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t InputName,
const long &  Value 
) [protected]

Sets input data for a unit, as a long integer

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the set property
[in] Value the value of the set property
void openfluid::base::PluggableFunction::OPENFLUID_SetInputData ( openfluid::core::Unit UnitPtr,
const openfluid::core::InputDataName_t InputName,
const double &  Value 
) [protected]

Sets input data for a unit, as a double

Parameters:
[in] UnitPtr a Unit
[in] InputName the name of the set property
[in] Value the value of the set property
void openfluid::base::PluggableFunction::OPENFLUID_SetVariable ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step,
openfluid::core::VectorValue  Value 
) [protected]

Sets a distributed vector variable value for a unit at a time step

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the variable
[in] Step the time step for the value of the variable
[in] Value the added value of the variable
void openfluid::base::PluggableFunction::OPENFLUID_SetVariable ( openfluid::core::Unit UnitPtr,
openfluid::core::VariableName_t  VarName,
openfluid::core::TimeStep_t  Step,
openfluid::core::ScalarValue  Value 
) [protected]

Sets a distributed scalar variable value for a unit at a time step

Parameters:
[in] UnitPtr a Unit
[in] VarName the name of the variable
[in] Step the time step for the value of the variable
[in] Value the added value of the variable
virtual bool openfluid::base::PluggableFunction::prepareData (  )  [pure virtual]

Prepares data. Called by the kernel.

Implemented in openfluid::machine::Generator.

virtual bool openfluid::base::PluggableFunction::runStep ( const SimulationStatus SimStatus  )  [pure virtual]
void openfluid::base::PluggableFunction::setDataRepository ( openfluid::core::CoreRepository CoreData  )  [inline]
void openfluid::base::PluggableFunction::setExecutionMessages ( openfluid::base::ExecutionMessages ExecMsgs  )  [inline]
void openfluid::base::PluggableFunction::setFunctionEnvironment ( openfluid::base::EnvironmentProperties FuncEnv  )  [inline]
void openfluid::base::PluggableFunction::setFunctionID ( const openfluid::base::FuncID_t FuncID  )  [inline]

Member Data Documentation

Pointer to the core repository (const). It should be used with care. Prefer to use the OPENFLUID_Xxxx methods.


Generated using Doxygen 1.6.3
Creative Commons License Creative Commons By-NC-ND license