WinStd Additional templates and function helpers for Microsoft Windows using Standard C++ classes

Public Member Functions | List of all members
winstd::variant Class Reference
COM object management

VARIANT struct wrapper. More...

`#include <COM.h>`

Inheritance diagram for winstd::variant:

## Public Member Functions
| variant () noexcept
| Constructs blank VARIANT.
| variant (_In_ const VARIANT &varSrc)
| Constructs VARIANT from another.
| variant (_Inout_ VARIANT &&varSrc) noexcept
| Moves VARIANT from another.
| variant (_In_ bool bSrc) noexcept
| Constructs VARIANT from bool.
| variant (_In_ char cSrc) noexcept
| Constructs VARIANT from character.
| variant (_In_ unsigned char nSrc) noexcept
| Constructs VARIANT from byte.
| variant (_In_ short nSrc) noexcept
| Constructs VARIANT from short.
| variant (_In_ unsigned short nSrc) noexcept
| Constructs VARIANT from unsigned short.
| variant (_In_ int nSrc, _In_ VARTYPE vtSrc=VT_I4) noexcept
| Constructs VARIANT from integer.
| variant (_In_ unsigned int nSrc, _In_ VARTYPE vtSrc=VT_UI4) noexcept
| Constructs VARIANT from unsigned integer.
| variant (_In_ long nSrc, _In_ VARTYPE vtSrc=VT_I4) noexcept
| Constructs VARIANT from long.
| variant (_In_ unsigned long nSrc) noexcept
| Constructs VARIANT from unsigned long.
| variant (_In_ float fltSrc) noexcept
| Constructs VARIANT from float.
| variant (_In_ double dblSrc, _In_ VARTYPE vtSrc=VT_R8) noexcept
| Constructs VARIANT from double or variant date.
| variant (_In_ long long nSrc) noexcept
| Constructs VARIANT from 64-bit integer.
| variant (_In_ unsigned long long nSrc) noexcept
| Constructs VARIANT from unsigned integer.
| variant (_In_ CY cySrc) noexcept
| Constructs VARIANT from CY (64-bit integer)
| variant (_In_z_ LPCOLESTR lpszSrc) noexcept
| Constructs VARIANT from OLE string.
| variant (_In_z_ BSTR bstr) noexcept
| Constructs VARIANT from BSTR.
| variant (_In_opt_ IDispatch *pSrc)
| Constructs VARIANT from IDispatch.
| variant (_In_opt_ IUnknown *pSrc)
| Constructs VARIANT from IUnknown.
| variant (_In_ const SAFEARRAY *pSrc)
| Constructs VARIANT from SAFEARRAY.
virtual | ~variant ()
| Destroys VARIANT.
variant & | operator= (_In_ const VARIANT &varSrc)
| Copy from another VARIANT.
variant & | operator= (_Inout_ VARIANT &&varSrc) noexcept
| Moves from another VARIANT.
variant & | operator= (_In_ bool bSrc) noexcept
| Copy from bool value.
variant & | operator= (_In_ char cSrc) noexcept
| Copy from char value.
variant & | operator= (_In_ unsigned char nSrc) noexcept
| Copy from unsigned char value.
variant & | operator= (_In_ short nSrc) noexcept
| Copy from short value.
variant & | operator= (_In_ unsigned short nSrc) noexcept
| Copy from unsigned short value.
variant & | operator= (_In_ int nSrc) noexcept
| Copy from int value.
variant & | operator= (_In_ unsigned int nSrc) noexcept
| Copy from unsigned int value.
variant & | operator= (_In_ long nSrc) noexcept
| Copy from long value.
variant & | operator= (_In_ unsigned long nSrc) noexcept
| Copy from unsigned long value.
variant & | operator= (_In_ long long nSrc) noexcept
| Copy from long long value.
variant & | operator= (_In_ unsigned long long nSrc) noexcept
| Copy from unsigned long long value.
variant & | operator= (_In_ float fltSrc) noexcept
| Copy from float value.
variant & | operator= (_In_ double dblSrc) noexcept
| Copy from double value.
variant & | operator= (_In_ CY cySrc) noexcept
| Copy from CY value.
variant & | operator= (_In_z_ LPCOLESTR lpszSrc) noexcept
| Copy from OLE string value.
variant & | operator= (_Inout_opt_ IDispatch *pSrc)
| Copy from IDispatch.
variant & | operator= (_Inout_opt_ IUnknown *pSrc)
| Copy from IUnknown.
variant & | operator= (_In_ unsigned char *pbSrc) noexcept
| Copy from unsigned char reference.
variant & | operator= (_In_ short *pnSrc) noexcept
| Copy from short reference.
variant & | operator= (_In_ unsigned short *pnSrc) noexcept
| Copy from unsigned short reference.
variant & | operator= (_In_ int *pnSrc) noexcept
| Copy from int reference.
variant & | operator= (_In_ unsigned int *pnSrc) noexcept
| Copy from unsigned int reference.
variant & | operator= (_In_ long *pnSrc) noexcept
| Copy from long reference.
variant & | operator= (_In_ unsigned long *pnSrc) noexcept
| Copy from unsigned long reference.
variant & | operator= (_In_ long long *pnSrc) noexcept
| Copy from long long reference.
variant & | operator= (_In_ unsigned long long *pnSrc) noexcept
| Copy from unsigned long long reference.
variant & | operator= (_In_ float *pfSrc) noexcept
| Copy from float reference.
variant & | operator= (_In_ double *pfSrc) noexcept
| Copy from double reference.
variant & | operator= (_In_ const SAFEARRAY *pSrc) noexcept
| Copy from SAFEARRAY.
bool | operator== (_In_ const VARIANT &varSrc) const noexcept
| Is variant equal to? More...
bool | operator!= (_In_ const VARIANT &varSrc) const noexcept
| Is variant not equal to? More...
bool | operator< (_In_ const VARIANT &varSrc) const noexcept
| Is variant less than? More...
bool | operator> (_In_ const VARIANT &varSrc) const noexcept
| Is variant greater than? More...
bool | operator<= (_In_ const VARIANT &varSrc) const noexcept
| Is variant less than or equal to? More...
bool | operator>= (_In_ const VARIANT &varSrc) const noexcept
| Is variant greater than or equal to? More...
HRESULT | change_type (_In_ VARTYPE _vt, _In_opt_ USHORT wFlags=0) noexcept
| Converts a variant from one type to another. More...

## Detailed Description

VARIANT struct wrapper.

## Member Function Documentation

## ◆ change_type()

HRESULT winstd::variant::change_type | ( | _In_ VARTYPE | _vt,
|  | _In_opt_ USHORT | wFlags = `0`
| ) |  |
| inline noexcept

Converts a variant from one type to another.

See also
  VariantChangeType function

## ◆ operator!=()

bool winstd::variant::operator!= | ( | _In_ const VARIANT & | varSrc | ) | const
| inline noexcept

Is variant not equal to?

Parameters

  [in] | varSrc | Variant to compare against

Returns
  - Non zero when variant is not equal to `varSrc`;
  - Zero otherwise.

## ◆ operator<()

bool winstd::variant::operator< | ( | _In_ const VARIANT & | varSrc | ) | const
| inline noexcept

Is variant less than?

Parameters

  [in] | varSrc | Variant to compare against

Returns
  - Non zero when variant is less than `varSrc`;
  - Zero otherwise.

## ◆ operator<=()

bool winstd::variant::operator<= | ( | _In_ const VARIANT & | varSrc | ) | const
| inline noexcept

Is variant less than or equal to?

Parameters

  [in] | varSrc | Variant to compare against

Returns
  - Non zero when variant is less than or equal to `varSrc`;
  - Zero otherwise.

## ◆ operator==()

bool winstd::variant::operator== | ( | _In_ const VARIANT & | varSrc | ) | const
| inline noexcept

Is variant equal to?

Parameters

  [in] | varSrc | Variant to compare against

Returns
  - Non zero when variant is equal to `varSrc`;
  - Zero otherwise.

## ◆ operator>()

bool winstd::variant::operator> | ( | _In_ const VARIANT & | varSrc | ) | const
| inline noexcept

Is variant greater than?

Parameters

  [in] | varSrc | Variant to compare against

Returns
  - Non zero when variant is greater than `varSrc`;
  - Zero otherwise.

## ◆ operator>=()

bool winstd::variant::operator>= | ( | _In_ const VARIANT & | varSrc | ) | const
| inline noexcept

Is variant greater than or equal to?

Parameters

  [in] | varSrc | Variant to compare against

Returns
  - Non zero when variant is greater than or equal to `varSrc`;
  - Zero otherwise.

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

- include/WinStd/COM.h