#include <wx/msw/ole/automtn.h>
This class represents a thin wrapper for Microsoft Windows SAFEARRAY type.
It is used for converting between wxVariant and OLE VARIANT with type set to VT_ARRAY, which has more than one dimension. When wxVariant stores wxVariantDataSafeArray, it returns "safearray" as its type.
wxVariantDataSafeArray does NOT manage the SAFEARRAY it points to. If you want to pass it to a wxAutomationObject as a parameter:
An example of creating a 2-dimensional SAFEARRAY containing VARIANTs and storing it in a wxVariant
If you you received wxVariantDataSafeArray as a result of wxAutomationObject method call: (1) Get the data out of the array. (2) Destroy the array.
Include file:
#include <wx/msw/ole/oleutils.h>
Public Member Functions | |
wxVariantDataSafeArray (SAFEARRAY *value=NULL) | |
Constructor initializes the object to value. More... | |
SAFEARRAY * | GetValue () const |
Returns the stored array. More... | |
void | SetValue (SAFEARRAY *value) |
Set the stored array. More... | |
virtual bool | Eq (wxVariantData &data) const |
Returns true if data is of wxVariantDataSafeArray type and contains the same SAFEARRAY* value. More... | |
virtual bool | Write (wxString &str) const |
Fills the provided string with the textual representation of this object. More... | |
wxVariantData * | Clone () const |
Returns a copy of itself. More... | |
virtual wxString | GetType () const |
Returns "safearray". More... | |
virtual bool | GetAsAny (wxAny *any) const |
Converts the value of this object to wxAny. More... | |
Public Member Functions inherited from wxVariantData | |
wxVariantData () | |
Default constructor. More... | |
void | DecRef () |
Decreases reference count. More... | |
virtual bool | GetAny (wxAny *any) const |
Converts value to wxAny, if possible. More... | |
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. More... | |
void | IncRef () |
Increases reference count. More... | |
virtual bool | Read (istream &stream) |
Reads the data from stream. More... | |
virtual bool | Read (wxString &string) |
Reads the data from string. More... | |
virtual bool | Write (ostream &stream) const |
Writes the data to stream. More... | |
|
explicit |
Constructor initializes the object to value.
|
virtual |
Returns a copy of itself.
Reimplemented from wxVariantData.
|
virtual |
Returns true if data is of wxVariantDataSafeArray type and contains the same SAFEARRAY* value.
Implements wxVariantData.
|
virtual |
Converts the value of this object to wxAny.
|
virtual |
Returns "safearray".
Implements wxVariantData.
SAFEARRAY* wxVariantDataSafeArray::GetValue | ( | ) | const |
Returns the stored array.
void wxVariantDataSafeArray::SetValue | ( | SAFEARRAY * | value | ) |
Set the stored array.
|
virtual |
Fills the provided string with the textual representation of this object.
Only the address of SAFEARRAY pointer is output.
Reimplemented from wxVariantData.