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$
*/
#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.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
uint16_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
XSAnnotation
Definition: XSAnnotation.hpp:42
XSAttributeDeclaration
Definition: XSAttributeDeclaration.hpp:43
XSAttributeDeclaration::~XSAttributeDeclaration
~XSAttributeDeclaration()
XSAttributeDeclaration::fScope
XSConstants::SCOPE fScope
Definition: XSAttributeDeclaration.hpp:173
XSAttributeDeclaration::fTypeDefinition
XSSimpleTypeDefinition * fTypeDefinition
Definition: XSAttributeDeclaration.hpp:171
XSAttributeDeclaration::getScope
XSConstants::SCOPE getScope() const
Optional.
Definition: XSAttributeDeclaration.hpp:190
XSAttributeDeclaration::getAnnotation
XSAnnotation * getAnnotation() const
Optional.
Definition: XSAttributeDeclaration.hpp:185
XSAttributeDeclaration::getNamespaceItem
XSNamespaceItem * getNamespaceItem()
A namespace schema information item corresponding to the target namespace of the component,...
XSAttributeDeclaration::getConstraintValue
const XMLCh * getConstraintValue()
Value constraint: The actual value with respect to the [type definition ].
XSAttributeDeclaration::fAnnotation
XSAnnotation * fAnnotation
Definition: XSAttributeDeclaration.hpp:172
XSAttributeDeclaration::getName
const XMLCh * getName() const
The name of type NCName of this declaration as defined in XML Namespaces.
XSAttributeDeclaration::XSAttributeDeclaration
XSAttributeDeclaration(SchemaAttDef *const attDef, XSSimpleTypeDefinition *const typeDef, XSAnnotation *const annot, XSModel *const xsModel, XSConstants::SCOPE scope, XSComplexTypeDefinition *enclosingCTDefinition, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager)
The default constructor.
XSAttributeDeclaration::getNamespace
const XMLCh * getNamespace() const
The [target namespace] of this object, or null if it is unspecified.
XSAttributeDeclaration::getConstraintType
XSConstants::VALUE_CONSTRAINT getConstraintType() const
Value constraint: one of VC_NONE, VC_DEFAULT, VC_FIXED.
XSAttributeDeclaration::fEnclosingCTDefinition
XSComplexTypeDefinition * fEnclosingCTDefinition
Definition: XSAttributeDeclaration.hpp:174
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::getRequired
bool getRequired() const
methods needed by implementation
XSAttributeDeclaration::getTypeDefinition
XSSimpleTypeDefinition * getTypeDefinition() const
[type definition]: A simple type definition
Definition: XSAttributeDeclaration.hpp:180
XSComplexTypeDefinition
Definition: XSComplexTypeDefinition.hpp:46
XSConstants::VALUE_CONSTRAINT
VALUE_CONSTRAINT
Definition: XSConstants.hpp:172
XSConstants::SCOPE
SCOPE
Definition: XSConstants.hpp:152
XSModel
Definition: XSModel.hpp:60
XSNamespaceItem
Definition: XSNamespaceItem.hpp:54
XSObject
Definition: XSObject.hpp:43
XSSimpleTypeDefinition
Definition: XSSimpleTypeDefinition.hpp:44