Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9869 in orxonox.OLD for trunk/src/lib/script_engine/script_class.h


Ignore:
Timestamp:
Oct 3, 2006, 12:19:30 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/script_engine/script_class.h

    r9003 r9869  
    1818 * this should be used at the beginning of all the Classes that should be loadable (in the cc-file)
    1919 */
    20 #define CREATE_SCRIPTABLE_CLASS(CLASS_NAME, CLASS_ID, SCRIPT_METHODS) \
    21     tScriptClass<CLASS_NAME> global_##CLASS_NAME##_ScriptableClass(#CLASS_NAME, CLASS_ID, (new ScriptMethod)->SCRIPT_METHODS)
     20#define CREATE_SCRIPTABLE_CLASS(CLASS_NAME, SCRIPT_METHODS) \
     21    tScriptClass<CLASS_NAME> global_##CLASS_NAME##_ScriptableClass(#CLASS_NAME, CLASS_NAME::staticClassID(), (new ScriptMethod)->SCRIPT_METHODS)
    2222
    2323
    2424//! A class for ...
    25 class ScriptClass : protected BaseObject
     25class ScriptClass : public BaseObject
    2626{
     27  ObjectListDeclaration(ScriptClass);
    2728
    2829public:
    2930  virtual ~ScriptClass();
    3031
    31   bool operator==(const std::string& name) { return (this->getName() == name); }
    32   bool operator==(ClassID classID) { return (this->_classID == classID); }
    33 
    3432  virtual void registerClass(Script* script) = 0;
    3533  virtual int insertObject(Script* L, BaseObject* obj, bool gc=false) = 0;
    36   virtual int insertObject(Script* L, BaseObject* obj, const std::string& name, bool gc=false) = 0; 
     34  virtual int insertObject(Script* L, BaseObject* obj, const std::string& name, bool gc=false) = 0;
    3735
    3836  const ScriptMethod* scriptMethods() const { return this->_scriptMethods; }
    3937
    4038protected:
    41   ScriptClass(const std::string& name, ClassID classID, ScriptMethod* scriptMethods);
     39  ScriptClass(const std::string& name, const ClassID& classID, ScriptMethod* scriptMethods);
    4240
    4341private:
Note: See TracChangeset for help on using the changeset viewer.