OBJECT RETPROPERTY()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Return an OBJARG format string


SYNONYM

None


SYNOPSIS

#include "dbapi.h"
 
OBJECT_RETPROPERTY(type, value)
 
<input parameters>
char		type;		/* Data type to return		*/
void		value;		/* Value to return			*/
 
<output parameters>
none


DESCRIPTION

The OBJECT_RETPROPERTY() macro is used to return the specified value in an OBJARG format from get property method.


EXAMPLE

The following example returns the numeric value of the property NumValue as a numeric type.

Example Recital program:

test = newobject("myclass")
? test.numvalue

Example in 'C' object:

#include "dbapi.h"
 
/* Define get property method */
DEFINE_PROPERTYGET(clsMyClass, NumValue) 
{
		struct example_data *objectData = (struct example_data *)OBJECT_GETDATA();
 
	if (objectData == NULL) return(-1);
 
	OBJECT_RETPROPERTY('N', objectData->prop_numvalue);
}


SEE ALSO

DEFINE_CLASS(), DEFINE_METHOD(), DEFINE_PROPERTYGET(), DEFINE_PROPERTYSET(), DISPATCH_FACTORY(), 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_RETRESULT(), OBJECT_SETARG(), OBJECT_SETDATA(), OBJECT_SETPROPERTY()