ILS_RP_OBJECT_DECL
 
ILS_RP_OBJECT_DECL
Category 
Dynamic view-related macro (component side)
Description 
This macro is used with classes that derive from IlsRpObject together with the pair of macros ILS_RP_OBJECT_BEGIN/ILS_RP_OBJECT_END.It allows you to declare these classes to the representation model interpreter, which is implemented in the Rogue Wave Server libraries. Using this declaration, the representation model interpreter can create representation objects whose C++ type corresponds to the object representation types described in a view specification.
In the following dynamic view type specification, for example, the class of representation objects TreeGadget should be declared to the representation model interpreter so that when a panel representation is created in the view NetworkTree, the interpreter will instantiate an object of type TreeGadget in the application component.
view NetworkTree:
...
subscribe Network:
represent TreeGadget panel:...
Header File 
#include <ilserver/rpmoditp.h>
Synopsis 
ILS_RP_OBJECT_DECL(rpObjectType)
Details 
The macro ILS_RP_OBJECT_DECL must be added to any classes deriving from IlsRpObject as shown below:
class TreeGadget: public IlsRpObject
{
...
ILS_RP_OBJECT_DECL(TreeGadget)
}
It defines the following function:
[static] static TreeGadget* Narrow(IlsRpObject&);
If this function takes a reference to a representation object as its parameter, it returns a pointer to TreeGadget if the object is of type TreeGadget or of a derived type. Otherwise, it returns a null pointer.
See Also 
IlsRpModel, IlsRpObject, ILS_RP_OBJECT_BEGIN/ILS_RP_OBJECT_END, ILS_RP_OBJECT_INIT, IlsRpObjModel

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.