Inherited: None


This class is a part of Object-Introspection-Mechanism. MetaEnum provides information about one particular class enumerator.

To make enumerators visible in introspection mechanism, developers must declare those under A_ENUMS() macro.

Public Methods

MetaEnum (const MetaEnum::Table * table)


isValid () const

const char

key (int index) const


keyCount () const

const char

name () const

const MetaEnum::Table *

table () const


value (int index) const

Static Methods


Methods Description

MetaEnum::MetaEnum (MetaEnum::Table * table)

Constructs MetaEnum object which will contain information provided in a table.

bool MetaEnum::isValid () const

Returns true if enumerator is valid; otherwise returns false.

const char MetaEnum::key (int index) const

Returns the key with the given index, or nullptr if no such key exists.

int MetaEnum::keyCount () const

Returns the number of keys.

const char MetaEnum::name () const

Returns a name of enumerator.

const :ref:`MetaEnum::Table<api_MetaEnum::Table>`* MetaEnum::table () const

Returns enumerator information table.

int MetaEnum::value (int index) const

Returns the value with the given index; or returns -1 if there is no such value.