/************************************************** * (C) 2007 Christoph Ludwig * * ludwig@fh-worms.de * **************************************************/ #ifndef BOTAN_FREESTORE_H__ #define BOTAN_FREESTORE_H__ #if defined(BOTAN_USE_TR1_SHARED_PTR) #include #elif defined(BOTAN_USE_BOOST_TR1_SHARED_PTR) #include #else #error "Please choose a shared_ptr implementation" #endif namespace Botan { template class BOTAN_DLL SharedPtrConverter { public: typedef std::tr1::shared_ptr SharedPtr; SharedPtrConverter() : ptr() {}; SharedPtrConverter(SharedPtrConverter const& other) : ptr(other.ptr) {}; template SharedPtrConverter(Ptr p) : ptr(p) {}; SharedPtr const& get_ptr() const { return this->ptr; } SharedPtr get_ptr() { return this->ptr; } SharedPtr const& get_shared() const { return this->ptr; } SharedPtr get_shared() { return this->ptr; } private: SharedPtr ptr; }; } #endif