glibmm: Glib::Value Class Reference

glibmm 2.33.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions
Glib::Value Class Reference
Generic Values

Generic value implementation for custom types. More...

`#include <glibmm/value_custom.h>`

Inheritance diagram for Glib::Value:
[legend]

List of all members.

## Public Types
typedef T | CppType
typedef T* | CType
## Public Member Functions
void | set (const CppType& data)
CppType | get () const
## Static Public Member Functions
static GType | value_type ()

## Detailed Description

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.

## Member Typedef Documentation

typedef T Glib::Value::CppType

typedef T* Glib::Value::CType

## Member Function Documentation

CppType Glib::Value::get | ( |  | ) | const`[inline]`

void Glib::Value::set | ( | const CppType& | data | ) | `[inline]`

static GType Glib::Value::value_type | ( |  | ) | `[static]`

Reimplemented from Glib::ValueBase_Boxed.