]> git.localhorst.tv Git - l2e.git/blobdiff - src/loader/ParsedSource.h
added destructors for ParsedSource & Co. to free some resources
[l2e.git] / src / loader / ParsedSource.h
index 6351ae43f90855b8786c57f2c2d23447817ef0bd..36f3810ab434cb8805bb188b95348f6984165a91 100644 (file)
@@ -42,6 +42,10 @@ public:
        Literal(const std::string &);
        Literal(int x, int y);
        Literal(const std::string &typeName, PropertyList *properties);
+       ~Literal();
+private:
+       Literal(const Literal &);
+       Literal &operator =(const Literal &);
 
 public:
        Type GetType() const { return type; }
@@ -79,6 +83,10 @@ public:
        : literal(0), identifier(identifier), isLiteral(false) { }
        explicit Value(Literal *literal)
        : literal(literal), isLiteral(true) { }
+       ~Value();
+private:
+       Value(const Value &);
+       Value &operator =(const Value &);
 
 public:
        bool IsLiteral() const { return isLiteral; }
@@ -96,7 +104,11 @@ private:
 class PropertyList {
 
 public:
+       PropertyList() { }
        ~PropertyList();
+private:
+       PropertyList(const PropertyList &);
+       PropertyList &operator =(const PropertyList &);
 
 public:
        void SetProperty(const std::string &name, Value *value) {
@@ -122,6 +134,9 @@ public:
        Declaration(const std::string &typeName, const std::string &identifier)
        : typeName(typeName), identifier(identifier) { }
        virtual ~Declaration() { }
+private:
+       Declaration(const Declaration &);
+       Declaration &operator =(const Declaration &);
 
 public:
        const std::string &TypeName() const { return typeName; }
@@ -140,6 +155,10 @@ class Definition
 public:
        Definition(const std::string &typeName, const std::string &identifier)
        : Declaration(typeName, identifier), value(0), isLiteral(false) { }
+       virtual ~Definition();
+private:
+       Definition(const Definition &);
+       Definition &operator =(const Definition &);
 
 public:
        void SetValue(Literal *);
@@ -163,7 +182,10 @@ class ParsedSource {
 
 public:
        ParsedSource() { }
-       ~ParsedSource() { }
+       ~ParsedSource();
+private:
+       ParsedSource(const ParsedSource &);
+       ParsedSource &operator =(const ParsedSource &);
 
 public:
        void AddDeclaration(Declaration *);