]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/binarydict.h
Add binary data format
[libs/datafile.git] / source / binarydict.h
diff --git a/source/binarydict.h b/source/binarydict.h
new file mode 100644 (file)
index 0000000..3b19561
--- /dev/null
@@ -0,0 +1,31 @@
+/* $Id$
+
+This file is part of libmspdatafile
+Copyright © 2006  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_DATAFILE_BINARYDICT_H_
+#define MSP_DATAFILE_BINARYDICT_H_
+
+#include <string>
+
+namespace Msp {
+namespace DataFile {
+
+struct DictEntry
+{
+       std::string keyword;
+       std::string args;
+
+       DictEntry() { }
+       DictEntry(const std::string &k, const std::string &a): keyword(k), args(a) { }
+
+       bool operator<(const DictEntry &o) const
+       { return keyword<o.keyword || (keyword==o.keyword && args<o.args); }
+};
+
+} // namespace DataFile
+} // namespace Msp
+
+#endif