LRAUV  revA
ScriptComponent Class Reference

Not really a component, but a class that can be merged with a Component to wrap code that is scripted. More...

#include <ScriptComponent.h>

Inheritance diagram for ScriptComponent:
Collaboration diagram for ScriptComponent:

Public Member Functions

virtual ~ScriptComponent ()
 Destructor. More...
 
void setIndex (int index)
 int index More...
 
void setModuleName (Str moduleName)
 
virtual void scriptInitialize (Logger &logger)
 Initialize function. More...
 
virtual void scriptRun (Logger &logger)
 The actual "payload" of the component. More...
 
virtual bool scriptIsSatisfied (Logger &logger)
 The satisfied method. More...
 
virtual void scriptUninitialize (Logger &logger)
 Uninit function. More...
 

Static Public Member Functions

static ComponentInstance (int index, Logger &logger)
 Returns a "Script" version of AsyncComponent, Behavior, or SyncComponent, or NULL if the component can not be properly read. More...
 

Protected Member Functions

 ScriptComponent ()
 Protected constructor called through instance() More...
 

Protected Attributes

Str moduleName_
 
int index_
 

Detailed Description

Not really a component, but a class that can be merged with a Component to wrap code that is scripted.

See classes ScriptAsyncComponent, ScriptMissionComponent and ScriptSyncMissionComponent.

Constructor & Destructor Documentation

ScriptComponent::~ScriptComponent ( )
virtual

Destructor.

ScriptComponent::ScriptComponent ( )
protected

Protected constructor called through instance()

Member Function Documentation

Component * ScriptComponent::Instance ( int  tableIndex,
Logger logger 
)
static

Returns a "Script" version of AsyncComponent, Behavior, or SyncComponent, or NULL if the component can not be properly read.

Returns a barebones instance of ScriptComponent at the indicated index in the script, or NULL if the lua component can not be properly read.

void ScriptComponent::scriptInitialize ( Logger logger)
virtual
bool ScriptComponent::scriptIsSatisfied ( Logger logger)
virtual

The satisfied method.

The Trigger test method.

Referenced by ScriptMissionComponent::isSatisfied().

void ScriptComponent::scriptRun ( Logger logger)
virtual

The actual "payload" of the component.

Referenced by ScriptAsyncComponent::run(), ScriptMissionComponent::run(), and ScriptSyncComponent::run().

void ScriptComponent::scriptUninitialize ( Logger logger)
virtual
void ScriptComponent::setIndex ( int  index)
inline

int index

References index_.

void ScriptComponent::setModuleName ( Str  moduleName)
inline

References moduleName_.

Member Data Documentation

int ScriptComponent::index_
protected

Referenced by setIndex().

Str ScriptComponent::moduleName_
protected

Referenced by setModuleName().


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