ILS_REPRESENTATION_DECL
 
ILS_REPRESENTATION_DECL
Category 
Dynamic view-related macro (component side)
Description 
This macro is used with classes that derive from IlsRepresentation together with the pair of macros ILS_REPRESENTATION_BEGIN/ILS_REPRESENTATION_END. It allows you to declare these classes to the representation model interpreter, which is implemented in the Rogue Wave Server library. Using this declaration, the representation model interpreter can create representations whose C++ type corresponds to the dynamic representation model appearing in the dynamic view type specification.
In the following view specification, for example, the class IlsSwRepresentation, which derives from IlsRepresentation, should be declared to the representation model interpreter so that when the representation associated with the view NetworkPanel is created, the interpreter instantiates an object of type IlsSwRepresentation in the application component.
view NetworkPanel:
represent IlsSwRepresentation repres:...;
..
The macro ILS_REPRESENTATION_DECL must be added to the declaration of all the classes deriving from IlsRepresentation, as shown below:
class IlsSwRepresentation: public IlsRepresentation
{
...
ILS_REPRESENTATION_DECL(IlsSwRepresentation)
}
It defines the following function:
static IlsSwRepresentation* Narrow(IlsRepresentation&);
When this function takes a reference to a representation as its parameter, it returns a pointer to IlsSwRepresentation if the object is of type IlsSwRepresentation or of a derived type. Otherwise, it returns a null pointer.
Header File 
#include <ilserver/rp.h>
Synopsis 
ILS_REPRESENTATION_DECL(representation_type)
See Also 
IlsRepresentation, ILS_REPRESENTATION_BEGIN/ILS_REPRESENTATION_END, ILS_REPRESENTATION_INIT, IlsRpModel, IlsRpObject, IlsRpObjModel

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