include branch image, make new branch unisolid
[supertux.git] / tools / miniswig / tree.hpp
index ca0131b..19ed320 100644 (file)
@@ -84,6 +84,28 @@ public:
     int ref;
 };
 
+class SQIntegerType : public AtomicType {
+public:
+    SQIntegerType()
+    {
+        this->name = "SQInteger";
+        assert(_instance == 0);
+        _instance = this;
+    }
+    virtual ~SQIntegerType()
+    {
+        assert(_instance == this);
+        _instance = NULL;
+    }
+    
+    static SQIntegerType* instance()
+    {
+        return _instance;
+    }
+private:
+    static SQIntegerType* _instance;
+};
+
 class HSQUIRRELVMType : public AtomicType {
 public:
     HSQUIRRELVMType()
@@ -95,7 +117,7 @@ public:
     virtual ~HSQUIRRELVMType()
     {
         assert(_instance == this);
-        _instance = 0;
+        _instance = NULL;
     }
 
     static HSQUIRRELVMType* instance()
@@ -155,12 +177,22 @@ public:
 
 class Function : public ClassMember {
 public:
+    Function() {
+      type = FUNCTION;
+      suspend = false;
+      custom = false;
+    }
+  
     enum FuncType {
         FUNCTION,
         CONSTRUCTOR,
         DESTRUCTOR
     };
     FuncType type;
+    /// function should suspend squirrel VM after execution
+    bool suspend;
+    /// a custom wrapper (just pass along HSQUIRRELVM)
+    bool custom;
     std::string docu_comment;
     std::string name;
     Type return_type;
@@ -195,6 +227,8 @@ public:
     }
     
     std::vector<ClassMember*> members;
+    std::vector<Class*> super_classes;
+    std::vector<Class*> sub_classes;
     std::string docu_comment;
 };