LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
parse::MetavarMap< Data > Class Template Reference

A generic map of metavariables. More...

#include <metavar-map.hh>

Inheritance diagram for parse::MetavarMap< Data >:
Collaboration diagram for parse::MetavarMap< Data >:

Public Member Functions

 MetavarMap (const std::string &name)
 Build a map of metavariables of kind name.
virtual ~MetavarMap ()
std::string show (unsigned key)

Protected Types

typedef misc::map< unsigned,
Data * > 
map_type
 Metavariables.

Protected Member Functions

virtual std::string append_ (unsigned &key, Data *data)
 Append a metavariable to the map.
virtual Data * take_ (unsigned key)
 Extract a metavariable.

Protected Attributes

const std::string name_
 Name of the kind of variable.
map_type map_

Detailed Description

template<typename Data>
class parse::MetavarMap< Data >

A generic map of metavariables.

Member Typedef Documentation

template<typename Data>
typedef misc::map<unsigned, Data*> parse::MetavarMap< Data >::map_type
protected

Metavariables.

Constructor & Destructor Documentation

template<typename Data >
parse::MetavarMap< Data >::MetavarMap ( const std::string &  name)

Build a map of metavariables of kind name.

template<typename Data >
parse::MetavarMap< Data >::~MetavarMap ( )
virtual

References assertion.

Member Function Documentation

template<typename Data>
std::string parse::MetavarMap< Data >::append_ ( unsigned &  key,
Data *  data 
)
protectedvirtual

Append a metavariable to the map.

template<typename Data >
std::string parse::MetavarMap< Data >::show ( unsigned  key)

Generate a (concrete syntax) Tiger statement for metavariable number key (of kind Data).

template<typename Data >
Data * parse::MetavarMap< Data >::take_ ( unsigned  key)
protectedvirtual

Extract a metavariable.

Member Data Documentation

template<typename Data>
map_type parse::MetavarMap< Data >::map_
protected
template<typename Data>
const std::string parse::MetavarMap< Data >::name_
protected

Name of the kind of variable.


The documentation for this class was generated from the following files: