You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2008/07/28 20:25:24 UTC
svn commit: r680433 [2/2] - in /xalan/c/trunk: Tests/Dom2Dom/ Tests/Params/
Tests/PerfT/ Tests/Threads/ samples/DocumentBuilder/
samples/XalanTransformerCallback/ src/xalanc/DOMSupport/
src/xalanc/Harness/ src/xalanc/ICUBridge/ src/xalanc/Include/ src/...
Modified: xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XResultTreeFrag.cpp Mon Jul 28 11:25:22 2008
@@ -116,11 +116,7 @@
{
if (m_cachedNumberValue == 0.0)
{
-#if defined(XALAN_NO_MUTABLE)
- ((XResultTreeFrag*)this)->m_cachedNumberValue = DoubleSupport::toDouble(str());
-#else
m_cachedNumberValue = DoubleSupport::toDouble(str(), getMemoryManager());
-#endif
}
return m_cachedNumberValue;
@@ -149,11 +145,7 @@
}
else if (isEmpty(m_cachedStringValue) == true)
{
-#if defined(XALAN_NO_MUTABLE)
- DOMServices::getNodeData(*m_value, ((XResultTreeFrag*)this)->m_cachedStringValue);
-#else
DOMServices::getNodeData(*m_value, m_cachedStringValue);
-#endif
}
return m_cachedStringValue;
Modified: xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/XSLTEngineImpl.cpp Mon Jul 28 11:25:22 2008
@@ -670,21 +670,13 @@
if (theType == XalanNode::DOCUMENT_NODE)
{
const XalanDocument& doc =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const XalanDocument&)fragBase;
-#else
static_cast<const XalanDocument&>(fragBase);
-#endif
nsNode = doc.getDocumentElement();
}
else if (theType == XalanNode::ELEMENT_NODE)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- nsNode = (const XalanElement*)&fragBase;
-#else
nsNode = static_cast<const XalanElement*>(&fragBase);
-#endif
}
else
{
@@ -692,11 +684,7 @@
if (node->getNodeType() == XalanNode::ELEMENT_NODE)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- nsNode = (const XalanElement*)&fragBase;
-#else
nsNode = static_cast<const XalanElement*>(node);
-#endif
}
else
{
@@ -796,11 +784,7 @@
}
else
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- stylesheet = constructionContext.create( *((StylesheetRoot*)m_stylesheetRoot), stringHolder);
-#else
- stylesheet = constructionContext.create( *const_cast<StylesheetRoot*>(m_stylesheetRoot), stringHolder);
-#endif
+ stylesheet = constructionContext.create(*const_cast<StylesheetRoot*>(m_stylesheetRoot), stringHolder);
theGuard.reset(&theMemoryManager, stylesheet);
}
@@ -836,12 +820,8 @@
const XalanDocument* const theOwnerDocument =
fragBase.getNodeType() == XalanNode::DOCUMENT_NODE ?
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const XalanDocument*)&fragBase :
-#else
- static_cast<const XalanDocument*>(&fragBase) :
-#endif
- fragBase.getOwnerDocument();
+ static_cast<const XalanDocument*>(&fragBase) :
+ fragBase.getOwnerDocument();
assert(theOwnerDocument != 0);
// Catch any XMLExceptions thrown, since we may not
@@ -883,11 +863,7 @@
{
stylesheet = Stylesheet::create(
theMemoryManager,
-#if defined(XALAN_OLD_STYLE_CASTS)
- *(StylesheetRoot*)m_stylesheetRoot,
-#else
*const_cast<StylesheetRoot*>(m_stylesheetRoot),
-#endif
localXSLURLString,
constructionContext);
@@ -1297,9 +1273,9 @@
if(mode != 0 && mode->isEmpty() == false)
{
- msg += XalanDOMString(XALAN_STATIC_UCODE_STRING(", mode = {"), executionContext.getMemoryManager());
+ msg += XalanDOMString(", mode = {", executionContext.getMemoryManager());
msg += mode->getNamespace();
- msg += XalanDOMString(XALAN_STATIC_UCODE_STRING("}"), executionContext.getMemoryManager());
+ msg += XalanDOMString("}", executionContext.getMemoryManager());
msg += mode->getLocalPart();
}
@@ -2135,11 +2111,7 @@
if (posNodeType == XalanNode::DOCUMENT_FRAGMENT_NODE)
{
outputResultTreeFragment(
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const XalanDocumentFragment&)node,
-#else
static_cast<const XalanDocumentFragment&>(node),
-#endif
cloneTextNodesOnly,
locator);
}
@@ -2305,11 +2277,7 @@
else
{
const XalanText& tx =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const XalanText&)node;
-#else
static_cast<const XalanText&>(node);
-#endif
cloneToResultTree(tx, overrideStrip);
}
@@ -2321,11 +2289,7 @@
case XalanNode::TEXT_NODE:
{
const XalanText& tx =
- #if defined(XALAN_OLD_STYLE_CASTS)
- (const XalanText&)node;
- #else
static_cast<const XalanText&>(node);
- #endif
cloneToResultTree(tx, overrideStrip);
}
Modified: xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanExtensions/FunctionEvaluate.cpp Mon Jul 28 11:25:22 2008
@@ -94,13 +94,8 @@
{
assert(resolver == 0 || resolver->getNodeType() == XalanNode::ELEMENT_NODE);
-#if defined(XALAN_OLD_STYLE_CASTS)
- ElementPrefixResolverProxy theProxy((const XalanElement*)resolver,
- executionContext.getMemoryManager());
-#else
ElementPrefixResolverProxy theProxy(static_cast<const XalanElement*>(resolver),
executionContext.getMemoryManager());
-#endif
return doExecute(executionContext, context, expression, theProxy, locator);
}
Modified: xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeHelper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeHelper.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeHelper.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeHelper.cpp Mon Jul 28 11:25:22 2008
@@ -44,11 +44,7 @@
inline XalanSourceTreeComment*
castToComment(XalanNode* theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanSourceTreeComment*)theNode;
-#else
return static_cast<XalanSourceTreeComment*>(theNode);
-#endif
}
@@ -56,11 +52,7 @@
inline XalanSourceTreeElement*
castToElement(XalanNode* theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanSourceTreeElement*)theNode;
-#else
return static_cast<XalanSourceTreeElement*>(theNode);
-#endif
}
@@ -68,11 +60,7 @@
inline XalanSourceTreeProcessingInstruction*
castToProcessingInstruction(XalanNode* theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanSourceTreeProcessingInstruction*)theNode;
-#else
return static_cast<XalanSourceTreeProcessingInstruction*>(theNode);
-#endif
}
@@ -80,11 +68,7 @@
inline XalanSourceTreeText*
castToText(XalanNode* theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanSourceTreeText*)theNode;
-#else
return static_cast<XalanSourceTreeText*>(theNode);
-#endif
}
Modified: xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanSourceTree/XalanSourceTreeParserLiaison.cpp Mon Jul 28 11:25:22 2008
@@ -194,11 +194,7 @@
{
m_xmlReader->setProperty(
XMLUni::fgXercesSchemaExternalSchemaLocation,
-#if defined(XALAN_OLD_STYLE_CASTS)
- (void*)theLocation);
-#else
const_cast<XalanDOMChar*>(theLocation));
-#endif
}
}
@@ -210,11 +206,7 @@
{
m_xmlReader->setProperty(
XMLUni::fgXercesSchemaExternalNoNameSpaceSchemaLocation,
-#if defined(XALAN_OLD_STYLE_CASTS)
- (void*)theLocation);
-#else
const_cast<XalanDOMChar*>(theLocation));
-#endif
}
}
}
Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanCAPI.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanCAPI.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XalanTransformer/XalanCAPI.cpp (original)
+++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanCAPI.cpp Mon Jul 28 11:25:22 2008
@@ -125,11 +125,7 @@
{
assert(theHandle != 0);
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanTransformer*)theHandle;
-#else
return static_cast<XalanTransformer*>(theHandle);
-#endif
}
@@ -139,11 +135,7 @@
{
assert(theHandle != 0);
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (const XalanCompiledStylesheet*)theHandle;
-#else
return reinterpret_cast<const XalanCompiledStylesheet*>(theHandle);
-#endif
}
@@ -153,11 +145,7 @@
{
assert(theHandle != 0);
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (const XalanParsedSource*)theHandle;
-#else
return reinterpret_cast<const XalanParsedSource*>(theHandle);
-#endif
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesBridgeNavigator.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesBridgeNavigator.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesBridgeNavigator.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesBridgeNavigator.cpp Mon Jul 28 11:25:22 2008
@@ -39,14 +39,9 @@
-// I'm using this to distinguish between null nodes, which are valid, and
-// an uninitialized cached node address. This is probably bogus, and I'll
-// probably just change this to 0, but this is experimental anyway...
-#if defined(XALAN_OLD_STYLE_CASTS)
-static XalanNode* const invalidNodeAddress = (XalanNode*)1;
-#else
+// This is used to distinguish between null nodes, which are valid, and
+// an uninitialized cached node address.
static XalanNode* const invalidNodeAddress = reinterpret_cast<XalanNode*>(1);
-#endif
@@ -121,11 +116,7 @@
{
if (m_parentNode == invalidNodeAddress)
{
-#if defined(XALAN_NO_MUTABLE)
- ((XercesBridgeNavigator*)this)->m_parentNode = m_ownerDocument->mapNode(theXercesNode.getParentNode());
-#else
m_parentNode = m_ownerDocument->mapNode(theXercesNode.getParentNode());
-#endif
}
return m_parentNode;
@@ -138,11 +129,7 @@
{
if (m_previousSibling == invalidNodeAddress)
{
-#if defined(XALAN_NO_MUTABLE)
- ((XercesBridgeNavigator*)this)->m_previousSibling = m_ownerDocument->mapNode(theXercesNode.getPreviousSibling());
-#else
m_previousSibling = m_ownerDocument->mapNode(theXercesNode.getPreviousSibling());
-#endif
}
return m_previousSibling;
@@ -155,11 +142,7 @@
{
if (m_nextSibling == invalidNodeAddress)
{
-#if defined(XALAN_NO_MUTABLE)
- ((XercesBridgeNavigator*)this)->m_nextSibling = m_ownerDocument->mapNode(theXercesNode.getNextSibling());
-#else
m_nextSibling = m_ownerDocument->mapNode(theXercesNode.getNextSibling());
-#endif
}
return m_nextSibling;
@@ -172,11 +155,7 @@
{
if (m_firstChild == invalidNodeAddress)
{
-#if defined(XALAN_NO_MUTABLE)
- ((XercesBridgeNavigator*)this)->m_firstChild = m_ownerDocument->mapNode(theXercesNode.getFirstChild());
-#else
m_firstChild = m_ownerDocument->mapNode(theXercesNode.getFirstChild());
-#endif
}
return m_firstChild;
@@ -189,11 +168,7 @@
{
if (m_lastChild == invalidNodeAddress)
{
-#if defined(XALAN_NO_MUTABLE)
- ((XercesBridgeNavigator*)this)->m_lastChild = m_ownerDocument->mapNode(theXercesNode.getLastChild());
-#else
m_lastChild = m_ownerDocument->mapNode(theXercesNode.getLastChild());
-#endif
}
return m_lastChild;
@@ -302,11 +277,7 @@
{
assert(m_parentNode->getNodeType() == XalanNode::ELEMENT_NODE);
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanElement*)m_parentNode;
-#else
return static_cast<XalanElement*>(m_parentNode);
-#endif
}
else
{
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOM_NodeHack.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOM_NodeHack.hpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOM_NodeHack.hpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDOM_NodeHack.hpp Mon Jul 28 11:25:22 2008
@@ -73,11 +73,7 @@
static NodeImplType*
getImpl(const ParentType& theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesDOM_NodeHack&)theNode).getImpl();
-#else
return static_cast<const XercesDOM_NodeHack&>(theNode).getImpl();
-#endif
}
};
@@ -140,21 +136,13 @@
ElementImplType*
getImpl() const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (ElementImplType*)fImpl;
-#else
return reinterpret_cast<ElementImplType*>(fImpl);
-#endif
}
static ElementImplType*
getImpl(const ParentType& theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesDOM_ElementHack&)theNode).getImpl();
-#else
return static_cast<const XercesDOM_ElementHack&>(theNode).getImpl();
-#endif
}
};
@@ -194,21 +182,13 @@
TextImplType*
getImpl() const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (TextImplType*)fImpl;
-#else
return reinterpret_cast<TextImplType*>(fImpl);
-#endif
}
static TextImplType*
getImpl(const ParentType& theNode)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesDOM_TextHack&)theNode).getImpl();
-#else
return static_cast<const XercesDOM_TextHack&>(theNode).getImpl();
-#endif
}
};
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesDocumentBridge.cpp Mon Jul 28 11:25:22 2008
@@ -180,11 +180,7 @@
NodeImplType* const theXercesNodeImpl =
mapNodeToImpl(theXalanNode);
-#if defined(XALAN_OLD_STYLE_CASTS)
- return XercesDOM_AttrHack((AttrImplType*)theXercesNodeImpl);
-#else
return XercesDOM_AttrHack(reinterpret_cast<AttrImplType*>(theXercesNodeImpl));
-#endif
}
@@ -212,11 +208,7 @@
XalanAttr*
XercesDocumentBridge::mapNode(const DOM_AttrType& theXercesNode) const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XercesAttrBridge*)mapNode(XercesDOM_NodeHack::getImpl(theXercesNode));
-#else
return static_cast<XercesAttrBridge*>(mapNode(XercesDOM_NodeHack::getImpl(theXercesNode)));
-#endif
}
@@ -224,11 +216,7 @@
XalanElement*
XercesDocumentBridge::mapNode(const DOM_ElementType& theXercesNode) const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XercesElementBridge*)mapNode(XercesDOM_NodeHack::getImpl(theXercesNode));
-#else
return static_cast<XercesElementBridge*>(mapNode(XercesDOM_NodeHack::getImpl(theXercesNode)));
-#endif
}
@@ -283,11 +271,7 @@
XercesDocumentBridge::pushNavigator(bool mappingMode) const
{
XercesDocumentBridge* const This =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (XercesDocumentBridge*)this;
-#else
const_cast<XercesDocumentBridge*>(this);
-#endif
This->m_navigators.push_back(XercesBridgeNavigator(This, mappingMode));
@@ -313,23 +297,15 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
// Update the member variable for the new instance.
- This->m_doctype = new XercesDocumentTypeBridge(theDoctype, theNavigator);
+ m_doctype = new XercesDocumentTypeBridge(theDoctype, theNavigator);
if (mapNode == true)
{
- This->m_nodeMap.addAssociation(theDoctype, m_doctype);
+ m_nodeMap.addAssociation(theDoctype, m_doctype);
}
- This->m_nodes.push_back(m_doctype);
+ m_nodes.push_back(m_doctype);
return m_doctype;
}
@@ -347,23 +323,14 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
XercesElementBridge* const theBridge =
- This->m_elementAllocator.create(theXercesNode,
- theNavigator);
+ m_elementAllocator.create(theXercesNode, theNavigator);
if (m_doctype != 0 || mapNode == true)
{
// Add it to the node map, since we my need it for getting
// elements by ID, or we're in mapping mode.
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -386,20 +353,12 @@
new XercesDocumentFragmentBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -418,22 +377,13 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
XercesTextBridge* const theBridge =
- This->m_textAllocator.create(theXercesNode,
- theNavigator);
+ m_textAllocator.create(theXercesNode, theNavigator);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -456,20 +406,12 @@
new XercesCommentBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -492,20 +434,12 @@
new XercesCDATASectionBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -528,20 +462,12 @@
new XercesProcessingInstructionBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -560,21 +486,12 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
XercesAttrBridge* const theBridge =
- This->m_attributeAllocator.create(theXercesNode,
- theNavigator);
+ m_attributeAllocator.create(theXercesNode, theNavigator);
// Add it to the node map -- attributes ALWAYS go in the map
// for now...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
return theBridge;
}
@@ -596,19 +513,11 @@
new XercesEntityBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
// Add it to the node map -- entities ALWAYS go in the map
// for now...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
return theBridge;
}
@@ -630,20 +539,12 @@
new XercesEntityReferenceBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
}
return theBridge;
@@ -666,19 +567,11 @@
new XercesNotationBridge(theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentBridge* const This =
- (XercesDocumentBridge*)this;
-#else
- const XercesDocumentBridge* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theBridge);
+ m_nodes.push_back(theBridge);
// Add it to the node map -- notations ALWAYS go in the map
// for now...
- This->m_nodeMap.addAssociation(theXercesNode, theBridge);
+ m_nodeMap.addAssociation(theXercesNode, theBridge);
return theBridge;
}
@@ -698,11 +591,7 @@
case DOM_NodeType::ATTRIBUTE_NODE:
{
const DOM_AttrType& theAttrNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_AttrType&)theXercesNode;
-#else
static_cast<const DOM_AttrType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theAttrNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -712,11 +601,7 @@
case DOM_NodeType::CDATA_SECTION_NODE:
{
const DOM_CDATASectionType& theCDATASectionNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_CDATASectionType&)theXercesNode;
-#else
static_cast<const DOM_CDATASectionType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theCDATASectionNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -727,11 +612,7 @@
case DOM_NodeType::COMMENT_NODE:
{
const DOM_CommentType& theCommentNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_CommentType&)theXercesNode;
-#else
static_cast<const DOM_CommentType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theCommentNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -741,11 +622,7 @@
case DOM_NodeType::DOCUMENT_FRAGMENT_NODE:
{
const DOM_DocumentFragmentType& theDocumentFragmentNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_DocumentFragmentType&)theXercesNode;
-#else
static_cast<const DOM_DocumentFragmentType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theDocumentFragmentNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -756,11 +633,7 @@
case DOM_NodeType::ELEMENT_NODE:
{
const DOM_ElementType& theElementNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_ElementType&)theXercesNode;
-#else
static_cast<const DOM_ElementType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theElementNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -770,11 +643,7 @@
case DOM_NodeType::ENTITY_NODE:
{
const DOM_EntityType& theEntityNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_EntityType&)theXercesNode;
-#else
static_cast<const DOM_EntityType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theEntityNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -784,11 +653,7 @@
case DOM_NodeType::ENTITY_REFERENCE_NODE:
{
const DOM_EntityReferenceType& theEntityReferenceNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_EntityReferenceType&)theXercesNode;
-#else
static_cast<const DOM_EntityReferenceType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theEntityReferenceNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -798,11 +663,7 @@
case DOM_NodeType::NOTATION_NODE:
{
const DOM_NotationType& theNotationNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_NotationType&)theXercesNode;
-#else
static_cast<const DOM_NotationType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theNotationNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -812,11 +673,7 @@
case DOM_NodeType::PROCESSING_INSTRUCTION_NODE:
{
const DOM_ProcessingInstructionType& thePINode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_ProcessingInstructionType&)theXercesNode;
-#else
static_cast<const DOM_ProcessingInstructionType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(thePINode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -826,11 +683,7 @@
case DOM_NodeType::TEXT_NODE:
{
const DOM_TextType& theTextNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_TextType&)theXercesNode;
-#else
static_cast<const DOM_TextType&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theTextNode, theIndex, mapNode);
assert(theNewNode != 0);
@@ -840,11 +693,7 @@
case DOM_NodeType::DOCUMENT_TYPE_NODE:
{
const DOM_DocumentType_Type& theDoctypeNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_DocumentType_Type&)theXercesNode;
-#else
static_cast<const DOM_DocumentType_Type&>(theXercesNode);
-#endif
theNewNode = createBridgeNode(theDoctypeNode, theIndex, mapNode);
@@ -1027,11 +876,7 @@
const DOM_NodeType theNewDocument = m_xercesDocument.cloneNode(deep);
theBridge =
-#if defined(XALAN_OLD_STYLE_CASTS)
- new XercesDocumentBridge((const DOM_Document_Type&)theNewDocument);
-#else
new XercesDocumentBridge(static_cast<const DOM_Document_Type&>(theNewDocument));
-#endif
}
catch(const DOM_DOMExceptionType& theException)
{
@@ -1495,18 +1340,10 @@
{
// $$$ ToDo: This is because DOM_Document::getElementById() is not
// const...
-#if defined(XALAN_NO_MUTABLE)
- const DOM_NodeType theXercesNode(((DOM_Document_Type&)m_xercesDocument).getElementById(c_wstr(elementId)));
-#else
- const DOM_NodeType theXercesNode(m_xercesDocument.getElementById(c_wstr(elementId)));
-#endif
+ const DOM_NodeType theXercesNode(m_xercesDocument.getElementById(elementId.c_str()));
return theXercesNode.isNull() == true ? 0 :
-#if defined(XALAN_OLD_STYLE_CASTS)
- (XalanElement*)mapNode(theXercesNode);
-#else
static_cast<XalanElement*>(mapNode(theXercesNode));
-#endif
}
@@ -1541,11 +1378,7 @@
theChild = theChild->getNextSibling();
}
-#if defined(XALAN_OLD_STYLE_CASTS)
- m_documentElement = (XalanElement*)theChild;
-#else
m_documentElement = static_cast<XalanElement*>(theChild);
-#endif
m_indexValid = true;
@@ -1645,11 +1478,7 @@
{
// Special case for doctype -- we have to build its entities...
const DOM_DocumentType_Type& theDoctype =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_DocumentType_Type&)node;
-#else
static_cast<const DOM_DocumentType_Type&>(node);
-#endif
const DOM_NamedNodeMapType theEntities =
theDoctype.getEntities();
@@ -1665,13 +1494,9 @@
}
else if (theType == DOM_NodeType::ELEMENT_NODE)
{
- // Special case for element nodes -- we have to build the attributes...
+ // Special case for element nodes -- we have to build the attributes...
const DOM_ElementType& theElement =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOM_ElementType&)node;
-#else
static_cast<const DOM_ElementType&>(node);
-#endif
const DOM_NamedNodeMapType theAttributes =
theElement.getAttributes();
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesElementBridge.cpp Mon Jul 28 11:25:22 2008
@@ -309,11 +309,7 @@
XalanAttr*
XercesElementBridge::getAttributeNode(const XalanDOMString& name) const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanAttr*)m_attributes.getNamedItem(name);
-#else
return static_cast<XalanAttr*>(m_attributes.getNamedItem(name));
-#endif
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/Deprecated/XercesNamedNodeMapBridge.cpp Mon Jul 28 11:25:22 2008
@@ -155,11 +155,7 @@
const XalanDOMString& namespaceURI,
const XalanDOMString& localName) const
{
-#if defined(XALAN_NO_MUTABLE)
- return m_navigator.mapNode(((XercesNamedNodeMapBridge*)this)->m_xercesNamedNodeMap.getNamedItemNS(c_wstr(namespaceURI), c_wstr(localName)));
-#else
- return m_navigator.mapNode(m_xercesNamedNodeMap.getNamedItemNS(c_wstr(namespaceURI), c_wstr(localName)));
-#endif
+ return m_navigator.mapNode(m_xercesNamedNodeMap.getNamedItemNS(namespaceURI.c_str(), localName.c_str()));
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMFormatterWalker.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMFormatterWalker.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMFormatterWalker.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMFormatterWalker.cpp Mon Jul 28 11:25:22 2008
@@ -77,11 +77,7 @@
case DOMNodeType::ELEMENT_NODE:
{
const DOMElementType* const theElementNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMElementType*)node;
-#else
static_cast<const DOMElementType*>(node);
-#endif
const DOMNamedNodeMapType* const atts = theElementNode->getAttributes();
assert(atts != 0);
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMWalker.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMWalker.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMWalker.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDOMWalker.cpp Mon Jul 28 11:25:22 2008
@@ -290,11 +290,7 @@
bool
XercesDOMWalker::startNode(DOMNodeType* node)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return startNode((const DOMNodeType*)node);
-#else
return startNode(const_cast<const DOMNodeType*>(node));
-#endif
}
@@ -302,11 +298,7 @@
bool
XercesDOMWalker::endNode(DOMNodeType* node)
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return endNode((const DOMNodeType*)node);
-#else
return endNode(const_cast<const DOMNodeType*>(node));
-#endif
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDocumentWrapper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDocumentWrapper.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDocumentWrapper.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesDocumentWrapper.cpp Mon Jul 28 11:25:22 2008
@@ -162,11 +162,7 @@
{
if (theXercesNode != m_xercesDocument &&
theXercesNode->getOwnerDocument() != m_xercesDocument &&
-#if defined(XALAN_OLD_STYLE_CASTS)
- theXercesNode->getParentNode() != (const DOMNodeType*)m_xercesDocument)
-#else
theXercesNode->getParentNode() != static_cast<const DOMNodeType*>(m_xercesDocument))
-#endif
{
throw XercesDOMWrapperException(XercesDOMWrapperException::WRONG_DOCUMENT_ERR);
}
@@ -188,20 +184,11 @@
const DOMNodeType*
XercesDocumentWrapper::mapNode(XalanNode* theXalanNode) const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- if ((const XalanNode*)this == theXalanNode)
-#else
- if (static_cast<const XalanNode*>(this) == theXalanNode)
-#endif
+ if (this == theXalanNode)
{
return m_xercesDocument;
}
- else if (theXalanNode == 0 ||
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const XalanDocument*)this != theXalanNode->getOwnerDocument())
-#else
- static_cast<const XalanDocument*>(this) != theXalanNode->getOwnerDocument())
-#endif
+ else if (theXalanNode == 0 || this != theXalanNode->getOwnerDocument())
{
throw XercesDOMWrapperException(XercesDOMWrapperException::WRONG_DOCUMENT_ERR);
}
@@ -210,27 +197,15 @@
switch(theXalanNode->getNodeType())
{
case XalanNode::ATTRIBUTE_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesAttrWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesAttrWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::CDATA_SECTION_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesCDATASectionWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesCDATASectionWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::COMMENT_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesCommentWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesCommentWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::DOCUMENT_FRAGMENT_NODE:
@@ -238,59 +213,31 @@
break;
case XalanNode::ELEMENT_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesElementWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesElementWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::ENTITY_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesEntityWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesEntityWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::ENTITY_REFERENCE_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesEntityReferenceWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesEntityReferenceWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::NOTATION_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesNotationWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesNotationWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::PROCESSING_INSTRUCTION_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesProcessingInstructionWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesProcessingInstructionWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::TEXT_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesTextWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesTextWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
case XalanNode::DOCUMENT_TYPE_NODE:
-#if defined(XALAN_OLD_STYLE_CASTS)
- return ((const XercesDocumentTypeWrapper*)theXalanNode)->getXercesNode();
-#else
return static_cast<const XercesDocumentTypeWrapper*>(theXalanNode)->getXercesNode();
-#endif
break;
default:
@@ -307,11 +254,7 @@
XalanAttr*
XercesDocumentWrapper::mapNode(const DOMAttrType* theXercesNode) const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanAttr*)mapNode((const DOMNodeType*)theXercesNode);
-#else
return static_cast<XalanAttr*>(mapNode(static_cast<const DOMNodeType*>(theXercesNode)));
-#endif
}
@@ -319,11 +262,7 @@
XalanElement*
XercesDocumentWrapper::mapNode(const DOMElementType* theXercesNode) const
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XercesElementWrapper*)mapNode((const DOMNodeType*)theXercesNode);
-#else
return static_cast<XercesElementWrapper*>(mapNode(static_cast<const DOMNodeType*>(theXercesNode)));
-#endif
}
@@ -377,14 +316,7 @@
XercesWrapperNavigator&
XercesDocumentWrapper::createNavigator() const
{
- XercesDocumentWrapper* const This =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (XercesDocumentWrapper*)this;
-#else
- const_cast<XercesDocumentWrapper*>(this);
-#endif
-
- return *This->m_navigatorAllocator.create(This);
+ return *m_navigatorAllocator.create(const_cast<XercesDocumentWrapper*>(this));
}
@@ -407,23 +339,15 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
// Update the member variable for the new instance.
- This->m_doctype = XercesDocumentTypeWrapper::create( getMemoryManager(), theDoctype, theNavigator);
+ m_doctype = XercesDocumentTypeWrapper::create(getMemoryManager(), theDoctype, theNavigator);
if (mapNode == true)
{
- This->m_nodeMap.addAssociation(theDoctype, m_doctype);
+ m_nodeMap.addAssociation(theDoctype, m_doctype);
}
- This->m_nodes.push_back(m_doctype);
+ m_nodes.push_back(m_doctype);
if (theWrapperNodeNavigator != 0)
{
@@ -447,23 +371,14 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
XercesElementWrapper* const theWrapper =
- This->m_elementAllocator.create(theXercesNode,
- theNavigator);
+ m_elementAllocator.create(theXercesNode, theNavigator);
if (m_doctype != 0 || mapNode == true)
{
// Add it to the node map, since we my need it for getting
// elements by ID, or we're in mapping mode.
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
}
if (theWrapperNodeNavigator != 0)
@@ -488,22 +403,13 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
XercesTextWrapper* const theWrapper =
- This->m_textAllocator.create(theXercesNode,
- theNavigator);
+ m_textAllocator.create(theXercesNode, theNavigator);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
}
if (theWrapperNodeNavigator != 0)
@@ -534,20 +440,12 @@
theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theWrapper);
+ m_nodes.push_back(theWrapper);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
}
if (theWrapperNodeNavigator != 0)
@@ -578,20 +476,12 @@
theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theWrapper);
+ m_nodes.push_back(theWrapper);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
}
if (theWrapperNodeNavigator != 0)
@@ -622,20 +512,12 @@
theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theWrapper);
+ m_nodes.push_back(theWrapper);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
}
if (theWrapperNodeNavigator != 0)
@@ -660,21 +542,12 @@
theNavigator.setIndex(theIndex);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
XercesAttrWrapper* const theWrapper =
- This->m_attributeAllocator.create(theXercesNode,
- theNavigator);
+ m_attributeAllocator.create(theXercesNode, theNavigator);
// Add it to the node map -- attributes ALWAYS go in the map
// for now...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
if (theWrapperNodeNavigator != 0)
{
@@ -704,19 +577,11 @@
theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theWrapper);
+ m_nodes.push_back(theWrapper);
// Add it to the node map -- entities ALWAYS go in the map
// for now...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
if (theWrapperNodeNavigator != 0)
{
@@ -746,20 +611,12 @@
theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theWrapper);
+ m_nodes.push_back(theWrapper);
if (mapNode == true)
{
// Add it to the node map...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
}
if (theWrapperNodeNavigator != 0)
@@ -790,19 +647,11 @@
theXercesNode,
theNavigator);
-#if defined(XALAN_NO_MUTABLE)
- XercesDocumentWrapper* const This =
- (XercesDocumentWrapper*)this;
-#else
- const XercesDocumentWrapper* const This =
- this;
-#endif
-
- This->m_nodes.push_back(theWrapper);
+ m_nodes.push_back(theWrapper);
// Add it to the node map -- notations ALWAYS go in the map
// for now...
- This->m_nodeMap.addAssociation(theXercesNode, theWrapper);
+ m_nodeMap.addAssociation(theXercesNode, theWrapper);
if (theWrapperNodeNavigator != 0)
{
@@ -830,11 +679,7 @@
case DOMNodeType::ATTRIBUTE_NODE:
{
const DOMAttrType* theAttrNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMAttrType*)theXercesNode;
-#else
static_cast<const DOMAttrType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theAttrNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -844,11 +689,7 @@
case DOMNodeType::CDATA_SECTION_NODE:
{
const DOMCDATASectionType* theCDATASectionNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMCDATASectionType*)theXercesNode;
-#else
static_cast<const DOMCDATASectionType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theCDATASectionNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -859,11 +700,7 @@
case DOMNodeType::COMMENT_NODE:
{
const DOMCommentType* theCommentNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMCommentType*)theXercesNode;
-#else
static_cast<const DOMCommentType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theCommentNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -877,11 +714,7 @@
case DOMNodeType::ELEMENT_NODE:
{
const DOMElementType* theElementNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMElementType*)theXercesNode;
-#else
static_cast<const DOMElementType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theElementNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -891,11 +724,7 @@
case DOMNodeType::ENTITY_NODE:
{
const DOMEntityType* theEntityNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMEntityType*)theXercesNode;
-#else
static_cast<const DOMEntityType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theEntityNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -905,11 +734,7 @@
case DOMNodeType::ENTITY_REFERENCE_NODE:
{
const DOMEntityReferenceType* theEntityReferenceNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMEntityReferenceType*)theXercesNode;
-#else
static_cast<const DOMEntityReferenceType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theEntityReferenceNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -919,11 +744,7 @@
case DOMNodeType::NOTATION_NODE:
{
const DOMNotationType* theNotationNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMNotationType*)theXercesNode;
-#else
static_cast<const DOMNotationType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theNotationNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -933,11 +754,7 @@
case DOMNodeType::PROCESSING_INSTRUCTION_NODE:
{
const DOMProcessingInstructionType* thePINode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMProcessingInstructionType*)theXercesNode;
-#else
static_cast<const DOMProcessingInstructionType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(thePINode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -947,11 +764,7 @@
case DOMNodeType::TEXT_NODE:
{
const DOMTextType* theTextNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMTextType*)theXercesNode;
-#else
static_cast<const DOMTextType*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theTextNode, theIndex, mapNode, theWrapperNodeNavigator);
assert(theNewNode != 0);
@@ -961,11 +774,7 @@
case DOMNodeType::DOCUMENT_TYPE_NODE:
{
const DOMDocumentType_Type* theDoctypeNode =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMDocumentType_Type*)theXercesNode;
-#else
static_cast<const DOMDocumentType_Type*>(theXercesNode);
-#endif
theNewNode = createWrapperNode(theDoctypeNode, theIndex, mapNode, theWrapperNodeNavigator);
@@ -998,18 +807,12 @@
}
else
{
- // Delete the node...
- XalanNode* ptrToDelete = *i;
-
- if ( ptrToDelete != 0 )
- {
- MemoryManagerType& theManager = m_nodes.getMemoryManager();
-
- ptrToDelete->~XalanNode();
-
- theManager.deallocate(ptrToDelete);
+ assert(*i != 0);
- }
+ // Delete the node...
+ XalanDestroy(
+ m_nodes.getMemoryManager(),
+ *i);
// Erase it from the map...
m_nodes.erase(i);
@@ -1176,7 +979,8 @@
XalanElement*
XercesDocumentWrapper::getElementById(const XalanDOMString& elementId) const
{
- const DOMNodeType* const theXercesNode = m_xercesDocument->getElementById(c_wstr(elementId));
+ const DOMNodeType* const theXercesNode =
+ m_xercesDocument->getElementById(elementId.c_str());
if (theXercesNode == 0)
{
@@ -1184,11 +988,7 @@
}
else
{
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanElement*)mapNode(theXercesNode);
-#else
return static_cast<XalanElement*>(mapNode(theXercesNode));
-#endif
}
}
@@ -1223,11 +1023,7 @@
theChild = theChild->getNextSibling();
}
-#if defined(XALAN_OLD_STYLE_CASTS)
- m_documentElement = (XalanElement*)theChild;
-#else
m_documentElement = static_cast<XalanElement*>(theChild);
-#endif
m_indexValid = true;
@@ -1331,11 +1127,7 @@
{
// Special case for doctype -- we have to build its entities...
const DOMDocumentType_Type* const theDoctype =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMDocumentType_Type*)node;
-#else
static_cast<const DOMDocumentType_Type*>(node);
-#endif
const DOMNamedNodeMapType* const theEntities =
theDoctype->getEntities();
@@ -1351,13 +1143,9 @@
}
else if (node->getNodeType() == DOMNodeType::ELEMENT_NODE)
{
- // Special case for element nodes -- we have to build the attributes...
+ // Special case for element nodes -- we have to build the attributes...
const DOMElementType* const theElement =
-#if defined(XALAN_OLD_STYLE_CASTS)
- (const DOMElementType*)node;
-#else
static_cast<const DOMElementType*>(node);
-#endif
const DOMNamedNodeMapType* const theAttributes =
theElement->getAttributes();
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesLiaisonXalanDOMStringPool.cpp Mon Jul 28 11:25:22 2008
@@ -66,11 +66,7 @@
size_t
XercesLiaisonXalanDOMStringPool::size() const
{
-#if defined(XALAN_NO_MUTABLE)
- XMLMutexLockType theLock(&((XercesLiaisonXalanDOMStringPool*)this)->m_mutex);
-#else
XMLMutexLockType theLock(&m_mutex);
-#endif
return ParentType::size();
}
Modified: xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesWrapperNavigator.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesWrapperNavigator.cpp?rev=680433&r1=680432&r2=680433&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesWrapperNavigator.cpp (original)
+++ xalan/c/trunk/src/xalanc/XercesParserLiaison/XercesWrapperNavigator.cpp Mon Jul 28 11:25:22 2008
@@ -181,11 +181,7 @@
{
assert(m_parentNode->getNodeType() == XalanNode::ELEMENT_NODE);
-#if defined(XALAN_OLD_STYLE_CASTS)
- return (XalanElement*)m_parentNode;
-#else
return static_cast<XalanElement*>(m_parentNode);
-#endif
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org