]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/statement.h
Use a common StatementKey structure for Loader and BinaryParser/Writer
[libs/datafile.git] / source / statement.h
index f9287a51714f56e89719db5c2a3b6871f0889b81..1df34381b38630b97494764e5e6c2fd581c0723a 100644 (file)
@@ -36,6 +36,18 @@ public:
        { return append(v); }
 };
 
+struct StatementKey
+{
+       std::string keyword;
+       std::string signature;
+
+       StatementKey() { }
+       StatementKey(const std::string &k, const std::string &s): keyword(k), signature(s) { }
+
+       bool operator<(const StatementKey &o) const
+       { return keyword<o.keyword || (keyword==o.keyword && signature<o.signature); }
+};
+
 } // namespace DataFile
 } // namespace Msp