/* -*- C++ -*- */ // $Id$ // Stack.i template ACE_INLINE void ACE_Bounded_Stack::push (const T &new_item) { ACE_TRACE ("ACE_Bounded_Stack::push"); this->stack_[this->top_++] = new_item; } template ACE_INLINE void ACE_Bounded_Stack::pop (T &item) { ACE_TRACE ("ACE_Bounded_Stack::pop"); item = this->stack_[--this->top_]; } template ACE_INLINE void ACE_Bounded_Stack::top (T &item) const { ACE_TRACE ("ACE_Bounded_Stack::top"); item = this->stack_[this->top_ - 1]; } template ACE_INLINE int ACE_Bounded_Stack::is_empty (void) const { ACE_TRACE ("ACE_Bounded_Stack::is_empty"); return this->top_ == 0; } template ACE_INLINE int ACE_Bounded_Stack::is_full (void) const { ACE_TRACE ("ACE_Bounded_Stack::is_full"); return this->top_ >= this->size_; } //---------------------------------------- template ACE_INLINE void ACE_Fixed_Stack::push (const T &new_item) { ACE_TRACE ("ACE_Fixed_Stack::push"); this->stack_[this->top_++] = new_item; } template ACE_INLINE void ACE_Fixed_Stack::pop (T &item) { ACE_TRACE ("ACE_Fixed_Stack::pop"); item = this->stack_[--this->top_]; } template ACE_INLINE void ACE_Fixed_Stack::top (T &item) const { ACE_TRACE ("ACE_Fixed_Stack::top"); item = this->stack_[this->top_ - 1]; } template ACE_INLINE int ACE_Fixed_Stack::is_empty (void) const { ACE_TRACE ("ACE_Fixed_Stack::is_empty"); return this->top_ == 0; } template ACE_INLINE int ACE_Fixed_Stack::is_full (void) const { ACE_TRACE ("ACE_Fixed_Stack::is_full"); return this->top_ >= this->size_; } //---------------------------------------- template ACE_INLINE void ACE_Unbounded_Stack::top (T &item) const { ACE_TRACE ("ACE_Unbounded_Stack::top"); item = this->head_->item_; } template ACE_INLINE int ACE_Unbounded_Stack::is_empty (void) const { ACE_TRACE ("ACE_Unbounded_Stack::is_empty"); return this->head_ == 0; } template ACE_INLINE int ACE_Unbounded_Stack::is_full (void) const { ACE_TRACE ("ACE_Unbounded_Stack::is_full"); return this->last_resort_ == 0; }