ILS_RW_INDEXED_ATTR_XXX
 
ILS_RW_INDEXED_ATTR_XXX
Category 
Dynamic view-related macros (server side)
Description 
The macros ILS_RW_INDEXED_ATTR_xxx declare a read/write 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 modifier and a modification test.
*The accessor is used by Rogue Wave Server during the notification of a dynamic view to notify the value of a representation attribute to a component or to evaluate a condition of representation and/or of propagation (see Dynamic View Types and C++ View Types).
*The modifier is used by Rogue Wave Server during a component-to-server transaction to modify the attribute value. When the modifier returns IlsFalse and if the rollback is enabled by the component, the current transaction is rolled back by the server and a rollback transaction is sent to the component that requested the modification. See the “Transaction Control” sections in the IlsMvComponent and IlsMvServer class descriptions for more information.
Note: When the runtime attribute is not related to an entry or to a derived data member, it is your responsibility to force the modification state of the owning object by calling the member function IlsViewed::forceModify.
*The modification test is used by Rogue Wave Server to detect whether the attribute has changed since the latest notification cycle. For instance, if the runtime attribute is associated with an entry, the test function should call the function isModified declared on the class template IlsEntry.
These macros allow you to declare pure runtime attributes whose names do not correspond to any data member of the Server object type.
These macros can be enclosed only between the pairs of macros:
*ILS_OBJECT_BEGIN/ILS_OBJECT_END
*ILS_ENTITY_BEGIN/ILS_ENTITY_END
*ILS_MVVIEW_BEGIN/ILS_MVVIEW_END
or their derivatives.
Important: Rogue Wave Server does not differentiate between the “integer” and “long” types, “int” being considered an equivalent of “long”, both on the server side and on the component side.
Header File 
#include <ilserver/rtmodel.h>
Synopsis 
ILS_RW_INDEXED_ATTR_CHAR
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_BOOLEAN
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_SHORT
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_INT
(objType,attrLabel,getValuesetValue,isModified)
ILS_RW_INDEXED_ATTR_LONG
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_FLOAT
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_DOUBLE
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_STRING
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_MVVALUE
(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_USERTYPE
(objType,userType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_ENUM
(objType,attrType,attrLabel,getValue,setValue,isModified)
Macros 
ILS_RW_INDEXED_ATTR_CHAR
(objType,attrLabel,getValue,setValue,isModified)
This macro declares attrLabel as a runtime attribute of the class objType.
This attribute is of type char and can be modified.
*Its accessor, getValue, has the following signature:
char objType::getValue(int index);
When the function returns IlsFalse, the attribute cannot be set to this value. In that case the current transaction is rolled back by the server and a rollback transaction is sent to the component having requested the modification. See Transaction Control in the IlsMvComponent class description.
The function signature can be different under the following conditions:
*the function is a member of the class or of a derived class.
*its result converts implicitly to char.
*it can be invoked with an integer as argument.
*Its modifier, setValue, has the following signature:
IlsBoolean objType::setValue(int index,char value);
The function signature can be different under the following conditions:
*The function is a member of the class or of a parent class, and
*Its result converts implicitly to IlsBoolean, and
*It can be invoked with an integer and a char as arguments.
When the function returns IlsFalse, the attribute cannot be set to this value. In that case, any current transaction on the server side is rolled back by the server and a rollback transaction is sent to the component having requested the modification. See Transaction Control in the IlsMvComponent class description.
*Its modification test has the following signature:
IlsBoolean objType::isModified(int index);
This signature can be different under the following conditions:
*the function is a member of the class or of a derived class, and
*its result converts implicitly to IlsBoolean, and
*it can be invoked with one integer value as argument.
ILS_RW_INDEXED_ATTR_SHORT(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_INT(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_LONG(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_FLOAT(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_DOUBLE(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_STRING(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_MVVALUE(objType,attrLabel,getValue,setValue,isModified)
ILS_RW_INDEXED_ATTR_USERTYPE(objType,attrType,attrLabel,getValue,setValue,
isModified)
ILS_RW_INDEXED_ATTR_ENUM(objType,attrType,attrLabel,getValue,
setValue,isModified)
The macros in the above list follow the same rules as ILS_RW_INDEXED_ATTR_CHAR, except that their attribute type varies according to the following table:
ILS_RW_INDEXED_ATTR_BOOLEAN
IlsBoolean
ILS_RW_INDEXED_ATTR_SHORT
short
ILS_RW_INDEXED_ATTR_INT
long
ILS_RW_INDEXED_ATTR_LONG
long
ILS_RW_INDEXED_ATTR_FLOAT
float
ILS_RW_INDEXED_ATTR_DOUBLE
double
ILS_RW_INDEXED_ATTR_STRING
IlsString
ILS_RW_INDEXED_ATTR_MVVALUE
IlsMvValue
ILS_RW_INDEXED_ATTR_USERTYPE
user-defined class
deriving from IlsMvUserType
ILS_RW_INDEXED_ATTR_ENUM
enumerated type
See Also 
IlsEntry, IlsMvComponent, ILS_R_INDEXED_ATTR_XXX

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