Difference between revisions of "DISPATCH PROPGET()"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 14: | Line 14: | ||
<input parameters> | <input parameters> | ||
− | constant classname; /* class name that contains the property */ | + | constant classname; /* class name that contains the property */ |
constant propertyname; /* property name to dispatch get method */ | constant propertyname; /* property name to dispatch get method */ | ||
Line 48: | Line 48: | ||
/* Dispatch SET or GET PROPERTY */ | /* Dispatch SET or GET PROPERTY */ | ||
− | /* method for property NumValue | + | /* method for property NumValue */ |
/* then return. */ | /* then return. */ | ||
DISPATCH_PROPSET(clsMyClass, NumValue); | DISPATCH_PROPSET(clsMyClass, NumValue); |
Latest revision as of 12:48, 27 March 2009
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()