Member Avatar

Hi Daniweb, I've been programming a base class resource manager for a game I'm working on, and so read up on boost's shared_ptr and weak_ptr. I'm done with it and it works and I would really appreciate some feedback on my choice of implementation and design. Am I using the smart pointers in a correct way? Am I overcomplicating things? etc... Here's the code: [CODE] #ifndef RESOURCE_MANAGER_HPP #define RESOURCE_MANAGER_HPP #include <map> #include <string> #include <iostream> #include <stdexcept> #include <boost/smart_ptr/shared_ptr.hpp> #include <boost/smart_ptr/weak_ptr.hpp> template<typename T> class ResourceManager { // Type definitions protected: typedef boost::shared_ptr<T> Resource; // Not to be used by users …

+0 forum 0

The End.