3 // ---------------------------------------------------------------------------
 
    9  * Simplified stack class.
 
   10  * It is intended to be used as a replacement of the standard class where
 
   11  * full functionality of <stack> is not required, but it is essential
 
   12  * to have highly portable and effective code.
 
   14  * This file should be used exclusively inside *.cc files.
 
   15  * Usage inside header files can result to a clash with standard <stack>.
 
   17  * @author Evgeni Chernyaev  <Evgueni.Tcherniaev@cern.ch>
 
   26   stack() :  k(0), max_size(20), v(new T[20]) {}
 
   27   ~stack() { delete [] v; }  
 
   29   int    size()    const { return k; }
 
   30   T      top ()    const { return v[k-1]; }
 
   31   T &    top ()          { return v[k-1]; }
 
   38       for (int i=0; i<k; i++) v[i] = w[i];
 
   45 #endif /* HEP_STACK_SRC */