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

Template_defn_scope Class Reference

Dummy scope for template definitions. More...

#include <template_i.h>

Inheritance diagram for Template_defn_scope:

Inheritance graph
[legend]
Collaboration diagram for Template_defn_scope:

Collaboration graph
[legend]
List of all members.

Public Methods

 Template_defn_scope (Abstract_scope *parent, const Template_thing *arg_names, const Type_vector *arg_types, std::string class_name, std::string tpl_name)
 ~Template_defn_scope ()
Symbol_pair lookup_here (std::string name, bool for_decl)
 Look up a symbol in this scope. More...

Variable_symboladd_variable (Storage_class_specifier s, Type t, Ptree *n, Ptree *i, Ptree *b)
 Add a variable. More...

Function_signatureadd_function_decl (Storage_class_specifier s, Function_specifier_set f, Type t, const Symbol_name &n)
 Declare a function. More...

void add_function_implementation (Function_signature *sig, Block_scope *sco, Ptree *b, Ptree *i)
 Add function implementation. More...

void add_symbol (std::string name, Symbol *s)
 Add another symbol (nested type, ...). More...

std::string get_unique_name (std::string name)
 Get unique naming prefix. More...

Type get_this_type () const
 Get type of "*this". More...


Private Attributes

std::map< std::string, Typedef_symbol * > things

Detailed Description

Dummy scope for template definitions.

This is just a dummy class which is never directly handed to Annotator; hence we can get away with this many dummy functions. Its only raison d'etre is that template args can be found.

Definition at line 42 of file template_i.h.


Constructor & Destructor Documentation

Template_defn_scope::Template_defn_scope Abstract_scope   parent,
const Template_thing   arg_names,
const Type_vector   arg_types,
std::string    class_name,
std::string    tpl_name
 

Definition at line 115 of file template.cc.

References Template_thing::get_num_args(), Template_thing::get_type_arg(), things, and Type_vector.

Template_defn_scope::~Template_defn_scope  
 

Definition at line 133 of file template.cc.


Member Function Documentation

Function_signature * Template_defn_scope::add_function_decl Storage_class_specifier    s,
Function_specifier_set    f,
Type    t,
const Symbol_name   n
[virtual]
 

Declare a function.

Returns the declared signature.

Implements Abstract_scope.

Definition at line 157 of file template.cc.

References Abstract_scope::add_function_decl(), Function_specifier_set, Abstract_scope::get_parent(), and Storage_class_specifier.

void Template_defn_scope::add_function_implementation Function_signature   sig,
Block_scope   sco,
Ptree   b,
Ptree   i
[virtual]
 

Add function implementation.

Implements Abstract_scope.

Definition at line 166 of file template.cc.

References Abstract_scope::add_function_implementation(), and Abstract_scope::get_parent().

void Template_defn_scope::add_symbol std::string    name,
Symbol   s
[virtual]
 

Add another symbol (nested type, ...).

Implements Abstract_scope.

Definition at line 174 of file template.cc.

Variable_symbol * Template_defn_scope::add_variable Storage_class_specifier    s,
Type    t,
Ptree   n,
Ptree   i,
Ptree   b
[virtual]
 

Add a variable.

Returns variable symbol if this is a definition of a variable which must appear in output.

Implements Abstract_scope.

Definition at line 148 of file template.cc.

References Storage_class_specifier.

Type Template_defn_scope::get_this_type   const [virtual]
 

Get type of "*this".

Implements Abstract_scope.

Definition at line 190 of file template.cc.

std::string Template_defn_scope::get_unique_name std::string    name [virtual]
 

Get unique naming prefix.

I hope to never need this function

Implements Abstract_scope.

Definition at line 182 of file template.cc.

Symbol_pair Template_defn_scope::lookup_here std::string    name,
bool    for_decl
[virtual]
 

Look up a symbol in this scope.

Parameters:
for_decl=true  this is a declaration, don't scan bases or using

Implements Abstract_scope.

Definition at line 139 of file template.cc.

References things.


Member Data Documentation

std::map<std::string, Typedef_symbol*> Template_defn_scope::things [private]
 

Definition at line 43 of file template_i.h.

Referenced by lookup_here(), and Template_defn_scope().


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