|
cxWidgets 1.0
|
This class is a cxFunction that is templated to take a reference of a specific type. More...
#include <cxFunction.h>


Public Types | |
| using | FuncPtr = std::string(*)(T1 &) |
Public Member Functions | |
| cxFunction1RefTemplated (FuncPtr pFuncPtr, T1 &pParam, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) | |
| Default constructor. All parameters have default values. | |
| virtual | ~cxFunction1RefTemplated () |
| virtual bool | functionIsSet () const override |
| void | setFunction (FuncPtr pFuncPtr) |
| FuncPtr | getFunction () const |
| Accessor for the internal function pointer. | |
| void | setParam (T1 &pParam) |
| const T1 & | getParam () const |
| virtual std::string | runFunction () const override |
| virtual void * | getFuncPtr () const override |
| virtual std::string | cxTypeStr () const override |
| Returns the name of the cxWidgets class, "cxFunction1RefTemplated". This can be. | |
Public Member Functions inherited from cx::cxFunction | |
| cxFunction (bool pUseReturnVal, bool pExitAfterRun, bool pRunOnLeaveFunction) | |
| Constructor. | |
| virtual | ~cxFunction () |
| virtual bool | getUseReturnVal () const |
| Accessor for whether the caller should use the return value. | |
| virtual void | setUseReturnVal (bool pUseReturnVal) |
| Setter for whether or not the caller should make use of the return value. | |
| virtual bool | getExitAfterRun () const |
| Accessor for whether the caller should exit after the function. | |
| virtual void | setExitAfterRun (bool pExitAfterRun) |
| Setter for whether or not the caller should quit what. | |
| virtual bool | getRunOnLeaveFunction () const |
| Accessor for whether the caller should run its onLeave function. | |
| virtual void | setRunOnLeaveFunction (bool pRunOnLeaveFunction) |
| Setter for whether or not the caller should run its. | |
Static Public Member Functions | |
| static std::shared_ptr< cxFunction1RefTemplated< T1 > > | create (FuncPtr pFuncPtr, T1 &pParam1, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) |
This class is a cxFunction that is templated to take a reference of a specific type.
| using cx::cxFunction1RefTemplated< T1 >::FuncPtr = std::string (*)(T1&) |
|
inlineexplicit |
Default constructor. All parameters have default values.
available. Note that function must have this signature:
string func(void*, void*)
| pFuncPtr | Pointer to the function to be run. Defaults to nullptr. |
| pParam1 | The first parameter to pass to the function when it's run |
| pUseReturnVal | Indicates whether caller will make use of return value. Defaults to false |
| pExitAfterRun | Whether or not the caller should exit from its input loop once the function is done. Defaults to false. |
| pRunOnLeaveFunction | Whether or not the caller should run its onLeave function when it exits (useful if pExitAfterRun is true). This defaults to true. |
|
inlinevirtual |
Destructor
|
inlinestatic |
|
inlineoverridevirtual |
Returns the name of the cxWidgets class, "cxFunction1RefTemplated". This can be.
used to determine the type of cxWidgets object that deriving
classes derive from in applications.
Implements cx::cxFunction.
|
inlineoverridevirtual |
Returns whether the internal funtion pointer is set.
Implements cx::cxFunction.
|
inlineoverridevirtual |
Implements cx::cxFunction.
|
inline |
Accessor for the internal function pointer.
|
inline |
Accessor for the function parameter
|
inlineoverridevirtual |
If function pointer is not null, runs the function and returns its return value; If function pointer is nullptr, returns empty string
Implements cx::cxFunction.
|
inline |
Sets the internal function pointer
| pFuncPtr | The function to which to point |
|
inline |
Sets the parameter to pass to the function.
| pParam | The parameter to pass to function |