SNAP Library 2.1, User Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TSStack< TVal > Class Template Reference

#include <ds.h>

List of all members.

Public Member Functions

 TSStack ()
 TSStack (const int &MxVals)
 TSStack (const TSStack &Stack)
 TSStack (TSIn &SIn)
void Save (TSOut &SOut) const
TSStackoperator= (const TSStack &Stack)
bool operator== (const TSStack &Stack) const
const TVal & operator[] (const int &ValN) const
TVal & operator[] (const int &ValN)
bool Empty ()
void Clr (const bool &DoDel=false)
bool IsIn (const TVal &Val) const
int Len ()
TVal & Top ()
const TVal & Top () const
void Push ()
void Push (const TVal &Val)
void Pop ()

Private Attributes

TVec< TVal > ValV

Detailed Description

template<class TVal>
class TSStack< TVal >

Definition at line 3444 of file ds.h.


Constructor & Destructor Documentation

template<class TVal>
TSStack< TVal >::TSStack ( ) [inline]

Definition at line 3448 of file ds.h.

: ValV(){}
template<class TVal>
TSStack< TVal >::TSStack ( const int &  MxVals) [inline]

Definition at line 3449 of file ds.h.

: ValV(MxVals, 0){}
template<class TVal>
TSStack< TVal >::TSStack ( const TSStack< TVal > &  Stack) [inline]

Definition at line 3450 of file ds.h.

: ValV(Stack.ValV){}
template<class TVal>
TSStack< TVal >::TSStack ( TSIn SIn) [inline, explicit]

Definition at line 3451 of file ds.h.

: ValV(SIn){}

Member Function Documentation

template<class TVal>
void TSStack< TVal >::Clr ( const bool &  DoDel = false) [inline]

Definition at line 3461 of file ds.h.

{ValV.Clr(DoDel);}
template<class TVal>
bool TSStack< TVal >::Empty ( ) [inline]

Definition at line 3460 of file ds.h.

{return ValV.Len()==0;}
template<class TVal>
bool TSStack< TVal >::IsIn ( const TVal &  Val) const [inline]

Definition at line 3462 of file ds.h.

{return ValV.IsIn(Val);}
template<class TVal>
int TSStack< TVal >::Len ( ) [inline]

Definition at line 3463 of file ds.h.

{return ValV.Len();}
template<class TVal>
TSStack& TSStack< TVal >::operator= ( const TSStack< TVal > &  Stack) [inline]

Definition at line 3454 of file ds.h.

                                          {
    if (this!=&Stack){ValV=Stack.ValV;} return *this;}
template<class TVal>
bool TSStack< TVal >::operator== ( const TSStack< TVal > &  Stack) const [inline]

Definition at line 3456 of file ds.h.

{return this==&Stack;}
template<class TVal>
const TVal& TSStack< TVal >::operator[] ( const int &  ValN) const [inline]

Definition at line 3457 of file ds.h.

{return ValV[ValV.Len()-ValN-1];}
template<class TVal>
TVal& TSStack< TVal >::operator[] ( const int &  ValN) [inline]

Definition at line 3458 of file ds.h.

{return ValV[ValV.Len()-ValN-1];}
template<class TVal>
void TSStack< TVal >::Pop ( ) [inline]

Definition at line 3468 of file ds.h.

{Assert(0<ValV.Len()); ValV.DelLast();}
template<class TVal>
void TSStack< TVal >::Push ( ) [inline]

Definition at line 3466 of file ds.h.

{ValV.Add();}
template<class TVal>
void TSStack< TVal >::Push ( const TVal &  Val) [inline]

Definition at line 3467 of file ds.h.

{ValV.Add(Val);}
template<class TVal>
void TSStack< TVal >::Save ( TSOut SOut) const [inline]

Definition at line 3452 of file ds.h.

{ValV.Save(SOut);}
template<class TVal>
TVal& TSStack< TVal >::Top ( ) [inline]

Definition at line 3464 of file ds.h.

{Assert(0<ValV.Len()); return ValV.Last();}
template<class TVal>
const TVal& TSStack< TVal >::Top ( ) const [inline]

Definition at line 3465 of file ds.h.

{Assert(0<ValV.Len()); return ValV.Last();}

Member Data Documentation

template<class TVal>
TVec<TVal> TSStack< TVal >::ValV [private]

Definition at line 3446 of file ds.h.


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