XSAttributeUse.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_XSATTRIBUTEUSE_HPP)
#define XERCESC_INCLUDE_GUARD_XSATTRIBUTEUSE_HPP
#include <xercesc/framework/psvi/XSObject.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// forward declarations
class XSAttributeDeclaration;
class XMLPARSER_EXPORT XSAttributeUse : public XSObject
{
public:
// Constructors and Destructor
// -----------------------------------------------------------------------
XSAttributeUse
(
XSAttributeDeclaration* const xsAttDecl,
XSModel* const xsModel,
MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
~XSAttributeUse();
//---------------------
bool getRequired() const;
XSAttributeDeclaration *getAttrDeclaration() const;
XSConstants::VALUE_CONSTRAINT getConstraintType() const;
const XMLCh *getConstraintValue();
//----------------------------------
private:
// set data
void set
(
const bool isRequired
, XSConstants::VALUE_CONSTRAINT constraintType
, const XMLCh* const constraintValue
);
friend class XSObjectFactory;
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSAttributeUse(const XSAttributeUse&);
XSAttributeUse & operator=(const XSAttributeUse &);
protected:
// -----------------------------------------------------------------------
// data members
// -----------------------------------------------------------------------
bool fRequired;
XSConstants::VALUE_CONSTRAINT fConstraintType;
const XMLCh* fConstraintValue;
XSAttributeDeclaration* fXSAttributeDeclaration;
};
inline XSAttributeDeclaration *XSAttributeUse::getAttrDeclaration() const
{
return fXSAttributeDeclaration;
}
inline bool XSAttributeUse::getRequired() const
{
return fRequired;
}
inline XSConstants::VALUE_CONSTRAINT XSAttributeUse::getConstraintType() const
{
return fConstraintType;
}
inline const XMLCh *XSAttributeUse::getConstraintValue()
{
return fConstraintValue;
}
XERCES_CPP_NAMESPACE_END
#endif
XSObject.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
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
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121
XSAttributeDeclaration
Definition XSAttributeDeclaration.hpp:43
XSAttributeUse
Definition XSAttributeUse.hpp:40
XSAttributeUse::~XSAttributeUse
~XSAttributeUse()
XSAttributeUse::getAttrDeclaration
XSAttributeDeclaration * getAttrDeclaration() const
[attribute declaration]: provides the attribute declaration itself, which will in turn determine the ...
Definition XSAttributeUse.hpp:134
XSAttributeUse::fConstraintType
XSConstants::VALUE_CONSTRAINT fConstraintType
Definition XSAttributeUse.hpp:129
XSAttributeUse::getConstraintType
XSConstants::VALUE_CONSTRAINT getConstraintType() const
Value Constraint: one of default, fixed.
Definition XSAttributeUse.hpp:144
XSAttributeUse::getConstraintValue
const XMLCh * getConstraintValue()
Value Constraint: The actual value.
Definition XSAttributeUse.hpp:149
XSAttributeUse::getRequired
bool getRequired() const
[required]: determines whether this use of an attribute declaration requires an appropriate attribute...
Definition XSAttributeUse.hpp:139
XSAttributeUse::fXSAttributeDeclaration
XSAttributeDeclaration * fXSAttributeDeclaration
Definition XSAttributeUse.hpp:131
XSAttributeUse::fConstraintValue
const XMLCh * fConstraintValue
Definition XSAttributeUse.hpp:130
XSAttributeUse::fRequired
bool fRequired
Definition XSAttributeUse.hpp:128
XSAttributeUse::XSAttributeUse
XSAttributeUse(XSAttributeDeclaration *const xsAttDecl, XSModel *const xsModel, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.
XSConstants::VALUE_CONSTRAINT
VALUE_CONSTRAINT
Definition XSConstants.hpp:172
XSModel
Definition XSModel.hpp:60
XSObject
Definition XSObject.hpp:43