|
cxWidgets 1.0
|
A more intelligent function pointer, which can run a. More...
#include <cxFunction.h>


Public Member Functions | |
| cxFunction0 (funcPtr0 pFuncPtr=nullptr, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) | |
| Default constructor. All parameters have default values. | |
| virtual | ~cxFunction0 () |
| virtual bool | functionIsSet () const override |
| void | setFunction (funcPtr0 pFuncPtr) |
| funcPtr0 | getFunction () const |
| Accessor for the internal function pointer. | |
| virtual std::string | runFunction () const override |
| virtual void * | getFuncPtr () const override |
| virtual std::string | cxTypeStr () const override |
| Returns the name of the cxWidgets class, "cxFunction0". 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. | |
A more intelligent function pointer, which can run a.
function that takes no parameters. Note that
the function must have the following signature:
string func()
|
explicit |
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 null. |
| 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. |
|
virtual |
Destructor
|
overridevirtual |
Returns the name of the cxWidgets class, "cxFunction0". This can be.
used to determine the type of cxWidgets object that deriving
classes derive from in applications.
Implements cx::cxFunction.
|
overridevirtual |
Returns whether the internal funtion pointer is set.
Implements cx::cxFunction.
|
overridevirtual |
Implements cx::cxFunction.
| funcPtr0 cx::cxFunction0::getFunction | ( | ) | const |
Accessor for the internal function pointer.
|
overridevirtual |
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.
| void cx::cxFunction0::setFunction | ( | funcPtr0 | pFuncPtr | ) |
Sets the internal function pointer
| pFuncPtr | The function to which to point |