Puma Reference Manual | Puma: Puma::CLanguage Class Reference |
Language specific encoding of entity names. More...
#include <Puma/CLanguage.h>
Public Types | |
enum | LangType { LANG_C, LANG_CPLUSPLUS, LANG_OTHER, LANG_UNDEFINED } |
Entity language encoding types. More... | |
Public Member Functions | |
CLanguage () | |
Constructor. | |
void | Type (LangType lt) |
Set the language encoding type. | |
void | Type (LangType lt, const char *txt) |
Set the language encoding type. | |
LangType | Type () const |
Get the language type. | |
const DString & | Text () const |
Get the language identifier like "C" or "C++". | |
bool | operator== (const CLanguage &lang) |
Compare two language encodings. | |
bool | operator== (LangType lt) |
Compare two language encodings. |
Language specific encoding of entity names.
The language is specified using the 'extern' linkage specifier.
Following languages are supported: "C", "C++". C entity names are not encoded. C++ entity names usually are encoded according to the C++ V3 ABI mangling (see http://www.codesourcery.com/cxx-abi/abi.html#mangling).
Example:
void foo(char); // encoded as: _Z3fooc extern "C" void bar(int); // encoded as: bar
Puma::CLanguage::CLanguage | ( | ) | [inline] |
Constructor.
bool Puma::CLanguage::operator== | ( | const CLanguage & | lang | ) | [inline] |
Compare two language encodings.
lang | The language encoding to compare with. |
bool Puma::CLanguage::operator== | ( | LangType | lt | ) | [inline] |
Compare two language encodings.
lt | The language encoding type to compare with. |
const DString& Puma::CLanguage::Text | ( | ) | const [inline] |
Get the language identifier like "C" or "C++".
void Puma::CLanguage::Type | ( | LangType | lt, |
const char * | txt | ||
) | [inline] |
Set the language encoding type.
lt | The language type. |
txt | The language identifier for languages other than C or C++. |
LangType Puma::CLanguage::Type | ( | ) | const [inline] |
Get the language type.
void Puma::CLanguage::Type | ( | LangType | lt | ) | [inline] |
Set the language encoding type.
lt | The language type. |