Logo Search packages:      
Sourcecode: qt-gstreamer version File versions  Download package

void QGlib::Value::setData ( Type  dataType,
const void *  data 
) [private]

Sets the data of this Value to be the data pointed to by data. dataType indicates the actual data type of data and is used, among others, to cast data back to the actual C++ type that it points to and retrieve its value.

This method should only be accessed from ValueImpl.
See also:
Value Design

Definition at line 322 of file value.cpp.

References init(), isValid(), and setData().

Referenced by setData().

    if (!isValid()) {
        throw Private::InvalidValueException();
    } else if (g_value_type_compatible(dataType, type())) {
        ValueVTable vtable = s_dispatcher()->getVTable(dataType);
        if (vtable.set != NULL) {
            vtable.set(*this, data);
        } else {
            throw Private::UnregisteredTypeException(dataType.name().toStdString());
    } else if (dataType.isValueType() && g_value_type_transformable(dataType, type())) {
        Value v;
        v.setData(dataType, data);

        if (!g_value_transform(v.d->value(), d->value())) {
            throw Private::TransformationFailedException(dataType.name().toStdString(),
    } else {
        throw Private::InvalidTypeException(dataType.name().toStdString(),

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index