libabigail
|
The internal representation of an integral type. More...
#include <abg-ir-priv.h>
Public Types | |
enum | base_type { INT_BASE_TYPE , CHAR_BASE_TYPE , BOOL_BASE_TYPE , DOUBLE_BASE_TYPE , FLOAT_BASE_TYPE , CHAR16_T_BASE_TYPE , CHAR32_T_BASE_TYPE , WCHAR_T_BASE_TYPE } |
The possible base types of integral types. We might have forgotten many of these, so do not hesitate to add new ones. More... | |
enum | modifiers_type { NO_MODIFIER , SIGNED_MODIFIER , UNSIGNED_MODIFIER , SHORT_MODIFIER , LONG_MODIFIER , LONG_LONG_MODIFIER } |
The modifiers of the base types above. Several modifiers can be combined for a given base type. The presence of modifiers is usually modelled by a bitmap of modifiers. More... | |
Public Member Functions | |
integral_type () | |
Default constructor of the integral_type. More... | |
integral_type (base_type, modifiers_type) | |
Constructor of the integral_type. More... | |
integral_type (const string &name) | |
Constructor of the integral_type. More... | |
base_type | get_base_type () const |
Getter of the base type of the integral_type. More... | |
modifiers_type | get_modifiers () const |
Getter of the modifiers bitmap of the integral_type. More... | |
operator string () const | |
Convert the current instance of integral_type into its string representation. More... | |
bool | operator== (const integral_type &) const |
Equality operator for the integral_type. More... | |
void | set_modifiers (modifiers_type) |
Setter of the modifiers bitmap of the integral_type. More... | |
string | to_string (bool internal=false) const |
Return the string representation of the current instance of integral_type. More... | |
The internal representation of an integral type.
This is a "utility type" used internally to canonicalize the name of fundamental integral types, so that "unsignd long" and "long unsined int" end-up having the same name.
Definition at line 45 of file abg-ir-priv.h.
enum base_type |
The possible base types of integral types. We might have forgotten many of these, so do not hesitate to add new ones.
If you do add new ones, please also consider updating functions parse_base_integral_type and integral_type::to_string.
Definition at line 53 of file abg-ir-priv.h.
enum modifiers_type |
The modifiers of the base types above. Several modifiers can be combined for a given base type. The presence of modifiers is usually modelled by a bitmap of modifiers.
If you add a new modifier, please consider updating functions parse_integral_type_modifier and integral_type::to_string.
Definition at line 79 of file abg-ir-priv.h.
integral_type | ( | ) |
Default constructor of the integral_type.
integral_type | ( | const string & | type_name | ) |
Constructor of the integral_type.
the | name of the integral type to parse to initialize the current instance of integral_type. |
integral_type | ( | base_type | b, |
modifiers_type | m | ||
) |
Constructor of the integral_type.
b | the base type of the integral type. |
m | the modifiers of the integral type. |
integral_type::base_type get_base_type | ( | ) | const |
Getter of the base type of the integral_type.
integral_type::modifiers_type get_modifiers | ( | ) | const |
Getter of the modifiers bitmap of the integral_type.
operator string | ( | ) | const |
Convert the current instance of integral_type into its string representation.
bool operator== | ( | const integral_type & | other | ) | const |
Equality operator for the integral_type.
other | the other integral type to compare against. |
other
equals the current instance of integral_type. void set_modifiers | ( | modifiers_type | m | ) |
Setter of the modifiers bitmap of the integral_type.
m | the new modifiers. |
string to_string | ( | bool | internal = false | ) | const |
Return the string representation of the current instance of integral_type.
internal | if true the string representation is to be used for internal purposes. In general, it means it's for type canonicalization purposes. |