#include <wx/msw/ole/oleutils.h>
This class stores SAFEARRAY
in a wxVariant.
It can be used to pass arrays having more than one dimension with wxAutomationObject methods.
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:
SAFEARRAY
.SAFEARRAY
pointer to it and store it in a wxVariant.An example of creating a two-dimensional SAFEARRAY
containing VARIANT
s and storing it in a wxVariant, using a utility class wxSafeArray<varType>.
If you want to receive a SAFEARRAY
in a wxVariant as a result of an wxAutomationObject call:
SAFEARRAY
from the returned wxVariant.SAFEARRAY
.SAFEARRAY
when you no longer need it.The following example shows how to process a two-dimensional SAFEARRAY
with VT_VARIANT
type received from a wxAutomationObject call, using a utility class wxSafeArray<varType>.
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.