Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Types | Public Member Functions
IlsEntry< EntryType > Class Template Reference

Class for notifiable data members. More...

#include <ilserver/model.h>

Public Types

typedef IlsEntry< EntryType > Myself
 Myself is the type of the instantiated template class.
 

Public Member Functions

 IlsEntry (HolderType &holder, EntryType value, IlsActivity activity=IlsModel::GetDefaultActivity())
 This constructor lets you specify an initial value for EntryType. More...
 
 IlsEntry (HolderType &holder, IlsActivity activity=IlsModel::GetDefaultActivity())
 Constructor. More...
 
Myselfset (EntryType value)
 
Accessors
IlsActivity getActivity () const
 
EntryType getValue ()
 
EntryType getValueQuietly () const
 
Notification
Myselftouch ()
 
IlsBoolean isModified ()
 During a notification phase, this member function returns IlsTrue only if the entry data member has been modified since the last notification phase.
 
EntryType getOldValue ()
 During a notification phase, this member function returns the value of the entry data member before it has been edited in the last action phase. More...
 
Operators
Myselfoperator= (EntryType value)
 Equivalent to the set function described earlier.
 
Myselfoperator= (Myself &rhs)
 Assigns a new entry to IlsEntry.
 
 operator EntryType ()
 

Detailed Description

template<class EntryType>
class IlsEntry< EntryType >

Class for notifiable data members.

Library: server

Template Parameters
EntryTypeThe type of the handled value.

Rogue Wave Server lets you declare special data members called entry data members. Entries are data members whose update triggers notification, as well as the re-evaluation of derived data members whose evaluation function depends on modified entries.

Entry data members are instances of the class template IlsEntry. This class template takes the type of the entry data member (EntryType) as its parameter. The type of the holder class (HolderType) is used in the constructor of IlsEntry.

The HolderType must derive directly or transitively from the class IlsEntity or IlsObject. Derivation must be public. The EntryType must have a valid default and copy constructor, as well as an assignment operator.

See also
IlsDerived, IlsEntity, IlsObject.

Constructor & Destructor Documentation

◆ IlsEntry() [1/2]

template<class EntryType >
IlsEntry< EntryType >::IlsEntry ( HolderType &  holder,
IlsActivity  activity = IlsModel::GetDefaultActivity() 
)

Constructor.

This constructor leaves the value of EntryType uninitialized.

Parameters
holdera reference to the object that contains the entry.
activityspecifies whether the entry is active or not. An entry is active if its modification sets off the recomputation of derived data members. The default value is the one returned by the static function IlsModel::GetDefaultActivity(), which is ILS_INACTIVE by default.

◆ IlsEntry() [2/2]

template<class EntryType >
IlsEntry< EntryType >::IlsEntry ( HolderType &  holder,
EntryType  value,
IlsActivity  activity = IlsModel::GetDefaultActivity() 
)

This constructor lets you specify an initial value for EntryType.

Parameters
holdera reference to the object that contains the entry.
valueInitial value for EntryType.
activityspecifies whether the entry is active or not. An entry is active if its modification sets off the recomputation of derived data members. The default value is the one returned by the static function IlsModel::GetDefaultActivity(), which is ILS_INACTIVE by default.

Member Function Documentation

◆ getActivity()

template<class EntryType >
IlsActivity IlsEntry< EntryType >::getActivity ( ) const
\short Returns \c ILS_ACTIVE if the entry has been

set as active. Otherwise, it returns ILS_INACTIVE.

For details, see the constructor.

◆ getOldValue()

template<class EntryType >
EntryType IlsEntry< EntryType >::getOldValue ( )

During a notification phase, this member function returns the value of the entry data member before it has been edited in the last action phase.

The result of this function is significant only if the function isModified() returns IlsTrue for this attribute.

◆ getValue()

template<class EntryType >
EntryType IlsEntry< EntryType >::getValue ( )
\short Returns the value of \c EntryType.

It is useful especially when the conversion operator cannot be used or when the compiler is likely to encounter multiple user-defined conversions.

◆ getValueQuietly()

template<class EntryType >
EntryType IlsEntry< EntryType >::getValueQuietly ( ) const
\short Provides a quick access to the value of the entry.

It should not be used to evaluate a derived data member or to retrieve a value when using Rogue Wave Server transactions.

◆ operator EntryType()

template<class EntryType >
IlsEntry< EntryType >::operator EntryType ( )
\short Lets you manipulate an entry data member as if

it were the entry type.

This operator is not const, since it can update the entry internal data. It is equivalent to the function getValue() described above.

◆ set()

template<class EntryType >
Myself& IlsEntry< EntryType >::set ( EntryType  value)
\short Assigns a new value to \c EntryType without

checking for equality.

Exceptions
IlsUpdateForbiddenIf the function isUpdateAllowed() returns IlsFalse for the HolderType.

◆ touch()

template<class EntryType >
Myself& IlsEntry< EntryType >::touch ( )
\short Tells Rogue Wave Server that the entry has been modified.

This function is seldom used, but it is useful for notification and must be used when EntryType has been modified other than by an assignment.