]> git.cworth.org Git - apitrace/blobdiff - trace_model.hpp
Make sure that the size of the compressed length is constant.
[apitrace] / trace_model.hpp
index b3a118ae24cec562568eca53b02f2159046677fd..5c51bba7d06c345a541b8dca59cebe1291d546f6 100644 (file)
@@ -34,7 +34,6 @@
 #include <assert.h>
 
 #include <map>
-#include <list>
 #include <vector>
 #include <iostream>
 
@@ -101,6 +100,8 @@ public:
     virtual const char *toString(void) const;
 
     const Value & operator[](size_t index) const;
+
+    void dump(std::ostream &os, bool color=true);
 };
 
 
@@ -306,7 +307,12 @@ protected:
 };
 
 
-std::ostream & operator <<(std::ostream &os, Value *value);
+inline std::ostream & operator <<(std::ostream &os, Value *value) {
+    if (value) {
+        value->dump(os);
+    }
+    return os;
+}
 
 
 class Call
@@ -328,10 +334,15 @@ public:
         assert(index < args.size());
         return *(args[index]);
     }
+
+    void dump(std::ostream &os, bool color=true);
 };
 
 
-std::ostream & operator <<(std::ostream &os, Call &call);
+inline std::ostream & operator <<(std::ostream &os, Call &call) {
+    call.dump(os);
+    return os;
+}
 
 
 } /* namespace Trace */