This class is just like cxFunction2, but for functions.
More...
#include <cxFunction.h>
|
| | cxFunction4 (funcPtr4 pFuncPtr=nullptr, void *pParam1=nullptr, void *pParam2=nullptr, void *pParam3=nullptr, void *pParam4=nullptr, bool pUseReturnVal=false, bool pExitAfterRun=false, bool pRunOnLeaveFunction=true) |
| | Default constructor. All parameters have default values.
|
| |
| virtual | ~cxFunction4 () |
| |
| virtual bool | functionIsSet () const override |
| |
| void | setFunction (funcPtr4 pFuncPtr) |
| |
| funcPtr4 | getFunction () const |
| | Accessor for the internal function pointer.
|
| |
| void | setParams (void *pParam1, void *pParam2, void *pParam3, void *pParam4) |
| |
| void | setParam1 (void *pParam) |
| |
| void | setParam2 (void *pParam) |
| |
| void | setParam3 (void *pParam) |
| |
| void | setParam4 (void *pParam) |
| |
| void * | getParam1 () const |
| |
| void * | getParam2 () const |
| |
| void * | getParam3 () const |
| |
| void * | getParam4 () 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, "cxFunction4". This can be.
|
| |
| | 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.
|
| |
This class is just like cxFunction2, but for functions.
with 4 void pointer parameters instead of 2.
◆ cxFunction4()
| cx::cxFunction4::cxFunction4 |
( |
funcPtr4 |
pFuncPtr = nullptr, |
|
|
void * |
pParam1 = nullptr, |
|
|
void * |
pParam2 = nullptr, |
|
|
void * |
pParam3 = nullptr, |
|
|
void * |
pParam4 = nullptr, |
|
|
bool |
pUseReturnVal = false, |
|
|
bool |
pExitAfterRun = false, |
|
|
bool |
pRunOnLeaveFunction = true |
|
) |
| |
|
explicit |
Default constructor. All parameters have default values.
available. Note that function must have this signature:
string func(void*, void*)
- Parameters
-
| pFuncPtr | Pointer to the function to be run. Defaults to nullptr. |
| pParam1 | The first parameter to pass to the function when it's run - This is a void pointer. |
| pParam2 | The second parameter to pass to the function when it's run - This is a void pointer. |
| pParam3 | The 3rd parameter to pass to the function when it's run - This is a void pointer. |
| pParam4 | The 4th parameter to pass to the function when it's run - This is a void pointer. |
| 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. |
◆ ~cxFunction4()
| cx::cxFunction4::~cxFunction4 |
( |
| ) |
|
|
virtual |
◆ cxTypeStr()
| string cx::cxFunction4::cxTypeStr |
( |
| ) |
const |
|
overridevirtual |
Returns the name of the cxWidgets class, "cxFunction4". This can be.
used to determine the type of cxWidgets object that deriving
classes derive from in applications.
- Returns
- The name of the cxWidgets class ("cxFunction4").
Implements cx::cxFunction.
◆ functionIsSet()
| bool cx::cxFunction4::functionIsSet |
( |
| ) |
const |
|
overridevirtual |
Returns whether the internal funtion pointer is set.
- Returns
- Returns true if the internal function pointer is set (not null), or false otherwise.
Implements cx::cxFunction.
◆ getFuncPtr()
| void * cx::cxFunction4::getFuncPtr |
( |
| ) |
const |
|
overridevirtual |
◆ getFunction()
| funcPtr4 cx::cxFunction4::getFunction |
( |
| ) |
const |
Accessor for the internal function pointer.
- Returns
- The internal function pointer
◆ getParam1()
| void * cx::cxFunction4::getParam1 |
( |
| ) |
const |
Accessor for the first function parameter
- Returns
- Returns pointer to first parameter
◆ getParam2()
| void * cx::cxFunction4::getParam2 |
( |
| ) |
const |
Accessor for the second function parameter
- Returns
- Returns pointer to second parameter
◆ getParam3()
| void * cx::cxFunction4::getParam3 |
( |
| ) |
const |
Accessor for the 3rd function parameter
- Returns
- Returns pointer to first parameter
◆ getParam4()
| void * cx::cxFunction4::getParam4 |
( |
| ) |
const |
Accessor for the 4th function parameter
- Returns
- Returns pointer to second parameter
◆ runFunction()
| string cx::cxFunction4::runFunction |
( |
| ) |
const |
|
overridevirtual |
If function pointer is not null, runs the function and returns its return value; If function pointer is nullptr, returns empty string
- Returns
- Returns return value of function pointed to if pointer is not null, otherwise returns empty string
Implements cx::cxFunction.
◆ setFunction()
| void cx::cxFunction4::setFunction |
( |
funcPtr4 |
pFuncPtr | ) |
|
Sets the internal function pointer
- Parameters
-
| pFuncPtr | The function to which to point |
◆ setParam1()
| void cx::cxFunction4::setParam1 |
( |
void * |
pParam | ) |
|
Sets the first parameter
- Parameters
-
| pParam | First parameter to pass to function |
◆ setParam2()
| void cx::cxFunction4::setParam2 |
( |
void * |
pParam | ) |
|
Sets the second parameter
- Parameters
-
| pParam | Second parameter to pass to function |
◆ setParam3()
| void cx::cxFunction4::setParam3 |
( |
void * |
pParam | ) |
|
Sets the 3rd parameter
- Parameters
-
| pParam | 3rd parameter to pass to function |
◆ setParam4()
| void cx::cxFunction4::setParam4 |
( |
void * |
pParam | ) |
|
Sets the 4th parameter
- Parameters
-
| pParam | 4th parameter to pass to function |
◆ setParams()
| void cx::cxFunction4::setParams |
( |
void * |
pParam1, |
|
|
void * |
pParam2, |
|
|
void * |
pParam3, |
|
|
void * |
pParam4 |
|
) |
| |
Sets the parameters to pass to the function.
- Parameters
-
| pParam1 | First parameter to pass to function |
| pParam2 | Second parameter to pass to function |
| pParam3 | 3rd parameter to pass to function |
| pParam4 | 4th parameter to pass to function |
The documentation for this class was generated from the following files: