• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

IXMLDOMTextImpl.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  * 
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  * 
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 /*
00019  * $Id: IXMLDOMTextImpl.h 568078 2007-08-21 11:43:25Z amassari $
00020  */
00021 
00022 #ifndef ___ixmldomtextimpl_h___
00023 #define ___ixmldomtextimpl_h___
00024 
00025 #include "XMLDOMUtil.h"
00026 #include "IXMLDOMCharacterDataImpl.h"
00027 
00028 template <class T, const IID* piid, class tihclass = CComTypeInfoHolder>
00029 class ATL_NO_VTABLE IXMLDOMTextImpl: public IXMLDOMCharacterDataImpl<T,piid,tihclass>
00030 {
00031 public:
00032 
00033         virtual DOMText* get_DOMText() = 0; 
00034         virtual DOMCharacterData* get_DOMCharacterData() { return get_DOMText(); } 
00035 
00036         // IXMLDOMText
00037 
00038 STDMETHOD(splitText)(long offset, IXMLDOMText  **rightHandTextNode)
00039 {
00040         ATLTRACE(_T("IXMLDOMTextImpl::splitText\n"));
00041 
00042         if (NULL == rightHandTextNode)
00043                 return E_POINTER;
00044 
00045         *rightHandTextNode = NULL;
00046 
00047         HRESULT hr = S_OK;
00048 
00049         try
00050         {
00051                 hr = wrapNode(m_pIXMLDOMDocument,get_DOMText()->splitText(offset),IID_IXMLDOMText, reinterpret_cast<LPVOID *> (rightHandTextNode));
00052         }
00053         catch(...)
00054         {
00055                 return E_FAIL;
00056         }
00057         
00058         return hr;
00059 }
00060 
00061 };
00062 
00063 #endif // ___ixmldomtextimpl_h___

Generated on Thu Jan 12 2012 23:13:51 for ACS-10.0 C++ API by  doxygen 1.7.0