AddFunction
This method is used to register a function pointer with the expression. It returns an IFunctionDefinition
interface that allows you to define any arguments this function requires.
Calling convention:
AddFunction (const char* funcName, const char* funcDescription, Measure returnDimens, ArgType returnType, const char* returnDescription, RegFuncPtr ptrToFunc)
Argument | Data type | Description |
---|---|---|
funcName | const char* | Name of your plugin function used in a boundary condition. |
funcDescription | const char* | Description of your plugin function. |
returnDimens | Measure | Unit dimension for the returned value. |
returnType | ArgType | Return value data type. |
returnDescription | const char* | Name for the returned unit dimension. |
ptrToFunc | RegFuncPtr | Pointer of your implemented function. |
You can find a definition of this function in the CaeUtils_Exp_IRegistrar.hxx header file.
Example:
void AddHTCCustom(IRegistrar* pReg)
{
Measure meas;
meas.Set(1, 0, -3, 0, 0, 0, -1, 0, 0);
IFunctionDefinition* pFunc = pReg->AddFunction(
"HTCCustom"
"Return heat transfer coefficient from a free disc with turbulent flow"
meas,
TYP_DBL,
"Heat transfer coefficient",
&HTCCustom)
}