#pragma once /************************************************************************/ /* À¯ÀÏÇÑ Å°°ªÀ» »ý¼ºÇØ Áִ Ŭ·¡½º */ /************************************************************************/ #include class KeyGenerator { public: KeyGenerator(void); ~KeyGenerator(void); private: typedef std::map MAPKEY; typedef MAPKEY::iterator MAPKEY_ITER; private: MAPKEY m_mapKeyPool; DWORD m_dwStartKey; DWORD m_dwEndKey; public: VOID Init( DWORD dwStartKey = 1, DWORD dwEndKey = 100000 ); BOOL AllocKey( DWORD& dwKey ); //À¯ÀÏÇÑ Å°¸¦ ÇÒ´ç ¹Þ´Â´Ù.(Ç®¿¡¼­ ²¨³½´Ù.) BOOL FindKey( DWORD dwKey ); //Ç®¿¡ ÁÖ¾îÁø ۰¡ ÀÖ´ÂÁö ã´Â´Ù. BOOL RestoreKey( DWORD dwKey ); //Ç®¿¡¼­ ÁÖ¾îÁø ۸¦ ÇÒ´çÇÑ´Ù.(Ç®¿¡¼­ Á¦°Å) BOOL FreeKey( DWORD dwKey ); //ÇØ´ç۸¦ ¹Ý³³ÇÏ´Ù(Ç®¿¡ ³Ö´Â´Ù.) };