diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-09-23 19:12:44 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-09-23 19:12:44 (GMT) |
commit | de660b763459cdd707876ec244b6866abca07fa2 (patch) | |
tree | cc9e34f17a18dc152b8a90a0c7cf0076c46a297e /Swiften/Parser/Tree/ParserElement.h | |
parent | de50064af14eb31f027ea7fa59501c9b3754eafd (diff) | |
download | swift-contrib-de660b763459cdd707876ec244b6866abca07fa2.zip swift-contrib-de660b763459cdd707876ec244b6866abca07fa2.tar.bz2 |
Whitespace tweaks.
Diffstat (limited to 'Swiften/Parser/Tree/ParserElement.h')
-rw-r--r-- | Swiften/Parser/Tree/ParserElement.h | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/Swiften/Parser/Tree/ParserElement.h b/Swiften/Parser/Tree/ParserElement.h index 7229c5b..b3ad785 100644 --- a/Swiften/Parser/Tree/ParserElement.h +++ b/Swiften/Parser/Tree/ParserElement.h @@ -15,27 +15,33 @@ #include <boost/smart_ptr/make_shared.hpp> namespace Swift { -class ParserElement { - public: - typedef boost::shared_ptr<ParserElement> ref; - ParserElement(const std::string& name, const std::string& xmlns, const AttributeMap& attributes); - virtual ~ParserElement(); - virtual operator bool(); - ParserElement::ref addChild(const std::string& name, const std::string& xmlns, const AttributeMap& attributes); - void appendCharacterData(const std::string& data); - const std::string& getText() const {return text_;}; - const std::string& getName() const {return name_;}; - const std::string& getNamespace() const {return xmlns_;}; - std::vector<ParserElement::ref> getChildren(const std::string& name, const std::string& xmlns) const; - ParserElement::ref getChild(const std::string& name, const std::string& xmlns) const; - const AttributeMap& getAttributes() const {return attributes_;} - private: - std::vector<ParserElement::ref> children_; - std::string name_; - std::string xmlns_; - AttributeMap attributes_; - std::string text_; - -}; + class ParserElement { + public: + typedef boost::shared_ptr<ParserElement> ref; + ParserElement(const std::string& name, const std::string& xmlns, const AttributeMap& attributes); + virtual ~ParserElement(); + + const std::string& getText() const { return text_; } + const std::string& getName() const { return name_; } + const std::string& getNamespace() const { return xmlns_; } + const AttributeMap& getAttributes() const { return attributes_; } + + ParserElement::ref addChild(const std::string& name, const std::string& xmlns, const AttributeMap& attributes); + void appendCharacterData(const std::string& data); + + std::vector<ParserElement::ref> getChildren(const std::string& name, const std::string& xmlns) const; + ParserElement::ref getChild(const std::string& name, const std::string& xmlns) const; + + virtual operator bool() { + return true; + } + + private: + std::vector<ParserElement::ref> children_; + std::string name_; + std::string xmlns_; + AttributeMap attributes_; + std::string text_; + }; } |