/** * @class dash::xml::INode * @brief This interface defines the access to class members of XML Elements. * @details Due to the fact that some MPD elements may contain additional XML Elements, which are not specified in ISO/IEC 23009-1, Part 1, 2012 * but are attached to them, this interface is needed to access such an XML Element. \n\n * For clarification see the example in dash::mpd::IMPDElement * @see dash::mpd::IMPDElement * * @author bitmovin Softwareentwicklung OG \n * Email: libdash-dev@vicky.bitmovin.net * @version 2.1 * @date 2013 * @copyright bitmovin Softwareentwicklung OG, All Rights Reserved \n\n * This source code and its use and distribution, is subject to the terms * and conditions of the applicable license agreement. */ #ifndef INODE_H_ #define INODE_H_ #include "config.h" namespace dash { namespace xml { class INode { public: virtual ~INode (){} /** * Returns a reference to a vector of pointers to nested dash::xml::INode objects. * @return a reference to a vector containing pointers to dash::xml::INode objects. */ virtual const std::vector& GetNodes () const = 0; /** * Returns a vector of attribute names belonging to this XML Element * @return a vector of strings */ virtual std::vector GetAttributeKeys () const = 0; /** * Returns the name of this XML Element * @return a reference to string */ virtual const std::string& GetName () const = 0; /** * Returns the text contained in this XML Element * @return a string */ virtual std::string GetText () const = 0; /** * Returns a std::map of key value / mapped value pairs corresponding to the XML Attributes and their values of this XML Element * @return a reference to a map with key values and mapped values, both of type std::string */ virtual const std::map& GetAttributes () const = 0; /** * Returns the type of this XML Element represented by an integer * \code * Start = 1 * End = 15 * WhiteSpace = 14 * Text = 3 * \endcode * @return an integer */ virtual int GetType () const = 0; /** * Returns the value belonging to the XML Attribute specified by key * @param key the name of the desired XML Attribute * @return a reference to a string */ virtual const std::string& GetAttributeValue (std::string key) const = 0; /** * Returns a bool value determininig whether the XML Attribute name is contained in this XML Element or not. * @param name the name of the desired XML Attribute * @return a bool value */ virtual bool HasAttribute (const std::string& name) const = 0; /** * Returns a bool value determining whether the XML Element has text or not. * @return a bool value */ virtual bool HasText () const = 0; }; } } #endif /* INODE_H_ */