C.tom
上传用户:jnxxjx
上传日期:2015-03-08
资源大小:3388k
文件大小:7k
源码类别:

VC书籍

开发平台:

C/C++

  1. ; C Token Macros
  2. ; These macros are expanded by Source Insight prior to parsing C and C++ files.
  3. ; AtlCom Property Map
  4. BEGIN_PROPERTY_MAP(theClass)
  5. BEGIN_PROP_MAP(theClass)
  6. PROP_ENTRY(szDesc, dispid, clsid)
  7. PROP_ENTRY_EX(szDesc, dispid, clsid, iidDispatch)
  8. PROP_PAGE(clsid)
  9. PROP_DATA_ENTRY(szDesc, member, vt)
  10. END_PROPERTY_MAP()
  11. END_PROP_MAP()
  12. ; COM Map
  13. BEGIN_COM_MAP(x)
  14. DECLARE_GET_CONTROLLING_UNKNOWN()
  15. _ATL_IIDOF(x)
  16. COM_INTERFACE_ENTRY_BREAK(x)
  17. COM_INTERFACE_ENTRY_NOINTERFACE(x)
  18. COM_INTERFACE_ENTRY(x)
  19. COM_INTERFACE_ENTRY_IID(iid, x)
  20. COM_INTERFACE_ENTRY_IMPL(x)
  21. COM_INTERFACE_ENTRY_IMPL_IID(iid, x)
  22. COM_INTERFACE_ENTRY2(x, x2)
  23. COM_INTERFACE_ENTRY2_IID(iid, x, x2)
  24. COM_INTERFACE_ENTRY_FUNC(iid, dw, func)
  25. COM_INTERFACE_ENTRY_FUNC_BLIND(dw, func)
  26. COM_INTERFACE_ENTRY_TEAR_OFF(iid, x)
  27. COM_INTERFACE_ENTRY_CACHED_TEAR_OFF(iid, x, punk)
  28. COM_INTERFACE_ENTRY_AGGREGATE(iid, punk)
  29. COM_INTERFACE_ENTRY_AGGREGATE_BLIND(punk)
  30. COM_INTERFACE_ENTRY_AUTOAGGREGATE(iid, punk, clsid)
  31. COM_INTERFACE_ENTRY_AUTOAGGREGATE_BLIND(punk, clsid)
  32. COM_INTERFACE_ENTRY_CHAIN(classname)
  33. END_COM_MAP()
  34. BEGIN_CATEGORY_MAP(x)
  35. IMPLEMENTED_CATEGORY( catid )
  36. REQUIRED_CATEGORY( catid )
  37. END_CATEGORY_MAP()
  38. BEGIN_OBJECT_MAP(x)
  39. END_OBJECT_MAP()
  40. OBJECT_ENTRY(clsid, class)
  41. OBJECT_ENTRY_NON_CREATEABLE(class)
  42. DECLARE_CLASSFACTORY_SINGLETON(obj)
  43. DECLARE_OBJECT_DESCRIPTION(x)
  44. DECLARE_NO_REGISTRY()
  45. DECLARE_REGISTRY(class, pid, vpid, nid, flags)
  46. DECLARE_REGISTRY_RESOURCE(x)
  47. DECLARE_REGISTRY_RESOURCEID(x)
  48. DECLARE_STATIC_REGISTRY_RESOURCE(x)
  49. DECLARE_STATIC_REGISTRY_RESOURCEID(x)
  50. BEGIN_SERVICE_MAP(x)
  51. SERVICE_ENTRY(x)
  52. SERVICE_ENTRY_CHAIN(x)
  53. END_SERVICE_MAP()
  54. BEGIN_SINK_MAP(_class)
  55. SINK_ENTRY_INFO(id, iid, dispid, fn, info)
  56. SINK_ENTRY_EX(id, iid, dispid, fn)
  57. SINK_ENTRY(id, dispid, fn)
  58. END_SINK_MAP()
  59. ; Misc
  60. __declspec(name)
  61. __RPC_FAR
  62. CALLBACK
  63. EXPORT
  64. FAR
  65. far
  66. FASTCALL __fastcall
  67. NEAR
  68. PASCAL
  69. SIZE_T_MAX  UINT_MAX
  70. UNALIGNED
  71. ATL_NO_VTABLE 
  72. AFX_API_EXPORT
  73. AFX_API_IMPORT
  74. AFX_CDECL __cdecl
  75. AFX_CLASS_EXPORT 
  76. AFX_CLASS_IMPORT 
  77. AFX_COMDAT 
  78. AFX_CORE_DATA
  79. AFX_CORE_DATADEF
  80. AFX_DATA
  81. AFX_DATA_EXPORT 
  82. AFX_DATA_IMPORT 
  83. AFX_DATADEF
  84. AFX_DB_DATA
  85. AFX_DB_DATADEF
  86. AFX_EXPORT EXPORT
  87. AFX_EXT_API
  88. AFX_EXT_CLASS
  89. AFX_EXT_DATA
  90. AFX_EXT_DATADEF
  91. AFX_NET_DATA
  92. AFX_NET_DATADEF
  93. AFX_NOVTABLE
  94. AFX_OLE_DATA
  95. AFX_OLE_DATADEF
  96. AFX_STATIC extern
  97. AFX_STATIC_DATA extern 
  98. AFXAPI __stdcall
  99. AFXOLEAPI __stdcall
  100. BASED_CODE
  101. BASED_DEBUG
  102. BASED_STACK
  103. BEGIN_DUAL_INTERFACE_PART(localClass, baseClass) class X##localClass : public baseClass { public: BEGIN_COM_MAP(X##localClass, localClass) COM_INTERFACE_ENTRY (baseClass) END_COM_MAP()
  104. BEGIN_INTERFACE_PART(localClass, baseClass) class X##localClass : public baseClass  { public: BEGIN_COM_MAP(X##localClass, localClass) COM_INTERFACE_ENTRY (baseClass) END_COM_MAP() public: virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void * * ppvObj);
  105. BEGIN_CONNECTION_PART(theClass, localClass) class X##localClass : public CConnectionPoint { public: X##localClass() { m_nOffset = offsetof(theClass, m_x##localClass); }
  106. CDECL __cdecl
  107. CONNECTION_IID(iid) REFIID GetIID() { return iid; }
  108. DECLARE_AGGREGATABLE(x)
  109. DECLARE_CLASSFACTORY_EX(cf)
  110. DECLARE_CLASSFACTORY()
  111. DECLARE_CLASSFACTORY2(lic)
  112. DECLARE_CLASSFACTORY_AUTO_THREAD()
  113. DECLARE_CONNECTION_MAP()
  114. DECLARE_DISPATCH_MAP()
  115. DECLARE_DUAL_ERRORINFO()
  116. DECLARE_DYNAMIC(class_name)
  117. DECLARE_DYNCREATE(class_name)
  118. DECLARE_EMPTY_MSG_MAP()
  119. DECLARE_EVENT_MAP()
  120. DECLARE_EVENTSINK_MAP()
  121. DECLARE_HANDLE(x)
  122. DECLARE_HANDLE32(x)
  123. DECLARE_INTERFACE(iface)    interface iface
  124. DECLARE_INTERFACE_(iface, baseiface)    interface iface : public baseiface
  125. DECLARE_INTERFACE_MAP()
  126. DECLARE_MAPI_INTERFACE_(iface, baseiface) interface iface : public baseiface
  127. DECLARE_MAPI_INTERFACE_PTR(iface, piface)  typedef interface iface iface, FAR * piface
  128. DECLARE_MESSAGE_MAP()
  129. DECLARE_NOT_AGGREGATABLE(x)
  130. DECLARE_OLECMD_MAP()
  131. DECLARE_OLECREATE(class_name)
  132. DECLARE_OLECREATE_EX(class_name)
  133. DECLARE_OLECTLTYPE(class_name)
  134. DECLARE_OLETYPELIB(class_name)
  135. DECLARE_ONLY_AGGREGATABLE(x)
  136. DECLARE_OPAQUE32(x)
  137. DECLARE_PARSE_MAP()
  138. DECLARE_POLY_AGGREGATABLE(x)
  139. DECLARE_PROPERTY_SUPPORT(class)
  140. DECLARE_PROPPAGEIDS(class_name)
  141. DECLARE_PROTECT_FINAL_CONSTRUCT()
  142. DECLARE_REGISTRY(class, pid, vpid, nid, flags)
  143. DECLARE_REGISTRY_RESOURCE(x)
  144. DECLARE_SERIAL(class_name)
  145. DECLARE_WND_CLASS(WndClassName)
  146. DECLARE_WND_SUPERCLASS(WndClassName, OrigWndClassName)
  147. DELEGATE_DUAL_INTERFACE(objectClass, dualClass)
  148. END_CONNECTION_PART(localClass) } m_x##localClass; friend class X##localClass;
  149. END_DUAL_INTERFACE_PART(localClass)  } m_x##localClass; friend class X##localClass;
  150. END_INTERFACE_PART(localClass)  } m_x##localClass; friend class X##localClass;
  151. EXTERN_C extern
  152. EXTERN_PROCESS_LOCAL(class_name, ident_name) extern AFX_DATA AFX_DATADEF CProcessLocal<class_name> ident_name;
  153. IMPLEMENT_DUAL_ERRORINFO(objectClass, riidSource)
  154. IMPLEMENT_DYNAMIC(class_name, base_class_name)
  155. IMPLEMENT_DYNCREATE(class_name, base_class_name)
  156. IMPLEMENT_OLECREATE(class_name, external_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
  157. IMPLEMENT_OLECREATE_EX(class_name, external_name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
  158. IMPLEMENT_OLECTLTYPE(class_name, idsUserTypeName, dwOleMisc)
  159. IMPLEMENT_OLETYPELIB(class_name, tlid, wVerMajor, wVerMinor)
  160. IMPLEMENT_SERIAL(class_name, base_class_name, wSchema)
  161. INIT_INTERFACE_PART(theClass, localClass)
  162. MAPIMETHOD(method)   virtual HRESULT STDMETHODCALLTYPE method
  163. MAPIMETHOD_(type, method) virtual type STDMETHODCALLTYPE method
  164. MAPIMETHOD_DECLARE(type, method, prefix)  type STDMETHODCALLTYPE
  165. MIDL_INTERFACE(x)   struct
  166. PROCESS_LOCAL(class_name, ident_name) AFX_DATADEF CProcessLocal<class_name> ident_name;
  167. PURE                    = 0
  168. STDMETHOD(method)       virtual HRESULT STDMETHODCALLTYPE method
  169. STDMETHOD_(type,method) virtual type STDMETHODCALLTYPE method
  170. STDMETHODIMP_(type)     type STDMETHODCALLTYPE
  171. STDMETHODIMP HRESULT STDMETHODCALLTYPE
  172. SQLOLE_HELPID(id)
  173. THIS                    void
  174. THIS_
  175. TRY try {
  176. END_TRY }
  177. CATCH(class_name, e) } catch (class_name * e) {
  178. AND_CATCH(class_name, e) } catch (class_name * e) {
  179. END_CATCH }
  180. CATCH_ALL(e) } catch (CException* e) {
  181. AND_CATCH_ALL(e) } catch (CException* e) {
  182. END_CATCH_ALL }
  183. NTAPI *
  184. ; STD Include 
  185. _STD_BEGIN namespace std {
  186. _STD_END } ;
  187. _STD std::
  188. _TRY_BEGIN try {
  189. _CATCH(x) } catch (x) {
  190. _CATCH_ALL } catch (...) {
  191. _CATCH_END }
  192. _CATCH_IO_(x)
  193. _RAISE(x) throw (x)
  194. _RERAISE throw
  195. _THROW0() throw ()
  196. _THROW1(x) throw (x)
  197. _THROW(x, y) throw x(y)
  198. _BITMASK(E, T)  typedef int T
  199. _BITMASK_OPS(T)
  200. _TDEF(x) = x
  201. _TDEF2(x, y) = x, y
  202. _CNTSIZ(iter) ptrdiff_t
  203. _STCONS(ty, name, val) enum {name = val}
  204. _TRY_IO_BEGIN
  205. _CATCH_IO_END
  206. _CATCH_IO_(x)  
  207. ; Other Keywords
  208. volatile
  209. __packed 
  210. __abstract
  211. __box
  212. __delegate
  213. __event
  214. __finally
  215. __gc
  216. __identifier
  217. __interface
  218. __nogc
  219. __pin
  220. __property
  221. __sealed
  222. __try_cast
  223. __typeof
  224. __value
  225. _packed 
  226. packed