IlsObject
 
IlsObject
Category 
Modeling class
Inheritance Path 
IlsRefCounted
IlsViewed
IlsObject
Description 
The class IlsObject is a base class for all classes declaring server data members: derived data members, entries, and relations. 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.
Library 
<server>
Header File
#include <ilserver/model.h>
Synopsis 
class IlsObject
{
public:
virtual ~IlsObject();
IlsBoolean isInserted();
virtual void cut(ILS_CUT_DIRECTIVE=ILS_ALL);
virtual IlsBoolean remove();
virtual IlsEntity* getEntity();
virtual IlsBoolean lock();
virtual IlsBoolean unlock();
virtual IlsBoolean trylock();
virtual IlsBoolean isUpdateAllowed();
IlsBoolean isOwnerModified();
IlsBoolean areUsersModified();
};
Destructor 
virtual ~IlsObject();
This is the virtual destructor of IlsObject.
Member Functions 
IlsBoolean isInserted();
This member function indicates whether the object is owned or not.
[virtual] void cut(ILS_CUT_DIRECTIVE=ILS_ALL);
This virtual member function 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.
[virtual] IlsBoolean remove();
This virtual member function cuts the object and always returns IlsTrue. It overrides the virtual function IlsViewed::remove.
[virtual] IlsEntity* getEntity();
This virtual member function returns a pointer to the entity that owns the object transitively.
Locking Member Functions
These member functions return IlsFalse by default. They are meant to be overridden.
[virtual] IlsBoolean lock();
This virtual member function lets you lock the object.
[virtual] IlsBoolean unlock();
This virtual member function lets you unlock the object.
[virtual] IlsBoolean trylock();
This virtual member function tries to lock the object. It returns IlsFalse if the operation fails.
[virtual] IlsBoolean isUpdateAllowed();
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.
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.
See Also 
IlsDerived, IlsEntity, IlsEntry, IlsModel, IlsOwns, IlsOwnsDynamicArray, IlsOwnsFixedArray, IlsOwnsList, IlsOwnsSet, IlsUses, IlsUsesDynamicArray, IlsUsesFixedArray, IlsUsesList, IlsUsesSet

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