00001 /* 00002 * Copyright 1999-2000,2004 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /* 00018 * $Log: XMLDOMEntity.h,v $ 00019 * Revision 1.7 2004/09/08 13:55:35 peiyongz 00020 * Apache License Version 2.0 00021 * 00022 * Revision 1.6 2004/02/25 18:38:33 amassari 00023 * The COM wrapper doesn't use the deprecated DOM anymore 00024 * 00025 * Revision 1.5 2003/11/21 12:05:48 amassari 00026 * Updated version to 2.4 00027 * 00028 * Revision 1.4 2003/10/21 21:21:32 amassari 00029 * When the COM object is loaded by a late-binding engine (like WSH, or 00030 * Visual Basic when the type library is not preloaded in the editor), the type 00031 * library version stored in the resource must match the version specified in the 00032 * IDispatchImpl template (defaulted to 1.0), or trying to invoke a method will fail 00033 * 00034 * Revision 1.3 2003/03/14 12:44:49 tng 00035 * [Bug 17147] C++ namespace breaks build of XercesCOM DLL 00036 * 00037 * Revision 1.2 2002/05/21 19:53:53 tng 00038 * DOM Reorganization: update include path for the old DOM interface in COM files 00039 * 00040 * Revision 1.1.1.1 2002/02/01 22:21:41 peiyongz 00041 * sane_include 00042 * 00043 * Revision 1.3 2000/06/03 00:28:59 andyh 00044 * COM Wrapper changes from Curt Arnold 00045 * 00046 * Revision 1.2 2000/03/30 02:00:11 abagchi 00047 * Initial checkin of working code with Copyright Notice 00048 * 00049 */ 00050 00051 #ifndef ___xmldomentity_h___ 00052 #define ___xmldomentity_h___ 00053 00054 #include <xercesc/dom/DOMEntity.hpp> 00055 #include "IXMLDOMNodeImpl.h" 00056 00057 XERCES_CPP_NAMESPACE_USE 00058 00059 class ATL_NO_VTABLE CXMLDOMEntity : 00060 public CComObjectRootEx<CComSingleThreadModel>, 00061 public IXMLDOMNodeImpl<IXMLDOMEntity, &IID_IXMLDOMEntity> 00062 { 00063 public: 00064 CXMLDOMEntity() 00065 {} 00066 00067 void FinalRelease() 00068 { 00069 ReleaseOwnerDoc(); 00070 } 00071 00072 virtual DOMNode* get_DOMNode() { return entity;} 00073 virtual DOMNodeType get_DOMNodeType() const { return NODE_ENTITY; } 00074 00075 DECLARE_NOT_AGGREGATABLE(CXMLDOMEntity) 00076 DECLARE_PROTECT_FINAL_CONSTRUCT() 00077 00078 BEGIN_COM_MAP(CXMLDOMEntity) 00079 COM_INTERFACE_ENTRY(IXMLDOMEntity) 00080 COM_INTERFACE_ENTRY(IXMLDOMNode) 00081 COM_INTERFACE_ENTRY(IIBMXMLDOMNodeIdentity) 00082 COM_INTERFACE_ENTRY(IDispatch) 00083 END_COM_MAP() 00084 00085 // IXMLDOMEntity methods 00086 STDMETHOD(get_publicId)(VARIANT *pVal); 00087 STDMETHOD(get_systemId)(VARIANT *pVal); 00088 STDMETHOD(get_notationName)(BSTR *pVal); 00089 00090 DOMEntity* entity; 00091 }; 00092 00093 typedef CComObject<CXMLDOMEntity> CXMLDOMEntityObj; 00094 00095 #endif // ___xmldomentity_h___