Server
API Reference Guide
Product Documentation:

Visualization 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)
 
IlsBoolean isInserted ()
 Indicates whether the object is owned or not.
 
IlsBoolean remove ()
 
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 ()
 
virtual IlsBoolean unlock ()
 Unlocks the object.
 
virtual IlsBoolean isUpdateAllowed ()
 
virtual IlsBoolean isUsePossible ()
 Locks the object.
 
virtual IlsBoolean isAlreadyInHierarchy (void *)
 Locks the object.
 
virtual IlsEntitygetEntity ()
 
void setEntityContext (IlsEntityContext &)
 Locks the object.
 
void unsetEntityContext (IlsEntityContext &)
 Locks the object.
 

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
\short 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.

◆ getEntity()

virtual IlsEntity* IlsObject::getEntity ( )
virtual
\short Returns a pointer to the entity

that owns the object transitively.

◆ isUpdateAllowed()

virtual IlsBoolean IlsObject::isUpdateAllowed ( )
virtual
\short 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
\short Cuts the object and always returns \c IlsTrue.

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

Implements IlsViewed.

◆ trylock()

virtual IlsBoolean IlsObject::trylock ( )
virtual
\short Tries to lock the object.

It returns IlsFalse if the operation fails.

Reimplemented in IlsSafelyLockableObject, and IlsLockableObject.