Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

VirtualBoxSupportErrorInfoImpl< C, I > Class Template Reference

#include <VirtualBoxBase.h>

Inheritance diagram for VirtualBoxSupportErrorInfoImpl< C, I >:

VirtualBoxSupportErrorInfoImplBase

List of all members.


Detailed Description

template<class C, class I>
class VirtualBoxSupportErrorInfoImpl< C, I >

This template implements ISupportErrorInfo for the given component class and provides the setError() method to conveniently set the error information from within interface methods' implementations.

On Windows, the template argument must define a COM interface map using BEGIN_COM_MAP / END_COM_MAP macros and this map must contain a COM_INTERFACE_ENTRY(ISupportErrorInfo) definition. All interface entries that follow it will be considered to support IErrorInfo, i.e. the InterfaceSupportsErrorInfo() implementation will return S_OK for the corresponding IID.

On all platforms, the template argument must also define the following method: |public static const wchar_t *CgetComponentName()|. See setError (HRESULT, const char *, ...) for a description on how it is used.

Parameters:
C component class that implements one or more COM interfaces
I default interface for the component. This interface's IID is used by the shortest form of setError, for convenience.
Todo:
switch to com::SupportErrorInfo* and remove

Definition at line 1609 of file VirtualBoxBase.h.


Public Member Functions

STDMETHOD() InterfaceSupportsErrorInfo (REFIID riid)

Static Protected Member Functions

static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const char *aText, va_list aArgs, bool aLogIt=true)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const Bstr &aText, bool aLogIt=true)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const char *aText,...)
static HRESULT setError (HRESULT aResultCode, const char *aText,...)
static HRESULT setError (HRESULT aResultCode, const GUID &aIID, const wchar_t *aComponent, const char *aText,...)
static HRESULT setErrorBstr (HRESULT aResultCode, const Bstr &aText)
static HRESULT setErrorNoLog (HRESULT aResultCode, const char *aText,...)
static HRESULT setErrorV (HRESULT aResultCode, const char *aText, va_list aArgs)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const char *aText, va_list aArgs)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const Bstr &aComponent, const Bstr &aText)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const char *aText,...)
static HRESULT setWarning (HRESULT aResultCode, const char *aText,...)
static HRESULT setWarning (HRESULT aResultCode, const GUID &aIID, const wchar_t *aComponent, const char *aText,...)
static HRESULT setWarningBstr (HRESULT aResultCode, const Bstr &aText)
static HRESULT setWarningV (HRESULT aResultCode, const char *aText, va_list aArgs)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index