Update of /cvsroot/gcblue/gcb_wx/include/scriptinterface
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15468/include/scriptinterface
Modified Files:
tcScenarioInterface.h tcSimPythonInterface.h
Log Message:
Parallel ai update
Index: tcScenarioInterface.h
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcScenarioInterface.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** tcScenarioInterface.h 27 Jan 2005 01:01:45 -0000 1.13
--- tcScenarioInterface.h 16 Feb 2005 23:13:38 -0000 1.14
***************
*** 93,96 ****
--- 93,100 ----
unsigned int launcherIdx, const std::string& item, unsigned int quantity);
+ void AddUnitTask(const std::string& unitName, const std::string& taskName,
+ double priority);
+
+
void CreateAlliance(int alliance, std::string name);
tcOrder GetDefaultOrder();
Index: tcSimPythonInterface.h
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/include/scriptinterface/tcSimPythonInterface.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** tcSimPythonInterface.h 10 Jan 2005 00:30:20 -0000 1.19
--- tcSimPythonInterface.h 16 Feb 2005 23:13:38 -0000 1.20
***************
*** 43,47 ****
class tcDirector;
! namespace Sensor {
class tcAllianceSensorMap;
}
--- 43,48 ----
class tcDirector;
! namespace Sensor
! {
class tcAllianceSensorMap;
}
***************
*** 51,54 ****
--- 52,63 ----
using namespace Sensor;
+ namespace ai
+ {
+ class ScriptedTask;
+ class ScriptedTaskInterface;
+ }
+ using ai::ScriptedTask;
+ using ai::ScriptedTaskInterface;
+
/**
* Embedded python scripting interface code.
***************
*** 80,87 ****
using namespace Sensor;
class tcSimPythonInterface : public tcPythonInterface
{
public:
- void CallPlatformScript(tcPlatformObject *apObj, char *azCommand);
void SetUnitInfo(tcPlatformObject *apObj);
void Test();
--- 89,98 ----
using namespace Sensor;
+ /**
+ * Singleton class
+ */
class tcSimPythonInterface : public tcPythonInterface
{
public:
void SetUnitInfo(tcPlatformObject *apObj);
void Test();
***************
*** 99,102 ****
--- 110,115 ----
void BuildFlightPortPanel();
void CallPython(const char *commandtext, const char *errortext);
+ void CallPlatformScript(tcPlatformObject *apObj, const char* azCommand);
+ void CallTaskScript(ScriptedTask* task, const char* azCommand);
void GetObjectStringByMode(char *str); // gets name of python object to pass to python function
void LoadScenario(const char *filePath, const char *fileName); ///< loads scenario from Python script file
***************
*** 121,127 ****
void SetMenuGroup(const std::vector<long>& unitIds);
! tcSimPythonInterface();
! virtual ~tcSimPythonInterface();
private:
object PlatformInterface; ///< python tcPlatformInterface
tcPlatformInterface *platformInterface; ///< C++ handle to PlatformInterface
--- 134,143 ----
void SetMenuGroup(const std::vector<long>& unitIds);
! static tcSimPythonInterface* Get(); ///< singleton accessor
!
private:
+ tcSimPythonInterface();
+ ~tcSimPythonInterface();
+
object PlatformInterface; ///< python tcPlatformInterface
tcPlatformInterface *platformInterface; ///< C++ handle to PlatformInterface
***************
*** 148,151 ****
--- 164,170 ----
tcSoundConsole *mpConsole;
+ ScriptedTaskInterface* taskInterface;
+ object TaskInterfaceObject;
+
enum teInterfaceMode
{
|