From 05c1a838c881ea502888659848d8792843b28718 Mon Sep 17 00:00:00 2001 From: Luca Muscariello Date: Sat, 25 Feb 2017 23:42:31 +0100 Subject: Initial commit: video player - viper Change-Id: Id5aa33598ce34659bad4a7a9ae5006bfb84f9bd1 Signed-off-by: Luca Muscariello --- libdash/include/INode.h | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 libdash/include/INode.h (limited to 'libdash/include/INode.h') diff --git a/libdash/include/INode.h b/libdash/include/INode.h new file mode 100644 index 00000000..96bc6e88 --- /dev/null +++ b/libdash/include/INode.h @@ -0,0 +1,97 @@ +/** + * @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_ */ -- cgit 1.2.3-korg