Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Public Member Functions | Protected Member Functions | Friends
IlsSwRow Class Reference

Defines a Rogue Wave Server representation object that is a row. More...

#include <ilmvsw/row.h>

Inheritance diagram for IlsSwRow:
IlsRpObject

Public Member Functions

 IlsSwRow (IlsRepresentation &, const IlsRpObjModel &)
 Invoked by Server when a new row representation is created. More...
 
virtual ~IlsSwRow ()
 Destructor.
 
virtual void ackOpenView (const IlsMvValue *ackArgv, IlsCbArgNb ackArgc)
 Called by Server to acknowledge or to roll back a call to the second virtual member function openView() (documented above). More...
 
virtual void transferState (IlsSwRow &oldRow, IlsBoolean transferCallbacks=IlsTrue)
 Transfers the state of the old row to the row for which this method is called. More...
 
Accessors
IlsSwTablegetTable () const
 Returns the table representation object that owns the row.
 
IlvInt getRowNumber ()
 Returns the number of the current row in the table. More...
 
IlsRpAttributeId colToAttributeId (IlvInt colIndex) const
 Returns the attribute identifier for the Rogue Wave Views column number of the row.
 
Notification Cycle
virtual IlsBoolean beginS2CUpdate (IlsS2CTransStatus, IlsTransactionId)
 This virtual member function, which is inherited from IlsRpObject, must be called if overriden in an subclass.
 
virtual void endS2CUpdate (IlsS2CTransStatus, IlsTransactionId)
 This virtual member function, which is inherited from IlsRpObject, must be called if overriden in an subclass. More...
 
Opening a View

These member functions open a view on the server object associated with this representation object.

See the virtual member functions IlsSwComponent::openSwView for a description of their arguments.

virtual void openSwView (const IlsString &viewName, IlsSwServerDataSource *sds, IlsMvValue *argv=0, IlsCbArgNb argc=0, IlsBoolean force=IlsFalse, IlsSwOpenViewCallbackType cb=0, IlsAny arg=0)
 
virtual void openSwView (const IlsString &viewName, IlsSwServerDataSource *sds, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resultIndex, IlsBoolean force=IlsFalse, IlsSwOpenViewCallbackType cb=0, IlsAny arg=0)
 
- Public Member Functions inherited from IlsRpObject
virtual void onRmRepresentation ()
 Called when the representation that owns the representation object is destroyed and invokes in turn the representation object destructor. More...
 
IlsBoolean setConstAttribute (IlsRpAttributeId)
 Sets the value of a constant attribute for a representation object. More...
 
void setConstAttributes ()
 Sets the value of the constant attributes of a representation object. More...
 
virtual IlsBoolean setMapping (const IlsRpObject &cousin)
 Associates a new representation object with an existing Server object. More...
 
virtual IlsString getLabel () const
 Returns the label of the representation object. More...
 
IlsRpObjectId getId () const
 Returns the identifier of the representation object. More...
 
IlsRpAttributeId getAttributeId (const IlsString &label) const
 Returns an attribute identifier from its name. More...
 
IlsRpAttributeId getAttributeId (const IlsString &label, int index) const
 Returns an indexed attribute identifier from its name and its index. More...
 
IlsMvDataType getAttributeType (IlsRpAttributeId) const
 Returns the attribute type of a given attribute. More...
 
const IlsRpObjModelgetModel () const
 Returns a pointer to the runtime representation object model associated with the representation object. More...
 
IlsRepresentationgetRepresentation () const
 Returns a pointer to the representation that owns the representation object. More...
 
IlsBoolean isEditable (IlsRpAttributeId id, IlsEditRights::Value right=IlsEditRights::DEFAULT_EDIT) const
 Returns IlsTrue if the attribute id has the editing rights specified by the variable right.
 
IlsBoolean isLocalHRef (IlsRpAttributeId id)
 Returns IlsTrue if the attribute id is a local hyper-reference – in other words, a hyper-reference that has no associated relation.
 
