UGDK  0.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
abstractloader.h
Go to the documentation of this file.
1 
2 #ifndef UGDK_UTIL_GDD_ABSTRACTLOADER_H_
3 #define UGDK_UTIL_GDD_ABSTRACTLOADER_H_
4 
5 namespace ugdk {
6 
7 namespace gdd {
8 
9 template <class T>
11 
12 template <class T>
14 
15  public:
16 
17  virtual ~AbstractLoader() { delete protocol_; }
18 
19  virtual T* Load(const std::string& gddfile_path) = 0;
20 
21  virtual void newData(T* new_data) = 0;
22 
23  virtual T*& data() = 0;
24 
25  virtual void cleanData() = 0;
26 
27  protected:
28 
29  DescriptionProtocol<T>* protocol() const { return protocol_; }
30 
32  protocol_->set_loader(this);
33  }
34 
35  private:
36 
37  DescriptionProtocol<T> *protocol_;
38 
39 };
40 
41 } /* namespace gdd */
42 
43 } /* namespace ugdk */
44 
45 #endif /* UGDK_UTIL_GDD_ABSTRACTLOADER_H_ */