ScriptService Struct Reference
[Scripting Services]

Inherited by ScriptImpl.

List of all members.

Public Methods

virtual ContextgetDefaultContext ()=0
virtual const ChargetGlobal (const Char *name)=0
virtual bool runBuffer (void *buffer, unsigned size, const Char *name, Context *context=0)=0
virtual ServicecreateA (const Char *typeName)=0
virtual const ChargetTypeName (Service *s)=0
virtual bool isA (Service *s, const Char *type)=0
virtual void reference (Service *s, void *data)=0
virtual void release (Service *s, void *data)=0
virtual void destroy ()=0


Detailed Description

A generic interface to the scripting environment. I've tried to keep the interface as implementation neutral as possible to allow people to try out different scripting languages.

This interface is intended only to expose the scripting environment to the Core services. With very few exceptions, you should not be calling this interface directly. Rather, use the calls available in CoreService instead.


Member Function Documentation

virtual Service* ScriptService::createA const Char   typeName [pure virtual]
 

Locate a service and create a new instance.

virtual void ScriptService::destroy   [pure virtual]
 

Destroy this instance, called as part of the application exit code.

virtual Context* ScriptService::getDefaultContext   [pure virtual]
 

Retrieve the default scripting context.

virtual const Char* ScriptService::getGlobal const Char   name [pure virtual]
 

Retrieve the value of a global variable.

virtual const Char* ScriptService::getTypeName Service   s [pure virtual]
 

Return the type name of a scripted service. Returns NULL if no type name is available.

virtual bool ScriptService::isA Service   s,
const Char   type
[pure virtual]
 

Determine if a scripted service implements a particular type.

virtual void ScriptService::reference Service   s,
void *    data
[pure virtual]
 

Prevent this service instance from being garbage collected.

virtual void ScriptService::release Service   s,
void *    data
[pure virtual]
 

Allow this instance to be garbage collected (when the script system is done with it).

virtual bool ScriptService::runBuffer void *    buffer,
unsigned    size,
const Char   name,
Context   context = 0
[pure virtual]
 

Execute script code contained in a memory buffer.

Parameters:
buffer  The memory containing the script code.
size  The size of the script code, in bytes.
name  A name for the buffer which is shown if errors occur.
context  A script execution context (optional).
Returns:
True if the code ran successfully, false on errors.


The documentation for this struct was generated from the following file:


Flat Four Engine
Copyright (C) 2001 by 379, Inc.
This page generated by Doxygen