Main Page Widgets Namespaces Book

# Glib::Value< T > Class Template Reference
[Generic Values]

Inheritance diagram for Glib::Value< T >:

[legend]
List of all members.

## Detailed Description

### template <class T>
class Glib::Value< T >

Generic value implementation for custom types.

Any type to be used with this template must implement:

- default constructor
- copy constructor
- assignment operator
- destructor

Compiler-generated implementations are OK, provided they do the right thing for the type. In other words, any type that works with `std::vector` will work with Glib::Value<>.

Note:
  None of the operations listed above are allowed to throw. If you cannot ensure that no exceptions will be thrown, consider using either a normal pointer or a smart pointer to hold your objects indirectly.

## Public Types

typedef Glib::RefPtr< const T > | CppType
typedef T::BaseObjectType* | CType
typedef T | CppType
typedef T* | CType

## Public Member Functions

void | set (const CppType& data)
CppType | get () const
void | set (const CppType& data)
CppType | get () const

## Static Public Member Functions

GType | value_type ()
GType | value_type () G_GNUC_CONST

## Member Typedef Documentation

template <class T>
typedef T Glib::Value<T>::CppType

template <class T>
typedef Glib::RefPtr<const T> Glib::Value<T>::CppType

template <class T>
typedef T* Glib::Value<T>::CType

template <class T>
typedef T::BaseObjectType* Glib::Value<T>::CType

## Member Function Documentation

template <class T>
CppType Glib::Value<T>::get | ( |  | ) | const`[inline]`

template <class T>
CppType Glib::Value<T>::get | ( |  | ) | const`[inline]`

template <class T>
void Glib::Value<T>::set | ( | const CppType& | data | ) | `[inline]`

template <class T>
void Glib::Value<T>::set | ( | const CppType& | data | ) | `[inline]`

template <class T>
GType Glib::Value<T>::value_type | ( |  | ) | `[static]`

| Reimplemented from Glib::ValueBase_Boxed.

template <class T>
GType Glib::Value<T>::value_type | ( |  | ) | `[inline, static]`

| Reimplemented from Glib::ValueBase_Boxed.

The documentation for this class was generated from the following files:

- value_custom.h
- glib/glibmm/value.h