Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
Classes | Typedefs | Functions
Views Integration API

API for Rogue Wave Views integration. More...

Category Description

API for Rogue Wave Views integration.

Server provides a set of classes to ease the integration of Server into Views applications. It is possible to merge the Server main loop into the Views main loop.

There is also a predefined mapping for Data Access through customized memory data sources.

Classes

class  IlsSwComponent
 This class allows you to create a Rogue Wave Views application component. More...
 
class  IlsSwComponentFactory
 This class allows you to specify what subtypes of IlsSwComponent should be used instead of IlsSwComponent. More...
 
class  IlsSwDataSourceFactory
 This class allows you to use subtypes of the class IliMemoryDataSource. More...
 
class  IlsSwGadgetContainerFactory
 This factory class is used to instantiate new gadget containers. More...
 
class  IlsSwHRefDatatype
 This class is the Rogue Wave Views data type used to represent a hyper-reference. More...
 
class  IlsSwHRefGadget
 This class defines a hyper-reference gadget. More...
 
class  IlsSwMemoryTable
 This class derives from the Rogue Wave Views class IliMemoryTable and redefines some of the member functions related to the rows. More...
 
class  IlsSwMemoryTableFactory
 This class allows you to use subtypes of the class IlsSwMemoryTable. More...
 
class  IlsSwRepresentation
 This class implements the set of IlsSwTable representation objects associated with a given dynamic view. More...
 
class  IlsSwRow
 Defines a Rogue Wave Server representation object that is a row. More...
 
class  IlsSwServerDataSource
 This is the class of the Rogue Wave Server data source. More...
 
class  IlsSwTable
 This class defines a Rogue Wave Server representation object that is a table. More...
 
class  IlsSwTableGadget
 This class defines the basic table gadgets that are created by the Rogue Wave Server/Rogue Wave Views component. More...
 
class  IlsSwUtility
 This utility class provides simple services related to the Rogue Wave Server/Rogue Wave Views integration. More...
 
class  IlsVwConnectionPanel
 This class defines a Rogue Wave Views connection panel, allowing the user to connect to one or more servers, query the objects that were declared on them, and open views. More...
 

Typedefs

typedef IlsBoolean(* IlsSwComponentCallbackType) (IlsSwComponent &, IlsAny)
 This is the default IlsSwComponent callback type. More...
 
typedef IlsMvValue(* IlsSwInFormConverter) (const IliValue &)
 This type converts a Rogue Wave Views type to a Rogue Wave Server type. More...
 
typedef void(* IlsSwOpenViewCallbackType) (IlsSwRepresentation *, const IlsString &, IlsOpenViewStatus, IlsAny)
 This is the callback type for the callback called when a view is opened using member functions from the API of the Server/Views mapping (such as IlsSwComponent::openSwView(), IlsSwRow::swOnDereference(), and so forth). More...
 
typedef IlsBoolean(* IlsSwRowCallbackType) (IlsSwRow &, IlsAny)
 This is the default IlsSwRow callback type. More...
 
typedef IliValue(* IlsSwServerConverter) (const IlsMvValue &)
 This type converts a Server type to a Views type. More...
 
typedef IlsBoolean(* IlsSwTableCallbackDeleteRowType) (IlsSwTable &table, IlsAny arg, IlsBoolean destroy, IlsSwRow *&row, IlvBoolean &returnValue)
 This is the IlsSwTable callback type for the callback IlsSwTable::DeleteRowSymbol(). More...
 
typedef IlsBoolean(* IlsSwTableCallbackInsertRowType) (IlsSwTable &, IlsAny, IlvInt rowNumber, IliTableBuffer *buf, IlsSwRow *&row, IlvBoolean &returnValue)
 This is the IlsSwTable callback type for the callback IlvSwTable::InsertRowSymbol(). More...
 
typedef IlsBoolean(* IlsSwTableCallbackType) (IlsSwTable &, IlsAny)
 This the default IlsSwTable callback type. More...
 
typedef IlsBoolean(* IlsVwConnectionPanelOpenViewCallbackType) (IlsMvComponent *component, const IlsString &objName, const IlsString &viewName, IlsBoolean force, IlsAny)
 This is the callback type for the callback called when a view is opened using the connection panel. More...
 

Functions

const IliMemoryDataSource * IlsSwGetDs (const IliFieldItf *itf)
 Returns the data source associated with a data-source-aware gadget. More...
 
IliMemoryDataSource * IlsSwGetDs (IliFieldItf *itf)
 Returns the data source associated with a data-source-aware gadget. More...
 
const IlsSwTableIlsSwGetSwTable (const IliDataSource *ds)
 Returns the instance of IlsSwTable that is attached to a data source. More...
 
const IlsSwTableIlsSwGetSwTable (const IliFieldItf *itf)
 Returns the instance of IlsSwTable that is attached to a data-source-aware gadget. More...
 
IlsSwTableIlsSwGetSwTable (IliDataSource *ds)
 Returns the instance of IlsSwTable that is attached to a data source. More...
 
