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: XSAttributeUse.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#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
XSAttributeUse
Definition: XSAttributeUse.hpp:39
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSAttributeUse::getConstraintValue
const XMLCh * getConstraintValue()
Value Constraint: The actual value.
Definition: XSAttributeUse.hpp:149
XSAttributeUse::fConstraintValue
const XMLCh * fConstraintValue
Definition: XSAttributeUse.hpp:130
XSAttributeUse::fConstraintType
XSConstants::VALUE_CONSTRAINT fConstraintType
Definition: XSAttributeUse.hpp:129
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSModel
Definition: XSModel.hpp:59
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:118
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSObject
Definition: XSObject.hpp:42
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSAttributeUse::getConstraintType
XSConstants::VALUE_CONSTRAINT getConstraintType() const
Value Constraint: one of default, fixed.
Definition: XSAttributeUse.hpp:144
XSObject.hpp
XSAttributeUse::getAttrDeclaration
XSAttributeDeclaration * getAttrDeclaration() const
[attribute declaration]: provides the attribute declaration itself, which will in turn determine the ...
Definition: XSAttributeUse.hpp:134
XSAttributeUse::getRequired
bool getRequired() const
[required]: determines whether this use of an attribute declaration requires an appropriate attribute...
Definition: XSAttributeUse.hpp:139
XSConstants::VALUE_CONSTRAINT
VALUE_CONSTRAINT
Definition: XSConstants.hpp:172
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:42
XSAttributeUse::fRequired
bool fRequired
Definition: XSAttributeUse.hpp:128
XSAttributeUse::fXSAttributeDeclaration
XSAttributeDeclaration * fXSAttributeDeclaration
Definition: XSAttributeUse.hpp:131