Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

IXMLDOMTextImpl.h

Go to the documentation of this file.
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: IXMLDOMTextImpl.h,v $ 00019 * Revision 1.4 2004/09/08 13:55:35 peiyongz 00020 * Apache License Version 2.0 00021 * 00022 * Revision 1.3 2004/02/25 18:38:33 amassari 00023 * The COM wrapper doesn't use the deprecated DOM anymore 00024 * 00025 * Revision 1.2 2003/11/21 12:05:48 amassari 00026 * Updated version to 2.4 00027 * 00028 * Revision 1.1.1.1 2002/02/01 22:21:40 peiyongz 00029 * sane_include 00030 * 00031 * Revision 1.2 2000/03/30 02:00:12 abagchi 00032 * Initial checkin of working code with Copyright Notice 00033 * 00034 */ 00035 00036 #ifndef ___ixmldomtextimpl_h___ 00037 #define ___ixmldomtextimpl_h___ 00038 00039 #include "XMLDOMUtil.h" 00040 #include "IXMLDOMCharacterDataImpl.h" 00041 00042 template <class T, const IID* piid, class tihclass = CComTypeInfoHolder> 00043 class ATL_NO_VTABLE IXMLDOMTextImpl: public IXMLDOMCharacterDataImpl<T,piid,tihclass> 00044 { 00045 public: 00046 00047 virtual DOMText* get_DOMText() = 0; 00048 virtual DOMCharacterData* get_DOMCharacterData() { return get_DOMText(); } 00049 00050 // IXMLDOMText 00051 00052 STDMETHOD(splitText)(long offset, IXMLDOMText **rightHandTextNode) 00053 { 00054 ATLTRACE(_T("IXMLDOMTextImpl::splitText\n")); 00055 00056 if (NULL == rightHandTextNode) 00057 return E_POINTER; 00058 00059 *rightHandTextNode = NULL; 00060 00061 HRESULT hr = S_OK; 00062 00063 try 00064 { 00065 hr = wrapNode(m_pIXMLDOMDocument,get_DOMText()->splitText(offset),IID_IXMLDOMText, reinterpret_cast<LPVOID *> (rightHandTextNode)); 00066 } 00067 catch(...) 00068 { 00069 return E_FAIL; 00070 } 00071 00072 return hr; 00073 } 00074 00075 }; 00076 00077 #endif // ___ixmldomtextimpl_h___

Generated on Thu Apr 30 02:30:51 2009 for ACS C++ API by doxygen 1.3.8