DISPATCH FACTORY()

From Recital Documentation Wiki
Revision as of 12:50, 27 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

A macro to dispatch factory methods passed to the object


SYNONYM

None


SYNOPSIS

#include "dbapi.h"
 
DISPATCH_FACTORY()
 
<input parameters>
none
 
<output parameters>
none


DESCRIPTION

The DISPATCH_FACTORY() macro is used to dispatch factory methods passed to the object. This macro should always be included at the top of each defined class. After a factory method is dispatched by this macro, execution is returned to Recital. The Recital engine uses these factory methods for introspection of the class.


EXAMPLE

The following example adds a DISPATCH_FACTORY() method to a class called clsMyClass.

Example Recital program:

test = newobject("myclass")
// Introspect the object and display its properties and methods
display memory like test

Example in 'C' object:

#include "dbapi.h"
 
DEFINE_CLASS(clsMyClass)
{
	/* Dispatch factory methods and return */
	DISPATCH_FACTORY();
 
	/* Dispatch constructor and return */
	DISPATCH_METHOD(clsMyClass, Constructor);
 
	/* Dispatch destructor and return */
	DISPATCH_METHOD(clsMyClass, Destructor);
}


SEE ALSO

DEFINE_CLASS(), DEFINE_METHOD(), DEFINE_PROPERTYGET(), DEFINE_PROPERTYSET(), DISPATCH_METHOD(), DISPATCH_PROPGET(), DISPATCH_PROPSET(), OBJECT_ASSIGN(), OBJECT_DELETE(), OBJECT_GETARG(), OBJECT_GETARGC(), OBJECT_GETDATA(), OBJECT_GETOBJECT(), OBJECT_GETPARAMETER(), OBJECT_GETPROPERTY(), OBJECT_GETTYPE(), OBJECT_GETVALUE(), OBJECT_NEW(), OBJECT_RETERROR(), OBJECT_RETPROPERTY(), OBJECT_RETRESULT(), OBJECT_SETARG(), OBJECT_SETDATA(), OBJECT_SETPROPERTY()