You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by db...@apache.org on 2005/06/04 20:39:45 UTC

svn commit: r180012 - in /xerces/c/trunk/src/xercesc/util: Makefile.in XMLHolder.c XMLHolder.hpp

Author: dbertoni
Date: Sat Jun  4 11:39:44 2005
New Revision: 180012

URL: http://svn.apache.org/viewcvs?rev=180012&view=rev
Log:
Patch for Jira issue XERCESC-1420.

Added:
    xerces/c/trunk/src/xercesc/util/XMLHolder.c
    xerces/c/trunk/src/xercesc/util/XMLHolder.hpp
Modified:
    xerces/c/trunk/src/xercesc/util/Makefile.in

Modified: xerces/c/trunk/src/xercesc/util/Makefile.in
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/Makefile.in?rev=180012&r1=180011&r2=180012&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Makefile.in (original)
+++ xerces/c/trunk/src/xercesc/util/Makefile.in Sat Jun  4 11:39:44 2005
@@ -541,7 +541,7 @@
 	XMLInitializer.hpp \
 	XMLInteger.hpp \
 	XMLMsgLoader.hpp \
-	XMLMutexHolder.hpp \
+	XMLHolder.hpp \
 	XMLNetAccessor.hpp \
 	XMLNumber.hpp \
 	XMLRegisterCleanup.hpp \
@@ -582,7 +582,7 @@
 	ValueStackOf.c \
 	ValueVectorOf.c \
 	XMLDeleterFor.c \
-	XMLMutexHolder.c \
+	XMLHolder.c \
 	LogicalPath.c
 
 UTIL_CPP_OBJECTS = \

Added: xerces/c/trunk/src/xercesc/util/XMLHolder.c
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/XMLHolder.c?rev=180012&view=auto
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLHolder.c (added)
+++ xerces/c/trunk/src/xercesc/util/XMLHolder.c Sat Jun  4 11:39:44 2005
@@ -0,0 +1,52 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ */
+
+// ---------------------------------------------------------------------------
+//  Include
+// ---------------------------------------------------------------------------
+#if defined(XERCES_TMPLSINC)
+#include <xercesc/util/XMLHolder.hpp>
+#endif
+
+XERCES_CPP_NAMESPACE_BEGIN
+
+
+// -----------------------------------------------------------------------
+// XMLHolder:  Constructors and Destructor
+// -----------------------------------------------------------------------
+
+template<class Type>
+XMLHolder<Type>::XMLHolder() :
+    XMemory(),
+    fInstance()
+{
+}
+
+template<class Type>
+XMLHolder<Type>::~XMLHolder()
+{
+}
+
+
+template<class Type>
+XMLHolder<Type>*
+XMLHolder<Type>::castTo(void* handle)
+{
+    return (XMLHolder<Type>*)handle;
+}
+
+
+XERCES_CPP_NAMESPACE_END

Added: xerces/c/trunk/src/xercesc/util/XMLHolder.hpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/XMLHolder.hpp?rev=180012&view=auto
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLHolder.hpp (added)
+++ xerces/c/trunk/src/xercesc/util/XMLHolder.hpp Sat Jun  4 11:39:44 2005
@@ -0,0 +1,56 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.
+ */
+
+#if !defined(XMLHOLDER_HPP)
+#define XMLHOLDER_HPP
+
+#include <xercesc/util/XMemory.hpp>
+
+XERCES_CPP_NAMESPACE_BEGIN
+
+template<class Type>
+class XMLUTIL_EXPORT XMLHolder : public XMemory
+{
+public :
+    // -----------------------------------------------------------------------
+    //  Constructors and Destructor
+    // -----------------------------------------------------------------------
+    XMLHolder();
+
+    ~XMLHolder();
+
+    Type    fInstance;
+
+    static XMLHolder<Type>*
+    castTo(void* handle);
+
+private :
+    // -----------------------------------------------------------------------
+    //  Unimplemented constructors and operators
+    // -----------------------------------------------------------------------
+    XMLHolder(const XMLHolder<Type>&);
+    XMLHolder<Type>& operator=(const XMLHolder<Type>&);
+
+};
+
+XERCES_CPP_NAMESPACE_END
+
+#if !defined(XERCES_TMPLSINC)
+#include <xercesc/util/XMLHolder.c>
+#endif
+
+
+#endif



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org