From 3b41dcbf2ea8189eb001318f502845fca3d73bb2 Mon Sep 17 00:00:00 2001 From: randomdan Date: Sun, 9 Dec 2012 15:53:58 +0000 Subject: Add TypePointer, which creates a new instance of its value pointer on assignment from a registered type name string --- project2/common/typePointer.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 project2/common/typePointer.h 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 > +class TypePointer : public P { + public: + TypePointer() { } + TypePointer(const std::string &) { } + + TypePointer & operator=(const std::string & value) { + P::operator=(GenLoader::createNew(value)); + return *this; + } +}; + +#endif + -- cgit v1.2.3