IlsMvRef getReference () const
 Returns a reference object that identifies a representation object in the server-to-component protocol. More...
 
virtual void beginC2SUpdate (IlsRpUpdateType)
 Initializes a set of updates on the representation object. More...
 
void beginC2SUpdate ()
 Initializes a set of updates on the representation object. More...
 
IlsBoolean isInC2SUpdate ()
 Returns IlsTrue between a call to beginC2SUpdate() and a call to either endC2SUpdate() or discardC2SUpdate(). Otherwise, it returns IlsFalse.
 
virtual void endC2SUpdate ()
 Commits updates performed on the representation object. More...
 
virtual void discardC2SUpdate ()
 Discards the modifications currently stored in the representation object update buffer.
 
virtual void openView (const IlsString &viewName, IlsMvValue *argv=0, IlsCbArgNb argc=0, IlsBoolean force=IlsFalse)
 Requests the server to open the view viewName on the server object associated with its corresponding representation object. More...
 
virtual void openView (const IlsString &viewName, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resultIndex, IlsBoolean force=IlsFalse)
 Identical to the previous one except that Server executes a call to the representation object function ackOpenView() during the acknowledgment rollback of the transaction that includes the call to openView(). More...
 
virtual void setBoolean (IlsRpAttributeId id, IlsBoolean value)
 Called by the server when the Boolean attribute id has no associated modifier and must be set to value. More...
 
virtual void setChar (IlsRpAttributeId id, char value)
 Called by the server when the attribute id of type char has no associated modifier and must be set to value. More...
 
virtual void setShort (IlsRpAttributeId id, short value)
 Called by the server when the id attribute of type short has no associated modifier and must be set to value. More...
 
virtual void setLong (IlsRpAttributeId id, long value)
 Called by the server when the attribute id of type long has no associated modifier and must be set to value. More...
 
virtual void setFloat (IlsRpAttributeId id, float value)
 Called by the server when the attribute id of type float has no associated modifier and must be set to value. More...
 
virtual void setDouble (IlsRpAttributeId id, double value)
 Called by the server when the attribute id of type double has no associated modifier and must be set to value. More...
 
virtual void setString (IlsRpAttributeId id, const IlsString &value)
 Called by the server when the attribute id of type IlsString has no associated modifier and must be set to value. More...
 
virtual void setAny (IlsRpAttributeId id, IlsAny value)
 Called by the server when the attribute id of type IlsAny has no associated modifier and must be set to value. More...
 
virtual void setReference (IlsRpAttributeId id, const IlsRpObject *objectPtr)
 Called by the server when the id attribute has no associated modifier and must reference the object pointed to by objectPtr. More...
 
virtual void setHRef (IlsRpAttributeId id, const IlsString &hrefLabel)
 called by the server when the label of the hyper-reference id has no associated modifier and must be set to hrefLabel. More...
 
virtual void onSuppress (IlsBoolean isDestroyed=IlsFalse)
 This member function notifies the object destruction to the server. More...
 
virtual void setRpStatus (IlsRpStatus)
 Requests modification of the representation status of the server object associated with the representation object in the view to which the representation is attached.
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, IlsBoolean value)
 Requests the server to set the IlsBoolean attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, char value)
 Requests the server to set the char attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, short value)
 Requests the server to set the short attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, long value)
 Requests the server to set the long attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, float value)
 Requests the server to set the float attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, double value)
 Requests the server to set the double attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, const IlsString &value)
 Requests the server to set the IlsString attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, IlsAny value)
 Requests the server to set the IlsAny attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, const IlsMvUserType &value)
 Requests the server to set the IlsMvUserType attribute id to value. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, const IlsRpObject &objRef)
 Requests the server to set the attribute id of a reference to another representation object. More...
 
virtual IlsBoolean onUpdate (IlsRpAttributeId id, const IlsRpObject &newHRefOwner, IlsRpAttributeId newHRef)
 Requests the server to replace the target object of a Server relation with another object. More...
 
