Nuria Framework - Core
Core module of the NuriaProject Framework
 All Classes Functions Typedefs Enumerations Enumerator Groups
Public Member Functions | Friends | List of all members
Nuria::MetaEnum Class Reference

The MetaEnum class provides access to enum's in a MetaObject. More...

#include <metaobject.hpp>

Public Member Functions

 MetaEnum ()
 
bool isValid () const
 
QByteArray name () const
 
int elementCount () const
 
QByteArray key (int at) const
 
int value (int at) const
 
QByteArray valueToKey (int value) const
 
int keyToValue (const QByteArray &key) const
 
int annotationCount () const
 
MetaAnnotation annotation (int idx) const
 
int annotationLowerBound (const QByteArray &name) const
 
int annotationUpperBound (const QByteArray &name) const
 

Friends

class MetaObject
 

Detailed Description

The MetaEnum class provides access to enum's in a MetaObject.

Order of elements
Elements in a enum are always sorted by key in ascending order.

Constructor & Destructor Documentation

Nuria::MetaEnum::MetaEnum ( )

Creates a invalid instance.

Member Function Documentation

MetaAnnotation Nuria::MetaEnum::annotation ( int  idx) const

Returns the MetaAnnotation instance for the annotation at idx.

See also
annotationCount
int Nuria::MetaEnum::annotationCount ( ) const

Returns the number of known annotations.

See also
annotation
int Nuria::MetaEnum::annotationLowerBound ( const QByteArray &  name) const

Returns the index of the first annotation name. Returns -1 if there's no annotation called like that.

int Nuria::MetaEnum::annotationUpperBound ( const QByteArray &  name) const

Returns the index of the last annotation name. Returns -1 if there's no annotation called like that.

int Nuria::MetaEnum::elementCount ( ) const

Returns the number of elements.

bool Nuria::MetaEnum::isValid ( ) const

Returns true if this instance is valid.

QByteArray Nuria::MetaEnum::key ( int  at) const

Returns the name of element at.

int Nuria::MetaEnum::keyToValue ( const QByteArray &  key) const

Returns the value of key. If there's no value for key, -1 is returned.

QByteArray Nuria::MetaEnum::name ( ) const

Returns the name of the field.

int Nuria::MetaEnum::value ( int  at) const

Returns the value of element at.

QByteArray Nuria::MetaEnum::valueToKey ( int  value) const

Returns the first key which points to value. If no key points to value, a empty QByteArray is returned.


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