You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2003/11/23 17:20:16 UTC
cvs commit: xml-xerces/c/src/xercesc/framework/psvi XSElementDeclaration.hpp XSElementDeclaration.cpp
knoaman 2003/11/23 08:20:16
Modified: c/src/xercesc/framework/psvi XSElementDeclaration.hpp
XSElementDeclaration.cpp
Log:
PSVI: pass scope and enclosing type during construction.
Revision Changes Path
1.6 +17 -0 xml-xerces/c/src/xercesc/framework/psvi/XSElementDeclaration.hpp
Index: XSElementDeclaration.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/framework/psvi/XSElementDeclaration.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XSElementDeclaration.hpp 21 Nov 2003 17:29:53 -0000 1.5
+++ XSElementDeclaration.hpp 23 Nov 2003 16:20:16 -0000 1.6
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.6 2003/11/23 16:20:16 knoaman
+ * PSVI: pass scope and enclosing type during construction.
+ *
* Revision 1.5 2003/11/21 17:29:53 knoaman
* PSVI update
*
@@ -120,6 +123,8 @@
, XSAnnotation* const annot
, XSNamedMap<XSIDCDefinition>* const identityConstraints
, XSModel* const xsModel
+ , XSConstants::SCOPE elemScope = XSConstants::SCOPE_ABSENT
+ , XSComplexTypeDefinition* const enclosingTypeDefinition = 0
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
@@ -297,8 +302,10 @@
short fDisallowedSubstitutions;
short fSubstitutionGroupExclusions;
unsigned int fId;
+ XSConstants::SCOPE fScope;
SchemaElementDecl* fSchemaElementDecl;
XSTypeDefinition* fTypeDefinition;
+ XSComplexTypeDefinition* fEnclosingTypeDefinition;
XSElementDeclaration* fSubstitutionGroupAffiliation;
XSAnnotation* fAnnotation;
XSNamedMap<XSIDCDefinition>* fIdentityConstraints;
@@ -337,6 +344,16 @@
inline void XSElementDeclaration::setId(unsigned int id)
{
fId = id;
+}
+
+inline XSConstants::SCOPE XSElementDeclaration::getScope() const
+{
+ return fScope;
+}
+
+inline XSComplexTypeDefinition *XSElementDeclaration::getEnclosingCTDefinition() const
+{
+ return fEnclosingTypeDefinition;
}
1.7 +7 -14 xml-xerces/c/src/xercesc/framework/psvi/XSElementDeclaration.cpp
Index: XSElementDeclaration.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/framework/psvi/XSElementDeclaration.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XSElementDeclaration.cpp 21 Nov 2003 17:29:53 -0000 1.6
+++ XSElementDeclaration.cpp 23 Nov 2003 16:20:16 -0000 1.7
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.7 2003/11/23 16:20:16 knoaman
+ * PSVI: pass scope and enclosing type during construction.
+ *
* Revision 1.6 2003/11/21 17:29:53 knoaman
* PSVI update
*
@@ -100,14 +103,18 @@
, XSAnnotation* const annot
, XSNamedMap<XSIDCDefinition>* const identityConstraints
, XSModel* const xsModel
+ , XSConstants::SCOPE elemScope
+ , XSComplexTypeDefinition* const enclosingTypeDefinition
, MemoryManager* const manager
)
: XSObject(XSConstants::ELEMENT_DECLARATION, xsModel, manager)
, fDisallowedSubstitutions(0)
, fSubstitutionGroupExclusions(0)
, fId(0)
+ , fScope(elemScope)
, fSchemaElementDecl(schemaElementDecl)
, fTypeDefinition(typeDefinition)
+ , fEnclosingTypeDefinition(enclosingTypeDefinition)
, fSubstitutionGroupAffiliation(substitutionGroupAffiliation)
, fIdentityConstraints(identityConstraints)
{
@@ -171,20 +178,6 @@
// ---------------------------------------------------------------------------
// XSElementDeclaration: access methods
// ---------------------------------------------------------------------------
-XSConstants::SCOPE XSElementDeclaration::getScope() const
-{
- if (fSchemaElementDecl->getEnclosingScope() == Grammar::TOP_LEVEL_SCOPE)
- return XSConstants::SCOPE_GLOBAL;
- else
- return XSConstants::SCOPE_LOCAL;
-}
-
-XSComplexTypeDefinition *XSElementDeclaration::getEnclosingCTDefinition() const
-{
- // REVISIT
- return 0;
-}
-
XSConstants::VALUE_CONSTRAINT XSElementDeclaration::getConstraintType() const
{
if (fSchemaElementDecl->getMiscFlags() & SchemaSymbols::XSD_FIXED)
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org