virtual IlsBoolean onNullifyRef (IlsRpAttributeId id)
 Requests the server to reset the reference attribute id to null, so as to notify the server about this modification. More...
 
virtual IlsBoolean isMatchingRef (IlsRpAttributeId id, const IlsRpObject *newTarget)
 Tests whether the id attribute can be assigned the value of the object pointed to by newTarget. More...
 
virtual IlsBoolean isMatchingHRef (IlsRpAttributeId id, const IlsRpObject *newHRefOwner, IlsRpAttributeId newHRef)
 Tests whether the id attribute can be assigned the hyper-reference identified by newHRef and belonging to newHRefOwner. More...
 
virtual IlsBoolean onDereference (IlsRpAttributeId id, IlsMvValue *argv=0, IlsCbArgNb argc=0, IlsBoolean force=IlsFalse)
 Opens a view by dereferencing a hyper-reference (see Hyper-References). More...
 
virtual IlsBoolean onDereference (IlsRpAttributeId id, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resultIndex, IlsBoolean force=IlsFalse)
 Opens a view by dereferencing a hyper-reference (see Hyper-References) with aknowledgement. More...
 
virtual IlsBoolean onAddToCollection (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorId)
 Requests the server to set or add a target to a relation (usually a n-ary relation). More...
 
virtual IlsBoolean onRmFromCollection (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorId, IlsBoolean isDestroyed=IlsFalse)
 Requests the server to remove a target in a relation (usually a n-ary relation). More...
 
virtual IlsBoolean testCollection (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorId)
 Tests whether the representation object can be added to the collection of objects designated by the attribute collectorId and owned by the representation object collectorOwner. More...
 
virtual IlsBoolean execAsyncCallback (const IlsString &funNm, IlsMvValue *args=0, IlsCbArgNb argsNb=0, IlsBoolean inTrans=IlsTrue, IlsBoolean freeArgs=IlsFalse)
 Executes an asynchronous call to the function funNm on the Server object that matches the current representation object. More...
 
virtual IlsBoolean execSyncCallback (const IlsString &funNm, IlsMvValue *args, IlsCbArgNb argsNb, IlsMvValue &result, IlsBoolean freeArgs=IlsFalse)
 Executes a synchronous call to the callback function funNm on the server object that matches the current representation object. More...
 
virtual IlsBoolean execDuplexCallback (const IlsString &funNm, IlsMvValue *args, IlsCbArgNb argsNb, const IlsString &duplexFunNm, IlsMvValue *duplexArgs=0, IlsCbArgNb duplexNbArgs=0, IlsCbArgNb resultIndex=0, IlsBoolean inTrans=IlsTrue, IlsBoolean freeArgs=IlsFalse)
 Executes an asynchronous call to the function funNm on the server object, the representation object is bound to. More...
 

Static Public Member Functions

Callback Symbols
static IlvSymbol * RowCreatedSymbol ()
 Returns the symbol for the callback that can be called when a row is created.
 
static IlvSymbol * RowDestroyedSymbol ()
 Returns the symbol for the callback that can be called when a row is destroyed.
 
Callbacks
static void AddCallback (IlvSymbol *symbol, IlsSwRowCallbackType, IlsAny=0, IlsSwRow *row=0)
 Adds a callback to the row. More...
 
static void RemoveCallback (IlvSymbol *symbol, IlsSwRowCallbackType, IlsAny=0, IlsSwRow *=0)
 Removes a callback that was previously added using the member function IlsSwRow::AddCallback().
 

Protected Member Functions

virtual void afterInit ()
 Called immediately after an object has been created when a representation object is instantiated by the Server. More...
 
virtual void registerProperty (IlvSymbol *s, IlsSvInt index, const IliValue &value)
 Called to assign the property defined by s to the Rogue Wave Views table property manager. More...
 
