]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loaderaction.h
Introduce the concept of future objects
[libs/datafile.git] / source / loaderaction.h
index 22fb82ad13691209b484383fa421c48fd188b024..afca01e9ba3b478d95bd320e550f0cf7fbf08fff 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef MSP_DATAFILE_LOADERACTION_H_
 #define MSP_DATAFILE_LOADERACTION_H_
 
-#include "except.h"
 #include "statement.h"
 
 namespace Msp {
@@ -276,9 +275,7 @@ public:
        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>());
+               ldr.get_object().*ptr0 = &ldr.get_collection().template get<T0>(st.args[0].get<std::string>());
        }
 
        virtual std::string get_signature() const