|
||||
File indexing completed on 2025-01-18 10:14:51
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMUSERDATAHANDLER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DOMUSERDATAHANDLER_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 #include <xercesc/dom/DOMNode.hpp> 0027 0028 XERCES_CPP_NAMESPACE_BEGIN 0029 0030 /** 0031 * When associating an object to a key on a node using <code>setUserData</code> 0032 * the application can provide a handler that gets called when the node the 0033 * object is associated to is being cloned or imported. This can be used by 0034 * the application to implement various behaviors regarding the data it 0035 * associates to the DOM nodes. This interface defines that handler. 0036 * 0037 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>. 0038 * @since DOM Level 3 0039 */ 0040 class CDOM_EXPORT DOMUserDataHandler { 0041 protected: 0042 // ----------------------------------------------------------------------- 0043 // Hidden constructors 0044 // ----------------------------------------------------------------------- 0045 /** @name Hidden constructors */ 0046 //@{ 0047 DOMUserDataHandler() {}; 0048 //@} 0049 0050 private: 0051 // ----------------------------------------------------------------------- 0052 // Unimplemented constructors and operators 0053 // ----------------------------------------------------------------------- 0054 /** @name Unimplemented constructors and operators */ 0055 //@{ 0056 DOMUserDataHandler(const DOMUserDataHandler &); 0057 DOMUserDataHandler & operator = (const DOMUserDataHandler &); 0058 //@} 0059 0060 public: 0061 // ----------------------------------------------------------------------- 0062 // All constructors are hidden, just the destructor is available 0063 // ----------------------------------------------------------------------- 0064 /** @name Destructor */ 0065 //@{ 0066 /** 0067 * Destructor 0068 * 0069 */ 0070 virtual ~DOMUserDataHandler() {}; 0071 //@} 0072 0073 // ----------------------------------------------------------------------- 0074 // Class Types 0075 // ----------------------------------------------------------------------- 0076 /** @name Public Constants */ 0077 //@{ 0078 /** 0079 * Operation Type 0080 * 0081 * <p><code>NODE_CLONED:</code> 0082 * The node is cloned.</p> 0083 * 0084 * <p><code>NODE_IMPORTED</code> 0085 * The node is imported.</p> 0086 * 0087 * <p><code>NODE_DELETED</code> 0088 * The node is deleted.</p> 0089 * 0090 * <p><code>NODE_RENAMED</code> 0091 * The node is renamed. 0092 * 0093 * <p><code>NODE_ADOPTED</code> 0094 * The node is adopted. 0095 * 0096 * @since DOM Level 3 0097 */ 0098 enum DOMOperationType { 0099 NODE_CLONED = 1, 0100 NODE_IMPORTED = 2, 0101 NODE_DELETED = 3, 0102 NODE_RENAMED = 4, 0103 NODE_ADOPTED = 5 0104 }; 0105 //@} 0106 0107 0108 // ----------------------------------------------------------------------- 0109 // Virtual DOMUserDataHandler interface 0110 // ----------------------------------------------------------------------- 0111 /** @name Functions introduced in DOM Level 3 */ 0112 //@{ 0113 /** 0114 * This method is called whenever the node for which this handler is 0115 * registered is imported or cloned. 0116 * 0117 * @param operation Specifies the type of operation that is being 0118 * performed on the node. 0119 * @param key Specifies the key for which this handler is being called. 0120 * @param data Specifies the data for which this handler is being called. 0121 * @param src Specifies the node being cloned, adopted, imported, or renamed. 0122 * This is <code>null</code> when the node is being deleted. 0123 * @param dst Specifies the node newly created if any, or <code>null</code>. 0124 * 0125 * @since DOM Level 3 0126 */ 0127 virtual void handle(DOMOperationType operation, 0128 const XMLCh* const key, 0129 void* data, 0130 const DOMNode* src, 0131 DOMNode* dst) = 0; 0132 0133 //@} 0134 0135 }; 0136 0137 XERCES_CPP_NAMESPACE_END 0138 0139 #endif 0140
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |