wxVariantDataErrorCode Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxVariantDataErrorCode Class Reference
Class List by Category » Data Structures

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/msw/ole/oleutils.h>`

Inheritance diagram for wxVariantDataErrorCode:
[legend]

## Detailed Description

This class represents a thin wrapper for Microsoft Windows `SCODE` type (which is the same as `HRESULT`).

It is used for converting between a wxVariant and OLE `VARIANT` with type set to `VT_ERROR`. When wxVariant stores wxVariantDataErrorCode, it returns "errorcode" as its type. This class can be used for returning error codes of automation calls or exchanging values with other applications: e.g. Microsoft Excel returns VARIANTs with `VT_ERROR` type for cell values with errors (one of XlCVError constants, displayed as e.g. "#DIV/0!" or "#REF!" there) etc. See wxVariantDataCurrency for an example of how to exchange values between wxVariant and a native type not directly supported by it.

Availability: only available for the wxMSW port.

Since
  2.9.5

##

Library: wxCore
Category: Data Structures

See also
  wxAutomationObject, wxVariant, wxVariantData, wxVariantDataCurrency

## Public Member Functions
| wxVariantDataErrorCode (SCODE value=S_OK)
| Constructor initializes the object to value or `S_OK` if no value was passed.
SCODE | GetValue () const
| Returns the stored `SCODE` value.
void | SetValue (SCODE value)
| Set the stored value to value.
virtual bool | Eq (wxVariantData &data) const
| Returns true if data is of wxVariantDataErrorCode type and contains the same `SCODE` value.
virtual bool | Write (wxString &str) const
| Fills the provided string with the textual representation of this object.
wxVariantData * | Clone () const
| Returns a copy of itself.
virtual wxString | GetType () const
| Returns "errorcode".
virtual bool | GetAsAny (wxAny *any) const
| Converts the value of this object to wxAny.
Public Member Functions inherited from wxVariantData
| wxVariantData ()
| Default constructor.
void | DecRef ()
| Decreases reference count.
virtual bool | GetAny (wxAny *any) const
| Converts value to wxAny, if possible.
virtual wxClassInfo * | GetValueClassInfo ()
| If the data is a wxObject returns a pointer to the objects wxClassInfo structure, if the data isn't a wxObject the method returns NULL.
void | IncRef ()
| Increases reference count.
virtual bool | Read (istream &stream)
| Reads the data from stream.
virtual bool | Read (wxString &string)
| Reads the data from string.
virtual bool | Write (ostream &stream) const
| Writes the data to stream.
Public Member Functions inherited from wxRefCounter
| wxRefCounter ()
| Default constructor.
void | DecRef ()
| Decrements the reference count associated with this shared data and, if it reaches zero, destroys this instance of wxRefCounter releasing its memory.
int | GetRefCount () const
| Returns the reference count associated with this shared data.
void | IncRef ()
| Increments the reference count associated with this shared data.

## Additional Inherited Members
Protected Member Functions inherited from wxRefCounter
virtual | ~wxRefCounter ()
| Destructor.

## Constructor & Destructor Documentation

## ◆ wxVariantDataErrorCode()

wxVariantDataErrorCode::wxVariantDataErrorCode | ( | SCODE | value = S_OK | ) |

Constructor initializes the object to value or `S_OK` if no value was passed.

## Member Function Documentation

## ◆ Clone()

wxVariantData * wxVariantDataErrorCode::Clone | ( |  | ) | const
| virtual

Returns a copy of itself.

Reimplemented from wxVariantData.

## ◆ Eq()

virtual bool wxVariantDataErrorCode::Eq | ( | wxVariantData & | data | ) | const
| virtual

Returns true if data is of wxVariantDataErrorCode type and contains the same `SCODE` value.

Implements wxVariantData.

## ◆ GetAsAny()

virtual bool wxVariantDataErrorCode::GetAsAny | ( | wxAny * | any | ) | const
| virtual

Converts the value of this object to wxAny.

## ◆ GetType()

virtual wxString wxVariantDataErrorCode::GetType | ( |  | ) | const
| inlinevirtual

Returns "errorcode".

Implements wxVariantData.

## ◆ GetValue()

SCODE wxVariantDataErrorCode::GetValue | ( |  | ) | const

Returns the stored `SCODE` value.

## ◆ SetValue()

void wxVariantDataErrorCode::SetValue | ( | SCODE | value | ) |

Set the stored value to value.

## ◆ Write()

virtual bool wxVariantDataErrorCode::Write | ( | wxString & | str | ) | const
| virtual

Fills the provided string with the textual representation of this object.

The error code is just a number, so it's output as such.

Reimplemented from wxVariantData.