Rogue Wave Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Public Member Functions
IlsObject Class Reference

The class IlsObject is a base class for all classes declaring server data members: derived data members, entries, and relations. More...

#include <ilserver/model.h>

Inheritance diagram for IlsObject:
IlsDynObject IlsLockableObject IlsMvView IlsSafelyLockableObject

Public Member Functions

virtual ~IlsObject ()
 Virtual destructor.
 
virtual void cut (ILS_CUT_DIRECTIVE=ILS_ALL)
 Cuts all relations of which the object is the target. More...
 
virtual IlsEntitygetEntity ()
 Returns a pointer to the entity that owns the object transitively.
 
IlsBoolean isInserted ()
 Indicates whether the object is owned or not.
 
IlsBoolean remove ()
 Cuts the object and always returns IlsTrue. More...
 
Locking Member Functions

These member functions return IlsFalse by default. They are meant to be overridden.

virtual IlsBoolean lock ()
 Locks the object.
 
virtual IlsBoolean trylock ()
 Tries to lock the object. More...
 
virtual IlsBoolean unlock ()
 Unlocks the object.
 
virtual IlsBoolean isUpdateAllowed ()
 By default, this virtual member function checks whether the object is the target of an ownership relation. More...
 
Notification Member Functions
IlsBoolean isOwnerModified ()
 During a notification phase, this member function returns IlsTrue if the owner of the object has changed since the last notification phase.
 
IlsBoolean areUsersModified ()
 During a notification phase, this member function returns IlsTrue if a use relation has been added or removed since the last notification phase.
 

Detailed Description

The class IlsObject is a base class for all classes declaring server data members: derived data members, entries, and relations.

Library: server

Instances of a class deriving from IlsObject can be both the target of a use and an ownership relation. This rule will be enforced at compile time.

See also
IlsDerived, IlsEntity, IlsEntry, IlsModel, IlsOwns, IlsOwnsDynamicArray, IlsOwnsFixedArray, IlsOwnsList, IlsOwnsSet, IlsUses, IlsUsesDynamicArray, IlsUsesFixedArray, IlsUsesList, IlsUsesSet.

Member Function Documentation

§ cut()

virtual void IlsObject::cut ( ILS_CUT_DIRECTIVE  = ILS_ALL)
virtual

Cuts all relations of which the object is the target.

The argument passed to the function is an enumerated type which takes the following three values:

  • ILS_ALL cuts all relations.
  • ILS_USE cuts use relations only, if any.
  • ILS_OWNERSHIP cuts the ownership relation, if any.

Reimplemented in IlsDynObject.

§ isUpdateAllowed()

virtual IlsBoolean IlsObject::isUpdateAllowed ( )
virtual

By default, this virtual member function checks whether the object is the target of an ownership relation.

If yes, the test isUpdateAllowed() is propagated to this object. Otherwise, the lock flag is returned.

§ remove()

IlsBoolean IlsObject::remove ( )
virtual

Cuts the object and always returns IlsTrue.

It overrides the virtual function IlsViewed::remove().

Implements IlsViewed.

§ trylock()

virtual IlsBoolean IlsObject::trylock ( )
virtual

Tries to lock the object.

It returns IlsFalse if the operation fails.

Reimplemented in IlsSafelyLockableObject, and IlsLockableObject.


© Copyright 2018, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.