#include <wx/any.h>
wxAnyValueType is base class for value type functionality for C++ data types used with wxAny.
Usually the default template will create a satisfactory wxAnyValueType implementation for a data type, but sometimes you may need to add some customization. To do this you will need to add specialized template of wxAnyValueTypeImpl<>. Often your only need may be to add dynamic type conversion which would be done like this:
wxAnyValueTypeImplBase<> template, from which we inherit in the above example, contains the bulk of the default wxAnyValueTypeImpl<> template implementation, and as such allows you to easily add some minor customization.
If you need a have complete control over the type interpretation, you will need to derive a class directly from wxAnyValueType, like this:
<>< =''>:</>&;&;< =''>\ </></>
Public Member Functions | |
wxAnyValueType () | |
Default constructor. | |
virtual | ~wxAnyValueType () |
Destructor. | |
template<typename T > | |
bool | CheckType () const |
Use this template function for checking if wxAnyValueType represents a specific C++ data type. | |
virtual bool | ConvertValue (const wxAnyValueBuffer &src, wxAnyValueType *dstType, wxAnyValueBuffer &dst) const =0 |
Convert value into buffer of different type. | |
virtual void | CopyBuffer (const wxAnyValueBuffer &src, wxAnyValueBuffer &dst) const =0 |
Implement this for buffer-to-buffer copy. | |
virtual void | DeleteValue (wxAnyValueBuffer &buf) const =0 |
This function is called every time the data in wxAny buffer needs to be freed. | |
virtual bool | IsSameType (const wxAnyValueType *otherType) const =0 |
This function is used for internal type matching. | |
wxAnyValueType::wxAnyValueType | ( | ) |
Default constructor.
|
virtual |
Destructor.
bool wxAnyValueType::CheckType | ( | ) | const |
Use this template function for checking if wxAnyValueType represents a specific C++ data type.
|
pure virtual |
Convert value into buffer of different type.
Return false if not possible.
|
pure virtual |
Implement this for buffer-to-buffer copy.
src | This is the source data buffer. |
dst | This is the destination data buffer that is in either uninitialized or freed state. |
|
pure virtual |
This function is called every time the data in wxAny buffer needs to be freed.
|
pure virtual |
This function is used for internal type matching.