Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgxml::Attributes Class Reference
[XML SAX Module]

#include <qgarlib/sax/Attributes.H>

Inheritance diagram for qgxml::Attributes:

qgxml::QtAttributesAdaptor qgxml::XercesAttributesAdaptor List of all members.

Detailed Description

Interface for a list of XML attributes.

This interface allows access to a list of attributes in three different ways:

  1. by attribute index.
  2. by namespace-qualified name
  3. by qualified (prefixed) name.

This class is an adaptation for C++ of the interface of the same name implemented in the Java SAX API (http://www.saxproject.org).

Author:
Jan Rendek (Adaptation).
Date:
March 10, 2003 14:48
Since:
Qgar 2.1.1

Definition at line 69 of file Attributes.H.

Public Member Functions

Destructor
virtual ~Attributes ()
 Destructor.
Access
virtual int getIndex (const std::string &qName) const =0
 Look up the index of an attribute by XML 1.0 qualified name.
virtual int getIndex (const std::string &uri, const std::string &localName) const =0
 Look up the index of an attribute by Namespace name.
virtual int getLength () const =0
 Return the number of attributes in the list.
virtual std::string getLocalName (int index) const =0
 Look up an attribute's local name by index.
virtual std::string getQName (int index) const =0
 Look up an attribute's XML 1.0 qualified name by index.
virtual std::string getType (int index) const =0
 Look up an attribute's type by index.
virtual std::string getType (const std::string &qName) const =0
 Look up an attribute's type by XML 1.0 qualified name.
virtual std::string getType (const std::string &uri, const std::string &localName) const =0
 Look up an attribute's type by Namespace name.
virtual std::string getURI (int index) const =0
 Look up an attribute's Namespace URI by index.
virtual std::string getValue (int index) const =0
 Look up an attribute's value by index.
virtual std::string getValue (const std::string &qName) const =0
 Look up an attribute's value by XML 1.0 qualified name.
virtual std::string getValue (const std::string &uri, const std::string &localName) const =0
 Look up an attribute's value by Namespace name.


Constructor & Destructor Documentation

virtual qgxml::Attributes::~Attributes  )  [inline, virtual]
 

Destructor.

Definition at line 83 of file Attributes.H.


Member Function Documentation

virtual int qgxml::Attributes::getIndex const std::string &  uri,
const std::string &  localName
const [pure virtual]
 

Look up the index of an attribute by Namespace name.

Parameters:
uri The Namespace URI, or the empty string if the name has no Namespace URI.
localName The attribute's local name.
Returns:
The index of the attribute, or -1 if it does not appear in the list.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual int qgxml::Attributes::getIndex const std::string &  qName  )  const [pure virtual]
 

Look up the index of an attribute by XML 1.0 qualified name.

Parameters:
qName The qualified (prefixed) name.
Returns:
The index of the attribute, or -1 if it does not appear in the list.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual int qgxml::Attributes::getLength  )  const [pure virtual]
 

Return the number of attributes in the list.

Once you know the number of attributes, you can iterate through the list.

Returns:
The number of attributes in the list.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

Referenced by qgar::QgarAppDescr::startParam().

virtual std::string qgxml::Attributes::getLocalName int  index  )  const [pure virtual]
 

Look up an attribute's local name by index.

Parameters:
index The attribute index (zero-based).
Returns:
The local name, or the empty string if Namespace processing is not being performed, or null if the index is out of range.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

Referenced by qgar::QgarAppDescr::startParam().

virtual std::string qgxml::Attributes::getQName int  index  )  const [pure virtual]
 

Look up an attribute's XML 1.0 qualified name by index.

Parameters:
index The attribute index (zero-based).
Returns:
The XML 1.0 qualified name, or the empty string if none is available, or null if the index is out of range.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getType const std::string &  uri,
const std::string &  localName
const [pure virtual]
 

Look up an attribute's type by Namespace name.

Parameters:
uri The Namespace URI, or the empty String if the name has no Namespace URI.
localName The local name of the attribute.
Returns:
The attribute type as a string.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getType const std::string &  qName  )  const [pure virtual]
 

Look up an attribute's type by XML 1.0 qualified name.

Parameters:
qName The XML 1.0 qualified name.
Returns:
The attribute type as a string.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getType int  index  )  const [pure virtual]
 

Look up an attribute's type by index.

Parameters:
index The attribute index (zero-based).
Returns:
The attribute's type as a string.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getURI int  index  )  const [pure virtual]
 

Look up an attribute's Namespace URI by index.

Parameters:
index The attribute index (zero-based).
Returns:
The Namespace URI, or the empty string if none is available.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getValue const std::string &  uri,
const std::string &  localName
const [pure virtual]
 

Look up an attribute's value by Namespace name.

Parameters:
uri The Namespace URI, or the empty String if the name has no Namespace URI.
localName The local name of the attribute.
Returns:
The attribute value as a string, or null if the attribute is not in the list.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getValue const std::string &  qName  )  const [pure virtual]
 

Look up an attribute's value by XML 1.0 qualified name.

Parameters:
qName The XML 1.0 qualified name.
Returns:
The attribute value as a string, or null if the attribute is not in the list or if qualified names are not available.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

virtual std::string qgxml::Attributes::getValue int  index  )  const [pure virtual]
 

Look up an attribute's value by index.

Parameters:
index The attribute index (zero-based).
Returns:
The attribute's value as a string, or null if the index is out of range.

Implemented in qgxml::QtAttributesAdaptor, and qgxml::XercesAttributesAdaptor.

Referenced by qgar::QgarAppDescr::startParam().


The documentation for this class was generated from the following file: