Server
API Reference Guide
Product Documentation:

Visualization Server
Documentation Home
List of all members | Static Public Member Functions

This subclass of IlsMvServer runs a dynamic view server with dynamic modeling capabilities. More...

#include <ilserver/dynmvsvr.h>

Inheritance diagram for IlsDynMvServer:
IlsMvServer

Static Public Member Functions

static void CanUpdateModel (IlsBoolean b)
 This function allows to choose if the model can be updated or not after first loading. More...
 
static IlsBoolean Initialize (int &argc, char **argv, int threadMode=IlsMvServer::ILS_THREADED_DEFAULT, IlsBoolean consoleMode=IlsFalse)
 Use this static member function to initialize a dynamic view server with dynamic modeling capabilities. More...
 
static IlsBoolean LoadModel (const IlsString &modelFile)
 This static member function can be used to load a dynamic model from a file. More...
 
- Static Public Member Functions inherited from IlsMvServer
static IlsBoolean AbortTransaction ()
 Instructs the server to abort a component transaction handled by the server. More...
 
static void CreateDefaultCompAtStartup (IlsBoolean b)
 Change creation of default component at startup. More...
 
static IlsMvUserGetDefaultUser ()
 Returns the user associated with the default component that is linked to the server. More...
 
static IlsMvServerGetSingleton ()
 Retrieves a reference of the unique instance of the dynamic view server that has been initialized in the application. More...
 
static void Notify ()
 Performs notification and/or re-evaluation during an interaction cycle. More...
 
static void ReplyMessage (const IlsMvMessage::SvMsg &msg, IlsBoolean local=IlsFalse)
 Send a message of type IlsMvMessage::SvMsg to the component that sent the transaction currently processed by the server. More...
 
static void SetCatchExceptionMode ()
 Enable exception mode. More...
 
static void UnsetCatchExceptionMode ()
 Disable exception mode. More...
 
static IlsBoolean Initialize (int &argc, char **argv, int threadMode=ILS_THREADED_DEFAULT)
 Initialization of IlsMvServer. More...
 
static IlsBoolean LoadResources (IlsString resourceFile)
 Loads a resource file that contains a list of dynamic view type specification files. More...
 
static IlsBoolean LoadViewSpec (IlsString ilsFile, IlsBoolean useXmlParser=IlsFalse)
 Loads a dynamic-view type specification file on the server. More...
 
static IlsBoolean InterpretViewSpec (IlsString viewSpec, IlsMvComponentItf *compItf=0, IlsBoolean useXmlParser=IlsFalse)
 Interprets the dynamic-view type specification passed by the viewSpec parameter. More...
 
static IlsMvViewOpenView (const IlsString &objId, const IlsString &viewId, IlsMvComponentItf *compItf=0, const IlsMvValue *params=0, unsigned long paramsNb=0, IlsBoolean force=IlsFalse, IlsOpenViewStatus *status=0)
 Opens the dynamic view whose label is passed as its second parameter on the object whose label is provided as its first parameter. More...
 
static IlsMvViewOpenView (IlsViewed *obj, const IlsString &viewId, IlsMvComponentItf *compItf=0, const IlsMvValue *params=0, unsigned long paramsNb=0, IlsBoolean force=IlsFalse, IlsOpenViewStatus *status=0)
 Similar to the previous one, except that it takes a pointer to a Server object, instead of an object identifier, as its first argument. More...
 
static void SetTrace (IlsBoolean status=IlsTrue)
 Activates the trace mode of the server. More...
 
static IlsBoolean IsTraced ()
 Returns IlsTrue if the server is operating in trace mode.
 
static void SetTraceTime (IlsBoolean status=IlsTrue)
 Enable or disable time-tracing mode. More...
 
static IlsBoolean IsTracedTime ()
 Returns IlsTrue if time tracing-mode is enabled.
 
static IlsBoolean DeclObjectLabel (IlsViewed &obj, IlsString label)
 Associates a label with a server object and stores the association in the server. More...
 
static IlsString GetLabelOfObject (IlsViewed &object)
 Returns the label assigned to an object. More...
 
static IlsViewedGetObjectFromLabel (IlsString label)
 Returns the Server object with which the string label is associated. More...
 
static IlsBoolean UndeclObjectLabel (IlsViewed &object)
 Breaks the association established between the Server object object and a label, if any. More...
 
static IlsBoolean UndeclObjectLabel (IlsString label)
 Breaks any association established between label and a server object. More...
 
static IlsMvComponentItfGetComponent (IlsMvComponentId id)
 Returns the component identified by id. More...
 
static IlsMvComponentItf *const * GetComponents (int &dim)
 Returns an array of all the components that are currently connected to the server. More...
 
static IlsBoolean Run (int nb=0, IlsTime *t=0)
 Runs the execution loop of a dynamic view server. More...
 
static void Stop ()
 Interrupts the execution loop once the current interaction cycle is over.
 
static IlsMvComponentItfGetDefaultComp ()
 Returns a pointer to the interface of the default component that is implicitly created by Server when a view is opened with no associated component. More...
 
static IlsMvComponentItfGetInteractor ()
 Returns a pointer to the interface of the component that issued the request handled during the current interaction cycle. More...
 
