# Glib::Variant< unsigned char > Class Template Reference
[Variant Datatype]

Specialization of Glib::Variant containing a unsigned char type. More...

`#include <glibmm/variant_basictypes.h>`

Inheritance diagram for Glib::Variant< unsigned char >:
[legend]

List of all members.

## Public Types

typedef guchar | CType

## Public Member Functions

| Variant ()
| Default constructor.
| Variant (GVariant* castitem, bool take_a_reference=false)
| GVariant constructor.
unsigned char | get () const
| Gets the value of the Glib::Variant<unsigned char>.

## Static Public Member Functions

static const VariantType& | variant_type ()
| Gets the Glib::VariantType.
static Variant< unsigned char > | create (unsigned char data)
| Creates a new Glib::Variant<unsigned char>.

## Detailed Description

### template <>
class Glib::Variant< unsigned char >

Specialization of Glib::Variant containing a unsigned char type.

Since glibmm 2.26:

## Member Typedef Documentation

typedef guchar Glib::Variant< unsigned char >::CType

## Constructor & Destructor Documentation

Glib::Variant< unsigned char >::Variant | ( | ) | `[inline]`

Default constructor.

Glib::Variant< unsigned char >::Variant | ( | GVariant< unsigned char > * | castitem,
|  | bool | take_a_reference = `false`
| ) |  | `[inline, explicit]`

GVariant constructor.

Parameters:

  castitem | The GVariant to wrap.

## Member Function Documentation

static Variant<unsigned char> Glib::Variant< unsigned char >::create | ( | unsigned char | data ) | `[static]`

Creates a new Glib::Variant<unsigned char>.

Parameters:

  data | The value of the new Glib::Variant<unsigned char>.

Returns:
  The new Glib::Variant<unsigned char>.

unsigned char Glib::Variant< unsigned char >::get | ( | ) | const

Gets the value of the Glib::Variant<unsigned char>.

Returns:
  The unsigned char value of the Glib::Variant<unsigned char>.

static const VariantType& Glib::Variant< unsigned char >::variant_type | ( | ) | `[static]`

Gets the Glib::VariantType.

Returns:
  The Glib::VariantType.