-template<typename L, typename S>
-class SubLoader0: public LoaderAction<L>
-{
-public:
- typedef typename S::ObjectType &(L::*FuncType)();
-
- SubLoader0(FuncType f): func(f) { }
- void execute(L &l, const Statement &st) const
- {
- if(st.args.size()!=0) throw TypeError("Wrong number of arguments");
- typename S::ObjectType &obj=(l.*func)();
- S sl(obj);
- sl.load(st);
- }
-private:
- FuncType func;
-};
-
-template<typename L, typename S, typename A0>
-class SubLoader1: public LoaderAction<L>
-{
-public:
- typedef typename S::ObjectType &(L::*FuncType)(A0);
-
- SubLoader1(FuncType f): func(f) { }
- void execute(L &l, const Statement &st) const
- {
- if(st.args.size()!=1) throw TypeError("Wrong number of arguments");
- typename S::ObjectType &obj=(l.*func)(st.args[0].get<A0>());
- S sl(obj);
- sl.load(st);
- }
-private:
- FuncType func;
-};
-
-template<typename C, typename L>