Nebula
Loading...
Searching...
No Matches
Scripting::ScriptServer Class Reference

#include <scriptserver.h>

Detailed Description

Server class of the scripting subsystem.

The scripting server keeps track of all registered class script interfaces and registered global script commands. Subclasses of script server know how to execute scripts of a specific language.

Inherits Core::RefCounted.

Inherited by Scripting::PythonServer.

Public Member Functions

 ScriptServer ()
 constructor
 
virtual ~ScriptServer ()
 destructor
 
virtual bool Open ()
 open the script server
 
virtual void Close ()
 close the script server
 
bool IsOpen () const
 return true if open
 
void SetDebug (const bool b)
 set debugging with the HTTP interface
 
virtual void AddModulePath (const IO::URI &folder)
 add module search path
 
virtual bool Eval (const Util::String &str)
 evaluate a script statement in a string
 
virtual bool EvalFile (const IO::URI &file)
 evaluate script in file
 
- Public Member Functions inherited from Core::RefCounted
 RefCounted ()
 constructor
 
int GetRefCount () const
 get the current refcount
 
void AddRef ()
 increment refcount by one
 
void Release ()
 decrement refcount and destroy object if refcount is zero
 
bool IsInstanceOf (const Rtti &rtti) const
 return true if this object is instance of given class
 
bool IsInstanceOf (const Util::String &className) const
 return true if this object is instance of given class by string
 
bool IsInstanceOf (const Util::FourCC &classFourCC) const
 return true if this object is instance of given class by fourcc
 
bool IsA (const Rtti &rtti) const
 return true if this object is instance of given class, or a derived class
 
bool IsA (const Util::String &rttiName) const
 return true if this object is instance of given class, or a derived class, by string
 
bool IsA (const Util::FourCC &rttiFourCC) const
 return true if this object is instance of given class, or a derived class, by fourcc
 
const Util::StringGetClassName () const
 get the class name
 
Util::FourCC GetClassFourCC () const
 get the class FourCC code
 

Static Public Member Functions

static void RegisterModuleInit (const ScriptModuleInit &init)
 
- Static Public Member Functions inherited from Core::RefCounted
static void DumpRefCountingLeaks ()
 dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!)
 

Protected Attributes

bool isOpen
 
bool debug
 

Static Protected Attributes

static Util::Array< ScriptModuleInitinitFuncs
 

Private Member Functions

 __DeclareClass (ScriptServer)
 
 __DeclareSingleton (ScriptServer)
 

Additional Inherited Members

- Protected Member Functions inherited from Core::RefCounted
virtual ~RefCounted ()
 destructor (called when refcount reaches zero)
 

Constructor & Destructor Documentation

◆ ScriptServer()

Scripting::ScriptServer::ScriptServer ( )

constructor

◆ ~ScriptServer()

Scripting::ScriptServer::~ScriptServer ( )
virtual

destructor

Member Function Documentation

◆ __DeclareClass()

Scripting::ScriptServer::__DeclareClass ( ScriptServer )
private

◆ __DeclareSingleton()

Scripting::ScriptServer::__DeclareSingleton ( ScriptServer )
private

◆ AddModulePath()

virtual void Scripting::ScriptServer::AddModulePath ( const IO::URI & folder)
inlinevirtual

add module search path

Reimplemented in Scripting::PythonServer.

◆ Close()

void Scripting::ScriptServer::Close ( )
virtual

close the script server

Reimplemented in Scripting::PythonServer.

◆ Eval()

virtual bool Scripting::ScriptServer::Eval ( const Util::String & str)
inlinevirtual

evaluate a script statement in a string

Reimplemented in Scripting::PythonServer.

◆ EvalFile()

virtual bool Scripting::ScriptServer::EvalFile ( const IO::URI & file)
inlinevirtual

evaluate script in file

Reimplemented in Scripting::PythonServer.

◆ IsOpen()

bool Scripting::ScriptServer::IsOpen ( ) const
inline

return true if open

◆ Open()

bool Scripting::ScriptServer::Open ( )
virtual

open the script server

Reimplemented in Scripting::PythonServer.

◆ RegisterModuleInit()

void Scripting::ScriptServer::RegisterModuleInit ( const ScriptModuleInit & init)
inlinestatic

◆ SetDebug()

void Scripting::ScriptServer::SetDebug ( const bool b)
inline

set debugging with the HTTP interface

Member Data Documentation

◆ debug

bool Scripting::ScriptServer::debug
protected

◆ initFuncs

Util::Array< ScriptModuleInit > Scripting::ScriptServer::initFuncs
staticprotected

◆ isOpen

bool Scripting::ScriptServer::isOpen
protected

The documentation for this class was generated from the following files: