Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Encoding Class Reference

#include <encoding.h>

Collaboration diagram for Encoding:

Collaboration graph
[legend]
List of all members.

Public Types

enum  { MaxNameLen = 256 }

Public Methods

 Encoding ()
 Encoding (Encoding &e)
void Clear ()
void Reset (Encoding &)
char * Get ()
bool IsEmpty ()
void CvQualify (Ptree *, Ptree *=0)
void SimpleConst ()
void GlobalScope ()
void SimpleName (Ptree *)
void NoName ()
void Template (Ptree *, Encoding &)
void Qualified (int)
void Destructor (Ptree *)
void PtrOperator (int)
void PtrToMember (Encoding &, int)
void CastOperator (Encoding &)
void Array ()
void Function (Encoding &args)
void Recursion (Encoding &e)
void StartFuncArgs ()
void EndFuncArgs ()
void Void ()
void EllipsisArg ()
void NoReturnType ()
void ValueTempParam ()
void Insert (unsigned char)
void Insert (char *, int)
void Append (unsigned char)
void Append (char *, int)
void Append (Encoding &e)
void AppendWithLen (char *, int)
void AppendWithLen (Encoding &e)

Static Public Methods

void Print (ostream &, char *)
char * GetBaseName (char *, int &, Environment *&)
PtreeMakePtree (unsigned char *&, Ptree *)
PtreeMakeQname (unsigned char *&)
PtreeMakeLeaf (unsigned char *&)
bool IsSimpleName (unsigned char *)
PtreeNameToPtree (char *, int)
unsigned char * GetTemplateArguments (unsigned char *, int &)

Static Public Attributes

Ptreebool_t = new LeafBOOLEAN("bool", 4)
Ptreechar_t = new LeafCHAR("char", 4)
Ptreeint_t = new LeafINT("int", 3)
Ptreeshort_t = new LeafSHORT("short", 5)
Ptreelong_t = new LeafLONG("long", 4)
Ptreefloat_t = new LeafFLOAT("float", 5)
Ptreedouble_t = new LeafDOUBLE("double", 6)
Ptreevoid_t = new LeafVOID("void", 4)
Ptreesigned_t = new LeafSIGNED("signed", 6)
Ptreeunsigned_t = new LeafUNSIGNED("unsigned", 8)
Ptreeconst_t = new LeafCONST("const", 5)
Ptreevolatile_t = new LeafVOLATILE("volatile", 8)
Ptreeoperator_name = new LeafReserved("operator", 8)
Ptreenew_operator = new LeafReserved("new", 3)
Ptreeanew_operator = new LeafReserved("new[]", 5)
Ptreedelete_operator = new LeafReserved("delete", 6)
Ptreeadelete_operator = new LeafReserved("delete[]", 8)
Ptreestar = new Leaf("*", 1)
Ptreeampersand = new Leaf("&", 1)
Ptreecomma = new Leaf(",", 1)
Ptreedots = new Leaf("...", 3)
Ptreescope = new Leaf("::", 2)
Ptreetilder = new Leaf("~", 1)
Ptreeleft_paren = new Leaf("(", 1)
Ptreeright_paren = new Leaf(")", 1)
Ptreeleft_bracket = new Leaf("[", 1)
Ptreeright_bracket = new Leaf("]", 1)
Ptreeleft_angle = new Leaf("<", 1)
Ptreeright_angle = new Leaf(">", 1)

Static Private Methods

EnvironmentResolveTypedefName (Environment *, char *, int)
int GetBaseNameIfTemplate (unsigned char *, Environment *&)

Private Attributes

unsigned char name [MaxNameLen]
int len

Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MaxNameLen 

Definition at line 28 of file encoding.h.


Constructor & Destructor Documentation

Encoding::Encoding   [inline]
 

Definition at line 30 of file encoding.h.

References len.

Encoding::Encoding Encoding &    e [inline]
 

Definition at line 31 of file encoding.h.

References Reset().


Member Function Documentation

void Encoding::Append Encoding &    e [inline]
 

Definition at line 62 of file encoding.h.

References Append(), len, and name.

void Encoding::Append char *   ,
int   
 

Definition at line 403 of file encoding.cc.

References len, MaxNameLen, MopErrorMessage(), and name.

void Encoding::Append unsigned    char
 

Definition at line 394 of file encoding.cc.

References len, MaxNameLen, MopErrorMessage(), and name.

Referenced by Append(), CastOperator(), Destructor(), EllipsisArg(), EndFuncArgs(), GlobalScope(), NoReturnType(), Parser::optIntegralTypeOrClassSpec(), Parser::rArgDeclList(), Parser::rTemplateArgs(), SimpleConst(), StartFuncArgs(), Template(), ValueTempParam(), and Void().

void Encoding::AppendWithLen Encoding &    e [inline]
 

Definition at line 64 of file encoding.h.

References AppendWithLen(), len, and name.

void Encoding::AppendWithLen char *   ,
int   
 

Definition at line 413 of file encoding.cc.

References DigitOffset, len, MaxNameLen, MopErrorMessage(), and name.

Referenced by AppendWithLen(), NoName(), Parser::rOperatorName(), SimpleName(), and Template().

void Encoding::Array   [inline]
 

Definition at line 48 of file encoding.h.

References Insert().

Referenced by Parser::rDeclarator2(), and Parser::rNewDeclarator().

void Encoding::CastOperator Encoding &   
 

Definition at line 361 of file encoding.cc.

References Append(), DigitOffset, len, and name.

Referenced by Parser::rCastOperatorName().

void Encoding::Clear   [inline]
 

Definition at line 32 of file encoding.h.

References len.

Referenced by Parser::rArgDeclList(), Parser::rArgDeclListOrInit(), Parser::rBaseSpecifiers(), Parser::rCastOperatorName(), Parser::rDeclaration(), Parser::rDeclarationStatement(), Parser::rDeclarator2(), and Parser::rTemplateArgs().

void Encoding::CvQualify Ptree  ,
Ptree   = 0
 

Definition at line 256 of file encoding.cc.

References Ptree::Car(), Ptree::Cdr(), CONST, FALSE, Insert(), Ptree::IsLeaf(), nil, TRUE, VOLATILE, and Ptree::What().

Referenced by Parser::optPtrOperator(), Parser::rCastOperatorName(), Parser::rConstructorDecl(), Parser::rDeclarator2(), Parser::rIntegralDeclaration(), Parser::rIntegralDeclStatement(), Parser::rOtherDeclaration(), Parser::rOtherDeclStatement(), and Parser::rTypeSpecifier().

void Encoding::Destructor Ptree  
 

Definition at line 332 of file encoding.cc.

References Append(), DigitOffset, Ptree::GetLength(), Ptree::GetPosition(), and len.

Referenced by Parser::rName(), and Parser::rVarNameCore().

void Encoding::EllipsisArg   [inline]
 

Definition at line 54 of file encoding.h.

References Append().

Referenced by Parser::rArgDeclList().

void Encoding::EndFuncArgs   [inline]
 

Definition at line 52 of file encoding.h.

References Append().

Referenced by Parser::rArgDeclList(), Parser::rConstructorDecl(), and Parser::rDeclarator2().

void Encoding::Function Encoding &    args [inline]
 

Definition at line 49 of file encoding.h.

References Insert(), len, and name.

Referenced by Parser::rDeclarator2().

char * Encoding::Get  
 

Definition at line 111 of file encoding.cc.

References len, name, and nil.

Referenced by Class::Construct(), ClassWalker::MakeMetaobjectForCfunctions(), PtreeDeclarator::PtreeDeclarator(), PtreeFstyleCastExpr::PtreeFstyleCastExpr(), PtreeUsing::PtreeUsing(), Parser::rClassSpec(), Environment::RecordPointerVariable(), Environment::RecordVariable(), and Parser::rEnumSpec().

char * Encoding::GetBaseName char *   ,
int &   ,
Environment *&   
[static]
 

