UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
resourcecontainer.h
Go to the documentation of this file.
1 #ifndef UGDK_BASE_RESOURCECONTAINER_H_
2 #define UGDK_BASE_RESOURCECONTAINER_H_
3 
4 #include <string>
5 
6 namespace ugdk {
7 namespace base {
8 
10  protected: ResourceContainerBase() {}
11  public: virtual ~ResourceContainerBase() {}
12 };
13 
14 template <class T>
16  protected: ResourceContainer() {}
17  public:
18  virtual ~ResourceContainer() {}
19 
20  virtual void Insert( const std::string& tag, T val) = 0;
21  virtual void Replace(const std::string& tag, T val) = 0;
22  virtual bool Exists( const std::string& tag) const = 0;
23  virtual T& Find( const std::string& tag) = 0;
24  virtual T& Load( const std::string& filepath, const std::string& tag) = 0;
25 };
26 
27 template <class T>
29  protected: ResourceContainer() {}
30  public:
31  virtual ~ResourceContainer() {}
32 
33  virtual void Insert( const std::string& tag, T* val) = 0;
34  virtual void Replace(const std::string& tag, T* val) = 0;
35  virtual bool Exists( const std::string& tag) const = 0;
36  virtual T* Find( const std::string& tag) = 0;
37  virtual T* Load( const std::string& filepath, const std::string& tag) = 0;
38 };
39 
40 } // namespace base
41 } // namespace ugdk
42 
43 #endif // UGDK_BASE_RESOURCECONTAINER_H_
44