ILS_R_INDEXED_ATTR_XXX
 
ILS_R_INDEXED_ATTR_XXX
Category 
Dynamic view-related macros (server side)
Description 
The macros ILS_R_INDEXED_ATTR_xxx declare a read-only runtime indexed attribute for a server object type so that it can be used in view specifications. This attribute is defined by an accessor, a modification test and an update eagerness function.
*The accessor is used by Server during the notification of a dynamic view to notify a component the value of a representation attribute or to evaluate a condition of representation and/or of propagation (see Dynamic View Types and C++ View Types).
*The modification test is used by Server to detect whether the attribute has changed since the latest notification cycle. For instance, if the runtime attribute is associated with an entry or a derived data member, the test function should call the function isModified declared on the class template IlsEntry or IlsDerived respectively.
*The updEagerness function is used by Server to declare that a new view is interested in knowing the attribute value or, conversely, that a view is no longer interested in this attribute. This update eagerness function is especially useful for a runtime attribute associated with a derived data member. In this case, it should call the incrEagerness or decrEagerness functions declared on the IlsDerived class template.
These macros allows you to declare pure runtime attributes, that is attributes whose names do not correspond to any data member of the server object type. They can be enclosed only between the following pairs of macros:
*ILS_OBJECT_BEGIN/ILS_OBJECT_END
*ILS_ENTITY_BEGIN/ILS_ENTITY_END
*ILS_MVVIEW_BEGIN/ILS_MVVIEW_END
or their derivatives.
Header File 
#include <ilserver/rtmodel.h>
Synopsis 
ILS_R_INDEXED_ATTR_CHAR
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_BOOLEAN
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_SHORT
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_INT
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_LONG
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_FLOAT
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_DOUBLE
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_STRING
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_MVVALUE
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_USERTYPE
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_ENUM
(objType,attrType,attrLabel,getValue,isModified,updEagerness)
Macros 
ILS_R_INDEXED_ATTR_CHAR(objType,attrLabel,getValue,isModified,updEagerness)
This macro declares attrLabel as a runtime indexed attribute of the class objType. This attribute is of type char and cannot be modified.
*Its accessor, getValue, has the following signature:
char objType::getValue(int index)
The signature can be different under the following conditions:
*It is a member of the class or of a derived class.
*Its result converts implicitly to char.
*It can be invoked with one integer value as argument.
*The modification test has the following signature:
IlsBoolean objType::isModified(int index)
The signature can be different under the following conditions:
*It is a member of the class or of a derived class.
*Its result converts implicitly to IlsBoolean.
*It can be invoked with one integer value as argument.
*The update eagerness function has the following signature:
void objType::updEagerness(int index, IlsBoolean increment)
When the increment argument is set to IlsTrue, this means that a new view is interested by the atttribute value. Conversely, IlsFalse means that a view is no longer interested in the attribute value.
The signature can be different under the following conditions:
*It is a member of the class or of a derived class, and
*It can be invoked with an integer and a boolean as arguments.
ILS_R_INDEXED_ATTR_BOOLEAN
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_SHORT(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_INT(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_LONG(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_FLOAT(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_DOUBLE
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_STRING
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_MVVALUE
(objType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_USERTYPE
(objType,attrType,attrLabel,getValue,isModified,updEagerness)
ILS_R_INDEXED_ATTR_ENUM
(objType,attrType,attrLabel,getValue,isModified,updEagerness)
The macros in the above list follow the same rules as ILS_R_INDEXED_ATTR_CHAR, except that their attribute type varies according to the following table:
ILS_R_INDEXED_ATTR_BOOLEAN
IlsBoolean
ILS_R_INDEXED_ATTR_SHORT
short
ILS_R_INDEXED_ATTR_INT
long
ILS_R_INDEXED_ATTR_LONG
long
ILS_R_INDEXED_ATTR_FLOAT
float
ILS_R_INDEXED_ATTR_DOUBLE
double
ILS_R_INDEXED_ATTR_STRING
IlsString
ILS_R_INDEXED_ATTR_MVVALUE
IlsMvValue
ILS_R_INDEXED_ATTR_USERTYPE
user-defined class
ILS_R_INDEXED_ATTR_ENUM
enumerated type
See Also 
IlsDerived, IlsEntry, ILS_RW_INDEXED_ATTR_XXX

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