

/*!
  @author d金魚
  @since 2004/01/16
	@note
	licence:BSD Licence
*/


#ifndef _dktl_pool__h_
#define _dktl_pool__h_

#include "array_onebyone.h"

namespace dkutil{
/*
template <typename ElementType, typename ARRAY_ONEBYONE_EX = array_onebyone_ex<ElementType> >
class pool : protected ARRAY_ONEBYONE_EX
{

public:
  typedef ElementType element_type;
	typedef element_type DATA_TYPE;
  //typedef UserAllocator user_allocator;
  typedef typename ARRAY_ONEBYONE_EX::size_type size_type;
  typedef typename ARRAY_ONEBYONE_EX::difference_type difference_type;
	typedef ARRAY_ONEBYONE_EX CONTAINER_TYPE;
private:
  pool(const pool &);
  void operator=(const pool &);
	//ARRAY_ONEBYONE_EX mC;
	size_type mInterval;
	size_type mIntervalCounter;

	///intervalが来た時、
	void reserve(size_type num){
		CONTAINER_TYPE::reserve(size);
		typedef CONTAINER_TYPE::DEQUE_TYPE DEQ;
		DEQ &ref = CONTAINER_TYPE::get_deque();
		if(ref.empty())
		{//ちが
			DEQ::iterator it = ref.begin();
			for(size_type i = 0;it != ref.end();it++,i++)
			{
				(*it) = i;
			}
		}else{
		}

	}
public:
	pool(size_type size=512){
		intervals_of(size);
		mIntervalCounter = 0;

	}
  virtual ~pool(){

	}

  //element_type * malloc();
  //void free(element_type * p);
  //bool is_from(element_type * p) const;

  element_type * construct(ElementType &set_data=ElementType()){
		handle h = CONTAINER_TYPE::push(set_data);
		return &CONTAIENR_TYPE::at(h);
	}
  // other construct() functions
  void destroy(element_type * p){


	}
	///メモリ確保間隔を決める
	void intervals_of(size_type inval)
	{
		//if(mIntervalCounter > 0){}
		mInterval = inval;
		//mIntervalCounter
		
	}　
		
};
*/
}//end of dkutil namepsace

#endif //end of include once