|
|
|
|
|
|
|
|
|
|
|
|||||||
00001 /* 00002 * File: atlstl_support_error_info.h (formerly MAErInfo.h, ::SynesisAtl) 00003 * 00004 * Purpose: SupportErrorInfoImpl class. 00005 * 00006 * Created: 17th April 1999 00007 * Updated: 11th September 2004 00008 * 00009 * Home: http://stlsoft.org/ 00010 * 00011 * Copyright (c) 1999-2004, Matthew Wilson and Synesis Software 00012 * All rights reserved. 00013 * 00014 * Redistribution and use in source and binary forms, with or without 00015 * modification, are permitted provided that the following conditions are met: 00016 * 00017 * - Redistributions of source code must retain the above copyright notice, this 00018 * list of conditions and the following disclaimer. 00019 * - Redistributions in binary form must reproduce the above copyright notice, 00020 * this list of conditions and the following disclaimer in the documentation 00021 * and/or other materials provided with the distribution. 00022 * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of 00023 * any contributors may be used to endorse or promote products derived from 00024 * this software without specific prior written permission. 00025 * 00026 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00027 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00028 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00029 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00030 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00031 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00032 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00033 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00034 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00035 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00036 * POSSIBILITY OF SUCH DAMAGE. 00037 * 00038 * 00039 00040 00044 00045 #ifndef ATLSTL_INCL_H_ATLSTL_SUPPORT_ERROR_INFO 00046 #define ATLSTL_INCL_H_ATLSTL_SUPPORT_ERROR_INFO 00047 00048 #ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION 00049 # define ATLSTL_VER_H_ATLSTL_SUPPORT_ERROR_INFO_MAJOR 3 00050 # define ATLSTL_VER_H_ATLSTL_SUPPORT_ERROR_INFO_MINOR 0 00051 # define ATLSTL_VER_H_ATLSTL_SUPPORT_ERROR_INFO_REVISION 1 00052 # define ATLSTL_VER_H_ATLSTL_SUPPORT_ERROR_INFO_EDIT 49 00053 #endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */ 00054 00055 /* 00056 * Includes 00057 */ 00058 00059 #ifndef ATLSTL_INCL_H_ATLSTL 00060 # include "atlstl.h" // Include the ATLSTL root header 00061 #endif /* !ATLSTL_INCL_H_ATLSTL */ 00062 00063 /* 00064 * Namespace 00065 * 00066 * The ATLSTL components are contained within the atlstl namespace. This is 00067 * actually an alias for stlsoft::atlstl_project, 00068 * 00069 * The definition matrix is as follows: 00070 * 00071 * _STLSOFT_NO_NAMESPACE _ATLSTL_NO_NAMESPACE atlstl definition 00072 * --------------------- -------------------- ----------------- 00073 * not defined not defined = stlsoft::atlstl_project 00074 * not defined defined not defined 00075 * defined not defined atlstl 00076 * defined defined not defined 00077 * 00078 */ 00079 00080 #ifndef _ATLSTL_NO_NAMESPACE 00081 # if defined(_STLSOFT_NO_NAMESPACE) || \ 00082 defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) 00083 /* There is no stlsoft namespace, so must define ::atlstl */ 00084 namespace atlstl 00085 { 00086 # else 00087 /* Define stlsoft::atlstl_project */ 00088 00089 namespace stlsoft 00090 { 00091 00092 namespace atlstl_project 00093 { 00094 00095 # endif /* _STLSOFT_NO_NAMESPACE */ 00096 #endif /* !_ATLSTL_NO_NAMESPACE */ 00097 00098 /* 00099 00104 00105 /* 00106 * Classes 00107 */ 00108 00111 template <const IID *piid> 00112 class ATL_NO_VTABLE SupportErrorInfoImpl 00113 : public ISupportErrorInfo 00114 { 00115 public: 00116 typedef SupportErrorInfoImpl<piid> Class; 00117 00118 // ISupportErrorInfo 00119 public: 00120 STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid) 00121 { 00122 return (InlineIsEqualGUID(riid, *piid)) 00123 ? S_OK 00124 : S_FALSE; 00125 } 00126 }; 00127 00128 00131 template <const IID *piid1, const IID *piid2> 00132 class ATL_NO_VTABLE SupportErrorInfoImpl2 00133 : public ISupportErrorInfo 00134 { 00135 public: 00136 typedef SupportErrorInfoImpl2<piid1, piid2> Class; 00137 00138 // ISupportErrorInfo 00139 public: 00140 STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid) 00141 { 00142 return (InlineIsEqualGUID(riid, *piid1) || 00143 InlineIsEqualGUID(riid, *piid2)) 00144 ? S_OK 00145 : S_FALSE; 00146 } 00147 }; 00148 00149 00152 template <const IID *piid1, const IID *piid2, const IID *piid3> 00153 class ATL_NO_VTABLE SupportErrorInfoImpl3 00154 : public ISupportErrorInfo 00155 { 00156 public: 00157 typedef SupportErrorInfoImpl3<piid1, piid2, piid3> Class; 00158 00159 // ISupportErrorInfo 00160 public: 00161 STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid) 00162 { 00163 return (InlineIsEqualGUID(riid, *piid1) || 00164 InlineIsEqualGUID(riid, *piid2) || 00165 InlineIsEqualGUID(riid, *piid3)) 00166 ? S_OK 00167 : S_FALSE; 00168 } 00169 }; 00170 00171 /* 00172 00174 00175 /* 00176 00177 #ifndef _ATLSTL_NO_NAMESPACE 00178 # if defined(_STLSOFT_NO_NAMESPACE) || \ 00179 defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) 00180 } // namespace atlstl 00181 # else 00182 } // namespace atlstl_project 00183 } // namespace stlsoft 00184 # endif /* _STLSOFT_NO_NAMESPACE */ 00185 #endif /* !_ATLSTL_NO_NAMESPACE */ 00186 00187 /* 00188 00189 #endif /* !ATLSTL_INCL_H_ATLSTL_SUPPORT_ERROR_INFO */ 00190 00191 /*
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |