Puma Reference Manual Puma: 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== ( LangType  lt  )  [inline]

Compare two language encodings.

Parameters:
lt The language encoding type to compare with.
bool Puma::CLanguage::operator== ( const CLanguage lang  )  [inline]

Compare two language encodings.

Parameters:
lang The language encoding 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.
LangType Puma::CLanguage::Type (  )  const [inline]

Get the language type.

void Puma::CLanguage::Type ( LangType  lt,
const char *  txt 
) [inline]

Set the language encoding type.

Parameters:
lt The language type.
txt The language identifier for languages other than C or C++.
void Puma::CLanguage::Type ( LangType  lt  )  [inline]

Set the language encoding type.

Parameters:
lt The language type.



Puma Reference Manual. Created on 18 Sep 2009.