ILS_ENTITY_DECL
 
ILS_ENTITY_DECL
Category 
Dynamic view-related macro (server side)
Description 
This macro declare a server object type that derives from IlsEntity to the server model interpreter. It must be used with the macros ILS_ENTITY_BEGIN/ILS_ENTITY_END. The Server object types you declare using this macro can then be associated with representations in view specifications. This macro also lets you declare runtime entry data members, derived data members, and relations for the Server object type.
Header File 
#include <ilserver/rtmodel>
Synopsis 
ILS_ENTITY_DECL(objType)
Arguments 
This macro declares the Server Type objType as being accessible at runtime.
*The class objType must derive from IlsEntity directly or transitively, and contain a constructor that takes an IlsString argument, as follows:
objType::objType(IlsString identifier)
This argument is the entity identifier.
This constructor is called when the component notifies the server that a new representation object associated with the Server object has been created.
See the second constructor of the class IlsRpObject.
The argument identifier is set to the value of the first representation attribute that is set by the component on the new representation objects, provided this attribute complies with the following conditions:
*The attribute is directly mapped to the entity identifier in the dynamic view specification (see Semantics of Dynamic View Type Specifications).
*The attribute identifier has been set just after the object has been created (see IlsRpObject::onUpdate).
*The creation of the new rp object and the updating of the attribute occur within the same representation transaction.
See the member functions IlsRepresentation::beginC2STransaction and IlsRepresentation::commitC2STransaction for more information.
*This macro also defines the following function:
[static] objType* objType::Narrow(IlsViewed& object);
This static function performs a safe downcast on the object argument. It returns 0 if this argument is not of type objType or of a derived type.
See Also 
ILS_DERIVED_XXX, IlsEntity, ILS_ENTITY_BEGIN/ILS_ENTITY_END, ILS_ENTITY_INIT, ILS_ENTRY_XXX, ILS_OBJECT_DECL, IlsRepresentation, IlsRpObject, ILS_R_RELATION_1, ILS_R_RELATION_N, ILS_RW_RELATION_1, ILS_RW_RELATION_N, ILS_W_RELATION_1, ILS_W_RELATION_N

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