virtual void setCell (IlsSvInt svIndex, const IliValue &value)
 Called by the server to update the cell matching the svIndex column for the current row. More...
 
virtual void setUserTypeValue (IlsRpAttributeId, IlsMvUserType &value)
 Called by the server when the attribute id of type IlsMvUserType (or derived) has no associated modifier and must be set to value. More...
 
- Protected Member Functions inherited from IlsRpObject
 IlsRpObject (const IlsRpObject &collectorOwner, IlsRpAttributeId collectorAttrId, const IlsRpObjModel *model=0, IlsBoolean endUpdate=IlsTrue)
 Constructor used to create object from a collector. More...
 
 IlsRpObject (IlsRepresentation &rp, const IlsRpObjModel &model)
 Constructor used by the notification engine. More...
 
virtual ~IlsRpObject ()
 Destructor. More...
 
virtual void beforeDeletion (IlsTransactionId id)
 Called between the beginS2CUpdate() and theendS2CUpdate()` in the transaction that deletes the RpObject. More...
 
virtual IlsBoolean ackAttrUpdate (IlsRpAttributeId attrId, IlsS2CTransStatus transStatus, IlsTransactionId transId)
 Called for each attribute involved in a server-to-component transaction, except if the propagation has been aborted (see beginS2CUpdate() above). More...
 

Friends

class IlsSwTable
 

Dereferencing

void swOnDereference (IlvInt colNo, IlsSwServerDataSource *ds, IlsMvValue *argv=0, IlsCbArgNb argc=0, IlsBoolean force=IlsFalse, IlsSwOpenViewCallbackType cb=0, IlsAny arg=0)
 Dereferences the hyper-reference at the Rogue Wave Views column colNo. More...
 
void swOnDereference (IlvInt colNo, IlsSwServerDataSource *ds, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resIndex, IlsBoolean force=IlsFalse, IlsSwOpenViewCallbackType cb=0, IlsAny arg=0)
 Performs the same a action as the previous one, but allows you to specify acknowledgement parameters (see IlsRpObject::onDereference()).
 
virtual void onSwDereference (IlsRpAttributeId, IlsSwServerDataSource *ds, IlsMvValue *argv, IlsCbArgNb argc, IlsMvValue *ackArgv, IlsCbArgNb ackArgc, IlsCbArgNb resIndex, IlsBoolean force=IlsFalse, IlsSwOpenViewCallbackType cb=0, IlsAny arg=0)
 Dereferences the attribute specified if it is a valid hyper-reference, otherwise it has no effect. More...
 

Detailed Description

Defines a Rogue Wave Server representation object that is a row.

Library: mvsw

This class also defines a set of properties that are described in section IlsSwRow of Chapter Rogue Wave Server/Rogue Wave Views Mapping in the Server User's Guide.

See also
IlsRpObject, IlsSwComponent, IlsSwTable, IliValue (Rogue Wave Views/Data Access documentation).

Constructor & Destructor Documentation

◆ IlsSwRow()

IlsSwRow::IlsSwRow ( IlsRepresentation ,
const IlsRpObjModel  
)

Invoked by Server when a new row representation is created.

If you derive this class, you must call this constructor with representation and model arguments.

Member Function Documentation

◆ ackOpenView()

virtual void IlsSwRow::ackOpenView ( const IlsMvValue ackArgv,
IlsCbArgNb  ackArgc 
)
virtual

Called by Server to acknowledge or to roll back a call to the second virtual member function openView() (documented above).

The default implementation does nothing. It can be overridden.

Reimplemented from IlsRpObject.

◆ AddCallback()

static void IlsSwRow::AddCallback ( IlvSymbol *  symbol,
IlsSwRowCallbackType  ,
IlsAny  = 0,
IlsSwRow row = 0 
)
static

Adds a callback to the row.

The parameter symbol identifies which callback is to be added. If the row argument is null, the callback is called for all instances of IlsSwRow.

◆ afterInit()

virtual void IlsSwRow::afterInit ( )
protectedvirtual

Called immediately after an object has been created when a representation object is instantiated by the Server.

When this method has been called, the representation object has been assigned an identifier and you can use it to perform component-to-server transactions via callback member functions.

Reimplemented from IlsRpObject.

◆ endS2CUpdate()

virtual void IlsSwRow::endS2CUpdate ( IlsS2CTransStatus  ,
IlsTransactionId   
)
virtual

This virtual member function, which is inherited from IlsRpObject, must be called if overriden in an subclass.

This function applies to the Rogue Wave Views data sources all the updates that have been received during the notification cycle.

Reimplemented from IlsRpObject.

◆ getRowNumber()

IlvInt IlsSwRow::getRowNumber ( )

Returns the number of the current row in the table.

This function is not const because the row number can change if the rows have been sorted or moved. The row number will be available after the end of the first notification cycle for this row.

◆ onSwDereference()

virtual void IlsSwRow::onSwDereference ( IlsRpAttributeId  ,
IlsSwServerDataSource ds,
IlsMvValue argv,
IlsCbArgNb  argc,
IlsMvValue ackArgv,
IlsCbArgNb  ackArgc,
IlsCbArgNb  resIndex,
IlsBoolean  force = IlsFalse,
IlsSwOpenViewCallbackType  cb = 0,
IlsAny  arg = 0 
)
protectedvirtual

Dereferences the attribute specified if it is a valid hyper-reference, otherwise it has no effect.

You can specify a Server data source if you want to open the new view from an existing Server data source. If this argument is set to 0, Server looks for a preregistered data source for this view. If none is found, a new panel is created.

You can also specify a callback and its associated data by setting the cb and arg parameters. This callback is called when the view is opened.

You can refer to the functions IlsSwComponent::openSwView() and IlsRpObject::onDereference() for more information.

◆ registerProperty()

virtual void IlsSwRow::registerProperty ( IlvSymbol *  s,
IlsSvInt  index,
const IliValue &  value 
)
protectedvirtual

Called to assign the property defined by s to the Rogue Wave Views table property manager.

In the row-creation phase, this property is kept until the end of the notification cycle and applied when the row is inserted into a table.

◆ setCell()

virtual void IlsSwRow::setCell ( IlsSvInt  svIndex,
const IliValue &  value 
)
protectedvirtual

Called by the server to update the cell matching the svIndex column for the current row.

The row in the data source is updated at the end of notification for this row.

◆ setUserTypeValue()

virtual void IlsSwRow::setUserTypeValue ( IlsRpAttributeId  id,
IlsMvUserType value 
)
protectedvirtual

Called by the server when the attribute id of type IlsMvUserType (or derived) has no associated modifier and must be set to value.

The default implemetation does nothing.

For details on representation attribute modifiers, see the macros ILS_RP_ATTR_USERTYPE(), ILS_RP_INDEXED_ATTR_USERTYPE(), ILS_RP_DEFAULT_USERTYPE(), ILS_RP_INDEXED_DEFAULT_USERTYPE().

Reimplemented from IlsRpObject.

◆ swOnDereference()

void IlsSwRow::swOnDereference ( IlvInt  colNo,
IlsSwServerDataSource ds,
IlsMvValue argv = 0,
IlsCbArgNb  argc = 0,
IlsBoolean  force = IlsFalse,
IlsSwOpenViewCallbackType  cb = 0,
IlsAny  arg = 0 
)

Dereferences the hyper-reference at the Rogue Wave Views column colNo.

If the column corresponds to a selectable hyper-reference, this method calls the virtual member function onSwDereference().

◆ transferState()

virtual void IlsSwRow::transferState ( IlsSwRow oldRow,
IlsBoolean  transferCallbacks = IlsTrue 
)
virtual

Transfers the state of the old row to the row for which this method is called.

If the argument transferCallbacks is set to IlsTrue, the callbacks for the current instance are transferred to the new row.