diff options
Diffstat (limited to 'project2/common/typePointer.h')
-rw-r--r-- | project2/common/typePointer.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/project2/common/typePointer.h b/project2/common/typePointer.h new file mode 100644 index 0000000..95bf28a --- /dev/null +++ b/project2/common/typePointer.h @@ -0,0 +1,17 @@ +#ifndef TYPEPOINTER_H +#define TYPEPOINTER_H + +template <typename T, typename P = typename boost::intrusive_ptr<T>> +class TypePointer : public P { + public: + TypePointer() { } + TypePointer(const std::string &) { } + + TypePointer & operator=(const std::string & value) { + P::operator=(GenLoader<T>::createNew(value)); + return *this; + } +}; + +#endif + |