Definition at line 136 of file encoding.cc.

References GetBaseNameIfTemplate(), Environment::GetBottom(), len, nil, and ResolveTypedefName().

Referenced by MemberList::Append(), Environment::DontRecordDeclarator(), Member::IsConstructor(), Member::IsDestructor(), TypeInfo::IsEnum(), Environment::IsMember(), MemberList::Lookup(), Environment::Lookup(), Environment::LookupClassMetaobject(), Environment::LookupTop(), Walker::MatchedDeclarator(), Member::Name(), Environment::RecordClassName(), Environment::RecordDeclarator(), Environment::RecordEnumName(), Environment::RecordTemplateClass(), Environment::RecordTemplateFunction(), Environment::RecordTypedefName(), Environment::RecordUsing(), Environment::RecordUsingNamespace(), TypeInfo::ResolveTypedef(), TypeInfo::SkipCv(), TypeInfo::SkipName(), and Walker::WhichDeclarator().

int Encoding::GetBaseNameIfTemplate unsigned char *   ,
Environment *&   
[static, private]
 

Definition at line 222 of file encoding.cc.

References Bind::ClassMetaobject(), Class::GetEnvironment(), Bind::isTemplateClass, Environment::LookupType(), name, nil, and Bind::What().

Referenced by GetBaseName().

unsigned char * Encoding::GetTemplateArguments unsigned char *   ,
int &   
[static]
 

Definition at line 243 of file encoding.cc.

References len, and name.

Referenced by TypeInfo::NthTemplateArgument().

void Encoding::GlobalScope  
 

Definition at line 286 of file encoding.cc.

References Append(), and DigitOffset.

Referenced by Parser::rName(), Parser::rPtrToMember(), and Parser::rVarNameCore().

void Encoding::Insert char *   ,
int   
 

Definition at line 381 of file encoding.cc.

References len, MaxNameLen, MopErrorMessage(), and name.

void Encoding::Insert unsigned    char
 

Definition at line 368 of file encoding.cc.

References len, MaxNameLen, MopErrorMessage(), and name.

Referenced by Array(), CvQualify(), Function(), PtrOperator(), PtrToMember(), and Recursion().

bool Encoding::IsEmpty   [inline]
 

Definition at line 35 of file encoding.h.

References len.

Referenced by Parser::rDeclarator2().

bool Encoding::IsSimpleName unsigned char *    [static]
 

Definition at line 632 of file encoding.cc.

References DigitOffset.

Referenced by TypeInfo::FullTypeName().

Ptree * Encoding::MakeLeaf unsigned char *&    [static]
 

Definition at line 619 of file encoding.cc.

References DigitOffset, len, and nil.

Referenced by TypeInfo::FullTypeName(), MakePtree(), and MakeQname().

Ptree * Encoding::MakePtree unsigned char *&   ,
Ptree  
[static]
 

Definition at line 424 of file encoding.cc.

References ampersand, bool_t, char_t, comma, Ptree::Cons(), const_t, DigitOffset, dots, double_t, float_t, int_t, left_angle, left_bracket, left_paren, Ptree::List(), long_t, MakeLeaf(), MakeQname(), MopErrorMessage(), Ptree::Nconc(), nil, right_angle, right_bracket, right_paren, scope, short_t, signed_t, Ptree::Snoc(), star, unsigned_t, void_t, and volatile_t.

Referenced by Walker::FillArgumentName(), TypeInfo::FullTypeName(), TypeInfo::MakePtree(), and NameToPtree().

Ptree * Encoding::MakeQname unsigned char *&    [static]
 

Definition at line 603 of file encoding.cc.

References DigitOffset, MakeLeaf(), nil, scope, and Ptree::Snoc().

Referenced by TypeInfo::FullTypeName(), and MakePtree().

Ptree * Encoding::NameToPtree char *   ,
int   
[static]
 

Definition at line 637 of file encoding.cc.