IlsSwTableIlsSwGetSwTable (IliFieldItf *itf)
 Returns the instance of IlsSwTable that is attached to a data-source-aware gadget. More...
 

Typedef Documentation

◆ IlsSwComponentCallbackType

typedef IlsBoolean(* IlsSwComponentCallbackType) (IlsSwComponent &, IlsAny)

This is the default IlsSwComponent callback type.

If the callback returns IlsTrue, no further callbacks are called and, if appropriate, the default action of the component is not performed.

Library: mvsw
.

See also
IlsSwComponent.

◆ IlsSwInFormConverter

typedef IlsMvValue(* IlsSwInFormConverter) (const IliValue &)

This type converts a Rogue Wave Views type to a Rogue Wave Server type.

Library: mvsw
.

See also
IlsSwComponent.

◆ IlsSwOpenViewCallbackType

typedef void(* IlsSwOpenViewCallbackType) (IlsSwRepresentation *, const IlsString &, IlsOpenViewStatus, IlsAny)

This is the callback type for the callback called when a view is opened using member functions from the API of the Server/Views mapping (such as IlsSwComponent::openSwView(), IlsSwRow::swOnDereference(), and so forth).

The status argument gives the status of the view-opening.

This callback is called by the function IlsSwRepresentation::onCreation() if opening the view has caused a new representation to be created. It can also be called by the function IlsSwComponent::ackOpenView() if the view was already opened on the same origin, and has not been opened in force mode.

If the callback is called with no representation, it means that the view has not been opened on the client side, in which case the status reports why it has not been opened.

You can test whether the representation is bad using the member function IlsSwRepresentation::isBad(). A representation may be bad if its initialization failed – in most cases, because invalid parameters were passed – thus causing an alert message to be displayed to the user. If this happens, the representation will be closed just after this callback.

Note
You cannot delete the representation in this callback.

Library: mvsw
.

See also
IlsSwComponent, IlsSwRow.

◆ IlsSwRowCallbackType

typedef IlsBoolean(* IlsSwRowCallbackType) (IlsSwRow &, IlsAny)

This is the default IlsSwRow callback type.

If the callback returns IlsTrue, no further callbacks are called, and if appropriate, the default action of the row representation is not performed.

Library: mvsw
.

See also
IlsSwRow.

◆ IlsSwServerConverter

typedef IliValue(* IlsSwServerConverter) (const IlsMvValue &)

This type converts a Server type to a Views type.

Library: mvsw
.

See also
IlsSwComponent.

◆ IlsSwTableCallbackDeleteRowType

typedef IlsBoolean(* IlsSwTableCallbackDeleteRowType) (IlsSwTable &table, IlsAny arg, IlsBoolean destroy, IlsSwRow *&row, IlvBoolean &returnValue)

This is the IlsSwTable callback type for the callback IlsSwTable::DeleteRowSymbol().

This callback is called by the member function IlsSwTable::deleteRow(), which is itself called by the virtual member function IlsSwMemoryTable::deleteRow() when a row is deleted from the data source. This callback receives the following data:

  • table is a reference on the table that issues the deletion
  • arg is the parameter that has been specified when setting the callback.
  • The Boolean argument destroy is IlsTrue if the corresponding row must be deleted.
  • row is a pointer on the row to be deleted.
  • returnValue is a reference on a Boolean value that will be used as a return value for the function IlsSwMemoryTable::deleteRow().

When this callback is called, it must set the return value to IlsTrue if the deletion is successful or IlsFalse otherwise.

If this callback returns IlsTrue, this means that it has handled the deletion. In this case, the deleteRow() member function does not process any further action. Otherwise, Server deletes the IlsSwRow object.

Library: mvsw
.

See also
IlsSwRow, IlsSwTable.

◆ IlsSwTableCallbackInsertRowType

typedef IlsBoolean(* IlsSwTableCallbackInsertRowType) (IlsSwTable &, IlsAny, IlvInt rowNumber, IliTableBuffer *buf, IlsSwRow *&row, IlvBoolean &returnValue)

This is the IlsSwTable callback type for the callback IlvSwTable::InsertRowSymbol().

When this callback is called, it must set three values:

  • The return value of the callback.
    • This must be set to IlsFalse if the callback did nothing or is prepared to let the other callbacks, if any, be called.
    • If the callback returns IlsTrue, no more callbacks are called and the action taken then depends on the return parameters row and returnValue, as explained below. Additionally in this latter case, this callback receives as parameters the row number and buffer to be inserted and must set the parameters row and returnValue.
  • The returnValue parameter is the value that will be used as the return value of the Views member function IliTable::insertRow().
    • If the callback returns a row and sets the returnValue argument to IlvFalse, the row in the datasource is not inserted.
    • If the callback sets the returnValue argument to IlsTrue, the row in the datasource is inserted.
  • The row parameter
    • If non-null, this row object will be used as the new row.
    • If null, the table creates a new row object.

Library: mvsw
.

See also
IlsSwRow, IlsSwTable.

