[Final] Used for the simple mechanism for common delegation in XCube. More...
Public Member Functions | |
__construct () | |
Constructor. | |
_setSignatures ( $args) | |
Set signatures for this delegate. | |
register ( $delegateName) | |
Registers this object to delegate manager of root. | |
add ( $callback, $param2=null, $param3=null) | |
[Overload] Connects functions to this object as callback functions | |
delete ( $delcallback) | |
Disconnects a function from this object. | |
reset () | |
Resets all delegate functions from this object. | |
call () | |
Calls connected functions of this object. | |
isEmpty () | |
Gets a value indicating whether this object has callback functions. | |
getID () | |
[Final] Used for the simple mechanism for common delegation in XCube.
A delegate can have $callback as connected function, $filepath for lazy loading and $priority as order indicated.
\per Priority
Default of this parameter is XCUBE_DELEGATE_PRIORITY_NORMAL. Usually, this parameter isn't specified. Plus, the magic number should be used to specify priority. Use XCUBE_DELEGATE_PRIORITY_FIRST or XCUBE_DELEGATE_PRIORITY_FINAL with Addition and Subtraction. (e.x. XCUBE_DELEGATE_PRIORITY_NORMAL - 1 )
__construct | ( | ) |
Constructor.
The parameter of the constructor is a variable argument style to specify the signature of this delegate. If the argument is empty, signature checking doesn't work. Empty arguments are good to use in many cases. But, it is important to emphasize a delegate to make well-connected functions.
_setSignatures | ( | $args | ) |
Set signatures for this delegate.
$args | Array - std::vector<string> |
By this method, this function will check the arguments with the following signatures to call().
add | ( | $callback, | |
$param2 = null, | |||
$param3 = null ) |
[Overload] Connects functions to this object as callback functions
$callback | ||
null | $param2 | |
null | $param3 |
This method is a virtual overload by signatures.
delete | ( | $delcallback | ) |
Disconnects a function from this object.
$delcallback |
isEmpty | ( | ) |
Gets a value indicating whether this object has callback functions.
register | ( | $delegateName | ) |
Registers this object to delegate manager of root.
string | $delegateName |
reset | ( | ) |
Resets all delegate functions from this object.