const Statement *cur_st;
bool sub_loaded;
protected:
- bool allow_pointer_reload;
bool check_sub_loads;
Loader();
public:
virtual ~Loader();
- bool is_pointer_reload_allowed() const { return allow_pointer_reload; }
-
/** Loads statements from a parser. */
void load(Parser &p);
virtual void execute(Loader &l, const Statement &st) const
{
typename L::Loader &ldr = dynamic_cast<typename L::Loader &>(l);
- if(!ldr.is_pointer_reload_allowed() && ldr.get_object().*ptr0)
- throw InvalidState("The pointer has already been loaded");
ldr.get_object().*ptr0 = ldr.get_collection().template get<T0>(st.args[0].get<std::string>());
}