Piethon  1.0
A Python-like interpreter using flex and bison.
Public Member Functions | List of all members
FunctionTable Class Reference

#include <functionTable.h>

Collaboration diagram for FunctionTable:
Collaboration graph

Public Member Functions

Function *& operator[] (const string &)
 
Functionoperator[] (const string &) const
 

Detailed Description

Definition at line 12 of file functionTable.h.

Member Function Documentation

◆ operator[]() [1/2]

Function *& FunctionTable::operator[] ( const string &  ident)

Definition at line 13 of file functionTable.cpp.

13  {
14  // return reference to entry in funcTable
15  return funcTable[ident];
16 }

◆ operator[]() [2/2]

Function * FunctionTable::operator[] ( const string &  ident) const

Definition at line 4 of file functionTable.cpp.

4  {
5  // ensure function is defined
6  if (funcTable.count(ident) == 0) {
7  throw UndefinedFunction();
8  }
9  // return value
10  return funcTable.find(ident)->second;
11 }

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