Commit f09c2e4a111492f730b104f567ce22c9246c0121
1 parent
2c91f8d8
Chiefly review interface (some const references added)
Showing
12 changed files
with
58 additions
and
56 deletions
include/GXmlAttribute.hpp
| @@ -55,14 +55,14 @@ public: | @@ -55,14 +55,14 @@ public: | ||
| 55 | GXmlAttribute& operator=(const GXmlAttribute& attr); | 55 | GXmlAttribute& operator=(const GXmlAttribute& attr); |
| 56 | 56 | ||
| 57 | // Methods | 57 | // Methods |
| 58 | - void clear(void); | ||
| 59 | - GXmlAttribute* clone(void) const; | ||
| 60 | - void write(GUrl& url) const; | ||
| 61 | - std::string name(void) const { return m_name; } | ||
| 62 | - std::string value(void) const; | ||
| 63 | - void name(const std::string& name) { m_name=name; } | ||
| 64 | - void value(std::string value); | ||
| 65 | - std::string print(void) const; | 58 | + void clear(void); |
| 59 | + GXmlAttribute* clone(void) const; | ||
| 60 | + void write(GUrl& url) const; | ||
| 61 | + const std::string& name(void) const { return m_name; } | ||
| 62 | + std::string value(void) const; | ||
| 63 | + void name(const std::string& name) { m_name=name; } | ||
| 64 | + void value(std::string value); | ||
| 65 | + std::string print(void) const; | ||
| 66 | 66 | ||
| 67 | protected: | 67 | protected: |
| 68 | // Protected methods | 68 | // Protected methods |
| @@ -71,8 +71,8 @@ protected: | @@ -71,8 +71,8 @@ protected: | ||
| 71 | void free_members(void); | 71 | void free_members(void); |
| 72 | 72 | ||
| 73 | // Protected data members | 73 | // Protected data members |
| 74 | - std::string m_name; //!< Attribute name | ||
| 75 | - std::string m_value; //!< Attribute value | 74 | + std::string m_name; //!< Attribute name |
| 75 | + std::string m_value; //!< Attribute value | ||
| 76 | }; | 76 | }; |
| 77 | 77 | ||
| 78 | #endif /* GXMLATTRIBUTE_HPP */ | 78 | #endif /* GXMLATTRIBUTE_HPP */ |
include/GXmlComment.hpp
| @@ -53,7 +53,7 @@ public: | @@ -53,7 +53,7 @@ public: | ||
| 53 | // Operators | 53 | // Operators |
| 54 | GXmlComment& operator=(const GXmlComment& node); | 54 | GXmlComment& operator=(const GXmlComment& node); |
| 55 | 55 | ||
| 56 | - // Implemented virtual methods | 56 | + // Implemented pure virtual base class methods |
| 57 | virtual void clear(void); | 57 | virtual void clear(void); |
| 58 | virtual GXmlComment* clone(void) const; | 58 | virtual GXmlComment* clone(void) const; |
| 59 | virtual void write(GUrl& url, const int& indent = 0) const; | 59 | virtual void write(GUrl& url, const int& indent = 0) const; |
include/GXmlDocument.hpp
| @@ -53,7 +53,7 @@ public: | @@ -53,7 +53,7 @@ public: | ||
| 53 | // Operators | 53 | // Operators |
| 54 | GXmlDocument& operator= (const GXmlDocument& node); | 54 | GXmlDocument& operator= (const GXmlDocument& node); |
| 55 | 55 | ||
| 56 | - // Implemented virtual methods | 56 | + // Implemented pure virtual base class methods |
| 57 | void clear(void); | 57 | void clear(void); |
| 58 | GXmlDocument* clone(void) const; | 58 | GXmlDocument* clone(void) const; |
| 59 | void write(GUrl& url, const int& indent = 0) const; | 59 | void write(GUrl& url, const int& indent = 0) const; |
| @@ -61,12 +61,12 @@ public: | @@ -61,12 +61,12 @@ public: | ||
| 61 | std::string print(const int& indent = 0) const; | 61 | std::string print(const int& indent = 0) const; |
| 62 | 62 | ||
| 63 | // Methods | 63 | // Methods |
| 64 | - std::string version(void) const { return m_version.value(); } | ||
| 65 | - std::string encoding(void) const { return m_encoding.value(); } | ||
| 66 | - std::string standalone(void) const { return m_standalone.value(); } | ||
| 67 | - void version(const std::string& version) { m_version.value(version); } | ||
| 68 | - void encoding(const std::string& encoding) { m_encoding.value(encoding); } | ||
| 69 | - void standalone(const std::string& standalone) { m_standalone.value(standalone); } | 64 | + std::string version(void) const { return m_version.value(); } |
| 65 | + std::string encoding(void) const { return m_encoding.value(); } | ||
| 66 | + std::string standalone(void) const { return m_standalone.value(); } | ||
| 67 | + void version(const std::string& version) { m_version.value(version); } | ||
| 68 | + void encoding(const std::string& encoding) { m_encoding.value(encoding); } | ||
| 69 | + void standalone(const std::string& standalone) { m_standalone.value(standalone); } | ||
| 70 | 70 | ||
| 71 | protected: | 71 | protected: |
| 72 | // Protected methods | 72 | // Protected methods |
include/GXmlElement.hpp
| @@ -60,7 +60,7 @@ public: | @@ -60,7 +60,7 @@ public: | ||
| 60 | // Methods | 60 | // Methods |
| 61 | virtual void clear(void); | 61 | virtual void clear(void); |
| 62 | virtual GXmlElement* clone(void) const; | 62 | virtual GXmlElement* clone(void) const; |
| 63 | - std::string name(void) const { return m_name; } | 63 | + const std::string& name(void) const { return m_name; } |
| 64 | void name(const std::string& name) { m_name=name; } | 64 | void name(const std::string& name) { m_name=name; } |
| 65 | std::string attribute(const std::string& name) const; | 65 | std::string attribute(const std::string& name) const; |
| 66 | void attribute(const std::string& name, const std::string& value); | 66 | void attribute(const std::string& name, const std::string& value); |
include/GXmlPI.hpp
| @@ -52,7 +52,7 @@ public: | @@ -52,7 +52,7 @@ public: | ||
| 52 | // Operators | 52 | // Operators |
| 53 | GXmlPI& operator=(const GXmlPI& node); | 53 | GXmlPI& operator=(const GXmlPI& node); |
| 54 | 54 | ||
| 55 | - // Implemented virtual methods | 55 | + // Implemented pure virtual base class methods |
| 56 | virtual void clear(void); | 56 | virtual void clear(void); |
| 57 | virtual GXmlPI* clone(void) const; | 57 | virtual GXmlPI* clone(void) const; |
| 58 | virtual void write(GUrl& url, const int& indent = 0) const; | 58 | virtual void write(GUrl& url, const int& indent = 0) const; |
| @@ -60,8 +60,8 @@ public: | @@ -60,8 +60,8 @@ public: | ||
| 60 | virtual std::string print(const int& indent = 0) const; | 60 | virtual std::string print(const int& indent = 0) const; |
| 61 | 61 | ||
| 62 | // Other methods | 62 | // Other methods |
| 63 | - const std::string& pi(void) const { return m_pi; } | ||
| 64 | - void pi(const std::string& pi) { m_pi=pi; } | 63 | + const std::string& pi(void) const { return m_pi; } |
| 64 | + void pi(const std::string& pi) { m_pi=pi; } | ||
| 65 | 65 | ||
| 66 | protected: | 66 | protected: |
| 67 | // Protected methods | 67 | // Protected methods |
include/GXmlText.hpp
| @@ -60,8 +60,8 @@ public: | @@ -60,8 +60,8 @@ public: | ||
| 60 | virtual std::string print(const int& indent = 0) const; | 60 | virtual std::string print(const int& indent = 0) const; |
| 61 | 61 | ||
| 62 | // Other methods | 62 | // Other methods |
| 63 | - const std::string& text(void) const { return m_text; } | ||
| 64 | - void text(const std::string& text) { m_text=text; } | 63 | + const std::string& text(void) const { return m_text; } |
| 64 | + void text(const std::string& text) { m_text=text; } | ||
| 65 | 65 | ||
| 66 | protected: | 66 | protected: |
| 67 | // Protected methods | 67 | // Protected methods |
pyext/GXmlAttribute.i
| @@ -44,13 +44,13 @@ public: | @@ -44,13 +44,13 @@ public: | ||
| 44 | virtual ~GXmlAttribute(void); | 44 | virtual ~GXmlAttribute(void); |
| 45 | 45 | ||
| 46 | // Methods | 46 | // Methods |
| 47 | - void clear(void); | ||
| 48 | - GXmlAttribute* clone(void) const; | ||
| 49 | - void write(GUrl& url) const; | ||
| 50 | - std::string name(void) const; | ||
| 51 | - std::string value(void) const; | ||
| 52 | - void name(const std::string& name); | ||
| 53 | - void value(std::string value); | 47 | + void clear(void); |
| 48 | + GXmlAttribute* clone(void) const; | ||
| 49 | + void write(GUrl& url) const; | ||
| 50 | + const std::string& name(void) const; | ||
| 51 | + std::string value(void) const; | ||
| 52 | + void name(const std::string& name); | ||
| 53 | + void value(std::string value); | ||
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | 56 |
pyext/GXmlComment.i
| @@ -43,7 +43,7 @@ public: | @@ -43,7 +43,7 @@ public: | ||
| 43 | explicit GXmlComment(const std::string& segment); | 43 | explicit GXmlComment(const std::string& segment); |
| 44 | virtual ~GXmlComment(void); | 44 | virtual ~GXmlComment(void); |
| 45 | 45 | ||
| 46 | - // Implemented virtual methods | 46 | + // Implemented pure virtual base class methods |
| 47 | virtual void clear(void); | 47 | virtual void clear(void); |
| 48 | virtual GXmlComment* clone(void) const; | 48 | virtual GXmlComment* clone(void) const; |
| 49 | virtual void write(GUrl& url, const int& indent = 0) const; | 49 | virtual void write(GUrl& url, const int& indent = 0) const; |
pyext/GXmlDocument.i
| @@ -42,19 +42,19 @@ public: | @@ -42,19 +42,19 @@ public: | ||
| 42 | GXmlDocument(const GXmlDocument& node); | 42 | GXmlDocument(const GXmlDocument& node); |
| 43 | virtual ~GXmlDocument(void); | 43 | virtual ~GXmlDocument(void); |
| 44 | 44 | ||
| 45 | - // Implemented virtual methods | 45 | + // Implemented pure virtual base class methods |
| 46 | void clear(void); | 46 | void clear(void); |
| 47 | GXmlDocument* clone(void) const; | 47 | GXmlDocument* clone(void) const; |
| 48 | void write(GUrl& url, const int& indent = 0) const; | 48 | void write(GUrl& url, const int& indent = 0) const; |
| 49 | NodeType type(void) const; | 49 | NodeType type(void) const; |
| 50 | 50 | ||
| 51 | // Methods | 51 | // Methods |
| 52 | - std::string version(void) const; | ||
| 53 | - std::string encoding(void) const; | ||
| 54 | - std::string standalone(void) const; | ||
| 55 | - void version(const std::string& version); | ||
| 56 | - void encoding(const std::string& encoding); | ||
| 57 | - void standalone(const std::string& standalone); | 52 | + std::string version(void) const; |
| 53 | + std::string encoding(void) const; | ||
| 54 | + std::string standalone(void) const; | ||
| 55 | + void version(const std::string& version); | ||
| 56 | + void encoding(const std::string& encoding); | ||
| 57 | + void standalone(const std::string& standalone); | ||
| 58 | }; | 58 | }; |
| 59 | 59 | ||
| 60 | 60 |
pyext/GXmlElement.i
| @@ -43,19 +43,17 @@ public: | @@ -43,19 +43,17 @@ public: | ||
| 43 | explicit GXmlElement(const std::string& segment); | 43 | explicit GXmlElement(const std::string& segment); |
| 44 | virtual ~GXmlElement(void); | 44 | virtual ~GXmlElement(void); |
| 45 | 45 | ||
| 46 | - // Implemented virtual methods | 46 | + // Methods |
| 47 | virtual void clear(void); | 47 | virtual void clear(void); |
| 48 | virtual GXmlElement* clone(void) const; | 48 | virtual GXmlElement* clone(void) const; |
| 49 | + const std::string& name(void) const; | ||
| 50 | + void name(const std::string& name); | ||
| 51 | + std::string attribute(const std::string& name) const; | ||
| 52 | + void attribute(const std::string& name, const std::string& value); | ||
| 53 | + GXmlNode* parent(void) const; | ||
| 54 | + void parent(GXmlNode* node); | ||
| 49 | virtual void write(GUrl& url, const int& indent = 0) const; | 55 | virtual void write(GUrl& url, const int& indent = 0) const; |
| 50 | virtual NodeType type(void) const; | 56 | virtual NodeType type(void) const; |
| 51 | - | ||
| 52 | - // Methods | ||
| 53 | - std::string name(void) const; | ||
| 54 | - std::string attribute(const std::string& name) const; | ||
| 55 | - GXmlNode* parent(void) const; | ||
| 56 | - void name(const std::string& name); | ||
| 57 | - void parent(GXmlNode* node); | ||
| 58 | - void attribute(const std::string& name, const std::string& value); | ||
| 59 | }; | 57 | }; |
| 60 | 58 | ||
| 61 | 59 |
pyext/GXmlPI.i
| @@ -43,11 +43,15 @@ public: | @@ -43,11 +43,15 @@ public: | ||
| 43 | explicit GXmlPI(const std::string& segment); | 43 | explicit GXmlPI(const std::string& segment); |
| 44 | virtual ~GXmlPI(void); | 44 | virtual ~GXmlPI(void); |
| 45 | 45 | ||
| 46 | - // Implemented virtual methods | ||
| 47 | - virtual void clear(void); | ||
| 48 | - virtual GXmlPI* clone(void) const; | ||
| 49 | - virtual void write(GUrl& url, const int& indent = 0) const; | ||
| 50 | - virtual NodeType type(void) const; | 46 | + // Implemented pure virtual base class methods |
| 47 | + virtual void clear(void); | ||
| 48 | + virtual GXmlPI* clone(void) const; | ||
| 49 | + virtual void write(GUrl& url, const int& indent = 0) const; | ||
| 50 | + virtual NodeType type(void) const; | ||
| 51 | + | ||
| 52 | + // Other methods | ||
| 53 | + const std::string& pi(void) const; | ||
| 54 | + void pi(const std::string& pi); | ||
| 51 | }; | 55 | }; |
| 52 | 56 | ||
| 53 | 57 |
pyext/GXmlText.i
| @@ -43,15 +43,15 @@ public: | @@ -43,15 +43,15 @@ public: | ||
| 43 | explicit GXmlText(const std::string& text); | 43 | explicit GXmlText(const std::string& text); |
| 44 | virtual ~GXmlText(void); | 44 | virtual ~GXmlText(void); |
| 45 | 45 | ||
| 46 | - // Implemented virtual methods | 46 | + // Implemented pure virtual base class methods |
| 47 | virtual void clear(void); | 47 | virtual void clear(void); |
| 48 | virtual GXmlText* clone(void) const; | 48 | virtual GXmlText* clone(void) const; |
| 49 | virtual void write(GUrl& url, const int& indent = 0) const; | 49 | virtual void write(GUrl& url, const int& indent = 0) const; |
| 50 | virtual NodeType type(void) const; | 50 | virtual NodeType type(void) const; |
| 51 | 51 | ||
| 52 | // Other methods | 52 | // Other methods |
| 53 | - const std::string& text(void) const; | ||
| 54 | - void text(const std::string& text); | 53 | + const std::string& text(void) const; |
| 54 | + void text(const std::string& text); | ||
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | 57 |