epoc32/include/xml/dom/xmlenguserdata.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
--- a/epoc32/include/xml/dom/xmlenguserdata.h	Wed Mar 31 12:27:01 2010 +0100
+++ b/epoc32/include/xml/dom/xmlenguserdata.h	Wed Mar 31 12:33:34 2010 +0100
@@ -1,74 +1,81 @@
-/*
-* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). 
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
-* which accompanies this distribution, and is available
-* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:       Interface class describing class that may contains user
- *                 data aded to node
- *
-*/
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// Interface class describing class that may contains user
+// data added to node
+//
 
 
 
-
-
-
-
-#ifndef XMLENGINE_USERDATA_H_INCLUDED
-#define XMLENGINE_USERDATA_H_INCLUDED
+/**
+ @file
+ @publishedAll
+ @released
+*/
+#ifndef XMLENGUSERDATA_H
+#define XMLENGUSERDATA_H
 
 #include <e32def.h>
 
 /**
- * MXmlEngUserData is an abstract base class (interface) for user data that can be
- * stored in the DOM tree. Applications that wish to store user data in the 
- * DOM tree must wrap the user data in a class that implemens this interface.
- *
- * @lib XmlEngineDOM.lib
- * @since S60 v3.1
- */
+Defines an interface so that user data can be stored in the DOM tree.
+Applications that wish to store user data in the DOM tree must wrap the user
+data in a class that implements this interface.
+
+There are two common patterns for implementors of this interface:
+
+1)  Instance-based implementation
+The implementing class stores the user data.  The object can be duplicated with
+CloneL() to form a new object that duplicates the user data.  When Destroy() is
+called, the user data attached to the object is destroyed, but other duplicates
+may continue to hold the data.
+
+2)  Reference-counted implementation
+The implementing class points to the user data.  The object can be duplicated,
+but the user data is not duplicated.  When Destroy() is called, the object is
+destroyed, but the user data is not destroyed unless this is the last object
+referring to this data.
+*/
 class MXmlEngUserData {
 public:
     /**
-     * Free memory that is allocated and do other case specific cleanup.
-     *
-     * @since S60 v3.1
-     */
+    Free memory that is allocated and do other case specific cleanup.  Whether
+	this frees the user data depends on the implementation.  In a
+	reference-counted implementation, the user data may only be destroyed
+	when Destroy() is called on the last object referring to that data.
+    */
     virtual void Destroy() = 0;
     
     /**
-     * Make a copy of the the object. Note that if reference counting is used or
-     * the same pointer can be safely copied to other places the implementation
-     * of this method may just return a pointer to self.
-     *
-     * Copying user data when copying nodes has not been implemented
-     * so this method is for future use (though there's no harm in implementing 
-     * it, of course).
-     *
-     * @since S60 v3.1
-     * @return Pointer to a copy of this object.
-     */
+    Make a copy of the the object.  Whether this duplicates the data or
+	creates a new object that points to the data is determined by the
+	implementor of this class.
+    
+    @return Pointer to a copy of this object.
+	@leave - One of the system-wide error codes
+    */
     virtual MXmlEngUserData* CloneL() = 0;
 
-    /**
-     * Get id of the object. It is up to user-data provider what the result is.
-     * Such a "user data identification" may be in use if several types of
-     * MXmlEngUserData objects are used.
-     *
-     * @since S60 v3.1
-     * @return Pointer that somehow identifies the type of MXmlEngUserData (NULL by default)
-     */
+	/**
+	Gets the id of the object. It is up to the user data provider determine
+	what the result is.  Such a "user data identification" may be useful if
+	several types of MXmlEngUserData objects are used.
+    
+    @return Pointer that somehow identifies the type of MXmlEngUserData (NULL by default)
+    */
     virtual void* ID() {return NULL;}
 };
 
 
+#endif /* XMLENGUSERDATA_H*/
 
-#endif /* XMLENGINE_USERDATA_H_INCLUDED*/