]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.cpp
Support const types with Collection properly
[libs/datafile.git] / source / loader.cpp
index cf1a5acae89dc0e4abe7583358e3926ab629277c..0a9f68f249a8d56fe76ab5ba36f5c5bfe76a57e8 100644 (file)
@@ -34,6 +34,18 @@ Loader::~Loader()
                delete i->second;
 }
 
+void Loader::add(const string &k, LoaderAction *a)
+{
+       ActionMap::iterator i=actions.find(k);
+       if(i!=actions.end())
+       {
+               delete i->second;
+               i->second=a;
+       }
+       else
+               actions[k]=a;
+}
+
 void Loader::load_statement(const Statement &st)
 {
        cur_st=&st;