static IlsMvUserGetInteractingUser ()
 Returns the current interacting user by calling the virtual function getInteractingUser().
 
static IlsMvViewGetInteractingView ()
 Retrieves the interacting view while an update request from a component is processed by the server. More...
 

Additional Inherited Members

- Public Types inherited from IlsMvServer
enum  ThreadMode { ILS_SINGLE_THREAD , ILS_THREADED_SEND, ILS_THREAD_SAFE_TRANS, ILS_THREADED_DEFAULT }
 possible execution modes of the server More...
 
- Public Member Functions inherited from IlsMvServer
virtual IlsBoolean processRequest (IlsTime *t)
 Handles a request. More...
 
virtual void onOpenView (IlsMvView &)
 Called each time a new dynamic view is opened. More...
 
virtual void onCloseView (IlsMvView &)
 Called each time a view is closed on the server. More...
 
virtual IlsBoolean beginTransaction (IlsMvComponentItf &comp, IlsTransactionId tId, IlsC2STransStatus tStat)
 This virtual member function is executed by Server at the beginning of a transaction that was opened by the component. More...
 
virtual IlsBoolean endTransaction (IlsMvComponentItf &comp, IlsTransactionId tId, IlsC2STransStatus tStat, IlsBoolean res)
 This virtual member function is executed by Server at the end of a transaction that was opened by the component. More...
 
virtual void onConnect (IlsMvComponentItf &compItf)
 Called each time a new component connects to the server. More...
 
virtual void onDisconnect (IlsMvComponentItf &compItf)
 Called when a component disconnects from the server —that is, when the component interface compItf is deleted. More...
 
virtual IlsBoolean acceptConnection (IlsMvComponentItf &compItf, IlsString &cause)
 alled before the method onConnect() but after the user has been created and bound (see IlsMvUsr::onBind()). More...
 
virtual void beginNotification ()
 If you override this virtual member function, you must call the inherited function.
 
virtual void endNotification ()
 If you override this virtual member function, you must call the inherited function.
 
void registerEndCycleTask (IlsCallbackFunc cb, IlsAny arg)
 Register a callback which will be executed at the end of the notification cycle. These callbacks are executed only once and are unregistered after execution. More...
 
virtual IlsMvUsergetInteractingUser ()
 Returns the user associated with the interface of the component that issued the request handled during the current interaction cycle. More...
 
- Protected Member Functions inherited from IlsMvServer
 IlsMvServer (int threadMode=0)
 This protected constructor is implicitly called when the dynamic view server is initialized. More...
 

Detailed Description

This subclass of IlsMvServer runs a dynamic view server with dynamic modeling capabilities.

Library: dynmvsvr

Rogue Wave Views Script integration on the server side is also available when running this server. If you choose to use this dynamic view server, you must link your server application with the dynmvsvr library.

Note
This class does not set any IlsMvServer factory. The instantiated class is still IlsMvServer (or a subclass of it if you have installed a factory).
See also
IlsDynModelInterpreter, IlsMvServer.

Member Function Documentation

◆ CanUpdateModel()

static void IlsDynMvServer::CanUpdateModel ( IlsBoolean  b)
static

This function allows to choose if the model can be updated or not after first loading.

By default, after the model has been loaded to the server, it can no longer be updated while the application is running. This static member function enables you to change this default behavior. If you call this function with the b parameter set to IlsTrue, then you will be able to update the model while the application is running.

◆ Initialize()

static IlsBoolean IlsDynMvServer::Initialize ( int &  argc,
char **  argv,
int  threadMode = IlsMvServer::ILS_THREADED_DEFAULT,
IlsBoolean  consoleMode = IlsFalse 
)
static

Use this static member function to initialize a dynamic view server with dynamic modeling capabilities.

This method parses the following command line options:

  • -ilsm or -ilsmodel <model_file>

    This option allows you to load a dynamic model file at startup. Model files are generated by Rogue Wave Server Studio. The model file, if any, is loaded first, then the script file is loaded, and lastly the dynamic views are parsed. See the LoadModel() member function below. You may specify more than one -ilsm directive.

  • -ilsj or -ilsjscript <script_file>

    This option allows you to load a Rogue Wave Views Script file at startup. You may specify more than one -ilsj directive. This function also initializes the Rogue Wave Views Script integration. Set the consoleMode argument to IlsTrue if you want Rogue Wave Views Script to use the console to display messages (Windows® platforms only). If you do so, Rogue Wave Views Script messages will be redirected to Rogue Wave Server messages of type IlsMsg (see the class IlsLogfile), otherwise, messages will be directly handled by Rogue Wave Views Script.

◆ LoadModel()

static IlsBoolean IlsDynMvServer::LoadModel ( const IlsString modelFile)
static

This static member function can be used to load a dynamic model from a file.

Rogue Wave Server assumes this file is an XMI file and invoke the default built-in XMI parser.

A dynamic type and its description should be loaded to the server only once. If a dynamic type description contained in the model file extends a C++ type, this description must be loaded to the server before opening a view on that type and before instantiating any object of this type.

This function is normally used at initialization. Pass the -ilsm option to the Initialize() function, then call LoadModel().