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

XMLDOMElement.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: XMLDOMElement.h 568078 2007-08-21 11:43:25Z amassari $
00020  */
00021 
00022 #ifndef ___xmldomelement_h___
00023 #define ___xmldomelement_h___
00024 
00025 #include <xercesc/dom/DOMElement.hpp>
00026 #include "IXMLDOMNodeImpl.h"
00027 
00028 XERCES_CPP_NAMESPACE_USE
00029 
00030 class ATL_NO_VTABLE CXMLDOMElement :
00031         public CComObjectRootEx<CComSingleThreadModel>,
00032         public IXMLDOMNodeImpl<IXMLDOMElement, &IID_IXMLDOMElement>
00033 {
00034 public:
00035         CXMLDOMElement()
00036         {}
00037 
00038         void    FinalRelease()
00039         {
00040                 ReleaseOwnerDoc();
00041         }
00042 
00043         virtual DOMNode* get_DOMNode()    { return element;}
00044         virtual DOMNodeType get_DOMNodeType() const  { return NODE_ELEMENT; }
00045 
00046 DECLARE_NOT_AGGREGATABLE(CXMLDOMElement)
00047 
00048 DECLARE_PROTECT_FINAL_CONSTRUCT()
00049 
00050 BEGIN_COM_MAP(CXMLDOMElement)
00051         COM_INTERFACE_ENTRY(IXMLDOMElement)
00052         COM_INTERFACE_ENTRY(IXMLDOMNode)
00053         COM_INTERFACE_ENTRY(IIBMXMLDOMNodeIdentity)
00054         COM_INTERFACE_ENTRY(IDispatch)
00055         COM_INTERFACE_ENTRY(ISupportErrorInfo)
00056 END_COM_MAP()
00057 
00058         // IXMLDOMElement methods
00059         STDMETHOD(get_tagName)(BSTR  *pVal);
00060         STDMETHOD(getAttribute)(BSTR name, VARIANT  *value);
00061         STDMETHOD(setAttribute)(BSTR name, VARIANT value);
00062         STDMETHOD(removeAttribute)(BSTR name);
00063         STDMETHOD(getAttributeNode)(BSTR name, IXMLDOMAttribute  * *attr);
00064         STDMETHOD(setAttributeNode)(IXMLDOMAttribute  *attr, IXMLDOMAttribute  * *attributeNode);
00065         STDMETHOD(removeAttributeNode)(IXMLDOMAttribute  *attr, IXMLDOMAttribute  * *attributeNode);
00066         STDMETHOD(getElementsByTagName)(BSTR tagName, IXMLDOMNodeList  * *resultList);
00067         STDMETHOD(normalize)(void);
00068 
00069         DOMElement* element;
00070 };
00071 
00072 typedef CComObject<CXMLDOMElement> CXMLDOMElementObj;
00073 
00074 #endif // ___xmldomelement_h___

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