fwConfigs
8.4.0
|
Modules | |
fwDpFunction common functions and variables | |
Files | |
file | fwDpFunction.ctl |
Utility functions | |
Used to access the configuration object attributes (object of type dyn_anytype). | |
fwDpFunction_objectCreateDpeConnection (dyn_mixed &functionObject, dyn_string functionParams, dyn_string functionGlobals, string functionDefinition, dyn_string &exceptionInfo, bool runChecks=true) | |
fwDpFunction_objectExtractDpeConnection (dyn_mixed functionObject, dyn_string &functionParams, dyn_string &functionGlobals, string &functionDefinition, dyn_string &exceptionInfo) | |
bool | fwDpFunction_objectIsDpeConnection (dyn_mixed functionObject) |
Define dpFunctions of type dpe Connection. Please refer also to fwDpFunction common functions and variables. For type statistical, refer to fwDpFunction Statistical.
The fwDpFunctions library makes use of a configuration object. In order to configure a dpe with a dp function, the configuration setting object must be previously initialized with the dp function parameterization (using utility functions). Such object is then passed to the set function that will make the necessary dpSet.
A function of type DPE Connection can be set in the following way: one should declare a configuration object of type dyn_anytype, then fill it with the dpFunction settings using the function fwDpFunction_objectCreateDpeConnection(), then set the setting to the dpe using the function fwDpFunction_objectSet().
Example:
A function of type DPE Connection can be retrieved from a dpe in the following way: one should declare a configuration object of type dyn_anytype, then fill it with the dpFunction settings from the dpe using the function fwDpFunction_objectGet(), then extract the settings from the configuration object using the function fwDpFunction_objectExtractDpeConnection().. Before extracting the settings, it is possible to check that the settings are really of type dpeConnection (function fwDpFunction_objectIsDpeConnection()).
Example:
Functions of type DPE Connection can be set in batch in the following way: one should declare a configuration object of type dyn_anytype (dpFuncObject). This object will be contained in an array of object (one object per dpe), of type dyn_anytype (call it dpFuncObjects). Each dpFuncObject then must be filled with the function fwDpFunction_objectCreateDpeConnection(), and stored into the array of objects dpFuncObjects. The array of objects is then passed together with the array of dpes to the function fwDpFunction_objectSetMany().
Example: set 2 dp configs into 2 dpes:
It is also possible to set many dpes with the same dp function settings. In this case, the array of settings objects must contain one only object, at the index 1.
Functions of type DPE Connection can be retrieved in batch. This is more performing than looping into the dpes with the function fwDpFunction_objectGet(). It can be done in the following way: one should declare a configuration object of type dyn_anytype (dpFuncObject). This object will be contained in an array of object (one object per dpe), of type dyn_anytype (call it dpFuncObjects). The array of objects dpFuncObjects then must be filled with the function fwDpFunction_objectGetMany(). The array is the accessed in a loop, getting each element dpFuncObject inside dpFunctionObject. The parameters can be then accessed using fwDpFunction_objectEctractDpeConnection().
Example: get 2 dp configs into 2 dpes:
fwDpFunction_objectCreateDpeConnection | ( | dyn_mixed & | functionObject, |
dyn_string | functionParams, | ||
dyn_string | functionGlobals, | ||
string | functionDefinition, | ||
dyn_string & | exceptionInfo, | ||
bool | runChecks = true |
||
) |
Configures the dp function object with dpe connection parameters See fwDpFunction_objectSet() for an example.
functionObject | This object will contain the dp function parameters. |
functionParams | The list of dp elements to be used as parameters in the dp function. The # of elements must be = to the # of elements in fwDpFunction_OBJ_STAT_TYPE. |
functionGlobals | The list of dp elements to be used as globals in the dp function |
functionDefinition | The dp function is given here (in terms of p's (parameters) and g's (globals)) |
exceptionInfo | Details of any exceptions are returned here |
runChecks | Perform some consistency checks. Optional. Default value = true (recommended) |
fwDpFunction_objectExtractDpeConnection | ( | dyn_mixed | functionObject, |
dyn_string & | functionParams, | ||
dyn_string & | functionGlobals, | ||
string & | functionDefinition, | ||
dyn_string & | exceptionInfo | ||
) |
Reads the dp function object
functionObject | This object will contain the dp function parameters. |
functionParams | The list of dp elements to be used as parameters in the dp function. |
functionGlobals | The list of dp elements to be used as globals in the dp function |
functionDefinition | The dp function is given here (in terms of p's (parameters) and g's (globals)) |
exceptionInfo | Details of any exceptions are returned here |
bool fwDpFunction_objectIsDpeConnection | ( | dyn_mixed | functionObject | ) |
Check wether the configuration object contains dpe connection function.
functionObject | This object containing the dp function parameters. |