soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SAttrStorage-i.h
1#ifndef __SATTRSTORAGE_I__H__
2#define __SATTRSTORAGE_I__H__
3#include <interface/obj-ref-i.h>
4#include <interface/sstring-i.h>
5
6SNSBEGIN
7
8typedef struct IWindow IWindow;
9
10#undef INTERFACE
11#define INTERFACE IAttrStorage
12DECLARE_INTERFACE_(IAttrStorage, IObjRef)
13{
14 /**
15 * @brief 添加引用
16 * @return long -- 引用计数
17 */
18 STDMETHOD_(long, AddRef)(THIS) PURE;
19
20 /**
21 * @brief 释放引用
22 * @return long -- 引用计数
23 */
24 STDMETHOD_(long, Release)(THIS) PURE;
25
26 /**
27 * @brief 释放对象
28 * @return void
29 */
30 STDMETHOD_(void, OnFinalRelease)(THIS) PURE;
31
32 //////////////////////////////////////////////////////////////////////////
33
34 /**
35 * @brief 响应IObject::SetAttribute的时保存attribute值的方法
36 * @param strName const IStringW* -- 属性名
37 * @param strValue const IStringW* -- 属性值
38 * @param bHandled BOOL -- 该属性是否已经被处理
39 * @return void
40 */
41 STDMETHOD_(void, OnSetAttribute)
42 (THIS_ const IStringW *strName, const IStringW *strValue, BOOL bHandled) PURE;
43
44 /**
45 * @brief 响应IObject::GetAttribute调用
46 * @param strName const IStringW* -- 属性名
47 * @param[out] strValue IStringW* -- 返回的属性值
48 * @return BOOL -- TRUE: 成功
49 */
50 STDMETHOD_(BOOL, OnGetAttribute)(CTHIS_ const IStringW *strName, IStringW *strValue) SCONST PURE;
51};
52
53#undef INTERFACE
54#define INTERFACE IAttrStorageFactory
55DECLARE_INTERFACE_(IAttrStorageFactory, IObjRef)
56{
57 /**
58 * @brief 添加引用
59 * @return long -- 引用计数
60 */
61 STDMETHOD_(long, AddRef)(THIS) PURE;
62
63 /**
64 * @brief 释放引用
65 * @return long -- 引用计数
66 */
67 STDMETHOD_(long, Release)(THIS) PURE;
68
69 /**
70 * @brief 释放对象
71 * @return void
72 */
73 STDMETHOD_(void, OnFinalRelease)(THIS) PURE;
74
75 //////////////////////////////////////////////////////////////////////////
76
77 /**
78 * @brief 创建IAttrStorage对象
79 * @param owner IWindow* -- IAttrStorage的宿主
80 * @param[out] ppAttrStorage IAttrStorage** -- 返回值
81 * @return HRESULT -- S_OK: 成功
82 */
83 STDMETHOD_(HRESULT, CreateAttrStorage)
84 (CTHIS_ IWindow * owner, IAttrStorage * *ppAttrStorage) SCONST PURE;
85};
86
87SNSEND
88#endif // __SATTRSTORAGE_I__H__
Interface for reference counting.
Definition obj-ref-i.h:19