]> git.cworth.org Git - apitrace/blobdiff - trace_file.hpp
First working implementation of on-demand-loading of frames/calls.
[apitrace] / trace_file.hpp
index e3d797d3b20d3228f06711cfc9b3d31eef86c7a5..2129d1e388f197b9e2cd7e844ddcf836b3e4cbdc 100644 (file)
@@ -167,6 +167,40 @@ private:
     void *m_gzFile;
 };
 
+inline bool
+operator<(const File::Offset &one, const File::Offset &two)
+{
+    return one.chunk < two.chunk ||
+            (one.chunk == two.chunk && one.offsetInChunk < two.offsetInChunk);
+}
+
+inline bool
+operator==(const File::Offset &one, const File::Offset &two)
+{
+    return one.chunk == two.chunk &&
+            one.offsetInChunk == two.offsetInChunk;
+}
+
+inline bool
+operator>=(const File::Offset &one, const File::Offset &two)
+{
+    return one.chunk > two.chunk ||
+            (one.chunk == two.chunk && one.offsetInChunk >= two.offsetInChunk);
+}
+
+inline bool
+operator>(const File::Offset &one, const File::Offset &two)
+{
+    return two < one;
+}
+
+inline bool
+operator<=(const File::Offset &one, const File::Offset &two)
+{
+    return two >= one;
+}
+
+
 }
 
 #endif