Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8163 in orxonox.OLD for branches/script_engine


Ignore:
Timestamp:
Jun 5, 2006, 7:23:05 PM (18 years ago)
Author:
bensch
Message:

script_manager: should compile

Location:
branches/script_engine/src/lib/script_engine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/script_engine/src/lib/script_engine/script_manager.cc

    r8159 r8163  
    9898}
    9999
    100 void  ScriptManager::setCurrentScriptFile(std::string& file)
     100void  ScriptManager::setCurrentScriptFile(const std::string& file)
    101101 {
    102102   if( !fileIsInScriptList(file) )
     
    106106 }
    107107
    108 void  ScriptManager::addObjectToScript(std::string object, LuaScript& script)
     108void  ScriptManager::addObjectToScript(const std::string object, LuaScript& script)
    109109{
    110110  if(!objectIsInObjectList(object,script))
     
    113113
    114114
    115 bool ScriptManager::fileIsInScriptList(std::string& file)
     115bool ScriptManager::fileIsInScriptList(const std::string& file)
    116116{
    117117  for(std::list<LuaScript>::const_iterator it = scriptList.begin(); it != scriptList.end(); it++ )
     
    126126
    127127
    128 bool ScriptManager::objectIsInObjectList(std::string& object, const LuaScript& script)
     128bool ScriptManager::objectIsInObjectList(const std::string& object, const LuaScript& script)
    129129{
    130130  for(std::list<std::string>::const_iterator it = script.objectList.begin(); it != script.objectList.end(); it++ )
  • branches/script_engine/src/lib/script_engine/script_manager.h

    r8160 r8163  
    1919};
    2020
    21 class ScriptManager //: public BaseObject
     21class ScriptManager : public BaseObject
    2222{
    2323 public:
     
    2828
    2929  virtual void loadParams(const TiXmlElement* root);
    30   void setWorld(std::string& world){currentWorld = world;}
     30  void setWorld(const std::string& world) {currentWorld = world;}
    3131
    3232  void tick(float timestep);
     
    3838   void  init();
    3939   void  createScriptList(const TiXmlElement* scripts);
    40    void  setCurrentScriptFile(std::string& file);
    41    void  addObjectToScript(std::string object, LuaScript& script);
     40   void  setCurrentScriptFile(const std::string& file);
     41   void  addObjectToScript(const std::string object, LuaScript& script);
    4242
    43    bool fileIsInScriptList(std::string& file);
    44    bool objectIsInObjectList(std::string& object,const LuaScript& script);
     43   bool fileIsInScriptList(const std::string& file);
     44   bool objectIsInObjectList(const std::string& object, const LuaScript& script);
    4545
    4646
Note: See TracChangeset for help on using the changeset viewer.