References adelete_operator, anew_operator, delete_operator, is_letter(), len, Ptree::List(), MakePtree(), name, new_operator, nil, operator_name, and tilder.

Referenced by Member::Name().

void Encoding::NoName  
 

Definition at line 301 of file encoding.cc.

References AppendWithLen(), and name.

Referenced by Parser::rClassSpec(), and Parser::rEnumSpec().

void Encoding::NoReturnType   [inline]
 

Definition at line 55 of file encoding.h.

References Append().

Referenced by Parser::rConstructorDecl().

void Encoding::Print ostream &   ,
char *   
[static]
 

Definition at line 123 of file encoding.cc.

Referenced by NonLeaf::PrintWithEncodeds().

void Encoding::PtrOperator int   
 

Definition at line 340 of file encoding.cc.

References Insert().

Referenced by Parser::optPtrOperator(), and Environment::RecordPointerVariable().

void Encoding::PtrToMember Encoding &   ,
int   
 

Definition at line 348 of file encoding.cc.

References DigitOffset, Insert(), len, and name.

Referenced by Parser::rPtrToMember().

void Encoding::Qualified int   
 

Definition at line 320 of file encoding.cc.

References DigitOffset, len, MaxNameLen, MopErrorMessage(), and name.

Referenced by Parser::rName(), and Parser::rVarNameCore().

void Encoding::Recursion Encoding &    e [inline]
 

Definition at line 50 of file encoding.h.

References Insert(), len, and name.

Referenced by Parser::rDeclarator2().

void Encoding::Reset Encoding &   
 

Definition at line 104 of file encoding.cc.

References len, and name.

Referenced by Encoding(), and Parser::rDeclarators().

Environment * Encoding::ResolveTypedefName Environment  ,
char *   ,
int   
[static, private]
 

Definition at line 188 of file encoding.cc.

References TypeInfo::ClassMetaobject(), Bind::ClassMetaobject(), Class::GetEnvironment(), Bind::GetType(), Bind::isClassName, Bind::isTypedefName, len, Environment::LookupNamespace(), Environment::LookupType(), name, nil, and Bind::What().

Referenced by GetBaseName().

void Encoding::SimpleConst   [inline]
 

Definition at line 38 of file encoding.h.

References Append().

Referenced by Parser::rConstDeclaration().

void Encoding::SimpleName Ptree  
 

Definition at line 293 of file encoding.cc.

References AppendWithLen(), Ptree::GetLength(), and Ptree::GetPosition().

Referenced by Class::Construct(), ClassWalker::MakeMetaobjectForCfunctions(), Environment::RecordPointerVariable(), Environment::RecordVariable(), Parser::rEnumSpec(), Parser::rName(), Parser::rOperatorName(), Parser::rPtrToMember(), Parser::rVarNameCore(), and Template().

void Encoding::StartFuncArgs   [inline]
 

Definition at line 51 of file encoding.h.

References Append().

Referenced by Parser::rArgDeclList(), Parser::rConstructorDecl(), and Parser::rDeclarator2().

void Encoding::Template Ptree  ,
Encoding &   
 

Definition at line 313 of file encoding.cc.

References Append(), AppendWithLen(), and SimpleName().

Referenced by Parser::rName(), Parser::rPtrToMember(), and Parser::rVarNameCore().

void Encoding::ValueTempParam   [inline]
 

Definition at line 56 of file encoding.h.

References Append().

Referenced by Parser::rTemplateArgs().

void Encoding::Void   [inline]
 

Definition at line 53 of file encoding.h.

References Append().

Referenced by Parser::rArgDeclList(), Parser::rConstructorDecl(), and Parser::rDeclarator2().


Member Data Documentation

Ptree * Encoding::adelete_operator = new LeafReserved("delete[]", 8) [static]
 

Definition at line 87 of file encoding.cc.

Referenced by NameToPtree().

Ptree * Encoding::ampersand = new Leaf("&", 1) [static]
 

Definition at line 90 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::anew_operator = new LeafReserved("new[]", 5) [static]
 

Definition at line 85 of file encoding.cc.

