This abstract class defines the interface of dynamic relations. More...
#include <ilserver/dynobj.h>
Inherited by IlsInverted1ServerRelation, IlsInvertedNServerRelation, IlsOwnsNServerRelation, IlsOwnsServerRelation, IlsOwnsSetServerRelation, IlsSimpleServerRelation, IlsSortedInvertedNServerRelation, IlsSortedOwnsNServerRelation, IlsSortedUsesNServerRelation, IlsUsesNServerRelation, IlsUsesServerRelation, and IlsUsesSetServerRelation.
Public Types | |
enum | RelationImplementation { , ILS_REL_UNARY, ILS_REL_LIST, ILS_REL_SET, ILS_REL_SORTED_LIST } |
Describes types of relations. More... | |
Public Member Functions | |
IlsDynRelation (IlsDynObject &owner, const IlsRelationDef &relDef, IlsRelationId id=IlsDefaultRelationId) | |
Creates an instance of a dynamic relation. | |
virtual IlsBoolean | addTarget (IlsViewed *)=0 |
Adds a target to the dynamic relation (relevant only for n-ary relations). More... | |
virtual IlsViewed * | getElement (const IlsString &id) const =0 |
Retrieves an identified element from the n-ary relation. More... | |
virtual IlsViewedRel * | getRelation ()=0 |
Returns the relation implementation. | |
virtual IlsViewed * | getTarget () const =0 |
Gets the target of the dynamic relation (relevant only for unary relations). | |
virtual IlsBoolean | hasTarget (IlsViewed &target) |
Returns IlsTrue if the the target is an element of the relation. More... | |
virtual IlsBoolean | isInverse () const =0 |
Returns IlsTrue if the inverse property is true for the dynamic relation. | |
virtual IlsBoolean | isOwnership () const =0 |
Returns IlsTrue if the ownership property is true for the dynamic relation. | |
virtual IlsBoolean | isUnary () const =0 |
Returns IlsTrue if the unary property is true for the dynamic relation. | |
virtual IlsBoolean | removeTarget (IlsViewed *)=0 |
Removes a target from the dynamic relation (relevant only for n-ary relations). More... | |
virtual IlsBoolean | setTarget (IlsViewed *)=0 |
Sets the target of the dynamic relation (relevant only for unary relations). More... | |
This abstract class defines the interface of dynamic relations.
Library: dynmvsvr
The various subclasses implement the methods according to their semantics.
This class includes the following list of predefined subtypes, used to provide a Server implementation of dynamic relations:
IlsOwnsServerRelation:
encapsulates a simple ownership relation.IlsOwnsNServerRelation:
encapsulates a multiple ownership relation.IlsOwnsSetServerRelation:
encapsulates a multiple ownership relation implemented as a set relation.IlsUsesServerRelation:
encapsulates a simple use relation.IlsUsesNServerRelation:
encapsulates a multiple use relation.IlsUsesSetServerRelation:
encapsulates a multiple use relation implemented as a set relation.IlsInvertedServerRelation:
encapsulates a simple inverse relation.IlsInvertedNServerRelation:
encapsulates a n-m inverse relation.IlsDynModelInterpreter
, IlsDynObject
, IlsDynAttribute
.
|
pure virtual |
Adds a target to the dynamic relation (relevant only for n-ary relations).
IlsFalse
if assignment is not possible. Retrieves an identified element from the n-ary relation.
The identifier of the element is read by the IlsDynObject::getKeyIdentifier()
. This method provides direct access if the underlying relation is a set relation.
|
virtual |
Returns IlsTrue
if the the target is an element of the relation.
By default, this method returns IlsFalse
. You must override it in your subclasses.
|
pure virtual |
Removes a target from the dynamic relation (relevant only for n-ary relations).
IlsFalse
if removal is not possible.
|
pure virtual |
Sets the target of the dynamic relation (relevant only for unary relations).
IlsFalse
if assignment is not possible.