Attributes.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_ATTRIBUTES_HPP)
#define XERCESC_INCLUDE_GUARD_ATTRIBUTES_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class SAX2_EXPORT Attributes
{
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
Attributes()
{
}
virtual ~Attributes()
{
}
virtual XMLSize_t getLength() const = 0;
virtual const XMLCh* getURI(const XMLSize_t index) const = 0;
virtual const XMLCh* getLocalName(const XMLSize_t index) const = 0;
virtual const XMLCh* getQName(const XMLSize_t index) const = 0;
virtual const XMLCh* getType(const XMLSize_t index) const = 0;
virtual const XMLCh* getValue(const XMLSize_t index) const = 0;
// Name-based query.
virtual bool getIndex(const XMLCh* const uri,
const XMLCh* const localPart,
XMLSize_t& index) const = 0 ;
virtual int getIndex(const XMLCh* const uri,
const XMLCh* const localPart ) const = 0 ;
virtual bool getIndex(const XMLCh* const qName,
XMLSize_t& index) const = 0 ;
virtual int getIndex(const XMLCh* const qName ) const = 0 ;
virtual const XMLCh* getType(const XMLCh* const uri,
const XMLCh* const localPart ) const = 0 ;
virtual const XMLCh* getType(const XMLCh* const qName) const = 0;
virtual const XMLCh* getValue(const XMLCh* const uri, const XMLCh* const localPart ) const = 0 ;
virtual const XMLCh* getValue(const XMLCh* const qName) const = 0;
private :
/* Constructors and operators */
/* Copy constructor */
Attributes(const Attributes&);
/* Assignment operator */
Attributes& operator=(const Attributes&);
};
XERCES_CPP_NAMESPACE_END
#endif
XercesDefs.hpp
SAX2_EXPORT
#define SAX2_EXPORT
Definition XercesDefs.hpp:165
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLSize_t
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Attributes
Interface for an element's attribute specifications.
Definition Attributes.hpp:83
Attributes::getValue
virtual const XMLCh * getValue(const XMLCh *const qName) const =0
Look up an attribute's value by XML 1.0 qualified name.
Attributes::getValue
virtual const XMLCh * getValue(const XMLSize_t index) const =0
Return the value of an attribute in the list (by position).
Attributes::~Attributes
virtual ~Attributes()
Destructor.
Definition Attributes.hpp:96
Attributes::getLocalName
virtual const XMLCh * getLocalName(const XMLSize_t index) const =0
Return the local name of an attribute in this list (by position).
Attributes::getType
virtual const XMLCh * getType(const XMLSize_t index) const =0
Return the type of an attribute in the list (by position).
Attributes::Attributes
Attributes()
Default constructor.
Definition Attributes.hpp:91
Attributes::getValue
virtual const XMLCh * getValue(const XMLCh *const uri, const XMLCh *const localPart) const =0
Look up an attribute's value by Namespace name.
Attributes::getQName
virtual const XMLCh * getQName(const XMLSize_t index) const =0
Return the qName of an attribute in this list (by position).
Attributes::getLength
virtual XMLSize_t getLength() const =0
Return the number of attributes in this list.
Attributes::getIndex
virtual bool getIndex(const XMLCh *const uri, const XMLCh *const localPart, XMLSize_t &index) const =0
Look up the index of an attribute by Namespace name.
Attributes::getURI
virtual const XMLCh * getURI(const XMLSize_t index) const =0
Return the namespace URI of an attribute in this list (by position).
Attributes::getType
virtual const XMLCh * getType(const XMLCh *const qName) const =0
Look up an attribute's type by XML 1.0 qualified name.
Attributes::getIndex
virtual bool getIndex(const XMLCh *const qName, XMLSize_t &index) const =0
Look up the index of an attribute by XML 1.0 qualified name.
Attributes::getIndex
virtual int getIndex(const XMLCh *const qName) const =0
Look up the index of an attribute by XML 1.0 qualified name.
Attributes::getIndex
virtual int getIndex(const XMLCh *const uri, const XMLCh *const localPart) const =0
Look up the index of an attribute by Namespace name.
Attributes::getType
virtual const XMLCh * getType(const XMLCh *const uri, const XMLCh *const localPart) const =0
Look up an attribute's type by Namespace name.