Back to index

lightning-sunbird  0.9+nobinonly
XMLElementCollection.h
Go to the documentation of this file.
00001 // XMLElementCollection.h : Declaration of the CXMLElementCollection
00002 
00003 #ifndef __XMLELEMENTCOLLECTION_H_
00004 #define __XMLELEMENTCOLLECTION_H_
00005 
00006 #include "resource.h"       // main symbols
00007 
00009 // CXMLElementCollection
00010 class ATL_NO_VTABLE CXMLElementCollection : 
00011        public CComObjectRootEx<CComSingleThreadModel>,
00012        public CComCoClass<CXMLElementCollection, &CLSID_MozXMLElementCollection>,
00013        public IDispatchImpl<IXMLElementCollection, &IID_IXMLElementCollection, &LIBID_MozActiveXMLLib>
00014 {
00015        // List of elements
00016        ElementList m_cElements;
00017 
00018 public:
00019        CXMLElementCollection();
00020        virtual ~CXMLElementCollection();
00021 
00022 DECLARE_REGISTRY_RESOURCEID(IDR_XMLELEMENTCOLLECTION)
00023 
00024 DECLARE_PROTECT_FINAL_CONSTRUCT()
00025 
00026 BEGIN_COM_MAP(CXMLElementCollection)
00027        COM_INTERFACE_ENTRY(IXMLElementCollection)
00028        COM_INTERFACE_ENTRY(IDispatch)
00029 END_COM_MAP()
00030 
00031 // IXMLElementCollection
00032        virtual HRESULT STDMETHODCALLTYPE put_length(/* [in] */ long v);
00033        virtual HRESULT STDMETHODCALLTYPE get_length(/* [out][retval] */ long __RPC_FAR *p);
00034        virtual HRESULT STDMETHODCALLTYPE get__newEnum(/* [out][retval] */ IUnknown __RPC_FAR *__RPC_FAR *ppUnk);
00035        virtual HRESULT STDMETHODCALLTYPE item(/* [in][optional] */ VARIANT var1, /* [in][optional] */ VARIANT var2, /* [out][retval] */ IDispatch __RPC_FAR *__RPC_FAR *ppDisp);
00036 
00037 public:
00038        HRESULT Add(IXMLElement *pElement);
00039 };
00040 
00041 typedef CComObject<CXMLElementCollection> CXMLElementCollectionInstance;
00042 
00043 #endif //__XMLELEMENTCOLLECTION_H_