GammaRay API Documentation  2.11.0
Public Member Functions | Friends | List of all members
GammaRay::EnumDefinition Class Reference

Target-independent representation of an enum or flag definition. More...

#include <enumdefinition.h>

Public Member Functions

 EnumDefinition (EnumId id, const QByteArray &name)
 Create a new definition for an enum named name and internal id id. More...
 
QVector< EnumDefinitionElementelements () const
 Returns the individual elements of this enum. More...
 
EnumId id () const
 A unique identifer for this enum definition. More...
 
bool isFlag () const
 Returns true if this enum is used as a flag. More...
 
bool isValid () const
 Returns whether this is a valid enum definition. More...
 
QByteArray name () const
 The name of the enum. More...
 
QByteArray valueToString (const EnumValue &value) const
 Converts the given enum value into a string representation. More...
 

Friends

QDataStreamoperator<< (QDataStream &out, const EnumDefinition &def)
 
QDataStreamoperator>> (QDataStream &in, EnumDefinition &def)
 

Detailed Description

Target-independent representation of an enum or flag definition.

Constructor & Destructor Documentation

GammaRay::EnumDefinition::EnumDefinition ( EnumId  id,
const QByteArray name 
)
explicit

Create a new definition for an enum named name and internal id id.

Member Function Documentation

QVector<EnumDefinitionElement> GammaRay::EnumDefinition::elements ( ) const

Returns the individual elements of this enum.

That is, the key/value pairs of its definition.

EnumId GammaRay::EnumDefinition::id ( ) const

A unique identifer for this enum definition.

This is used to identify enums between the GammaRay client and server.

bool GammaRay::EnumDefinition::isFlag ( ) const

Returns true if this enum is used as a flag.

bool GammaRay::EnumDefinition::isValid ( ) const

Returns whether this is a valid enum definition.

This means it's a enum definition registered with the EnumRepository and there is at least one enum definition element present.

QByteArray GammaRay::EnumDefinition::name ( ) const

The name of the enum.

QByteArray GammaRay::EnumDefinition::valueToString ( const EnumValue value) const

Converts the given enum value into a string representation.


Klarälvdalens Datakonsult AB (KDAB)
"The Qt Experts"
https://www.kdab.com/
GammaRay
Qt-application inspection and manipulation tool
https://www.kdab.com/gammaray/