Referenced by NameToPtree().

Ptree * Encoding::bool_t = new LeafBOOLEAN("bool", 4) [static]
 

Definition at line 69 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::char_t = new LeafCHAR("char", 4) [static]
 

Definition at line 70 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::comma = new Leaf(",", 1) [static]
 

Definition at line 91 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::const_t = new LeafCONST("const", 5) [static]
 

Definition at line 80 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::delete_operator = new LeafReserved("delete", 6) [static]
 

Definition at line 86 of file encoding.cc.

Referenced by NameToPtree().

Ptree * Encoding::dots = new Leaf("...", 3) [static]
 

Definition at line 92 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::double_t = new LeafDOUBLE("double", 6) [static]
 

Definition at line 75 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::float_t = new LeafFLOAT("float", 5) [static]
 

Definition at line 74 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::int_t = new LeafINT("int", 3) [static]
 

Definition at line 71 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::left_angle = new Leaf("<", 1) [static]
 

Definition at line 99 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::left_bracket = new Leaf("[", 1) [static]
 

Definition at line 97 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::left_paren = new Leaf("(", 1) [static]
 

Definition at line 95 of file encoding.cc.

Referenced by MakePtree().

int Encoding::len [private]
 

Definition at line 83 of file encoding.h.

Referenced by Append(), AppendWithLen(), CastOperator(), Clear(), Destructor(), Encoding(), Function(), Get(), GetBaseName(), GetTemplateArguments(), Insert(), IsEmpty(), MakeLeaf(), NameToPtree(), PtrToMember(), Qualified(), Recursion(), Reset(), and ResolveTypedefName().

Ptree * Encoding::long_t = new LeafLONG("long", 4) [static]
 

Definition at line 73 of file encoding.cc.

Referenced by MakePtree().

unsigned char Encoding::name[MaxNameLen] [private]
 

Definition at line 82 of file encoding.h.

Referenced by Append(), AppendWithLen(), CastOperator(), Function(), Get(), GetBaseNameIfTemplate(), GetTemplateArguments(), Insert(), NameToPtree(), NoName(), PtrToMember(), Qualified(), Recursion(), Reset(), and ResolveTypedefName().

Ptree * Encoding::new_operator = new LeafReserved("new", 3) [static]
 

Definition at line 84 of file encoding.cc.

Referenced by NameToPtree().

Ptree * Encoding::operator_name = new LeafReserved("operator", 8) [static]
 

Definition at line 83 of file encoding.cc.

Referenced by NameToPtree().

Ptree * Encoding::right_angle = new Leaf(">", 1) [static]
 

Definition at line 100 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::right_bracket = new Leaf("]", 1) [static]
 

Definition at line 98 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::right_paren = new Leaf(")", 1) [static]
 

Definition at line 96 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::scope = new Leaf("::", 2) [static]
 

Definition at line 93 of file encoding.cc.

Referenced by TypeInfo::GetQualifiedName2(), MakePtree(), and MakeQname().

Ptree * Encoding::short_t = new LeafSHORT("short", 5) [static]
 

Definition at line 72 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::signed_t = new LeafSIGNED("signed", 6) [static]
 

Definition at line 78 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::star = new Leaf("*", 1) [static]
 

Definition at line 89 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::tilder = new Leaf("~", 1) [static]
 

Definition at line 94 of file encoding.cc.

Referenced by NameToPtree().

Ptree * Encoding::unsigned_t = new LeafUNSIGNED("unsigned", 8) [static]
 

Definition at line 79 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::void_t = new LeafVOID("void", 4) [static]
 

Definition at line 76 of file encoding.cc.

Referenced by MakePtree().

Ptree * Encoding::volatile_t = new LeafVOLATILE("volatile", 8) [static]
 

Definition at line 81 of file encoding.cc.

Referenced by MakePtree().


The documentation for this class was generated from the following files:
Generated on Mon Feb 10 17:35:29 2003 for VFiasco Semantics Compiler by doxygen1.2.15