Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Member Functions | Public Attributes
javascript::IlsServerRelation Class Reference

This Rogue Wave Views Script class is a proxy for Rogue Wave Server n-ary relations. More...

#include <javascript/serverside.h>

Public Member Functions

void add (IlsViewed target)
 Adds a target to the n-ary relation. More...
 
void clear ()
 Clears the contents of the relation. More...
 
IlsViewed get (String id)
 Returns the first object identified by id that is stored in the relation. More...
 
IlsViewed getElementAt (Int index)
 Returns the object located at position index if it exists. More...
 
Boolean isIn (IlsViewed obj)
 Returns true if the relation contains the specified object.
 
void remove (IlsViewed target)
 Removes the specified target from the n-ary relation. More...
 

Public Attributes

Boolean dynamic
 True if the relation is dynamic.
 
Boolean inverse
 True if the relation is an inverse relation.
 
Boolean length
 The number of elements in the relation.
 
String name
 Name of the n-ary relation.
 
Boolean owns
 True if the relation is an ownership relation.
 

Detailed Description

This Rogue Wave Views Script class is a proxy for Rogue Wave Server n-ary relations.

Warning
This class is a JavaScript class, not a C++ one.
See also
IlsServerRelationIterator (script class).

Member Function Documentation

◆ add()

void javascript::IlsServerRelation::add ( IlsViewed  target)

Adds a target to the n-ary relation.

Note
You cannot add an object to the relation if an iterator has been opened on it.
Parameters
targettarget to be added.

◆ clear()

void javascript::IlsServerRelation::clear ( )

Clears the contents of the relation.

Note that there must not be any open iterator on this relation when the method is called.

◆ get()

IlsViewed javascript::IlsServerRelation::get ( String  id)

Returns the first object identified by id that is stored in the relation.

The method calls the C++ member function IlsDynObject::getElementFromRel(const IlsRelationDef*, const IlsString&) const on the owner of the relation to retrieve the identified object, if it exists.

Parameters
idid of the object.
Returns
the object found.

◆ getElementAt()

IlsViewed javascript::IlsServerRelation::getElementAt ( Int  index)

Returns the object located at position index if it exists.

Parameters
indexposition index.

◆ remove()

void javascript::IlsServerRelation::remove ( IlsViewed  target)

Removes the specified target from the n-ary relation.

Note
You cannot remove an object from the relation if an iterator has been opened on it.
Parameters
targettarget to be removed.