Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Types | Public Member Functions
IlsDynRelation Class Referenceabstract

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 IlsViewedgetElement (const IlsString &id) const =0
 Retrieves an identified element from the n-ary relation. More...
 
virtual IlsViewedRelgetRelation ()=0
 Returns the relation implementation.
 
virtual IlsViewedgetTarget () 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...
 

Detailed Description

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:

See also
IlsDynModelInterpreter, IlsDynObject, IlsDynAttribute.

Member Function Documentation

◆ addTarget()

virtual IlsBoolean IlsDynRelation::addTarget ( IlsViewed )
pure virtual

Adds a target to the dynamic relation (relevant only for n-ary relations).

Returns
IlsFalse if assignment is not possible.

◆ getElement()

virtual IlsViewed* IlsDynRelation::getElement ( const IlsString id) const
pure virtual

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.

◆ hasTarget()

virtual IlsBoolean IlsDynRelation::hasTarget ( IlsViewed target)
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.

◆ removeTarget()

virtual IlsBoolean IlsDynRelation::removeTarget ( IlsViewed )
pure virtual

Removes a target from the dynamic relation (relevant only for n-ary relations).

Returns
IlsFalse if removal is not possible.

◆ setTarget()

virtual IlsBoolean IlsDynRelation::setTarget ( IlsViewed )
pure virtual

Sets the target of the dynamic relation (relevant only for unary relations).

Returns
IlsFalse if assignment is not possible.