22 #include <separatista/separatista.h>    23 #include <separatista/element.h>    24 #include "separatista/debug/debug.h"    28 #ifndef SEPARATISTA_CONTROL_ELEMENT_H    29 #define SEPARATISTA_CONTROL_ELEMENT_H    32 DEFINE_GUID(IID_ELEMENT ,
    33     0x6d9323, 0xd6c2, 0x4d53, 0x90, 0x72, 0x9a, 0xe3, 0x79, 0xce, 0xf7, 0xde);
    36 DEFINE_GUID(CLSID_ELEMENT ,
    37     0xf74285b, 0xc429, 0x4a58, 0x95, 0xac, 0xb1, 0xa0, 0x5b, 0x85, 0x65, 0x30);
    43     STDMETHOD_(ULONG, AddRef)() PURE;
    44     STDMETHOD_(ULONG, Release)() PURE;
    45     STDMETHOD(QueryInterface)(REFIID riid, 
void** ppvObject) PURE;
    46     STDMETHOD(GetTypeInfoCount)(UINT* pctinfo) PURE;
    47     STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo** ppTInfo) PURE;
    48     STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgDispId) PURE;
    49     STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS FAR* pDispParams, VARIANT FAR* pVarResult, EXCEPINFO FAR* pExcepInfo, 
unsigned int FAR* puArgErr) PURE;
    52     STDMETHOD(GetTagName)(BSTR *pTagName) PURE;
    53     STDMETHOD(GetValue)(BSTR *pValue) PURE;
    54     STDMETHOD(SetValue)(BSTR Value) PURE;
    55     STDMETHOD(GetCurrencyValue)(VARIANT *pValue) PURE;
    56     STDMETHOD(SetCurrencyValue)(VARIANT Value) PURE;
    57     STDMETHOD(GetDateValue)(DATE *pDateValue) PURE;
    58     STDMETHOD(SetDateValue)(DATE DateValue) PURE;
    59     STDMETHOD(SetDateTimeValue)(DATE DateTimeValue) PURE;
    60     STDMETHOD(GetElementByTagName)(BSTR TagName, UINT index, 
IElement **ppElement) PURE;
    61     STDMETHOD(CreateElementByTagName)(BSTR TagName, UINT index, 
IElement **ppElement) PURE;
    62     STDMETHOD(DestroyElement)(
IElement *pChildElement) PURE;
    63     STDMETHOD(GetAttributeValue)(BSTR AttributeName, BSTR *pValue) PURE;
    64     STDMETHOD(SetAttributeValue)(BSTR AttributeName, BSTR Value) PURE;
    65     STDMETHOD(GetAllByTagName)(BSTR TagName, SAFEARRAY **ppArray) PURE;
    69 struct __declspec(uuid("{006D9323-D6C2-4D53-9072-9AE379CEF7DE}
")) IElement;    75 class Element : public SepaControlDispatch<IElement>, public Separatista::ElementListener    81     Element(Separatista::Element *pElement);    84     // Subclass for ISupportErrorInfo    85     STDMETHOD(QueryInterface)(REFIID riid, void** ppvObject);    88     STDMETHOD(GetTagName)(BSTR *pTagName);    89     STDMETHOD(GetValue)(BSTR *pValue);    90     STDMETHOD(SetValue)(BSTR Value);    91     STDMETHOD(GetCurrencyValue)(VARIANT *pValue);    92     STDMETHOD(SetCurrencyValue)(VARIANT Value);    93     STDMETHOD(GetDateValue)(DATE *pDateValue);    94     STDMETHOD(SetDateValue)(DATE DateValue);    95     STDMETHOD(SetDateTimeValue)(DATE DateTimeValue);    96     STDMETHOD(GetElementByTagName)(BSTR TagName, UINT index, IElement **ppElement);    97     STDMETHOD(CreateElementByTagName)(BSTR TagName, UINT index, IElement **ppElement);    98     STDMETHOD(DestroyElement)(IElement *pChildElement);    99     STDMETHOD(GetAttributeValue)(BSTR AttributeName, BSTR *pValue);   100     STDMETHOD(SetAttributeValue)(BSTR AttributeName, BSTR Value);   101     STDMETHOD(GetAllByTagName)(BSTR TagName, SAFEARRAY **ppArray);   105     void elementValueChanged(Separatista::Element *pElement, const wchar_t *pValue);   106     void elementCreated(Separatista::Element *pParentElement, Separatista::Element *pChildElement);   107     void elementDeleted(Separatista::Element *pChildElement);   119     Separatista::Element *getElement() const;   125     void setElement(Separatista::Element *pElement);   128     Separatista::Element *m_pElement;   131 class __declspec(uuid("{0F74285B-C429-4A58-95AC-B1A05B856530}
")) Element;   133 #endif // #define SEPARATISTA_CONTROL_ELEMENT_H