diff options
-rw-r--r-- | project2/common/scriptStorage.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/project2/common/scriptStorage.h b/project2/common/scriptStorage.h index 0187cb4..1c5ed1e 100644 --- a/project2/common/scriptStorage.h +++ b/project2/common/scriptStorage.h @@ -38,10 +38,9 @@ class Storer : public virtual IntrusivePtrBase { virtual bool save(boost::intrusive_ptr<IntrusivePtrBase>, const Glib::ustring &) = 0; }; -template <class X, class M, class L> +template <class X, class L> class StorerBase : public Storer { public: - typedef M * Map; boost::intrusive_ptr<IntrusivePtrBase> create(ScriptNodePtr p) const { return LoaderBase::getLoader<L, NotSupported>(p->get_name())->createFrom(p); } @@ -58,13 +57,13 @@ class StorerBase : public Storer { }; template <class X, class M, class L> -class StorerImpl : public StorerBase<X, M, L> { +class StorerImpl : public StorerBase<X, L> { public: StorerImpl(M * m); bool insert(boost::intrusive_ptr<X> O); }; template <class X, class L> -class StorerImpl<X, SINGLE(X), L> : public StorerBase<X, SINGLE(X), L> { +class StorerImpl<X, SINGLE(X), L> : public StorerBase<X, L> { public: typedef SINGLE(X) Obj; StorerImpl(SINGLE(X) * o) : obj(o) @@ -78,7 +77,7 @@ class StorerImpl<X, SINGLE(X), L> : public StorerBase<X, SINGLE(X), L> { Obj * obj; }; template <class X, class L> -class StorerImpl<X, STORAGEOF(X), L> : public StorerBase<X, STORAGEOF(X), L> { +class StorerImpl<X, STORAGEOF(X), L> : public StorerBase<X, L> { public: typedef STORAGEOF(X) Map; StorerImpl(STORAGEOF(X) * m) : map(m) @@ -91,7 +90,7 @@ class StorerImpl<X, STORAGEOF(X), L> : public StorerBase<X, STORAGEOF(X), L> { Map * map; }; template <class X, class L> -class StorerImpl<X, ANONSTORAGEOF(X), L> : public StorerBase<X, ANONSTORAGEOF(X), L> { +class StorerImpl<X, ANONSTORAGEOF(X), L> : public StorerBase<X, L> { public: typedef ANONSTORAGEOF(X) Map; StorerImpl(ANONSTORAGEOF(X) * m) : map(m) @@ -105,7 +104,7 @@ class StorerImpl<X, ANONSTORAGEOF(X), L> : public StorerBase<X, ANONSTORAGEOF(X) Map * map; }; template <class X, class L> -class StorerImpl<X, ANONORDEREDSTORAGEOF(X), L> : public StorerBase<X, ANONORDEREDSTORAGEOF(X), L> { +class StorerImpl<X, ANONORDEREDSTORAGEOF(X), L> : public StorerBase<X, L> { public: typedef ANONORDEREDSTORAGEOF(X) Map; StorerImpl(ANONORDEREDSTORAGEOF(X) * m) : map(m) |