Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Static Public Member Functions
IlsScriptManager Class Reference

This class is the Rogue Wave Server Script Manager. More...

#include <ilserver/scriptmgr.h>

Static Public Member Functions

static IlsMvValue CallFunction (const IlsString &funcName, IlsMvValue *args, int nbParam, IlsBoolean checkError=IlsTrue, IlsBoolean useArray=IlsFalse)
 This static member function invokes the script function funcName if it exists, passing it the provided arguments. More...
 
static IlsBoolean IsTraced ()
 This static member function tests the trace mode for the Rogue Wave Script integration. More...
 
static IlsBoolean LoadScript (const IlsString &filename)
 This static member function loads a script file to memory.
 
static IlsBoolean LoadScriptFromString (const IlsString &code)
 This static member function loads the script contained in the string code to memory.
 
static IlsBoolean OnLoad (int argc=0, char **argv=0, IlsBoolean checkError=IlsFalse)
 This static member function calls the script function OnLoad(args) if it exists. More...
 
static void SetRaiseExceptionOnError (IlsBoolean b=IlsTrue)
 Choose if errors raises exceptions or only trace messages. More...
 
static void SetTraced (IlsBoolean b)
 This static member function sets a specific trace mode for the Rogue Wave Script integration. More...
 
static void UseDebugger (IlsBoolean b)
 Call this static member function with the argument set to IlsTrue before the dynamic-view server is initialized so as to enable the default Rogue Wave Views Script debugger in console mode. More...
 

Detailed Description

This class is the Rogue Wave Server Script Manager.

Library: server

Its utility methods allow you to manage Rogue Wave Views Script scripts that have been loaded to the server. The Rogue Wave Views Script integration is automatically initialized if you run a dynamic view server with dynamic modeling capabilities (see the class IlsDynMvServer).

See also
IlsDynMvServer.

Member Function Documentation

◆ CallFunction()

static IlsMvValue IlsScriptManager::CallFunction ( const IlsString funcName,
IlsMvValue args,
int  nbParam,
IlsBoolean  checkError = IlsTrue,
IlsBoolean  useArray = IlsFalse 
)
static

This static member function invokes the script function funcName if it exists, passing it the provided arguments.

If the checkError argument is true, an error will be raised if the function does not exist. The useArray parameter specifies whether the arguments are passed as a Rogue Wave Script array, or as independent function arguments.

◆ IsTraced()

static IlsBoolean IlsScriptManager::IsTraced ( )
static

This static member function tests the trace mode for the Rogue Wave Script integration.

See also
SetTraced()

◆ OnLoad()

static IlsBoolean IlsScriptManager::OnLoad ( int  argc = 0,
char **  argv = 0,
IlsBoolean  checkError = IlsFalse 
)
static

This static member function calls the script function OnLoad(args) if it exists.

The argv parameter is converted to a script array which contains the arguments you provided when you called this function.

◆ SetRaiseExceptionOnError()

static void IlsScriptManager::SetRaiseExceptionOnError ( IlsBoolean  b = IlsTrue)
static

Choose if errors raises exceptions or only trace messages.

If the b property is true, a Rogue Wave Script exception is raised if an error occurs when Server objects are accessed from a script. The script function resumes its execution.

If b is set to IlsFalse, an error message is displayed but the script function continues its execution.

By default, this property is set to IlsFalse, meaning that no exception is raised.

◆ SetTraced()

static void IlsScriptManager::SetTraced ( IlsBoolean  b)
static

This static member function sets a specific trace mode for the Rogue Wave Script integration.

If trace mode is enabled, a trace is displayed each time a method is called from or to C++ code.

◆ UseDebugger()

static void IlsScriptManager::UseDebugger ( IlsBoolean  b)
static

Call this static member function with the argument set to IlsTrue before the dynamic-view server is initialized so as to enable the default Rogue Wave Views Script debugger in console mode.

The dynamic-view server must also have been initialized in console mode (see the member function IlsDynMvServer::Initialize()).