/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2007.09.13 * ³» ¿ë : ™V ÅÛÇø´ * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #pragma warning( push ) #pragma warning( disable: 4267 ) #pragma warning( disable: 4311 ) #pragma warning( disable: 4996 ) #include #include "Functor.h" using namespace std; /// ™V /// Áߺ¹µÈ ۸¦ Çã¿ëÇÏÁö ¾Ê´Â´Ù. /// Á¦°øµÈ Á¤·Ä ±âÁØ¿¡ µû¶ó¼­ ¿ø¼Ò¸¦ ÀÚµ¿À¸·Î Á¤·ÄÇÑ´Ù. template < class T, class COMPARE = less, class ALLOC = allocator > class tSet { typedef tSet cSelf; typedef _STLP_PRIV _SetTraitsT _SetTraits; typedef _STLP_PRIV _Rb_tree, _SetTraits, ALLOC> cTree; public: typedef typename cTree::iterator cIterator; typedef typename cTree::const_iterator cConstIterator; typedef typename cTree::allocator_type cAllocatorType; private: /// ÀûÈæ Æ®¸® cTree mTree; public: /* tSet(); /// ¸ðµç ¿ø¼ÒµéÀ» Á¦°Å void Clear(); /// ÇØ½Ã Å×À̺íÀÇ ¹öŶ Å©±â¸¦ º¯°æ void Resize( unsigned int hint ); /// µ¿ÀÏÇÑ °ª¸¦ °¡Áö´Â ¿ø¼ÒÀÇ À§Ä¡¸¦ ¸®ÅÏ cIterator Find( const T& val ); cConstIterator Find( const T& val) const; /// °ªÀ» »ðÀÔ /// ½ÇÆÐÇϸé false¸¦ ¸®ÅÏÇÑ´Ù. bool Insert( const T& val ); /// [first, last) ¹üÀ§ÀÇ ¿ø¼Ò¸¦ »ðÀÔ void Insert( const T* first, const T* last ); /// [first, last) ¹üÀ§ÀÇ ¿ø¼Ò¸¦ »ðÀÔ void Insert( cConstIterator first, cConstIterator last ); /// ÇØ´ç °ªÀ» °¡Áö´Â ¿ø¼Ò¸¦ Á¦°Å /// Á¦°ÅµÈ ¿ø¼ÒÀÇ °³¼ö¸¦ ¸®ÅÏÇÑ´Ù. unsigned int Erase( const T& val ); /// posÀ§Ä¡ÀÇ ¿ø¼Ò¸¦ Á¦°Å void Erase( cIterator pos ); /// [first, last) ¹üÀ§ÀÇ ¿ø¼ÒµéÀ» Á¦°Å void Erase( cIterator first, cIterator last ); /// ¹Ýº¹ÀÚ¸¦ ¸®ÅÏ cIterator Begin(); cConstIterator Begin() const; cIterator End(); cConstIterator End() const; /// µ¿ÀÏÇÑ °ªÀ» °¡Áö´Â ¿ø¼ÒÀÇ °³¼ö¸¦ ¸®ÅÏ unsigned int GetCount( const T& val ) const; /// ¿ø¼Ò ¼ö¸¦ ¸®ÅÏ unsigned int GetSize() const; /// ºñ¾îÀÖ´ÂÁö ¿©ºÎ¸¦ ¸®ÅÏ bool IsEmpty() const; */ private: cSelf& operator = ( const cSelf& other ); # include "Set.inl" }; #pragma warning( pop )