/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.09.15 * ³» ¿ë : std::vector¸¦ °¨½Ñ ½ºÅà ÅÛÇø´ * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #pragma warning( push ) //#pragma warning( disable: 4996 ) #pragma warning( disable: 4267 ) #include using namespace std; template class tStack; /// ½ºÅà /// Çѹø ´Ã¾î³­ ¿ë·®(¼ö¿ë°¡´ÉÇÑ ÃÖ´ë ¿ø¼Ò ¼ö)Àº ÁÙ¾îµéÁö ¾Ê´Â´Ù. template class tStack : protected vector { typedef tStack cSelf; public: /* tStack(); explicit tStack( unsigned int capacity ); /// ¸ðµç ¿ø¼Ò¸¦ Á¦°Å void Clear(); /// ¿ë·®À» ¼³Á¤ void Reserve( unsigned int capacity ); /// ¿ø¼Ò¸¦ ¸¶Áö¸·¿¡ Ãß°¡ /// ¿ë·®À» ³Ñ¾î¼­¸é false¸¦ ¸®ÅÏÇÑ´Ù. bool PushBack( const T& val ); /// ¸¶Áö¸· ¿ø¼Ò¸¦ Á¦°Å /// ¿ø¼Ò°¡ Çϳªµµ ¾ø´Â °æ¿ì false¸¦ ¸®ÅÏÇÑ´Ù. bool PopBack(); /// ¸¶Áö¸· ¿ø¼Ò¸¦ ¸®ÅÏ T& Back(); const T& Back() const; /// ¿ø¼Ò ¼ö¸¦ ¸®ÅÏ unsigned int GetSize() const; /// ¿ë·®À» ¸®ÅÏ unsigned int GetCapacity() const; /// ºñ¾îÀÖ´ÂÁö ¿©ºÎ¸¦ ¸®ÅÏ bool IsEmpty() const; /// ¿ë·®ÀÌ ´Ù á´ÂÁö ¿©ºÎ¸¦ ¸®ÅÏ bool IsFull() const; /// ÁÖÀÇ: ºÎÇϸ¦ ¾ß±âÇÒ ¼ö ÀÖÀ¸¹Ç·Î Á¶½ÉÇØ¼­ »ç¿ëÇÑ´Ù. tStack( const cSelf& other ); */ private: cSelf& operator = ( const cSelf& other ); # include "Stack.inl" }; #pragma warning( pop )