contextor Class Reference

An automatic stack of contexts. More...

#include <contextor.hh>

List of all members.

Public Member Functions

 contextor (int n)
 contextor ()
 ~contextor ()
void set (int n)
int get ()

Static Private Attributes

static int top = 0
static int pile [1024]

Detailed Description

An automatic stack of contexts.

Definition at line 41 of file contextor.hh.


Constructor & Destructor Documentation

contextor::contextor ( int  n  )  [inline]

Definition at line 47 of file contextor.hh.

References pile, and top.

00047 { top=0; pile[top]=n; } // contructor to be called only once at the

contextor::contextor (  )  [inline]

Definition at line 50 of file contextor.hh.

References pile, and top.

00050 { assert(top >= 0 && top < 1023); int n = pile[top++]; pile[top] = n;}

contextor::~contextor (  )  [inline]

Definition at line 51 of file contextor.hh.

References top.

00051 {top--; }


Member Function Documentation

int contextor::get (  )  [inline]

Definition at line 54 of file contextor.hh.

References pile, and top.

00054 { return pile[top]; }

void contextor::set ( int  n  )  [inline]

Definition at line 53 of file contextor.hh.

References pile, and top.

00053 { pile[top] = n; }


Member Data Documentation

int contextor::pile [static, private]

Definition at line 44 of file contextor.hh.

Referenced by contextor(), get(), and set().

int contextor::top = 0 [static, private]

Definition at line 43 of file contextor.hh.

Referenced by contextor(), get(), set(), and ~contextor().


The documentation for this class was generated from the following files:
Generated on Thu Jul 15 15:47:30 2010 for FAUST compiler by  doxygen 1.6.3