Blender V2.61 - r43446
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

SCA_PythonController Class Reference

#include <SCA_PythonController.h>

Inheritance diagram for SCA_PythonController:
Inheritance graph
[legend]

List of all members.

Public Types

enum  SCA_PyExecMode { SCA_PYEXEC_SCRIPT = 0, SCA_PYEXEC_MODULE, SCA_PYEXEC_MAX }

Public Member Functions

 SCA_PythonController (SCA_IObject *gameobj, int mode)
virtual ~SCA_PythonController ()
virtual CValueGetReplica ()
virtual void Trigger (class SCA_LogicManager *logicmgr)
void SetScriptText (const STR_String &text)
void SetScriptName (const STR_String &name)
void SetDebug (bool debug)
void AddTriggeredSensor (class SCA_ISensor *sensor)
int IsTriggered (class SCA_ISensor *sensor)
bool Compile ()
bool Import ()
void ErrorPrint (const char *error_msg)

Static Public Attributes

static SCA_PythonControllerm_sCurrentController = NULL

Protected Attributes

STR_String m_scriptText
STR_String m_scriptName
std::vector< class SCA_ISensor * > m_triggeredSensors

Detailed Description

Definition at line 43 of file SCA_PythonController.h.


Member Enumeration Documentation

Enumerator:
SCA_PYEXEC_SCRIPT 
SCA_PYEXEC_MODULE 
SCA_PYEXEC_MAX 

Definition at line 66 of file SCA_PythonController.h.


Constructor & Destructor Documentation

SCA_PythonController::SCA_PythonController ( SCA_IObject gameobj,
int  mode 
)

Definition at line 56 of file SCA_PythonController.cpp.

Referenced by GetReplica().

SCA_PythonController::~SCA_PythonController ( ) [virtual]

Definition at line 90 of file SCA_PythonController.cpp.


Member Function Documentation

void SCA_PythonController::AddTriggeredSensor ( class SCA_ISensor sensor) [inline]

Definition at line 91 of file SCA_PythonController.h.

References m_triggeredSensors.

Referenced by SCA_LogicManager::AddTriggeredController().

bool SCA_PythonController::Compile ( )

Referenced by BL_ConvertControllers().

void SCA_PythonController::ErrorPrint ( const char *  error_msg)
CValue * SCA_PythonController::GetReplica ( void  ) [virtual]

Implements CValue.

Definition at line 109 of file SCA_PythonController.cpp.

References NULL, CValue::ProcessReplica(), and SCA_PythonController().

bool SCA_PythonController::Import ( )
int SCA_PythonController::IsTriggered ( class SCA_ISensor sensor)

Definition at line 172 of file SCA_PythonController.cpp.

References find(), and m_triggeredSensors.

void SCA_PythonController::SetDebug ( bool  debug) [inline]

Definition at line 90 of file SCA_PythonController.h.

References debug().

void SCA_PythonController::SetScriptName ( const STR_String name)

Definition at line 149 of file SCA_PythonController.cpp.

References m_scriptName.

void SCA_PythonController::SetScriptText ( const STR_String text)

Definition at line 141 of file SCA_PythonController.cpp.

References m_scriptText.

void SCA_PythonController::Trigger ( class SCA_LogicManager logicmgr) [virtual]

Implements SCA_IController.

Definition at line 518 of file SCA_PythonController.cpp.


Member Data Documentation

Definition at line 58 of file SCA_PythonController.h.

Referenced by SetScriptName().

Definition at line 57 of file SCA_PythonController.h.

Referenced by SetScriptText().

Definition at line 73 of file SCA_PythonController.h.

std::vector<class SCA_ISensor*> SCA_PythonController::m_triggeredSensors [protected]

Definition at line 63 of file SCA_PythonController.h.

Referenced by AddTriggeredSensor(), and IsTriggered().


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