#define VN_TRACE_POOL
#include "vn_resource_pool.hpp"


template <>
class ACE_Export VN_Resource_Create<int>
{
  public:
   int *operator () () const throw (resource_error)
   { 
      return new int;
   };
};

template <>
class ACE_Export VN_Resource_Destroy<int>
{
  public:
   void operator () (int *res) const 
   { 
      delete res;
   };
};

int main(int argc, char *argv[])
{
    VN_Resource_Pool<int> *pool = VN_Resource_Pool<int>::open();


    VN_Resource<int> a = pool->get();
    VN_Resource<int> b = pool->get();
    VN_Resource<int> c = pool->get();
    VN_Resource<int> d = pool->get();


    VN_Resource_Pool<int>::close(pool);

    return 0;
}