◆ IlsSwTableCallbackType

typedef IlsBoolean(* IlsSwTableCallbackType) (IlsSwTable &, IlsAny)

This the default IlsSwTable callback type.

If the callback returns IlsTrue, no further callbacks are called, and if appropriate, the default action of the table representation is not performed.

Library: mvsw
.

See also
IlsSwTable.

◆ IlsVwConnectionPanelOpenViewCallbackType

typedef IlsBoolean(* IlsVwConnectionPanelOpenViewCallbackType) (IlsMvComponent *component, const IlsString &objName, const IlsString &viewName, IlsBoolean force, IlsAny)

This is the callback type for the callback called when a view is opened using the connection panel.

Library: mvconpan
.

This type takes the following arguments:

  • The component on which this view is opened
  • The label of the server object
  • The name of the view
  • If set to IlsTrue, the Boolean argument force means that the user wants to open the view in force mode. See the description of the arguments to the function IlsMvComponent::openView() for more information.
  • arg is the argument you supplied when installing the callback using the member function IlsVwConnectionPanel::setOpenViewCallback().

If this type returns IlsTrue, it means that you have parameterized the opening of the view. Otherwise, the connection panel opens the view using the standard IlsMvComponent::openView() member function.

See also
IlsMvComponent, IlsVwConnectionPanel.

Function Documentation

◆ IlsSwGetDs() [1/2]

const IliMemoryDataSource* IlsSwGetDs ( const IliFieldItf *  itf)

Returns the data source associated with a data-source-aware gadget.

Library: mvsw

This function should be used instead of the following Rogue Wave Views member functions:

  • IliFieldItf::f_getDataSource(), or
  • IliFieldItf::f_getDataSourceName().

This function uses the Rogue Wave Views method f_getDataSource() or, if this method fails, the Rogue Wave Views repository, to get the data source from the data source name (using the method f_getDataSourceName()). The method then does a safe downcast to get the correct return type. It returns NULL if the data-aware gadget is not connected, or if the data source is not of type IliMemoryDataSource* or a type that derives from this class.

See also
IliFieldItf (in the Rogue Wave Views documentation, Data Access package).

◆ IlsSwGetDs() [2/2]

IliMemoryDataSource* IlsSwGetDs ( IliFieldItf *  itf)

Returns the data source associated with a data-source-aware gadget.

Library: mvsw

This function should be used instead of the following Rogue Wave Views member functions:

  • IliFieldItf::f_getDataSource(), or
  • IliFieldItf::f_getDataSourceName().

This function uses the Rogue Wave Views method f_getDataSource() or, if this method fails, the Rogue Wave Views repository, to get the data source from the data source name (using the method f_getDataSourceName()). The method then does a safe downcast to get the correct return type. It returns NULL if the data-aware gadget is not connected, or if the data source is not of type IliMemoryDataSource* or a type that derives from this class.

See also
IliFieldItf (in the Rogue Wave Views documentation, Data Access package).

◆ IlsSwGetSwTable() [1/4]

const IlsSwTable* IlsSwGetSwTable ( const IliDataSource *  ds)

Returns the instance of IlsSwTable that is attached to a data source.

Library: mvsw

This method can return 0 if the parameters are 0 or if there is no instance of IlsSwTable associated with the data source.

See also
IlsSwTable.

◆ IlsSwGetSwTable() [2/4]

const IlsSwTable* IlsSwGetSwTable ( const IliFieldItf *  itf)

Returns the instance of IlsSwTable that is attached to a data-source-aware gadget.

Library: mvsw

This function uses IlsSwGetDs() to get the data source from the data-source-aware gadget itf. It is provided so that you can find the table representation object associated with a data-source-aware gadget.

This method can return 0 if the parameters are 0 or if there is no instance of IlsSwTable associated with the data source.

Warning
This method cannot return the data source of the following data-aware gadget: IliDbGrapher, IliDbGant, IliDbTree.
See also
IlsSwGetDs(), IlsSwTable.

◆ IlsSwGetSwTable() [3/4]

IlsSwTable* IlsSwGetSwTable ( IliDataSource *  ds)

Returns the instance of IlsSwTable that is attached to a data source.

Library: mvsw

This method can return 0 if the parameters are 0 or if there is no instance of IlsSwTable associated with the data source.

See also
IlsSwTable.

◆ IlsSwGetSwTable() [4/4]

IlsSwTable* IlsSwGetSwTable ( IliFieldItf *  itf)

Returns the instance of IlsSwTable that is attached to a data-source-aware gadget.

Library: mvsw

This function uses IlsSwGetDs() to get the data source from the data-source-aware gadget itf. It is provided so that you can find the table representation object associated with a data-source-aware gadget.

This method can return 0 if the parameters are 0 or if there is no instance of IlsSwTable associated with the data source.

Warning
This method cannot return the data source of the following data-aware gadget: IliDbGrapher, IliDbGant, IliDbTree.
See also
IlsSwGetDs(), IlsSwTable.