XSAttributeDeclaration.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: XSAttributeDeclaration.hpp 1804272 2017-08-06 20:25:24Z scantor $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSATTRIBUTEDECLARATION_HPP)
#define XERCESC_INCLUDE_GUARD_XSATTRIBUTEDECLARATION_HPP
#include <xercesc/framework/psvi/XSObject.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// forward declarations
class XSAnnotation;
class XSComplexTypeDefinition;
class XSSimpleTypeDefinition;
class SchemaAttDef;
class XMLPARSER_EXPORT XSAttributeDeclaration : public XSObject
{
public:
// Constructors and Destructor
// -----------------------------------------------------------------------
XSAttributeDeclaration
(
SchemaAttDef* const attDef
, XSSimpleTypeDefinition* const typeDef
, XSAnnotation* const annot
, XSModel* const xsModel
, XSConstants::SCOPE scope
, XSComplexTypeDefinition* enclosingCTDefinition
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
~XSAttributeDeclaration();
//---------------------
const XMLCh* getName() const;
const XMLCh* getNamespace() const;
XSNamespaceItem* getNamespaceItem();
XSSimpleTypeDefinition *getTypeDefinition() const;
XSConstants::SCOPE getScope() const;
XSComplexTypeDefinition *getEnclosingCTDefinition();
XSConstants::VALUE_CONSTRAINT getConstraintType() const;
const XMLCh *getConstraintValue();
XSAnnotation *getAnnotation() const;
//----------------------------------
bool getRequired() const;
private:
void setEnclosingCTDefinition(XSComplexTypeDefinition* const toSet);
friend class XSObjectFactory;
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSAttributeDeclaration(const XSAttributeDeclaration&);
XSAttributeDeclaration & operator=(const XSAttributeDeclaration &);
protected:
// -----------------------------------------------------------------------
// data members
// -----------------------------------------------------------------------
SchemaAttDef* fAttDef;
XSSimpleTypeDefinition* fTypeDefinition;
XSAnnotation* fAnnotation;
XSConstants::SCOPE fScope;
XSComplexTypeDefinition* fEnclosingCTDefinition;
};
// ---------------------------------------------------------------------------
// XSAttributeDeclaration: inline methods
// ---------------------------------------------------------------------------
inline XSSimpleTypeDefinition* XSAttributeDeclaration::getTypeDefinition() const
{
return fTypeDefinition;
}
inline XSAnnotation *XSAttributeDeclaration::getAnnotation() const
{
return fAnnotation;
}
inline XSConstants::SCOPE XSAttributeDeclaration::getScope() const
{
return fScope;
}
inline XSComplexTypeDefinition *XSAttributeDeclaration::getEnclosingCTDefinition()
{
return fEnclosingCTDefinition;
}
inline void XSAttributeDeclaration::setEnclosingCTDefinition
(
XSComplexTypeDefinition* const toSet
)
{
fEnclosingCTDefinition = toSet;
}
XERCES_CPP_NAMESPACE_END
#endif
XSObject::getNamespaceItem
virtual XSNamespaceItem * getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component,...
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSConstants::VALUE_CONSTRAINT
VALUE_CONSTRAINT
Definition: XSConstants.hpp:172
XMLCh
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:42
XSNamespaceItem
Definition: XSNamespaceItem.hpp:53
XSObject
Definition: XSObject.hpp:42
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSAttributeDeclaration::fTypeDefinition
XSSimpleTypeDefinition * fTypeDefinition
Definition: XSAttributeDeclaration.hpp:171
XSObject::getName
virtual const XMLCh * getName() const
The name of type NCName of this declaration as defined in XML Namespaces.
XSModel
Definition: XSModel.hpp:59
XSAttributeDeclaration::fEnclosingCTDefinition
XSComplexTypeDefinition * fEnclosingCTDefinition
Definition: XSAttributeDeclaration.hpp:174
XSObject.hpp
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSAnnotation
Definition: XSAnnotation.hpp:41
XSConstants::SCOPE
SCOPE
Definition: XSConstants.hpp:152
XSComplexTypeDefinition
Definition: XSComplexTypeDefinition.hpp:45
XSAttributeDeclaration::getAnnotation
XSAnnotation * getAnnotation() const
Optional.
Definition: XSAttributeDeclaration.hpp:185
XSAttributeDeclaration::fAnnotation
XSAnnotation * fAnnotation
Definition: XSAttributeDeclaration.hpp:172
XSAttributeDeclaration::fAttDef
SchemaAttDef * fAttDef
Definition: XSAttributeDeclaration.hpp:170
XSAttributeDeclaration::getEnclosingCTDefinition
XSComplexTypeDefinition * getEnclosingCTDefinition()
The complex type definition for locally scoped declarations (see scope).
Definition: XSAttributeDeclaration.hpp:195
XSAttributeDeclaration::getScope
XSConstants::SCOPE getScope() const
Optional.
Definition: XSAttributeDeclaration.hpp:190
XSObject::getNamespace
virtual const XMLCh * getNamespace() const
The [target namespace] of this object, or null if it is unspecified.
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSAttributeDeclaration::getTypeDefinition
XSSimpleTypeDefinition * getTypeDefinition() const
[type definition]: A simple type definition
Definition: XSAttributeDeclaration.hpp:180
XSSimpleTypeDefinition
Definition: XSSimpleTypeDefinition.hpp:43
XSAttributeDeclaration::fScope
XSConstants::SCOPE fScope
Definition: XSAttributeDeclaration.hpp:173