libabigail
Public Member Functions | List of all members
enum_type_decl::enumerator Class Reference

The abstraction of an enumerator. More...

#include <abg-ir.h>

Public Member Functions

 enumerator ()
 Default constructor of the enum_type_decl::enumerator type. More...
 
 enumerator (const enumerator &)
 Copy constructor of the enum_type_decl::enumerator type. More...
 
 enumerator (const string &name, int64_t value)
 Constructor of the enum_type_decl::enumerator type. More...
 
enum_type_declget_enum_type () const
 Getter for the enum type that this enumerator is for. More...
 
const string & get_name () const
 Getter for the name of the current instance of enum_type_decl::enumerator. More...
 
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. More...
 
int64_t get_value () const
 Getter for the value of enum_type_decl::enumerator. More...
 
bool operator!= (const enumerator &other) const
 Inequality operator. More...
 
enumeratoroperator= (const enumerator &)
 Assignment operator of the enum_type_decl::enumerator type. More...
 
bool operator== (const enumerator &other) const
 Equality operator. More...
 
void set_enum_type (enum_type_decl *)
 Setter for the enum type that this enumerator is for. More...
 
void set_name (const string &n)
 Setter for the name of enum_type_decl::enumerator. More...
 
void set_value (int64_t v)
 Setter for the value of enum_type_decl::enumerator. More...
 

Detailed Description

The abstraction of an enumerator.

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

Constructor & Destructor Documentation

◆ enumerator() [1/3]

Default constructor of the enum_type_decl::enumerator type.

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

◆ enumerator() [2/3]

enumerator ( const string &  name,
int64_t  value 
)

Constructor of the enum_type_decl::enumerator type.

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

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

◆ enumerator() [3/3]

enumerator ( const enumerator other)

Copy constructor of the enum_type_decl::enumerator type.

Parameters
otherenumerator to copy.

Definition at line 20282 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 20385 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 20330 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 20347 of file abg-ir.cc.

◆ get_value()

int64_t get_value ( ) const

Getter for the value of enum_type_decl::enumerator.

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

Definition at line 20371 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 20321 of file abg-ir.cc.

◆ operator=()

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

Assignment operator of the enum_type_decl::enumerator type.

Parameters
o

Definition at line 20292 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 20308 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 20392 of file abg-ir.cc.

◆ set_name()

void set_name ( const string &  n)

Setter for the name of enum_type_decl::enumerator.

Parameters
nthe new name.

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

◆ set_value()

void set_value ( int64_t  v)

Setter for the value of enum_type_decl::enumerator.

Parameters
vthe new value of the enum_type_decl::enumerator.

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


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