]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.cpp
More flexible framework for loading substatements with custom loaders
[libs/datafile.git] / source / loader.cpp
index 284588afde9fba1462d4808d9891f49569b9c650..e4993868ab3adfac95c385ef7c5d9e6a3c638a1c 100644 (file)
@@ -36,6 +36,14 @@ Loader::~Loader()
                delete i->second;
 }
 
+void Loader::load_sub_with(Loader &ldr)
+{
+       if(!cur_st)
+               throw InvalidState("load_sub called without current statement");
+
+       ldr.load(*cur_st);
+}
+
 void Loader::add(const string &k, LoaderAction *a)
 {
        ActionMap::iterator i=actions.find(k);