#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. | |
SAFEARRAY * | GetValue () const |
Returns the stored array. | |
void | SetValue (SAFEARRAY *value) |
Set the stored array. | |
virtual bool | Eq (wxVariantData &data) const |
Returns true if data is of wxVariantDataSafeArray type and contains the same SAFEARRAY* 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 "safearray". | |
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. | |
|
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.