Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

ScriptAgent Class Reference

Inheritance diagram for ScriptAgent:

Inheritance graph
[legend]
Collaboration diagram for ScriptAgent:

Collaboration graph
[legend]

Detailed Description

Global scripting.

It is used by OptionAgent and debug console.

Definition at line 20 of file ScriptAgent.h.

Public Member Functions

void registerFunc (const char *name, lua_CFunction func)
void doFile (const Path &file)
virtual void receiveString (const StringMsg *msg)
 Messages:
  • dostring("input") .


Protected Member Functions

virtual void own_init ()
virtual void own_shutdown ()


Member Function Documentation

void ScriptAgent::doFile const Path file  ) 
 

Definition at line 49 of file ScriptAgent.cpp.

00050 {
00051     m_state->doFile(file);
00052 }

void ScriptAgent::own_init  )  [protected, virtual]
 

Reimplemented from BaseAgent.

Definition at line 28 of file ScriptAgent.cpp.

00029 {
00030     m_state = new ScriptState();
00031     m_state->registerFunc("sendMsg", script_options_sendMsg);
00032     m_state->registerFunc("setParam", script_options_setParam);
00033     m_state->registerFunc("getParam", script_options_getParam);
00034 }

void ScriptAgent::own_shutdown  )  [protected, virtual]
 

Reimplemented from BaseAgent.

Definition at line 37 of file ScriptAgent.cpp.

00038 {
00039     delete m_state;
00040 }

void ScriptAgent::receiveString const StringMsg msg  )  [virtual]
 

Messages:

  • dostring("input") .

.. run string

Exceptions:
UnknownMsgException 

Reimplemented from BaseListener.

Definition at line 61 of file ScriptAgent.cpp.

00062 {
00063     if (msg->equalsName("dostring")) {
00064         m_state->doString(msg->getValue());
00065     }
00066     else {
00067         throw UnknownMsgException(msg);
00068     }
00069 }

void ScriptAgent::registerFunc const char *  name,
lua_CFunction  func
 

Definition at line 43 of file ScriptAgent.cpp.

00044 {
00045     m_state->registerFunc(name, func);
00046 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:56:38 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2