26 #ifndef __TERRALIB_XML_INTERNAL_READER_H 
   27 #define __TERRALIB_XML_INTERNAL_READER_H 
   37 #include <boost/cstdint.hpp> 
   38 #include <boost/noncopyable.hpp> 
  130         virtual void read(
const std::string& fileURI) = 0;
 
  251         virtual std::string 
getAttr(
const std::string& name) 
const = 0;
 
  260         virtual std::string 
getAttr(std::size_t i) 
const = 0;
 
  366         virtual void getNamespace(std::size_t i, std::pair<std::string, std::string>& ns) 
const = 0;
 
This class models a XML reader object.
 
virtual std::string getAttrURI(std::size_t i) const =0
It returns the attribute URI of the associated namespace in the case of an element node.
 
virtual std::string getElementValue() const =0
It returns the element data value in the case of VALUE node.
 
virtual std::size_t getAttrPosition(const std::string &name) const =0
It returns the attribute position.
 
virtual void setCacheGrammarFromParse(bool d)=0
If true it caches the grammar in the pool for re-use in subsequent parses.
 
virtual void readFromContent(const std::string &content)=0
It prepare the given content to be read.
 
virtual void setDoNamespaces(bool d)=0
It enables or disables the parser namespace processing.
 
virtual NodeType getNodeType() const =0
It return the type of node read.
 
virtual void setInternalBufferSize(const std::size_t size)=0
It sets the maximal allowed buffer size used for parsing.
 
virtual std::size_t getNumberOfNamespaces() const =0
 
virtual double getAttrAsDouble(const std::string &name) const
It returns the attribute value in the case of an element node with valid attributes.
 
virtual bool hasAttrs() const =0
It tells if the element has attributes in the case of an element node.
 
virtual void setIgnoreWhiteSpaces(bool d)=0
If true the parser will ignore the white space characters.
 
virtual void getNamespace(std::size_t i, std::pair< std::string, std::string > &ns) const =0
 
virtual double getAttrAsDouble(std::size_t i) const
It returns the attribute value in the case of an element node with valid attributes.
 
virtual void setValidationScheme(bool d)=0
If true the parser will perform a validation scheme.
 
virtual bool next()=0
It gets the next event to be read.
 
virtual std::string getAttrLocalName(std::size_t i) const =0
It returns the local part of the attribute name for the i-th attribute.
 
virtual double getElementValueAsDouble() const
It returns the element data value in the case of VALUE node.
 
virtual void setDoSchema(bool d)=0
It enables or disables the parser schema processing.
 
virtual std::string getElementURI() const =0
It returns the URI of the associated namespace in the case of an element node.
 
virtual std::string getAttr(std::size_t i) const =0
It returns the attribute value in the case of an element node with valid attributes.
 
virtual void setUseCachedGrammarInParse(bool d)=0
If true the reader will use cached grammar if it exists in the pool.
 
virtual boost::int32_t getAttrAsInt32(std::size_t i) const
It returns the attribute value in the case of an element node with valid attributes.
 
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
 
virtual boost::uint32_t getAttrAsUInt32(std::size_t i) const
It returns the attribute value in the case of an element node with valid attributes.
 
virtual std::size_t getNumberOfAttrs() const =0
It returns the number of attributes in the case of an element node.
 
virtual std::string getElementQName() const =0
It returns the qualified name in the case of an element node.
 
virtual void read(const std::string &fileURI)=0
It prepare the given file to be read.
 
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.
 
Reader()
Default constructor.
 
virtual boost::int32_t getElementValueAsInt32() const
It returns the element data value in the case of VALUE node.
 
virtual std::string getAttrQName(std::size_t i) const =0
It returns the qualified name for the i-th attribute.
 
virtual bool getElementValueAsBoolean() const
It returns the element data value in the case of VALUE node.
 
virtual boost::uint32_t getAttrAsUInt32(const std::string name) const
It returns the attribute value in the case of an element node with valid attributes.
 
virtual std::size_t getElementDataLen() const =0
It returns the element data value in the case of VALUE node.
 
virtual boost::int32_t getAttrAsInt32(const std::string &name) const
It returns the attribute value in the case of an element node with valid attributes.
 
virtual ~Reader()
Virtual destructor.
 
NodeType
The type of node read by XML reader.
 
#define TEXMLEXPORT
You can use this macro in order to export/import classes and functions from this module.
 
Proxy configuration file for TerraView (see terraview_config.h).
 
Enumerations of XML module.