DISPATCH PROPGET()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

A macro to dispatch a get property method passed to the object


SYNONYM

None


SYNOPSIS

#include "dbapi.h"
 
DISPATCH_PROPGET(classname, propertyname)
 
<input parameters>
constant		classname;	/* class name that contains the property	*/
constant		propertyname;	/* property name to dispatch get method	*/
 
<output parameters>
none


DESCRIPTION

The DISPATCH_PROPGET() macro is used to dispatch a method that gets the value of a specified property passed to the object. After a method is dispatched by this macro, execution is returned to Recital.


EXAMPLE

The following example adds a DISPATCH_PROPGET() macro to get the value of the property NumValue in a class called clsMyClass.

Example Recital program:

test = newobject("myclass")
// Display the value of the property NumValue
? "numvalue", test.numvalue

Example in 'C' object:

#include "dbapi.h"
 
DEFINE_CLASS(clsMyClass)
{
	/* Dispatch factory methods and return */
	DISPATCH_FACTORY();
 
	/* Dispatch SET or GET PROPERTY  */
	/* method for property NumValue	*/
	/* then return.				*/
	DISPATCH_PROPSET(clsMyClass, NumValue);
	DISPATCH_PROPGET(clsMyClass, NumValue); 
}


SEE ALSO

DEFINE_CLASS(), DEFINE_METHOD(), DEFINE_PROPERTYGET(), DEFINE_PROPERTYSET(), DISPATCH_FACTORY(), DISPATCH_METHOD(), 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()