secureswitools/swisistools/source/xmlparser/xerces/include/xercesc/dom/DOMUserDataHandler.hpp
changeset 0 ba25891c3a9e
child 1 c42dffbd5b4f
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 #ifndef DOMUserDataHandler_HEADER_GUARD_
       
    18 #define DOMUserDataHandler_HEADER_GUARD_
       
    19 
       
    20 /*
       
    21  * Licensed to the Apache Software Foundation (ASF) under one or more
       
    22  * contributor license agreements.  See the NOTICE file distributed with
       
    23  * this work for additional information regarding copyright ownership.
       
    24  * The ASF licenses this file to You under the Apache License, Version 2.0
       
    25  * (the "License"); you may not use this file except in compliance with
       
    26  * the License.  You may obtain a copy of the License at
       
    27  * 
       
    28  *      http://www.apache.org/licenses/LICENSE-2.0
       
    29  * 
       
    30  * Unless required by applicable law or agreed to in writing, software
       
    31  * distributed under the License is distributed on an "AS IS" BASIS,
       
    32  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       
    33  * See the License for the specific language governing permissions and
       
    34  * limitations under the License.
       
    35  */
       
    36 
       
    37 /*
       
    38  * $Id: DOMUserDataHandler.hpp 568078 2007-08-21 11:43:25Z amassari $
       
    39  */
       
    40 
       
    41 #include <xercesc/util/XercesDefs.hpp>
       
    42 #include <xercesc/dom/DOMNode.hpp>
       
    43 
       
    44 XERCES_CPP_NAMESPACE_BEGIN
       
    45 
       
    46 /**
       
    47  * When associating an object to a key on a node using <code>setUserData</code>
       
    48  *  the application can provide a handler that gets called when the node the
       
    49  * object is associated to is being cloned or imported. This can be used by
       
    50  * the application to implement various behaviors regarding the data it
       
    51  * associates to the DOM nodes. This interface defines that handler.
       
    52  *
       
    53  * <p><b>"Experimental - subject to change"</b></p>
       
    54  *
       
    55  * <p>See also the <a href='http://www.w3.org/2001/07/WD-DOM-Level-3-Core-20010726'>Document Object Model (DOM) Level 3 Core Specification</a>.
       
    56  * @since DOM Level 3
       
    57  */
       
    58 class CDOM_EXPORT DOMUserDataHandler {
       
    59 protected:
       
    60     // -----------------------------------------------------------------------
       
    61     //  Hidden constructors
       
    62     // -----------------------------------------------------------------------
       
    63     /** @name Hidden constructors */
       
    64     //@{    
       
    65     DOMUserDataHandler() {};
       
    66     //@}
       
    67 
       
    68 private:
       
    69     // -----------------------------------------------------------------------
       
    70     // Unimplemented constructors and operators
       
    71     // -----------------------------------------------------------------------
       
    72     /** @name Unimplemented constructors and operators */
       
    73     //@{
       
    74     DOMUserDataHandler(const DOMUserDataHandler &);
       
    75     DOMUserDataHandler & operator = (const DOMUserDataHandler &);
       
    76     //@}
       
    77 
       
    78 public:
       
    79     // -----------------------------------------------------------------------
       
    80     //  All constructors are hidden, just the destructor is available
       
    81     // -----------------------------------------------------------------------
       
    82     /** @name Destructor */
       
    83     //@{
       
    84     /**
       
    85      * Destructor
       
    86      *
       
    87      */
       
    88     virtual ~DOMUserDataHandler() {};
       
    89     //@}
       
    90 
       
    91     // -----------------------------------------------------------------------
       
    92     //  Class Types
       
    93     // -----------------------------------------------------------------------
       
    94     /** @name Public Constants */
       
    95     //@{
       
    96     /**
       
    97      * Operation Type
       
    98      *
       
    99      * <p><code>NODE_CLONED:</code>
       
   100      * The node is cloned.</p>
       
   101      *
       
   102      * <p><code>NODE_IMPORTED</code>
       
   103      * The node is imported.</p>
       
   104      *
       
   105      * <p><code>NODE_DELETED</code>
       
   106      * The node is deleted.</p>
       
   107      *
       
   108      * <p><code>NODE_RENAMED</code>
       
   109      * The node is renamed.
       
   110      *
       
   111      * <p><b>"Experimental - subject to change"</b></p>
       
   112      *
       
   113      * @since DOM Level 3
       
   114      */
       
   115     enum DOMOperationType {
       
   116         NODE_CLONED               = 1,
       
   117         NODE_IMPORTED             = 2,
       
   118         NODE_DELETED              = 3,
       
   119         NODE_RENAMED              = 4
       
   120     };
       
   121     //@}
       
   122 
       
   123 
       
   124     // -----------------------------------------------------------------------
       
   125     //  Virtual DOMUserDataHandler interface
       
   126     // -----------------------------------------------------------------------
       
   127     /** @name Functions introduced in DOM Level 3 */
       
   128     //@{
       
   129     /**
       
   130      * This method is called whenever the node for which this handler is
       
   131      * registered is imported or cloned.
       
   132      *
       
   133      * <p><b>"Experimental - subject to change"</b></p>
       
   134      *
       
   135      * @param operation Specifies the type of operation that is being
       
   136      *   performed on the node.
       
   137      * @param key Specifies the key for which this handler is being called.
       
   138      * @param data Specifies the data for which this handler is being called.
       
   139      * @param src Specifies the node being cloned, imported, or renamed.
       
   140      * @param dst Specifies the node newly created.
       
   141      * @since DOM Level 3
       
   142      */
       
   143     virtual void handle(DOMOperationType operation,
       
   144                         const XMLCh* const key,
       
   145                         void* data,
       
   146                         const DOMNode* src,
       
   147                         const DOMNode* dst) = 0;
       
   148 
       
   149     //@}
       
   150 
       
   151 };
       
   152 
       
   153 XERCES_CPP_NAMESPACE_END
       
   154 
       
   155 #endif
       
   156