Puma Reference Manual Puma::CLanguage Class Reference



Puma::CLanguage Class Reference

Language specific encoding of entity names. More...

#include <Puma/CLanguage.h>

List of all members.

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 DStringText () 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.

Detailed Description

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

Member Enumeration Documentation

Entity language encoding types.

Enumerator:
LANG_C 

Language C.

LANG_CPLUSPLUS 

Language C++.

LANG_OTHER 

Neither C nor C++.

LANG_UNDEFINED 

No explicit language encoding.


Constructor & Destructor Documentation

Puma::CLanguage::CLanguage ( )
inline

Constructor.


Member Function Documentation

bool Puma::CLanguage::operator== ( const CLanguage lang)
inline

Compare two language encodings.

Parameters:
langThe language encoding to compare with.
bool Puma::CLanguage::operator== ( LangType  lt)
inline

Compare two language encodings.

Parameters:
ltThe language encoding type to compare with.
const DString& Puma::CLanguage::Text ( ) const
inline

Get the language identifier like "C" or "C++".

Returns:
The language identifier or the empty string.
void Puma::CLanguage::Type ( LangType  lt)
inline

Set the language encoding type.

Parameters:
ltThe language type.
void Puma::CLanguage::Type ( LangType  lt,
const char *  txt 
)
inline

Set the language encoding type.

Parameters:
ltThe language type.
txtThe language identifier for languages other than C or C++.
LangType Puma::CLanguage::Type ( ) const
inline

Get the language type.




Puma Reference Manual. Created on Sat Jun 30 2012.