XCube_Delegate Class Reference

Inherited by XCube_NewDelegate.

Inheritance diagram for XCube_Delegate:

[legend]
List of all members.

Public Member Functions

 XCube_Delegate ()
 _setSignatures ($args)
 register ($delegateName)
 add ($callback, $param2=null, $param3=null)
 delete ($delcallback)
 reset ()
 call ()

Public Attributes

 $_mLazyRegisterName = null

Detailed Description

This is simple mechanism for common delegation in XCube.

A delegate can have $callback as connected function, $filepath for lazy loading and $priority as order indicated.

"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 )

[Notice] This is the candidate as new delegate style, which has foolish name to escape conflict with old XCube_Delegate. After replacing, we'll change all.


Member Function Documentation

XCube_Delegate::XCube_Delegate (  ) 

Constructor. The parameter of the constructor is a variable argument style to specify the sigunature of this delegate. If the argument is empty, signature checking doesn't work. Empty arguments are good to use in many cases. But, that's important to accent a delegate for making rightly connected functions.

[Sample] $delegate =& new XCube_Delegate("string", "string");

XCube_Delegate::_setSignatures ( args  ) 

Set signatures for this delegate. By this member function, this function will come to check arguments with following signatures at call().

privated

Parameters:
$args array

XCube_Delegate::register ( delegateName  ) 

Register this object to delegate manager of root.

public

Parameters:
$delegateName string
Returns:
bool

XCube_Delegate::add ( callback,
param2 = null,
param3 = null 
)

Connect any functions to this object. This member function is virtual overload by sigunatures.

add(callback $callback, int priority = XCUBE_DELEGATE_PRIORITY_NORMAL); add(callback $callback, string filepath = null); add(callback $callback, int priority =... , string filepath=...);

public

Returns:
void

XCube_Delegate::delete ( delcallback  ) 

Disconnect a function from this object. public

Returns:
void

XCube_Delegate::reset (  ) 

Reset all delegate functions from this object. public

Returns:
void

XCube_Delegate::call (  ) 

Call connected functions.

public


Member Data Documentation

XCube_Delegate::$_mLazyRegisterName = null

This is register name for lazy registering.


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 00:27:22 2006 for XOOPS Cube Legacy by  doxygen 1.5.1