Synopsis - Synopsis::PTree::Encoding

namespace Synopsis::PTree
class Encoding
File: ../Synopsis/PTree/Encoding.hh

An Encoding represents a mangled (type) name. Here is a quick reference of the grammar:

- b: boolean
- c: char
- w: wchar_t
- i: int (signed, unsigned)
- s: short (short int)
- l: long (long int)
- j: long long
- f: float
- d: double
- r: long double
- v: void
- T: template class (e.g. Foo<int,char> ==> T[3]Foo[2]ic. [2] means the length of ic. It doesn't mean the number of template arguments.
- e: ...
- ?: no return type. the return type of constructors
- *: non-type template parameter
- S: signed
- U: unsigned
- C: const
- V: volatile
- P: pointer
- R: reference
- A: array (e.g. char[16] ==> A16_c)
- F: function (e.g. char foo(int) ==> Fi_c)
- M: pointer to member (e.g. Type::* ==> M[4]Type)
- Q: qualified class (e.g. X::YY ==> Q[2][1]X[2]YY, ::YY ==> Q[2][0][2]YY)
- [x]: means 0x80 + x
- 0: means :: (global scope)

Special function names:

- operator + ==> +
- operator new[] ==> new[]
- operator <type> ==> @<encoded type> cast operator

Public Typedefs Summary:
std::basic_string<unsigned char, char_traits> Code
Code::const_iterator iterator
Public Structs Summary:
struct char_traits
Public Member functions Summary:
static void do_init_static()
constructor Encoding()
constructor Encoding(const Code& b)
constructor Encoding(const char* b)
constructor Encoding(const char* b, size_t s)
constructor Encoding(iterator b, iterator e)
static Encoding simple_name(const Atom* name)
void clear()
bool empty() const
size_t size() const
iterator begin() const
iterator end() const
unsigned char front() const
unsigned char at(size_t i) const
const char* copy() const

return a copy of the underlaying buffer FIXME: this is a temporary workaround while there are still places that use raw strings

bool operator==(const Encoding& e) const
bool operator==(const std::string& s) const
bool operator==(const char* s) const
void prepend(unsigned char c)
void prepend(const char* p, size_t s)
void prepend(const Encoding& e)
void append(unsigned char c)
void append(const char* p, size_t s)
void append(const Encoding& e)
void append_with_length(const char* s, size_t n)
void append_with_length(const Encoding& e)
unsigned char pop()
void pop(size_t n)
void cv_qualify(const Node*, const Node* = 0)
void simple_const()
void global_scope()
void simple_name(const Node*)
void anonymous()
void template_(const Node*, const Encoding&)
void qualified(int)
void destructor(const Node*)
void ptr_operator(int)
void ptr_to_member(const Encoding&, int)
void cast_operator(const Encoding&)
void array()
void array(unsigned long s)
void function(const Encoding& e)
void recursion(const Encoding& e)
void start_func_args()
void end_func_args()
void void_()
void ellipsis_arg()
void no_return_type()
void value_temp_param()
Encoding get_scope() const

if this Encoding represents a qualified name, return the name of the outer scope

Encoding get_symbol() const

if this Encoding represents a qualified name, return the name of the symbol inside the outer scope, else return the unmodified name

Encoding get_template_arguments() const
std::string unmangled() const
Node* make_name()
Node* make_qname()
Node* make_ptree(Node*)
bool is_simple_name() const
bool is_global_scope() const
bool is_qualified() const
bool is_function() const
bool is_template() const
Node* name_to_ptree()
friend bool operator<(const Encoding&, const Encoding&)
friend std::ostream& operator<<(std::ostream&, const Encoding&)
Public Data members Summary:
Node* bool_t
Node* char_t
Node* wchar_t_t
Node* int_t
Node* short_t
Node* long_t
Node* float_t
Node* double_t
Node* void_t
Node* signed_t
Node* unsigned_t
Node* const_t
Node* volatile_t
Node* operator_name
Node* new_operator
Node* anew_operator
Node* delete_operator
Node* adelete_operator
Node* star
Node* ampersand
Node* comma
Node* dots
Node* scope
Node* tilder
Node* left_paren
Node* right_paren
Node* left_bracket
Node* right_bracket
Node* left_angle
Node* right_angle
Private Member functions Summary:
iterator end_of_scope() const
Private Data members Summary:
Code my_buffer
Public Member functions Details:
const char* copy() const

return a copy of the underlaying buffer FIXME: this is a temporary workaround while there are still places that use raw strings

Encoding get_scope() const

if this Encoding represents a qualified name, return the name of the outer scope

Encoding get_symbol() const

if this Encoding represents a qualified name, return the name of the symbol inside the outer scope, else return the unmodified name

Generated on Thu Apr 16 16:27:44 2009 by
synopsis (version devel)