]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/loader.h
Use a common StatementKey structure for Loader and BinaryParser/Writer
[libs/datafile.git] / source / loader.h
index dcbbd5dcda202bcd1e1af4f6da7c9f52df2a0f20..bb1292cc7b3c2740adc14a6c596bde54c4a59678 100644 (file)
@@ -35,17 +35,7 @@ See also classes ObjectLoader and CollectionObjectLoader in objectloader.h.
 class Loader
 {
 private:
-       struct ActionKey
-       {
-               std::string keyword;
-               std::string signature;
-
-               ActionKey(const std::string &, const std::string &);
-
-               bool operator<(const ActionKey &) const;
-       };
-
-       typedef std::map<ActionKey, LoaderAction *> ActionMap;
+       typedef std::map<StatementKey, LoaderAction *> ActionMap;
 
        ActionMap actions;
        const Statement *cur_st;
@@ -136,8 +126,8 @@ protected:
        void add_auxiliary_loader(Loader &);
 
 private:
-       bool has_action(const ActionKey &) const;
-       LoaderAction *find_action(const ActionKey &) const;
+       bool has_action(const StatementKey &) const;
+       LoaderAction *find_action(const StatementKey &) const;
 
 protected:
        /** Returns the source of the statement being processed.  This can be used