libabigail
Loading...
Searching...
No Matches
enum_type_decl::enumerator Class Reference

The abstraction of an enumerator. More...

#include <abg-ir.h>

Public Member Functions

 enumerator ()
 Default constructor of the enumerator type.
 
 enumerator (const enumerator &)
 Copy constructor of the enumerator type.
 
 enumerator (const string &name, int64_t value)
 Constructor of the enumerator type.
 
enum_type_declget_enum_type () const
 Getter for the enum type that this enumerator is for.
 
const string & get_name () const
 Getter for the name of the current instance of enum_type_decl::enumerator.
 
const string & get_qualified_name (bool internal=false) const
 Getter for the qualified name of the current instance of enum_type_decl::enumerator. The first invocation of the method builds the qualified name, caches it and return a reference to the cached qualified name. Subsequent invocations just return the cached value.
 
int64_t get_value () const
 Getter for the value of enumerator.
 
bool operator!= (const enumerator &other) const
 Inequality operator.
 
enumeratoroperator= (const enumerator &)
 Assignment operator of the enumerator type.
 
bool operator== (const enumerator &other) const
 Equality operator.
 
void set_enum_type (enum_type_decl *)
 Setter for the enum type that this enumerator is for.
 
void set_name (const string &n)
 Setter for the name of enumerator.
 
void set_value (int64_t v)
 Setter for the value of enumerator.
 

Detailed Description

The abstraction of an enumerator.

Definition at line 2880 of file abg-ir.h.

Constructor & Destructor Documentation

◆ enumerator() [1/3]

Default constructor of the enumerator type.

Definition at line 20830 of file abg-ir.cc.

◆ enumerator() [2/3]

enumerator ( const string & name,
int64_t value )

Constructor of the enumerator type.

Parameters
envthe environment we are operating from.
namethe name of the enumerator.
valuethe value of the enumerator.

Definition at line 20843 of file abg-ir.cc.

◆ enumerator() [3/3]

enumerator ( const enumerator & other)

Copy constructor of the enumerator type.

Parameters
otherenumerator to copy.

Definition at line 20851 of file abg-ir.cc.

Member Function Documentation

◆ get_enum_type()

enum_type_decl * get_enum_type ( ) const

Getter for the enum type that this enumerator is for.

Returns
the enum type that this enumerator is for.

Definition at line 20954 of file abg-ir.cc.

◆ get_name()

const string & get_name ( ) const

Getter for the name of the current instance of enum_type_decl::enumerator.

Returns
a reference to the name of the current instance of enum_type_decl::enumerator.

Definition at line 20899 of file abg-ir.cc.

◆ get_qualified_name()

const string & get_qualified_name ( bool internal = false) const

Getter for the qualified name of the current instance of enum_type_decl::enumerator. The first invocation of the method builds the qualified name, caches it and return a reference to the cached qualified name. Subsequent invocations just return the cached value.

Parameters
internalset to true if the call is intended for an internal use (for technical use inside the library itself), false otherwise. If you don't know what this is for, then set it to false.
Returns
the qualified name of the current instance of enum_type_decl::enumerator.

Definition at line 20916 of file abg-ir.cc.

◆ get_value()

int64_t get_value ( ) const

Getter for the value of enumerator.

Returns
the value of the current instance of enum_type_decl::enumerator.

Definition at line 20940 of file abg-ir.cc.

◆ operator!=()

bool operator!= ( const enumerator & other) const

Inequality operator.

Parameters
otherthe other instance to compare against.
Returns
true iff other is different from the current instance.

Definition at line 20890 of file abg-ir.cc.

◆ operator=()

enum_type_decl::enumerator & operator= ( const enumerator & o)

Assignment operator of the enumerator type.

Parameters
o

Definition at line 20861 of file abg-ir.cc.

◆ operator==()

bool operator== ( const enumerator & other) const

Equality operator.

Parameters
otherthe enumerator to compare to the current instance of enum_type_decl::enumerator.
Returns
true if other equals the current instance of enum_type_decl::enumerator.

Definition at line 20877 of file abg-ir.cc.

◆ set_enum_type()

void set_enum_type ( enum_type_decl * e)

Setter for the enum type that this enumerator is for.

Parameters
ethe new enum type.

Definition at line 20961 of file abg-ir.cc.

◆ set_name()

void set_name ( const string & n)

Setter for the name of enumerator.

Parameters
nthe new name.

Definition at line 20932 of file abg-ir.cc.

◆ set_value()

void set_value ( int64_t v)

Setter for the value of enumerator.

Parameters
vthe new value of the enum_type_decl::enumerator.

Definition at line 20947 of file abg-ir.cc.


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