wxRuby Documentation Home

# Wx::VariantData

The VariantData is used to implement a new type for Variant. Derive from VariantData,
and override the pure virtual functions.

## Derived from

Object

## See also

Variant

## Methods

- VariantData.new
- VariantData#copy
- VariantData#eq
- VariantData#get_type
- VariantData#get_value_class_info
- VariantData#read
- VariantData#write
- wxGetVariantCast

### VariantData.new

### VariantData#copy

copy(%(arg-type)VariantData% data)

Copy the data from `this’ object to data.

### VariantData#eq

Boolean eq(%(arg-type)VariantData% data)

Returns true if this object is equal to data.

### VariantData#get_type

String get_type()

Returns the string type of the data.

### VariantData#get_value_class_info

ClassInfo get_value_class_info()

If the data is a Object returns a pointer to the objects ClassInfo structure, if
the data isn’t a Object the method returns NULL.

### VariantData#read

Boolean read(%(arg-type)ostream% stream) Boolean read(%(arg-type)String% string)

Reads the data from stream or string.

### VariantData#write

Boolean write(%(arg-type)ostream% stream) Boolean write(%(arg-type)String% string)

Writes the data to stream or string.

### GetVariantCast

classname _get_variant_cast(Variant&, classname)

This macro returns the data stored in variant cast to the type classname * if
the data is of this type (the check is done during the run-time) or
`NULL` otherwise.

#### See also

RTTI overview

DynamicCast

[This page automatically generated from the Textile source at 2023-06-09 00:45:25 +0000]