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
XSAttributeDeclaration::fTypeDefinition
XSSimpleTypeDefinition * fTypeDefinition
Definition: XSAttributeDeclaration.hpp:171
XSComplexTypeDefinition
Definition: XSComplexTypeDefinition.hpp:45
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
XSObject::getName
virtual const XMLCh * getName() const
The name of type NCName of this declaration as defined in XML Namespaces.
XSAttributeDeclaration::fAttDef
SchemaAttDef * fAttDef
Definition: XSAttributeDeclaration.hpp:170
XSAttributeDeclaration::fEnclosingCTDefinition
XSComplexTypeDefinition * fEnclosingCTDefinition
Definition: XSAttributeDeclaration.hpp:174
XSObject::getNamespaceItem
virtual XSNamespaceItem * getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component, if it&#39;s globally declared; or null otherwise.
XSNamespaceItem
Definition: XSNamespaceItem.hpp:53
XSAttributeDeclaration::fScope
XSConstants::SCOPE fScope
Definition: XSAttributeDeclaration.hpp:173
XSAttributeDeclaration::getAnnotation
XSAnnotation * getAnnotation() const
Optional.
Definition: XSAttributeDeclaration.hpp:185
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition: XercesDefs.hpp:163
XSModel
Definition: XSModel.hpp:59
XSAnnotation
Definition: XSAnnotation.hpp:41
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:39
XSSimpleTypeDefinition
Definition: XSSimpleTypeDefinition.hpp:43
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.
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:118
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XSAttributeDeclaration::fAnnotation
XSAnnotation * fAnnotation
Definition: XSAttributeDeclaration.hpp:172
XSConstants::SCOPE
SCOPE
Definition: XSConstants.hpp:152
XSObject
Definition: XSObject.hpp:42
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XSObject.hpp
XSConstants::VALUE_CONSTRAINT
VALUE_CONSTRAINT
Definition: XSConstants.hpp:172
XSAttributeDeclaration::getEnclosingCTDefinition
XSComplexTypeDefinition * getEnclosingCTDefinition()
The complex type definition for locally scoped declarations (see scope).
Definition: XSAttributeDeclaration.hpp:195
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:42
XSAttributeDeclaration::getTypeDefinition
XSSimpleTypeDefinition * getTypeDefinition() const
[type definition]: A simple type definition
Definition: XSAttributeDeclaration.hpp:180