]> git.cworth.org Git - apitrace/blobdiff - trace_model.hpp
More efficient call representation.
[apitrace] / trace_model.hpp
index 0bcd1804be03791df0ffbbfa4fb4d76074ad6d2f..9e2ae97ae7b73334278df8b767c1e4c7c3cd702e 100644 (file)
@@ -246,20 +246,27 @@ unsigned long long asUInt(const Value &node);
 double asFloat(const Value &node);
 
 
-typedef std::pair<std::string, Value *> Arg;
-
 class Call
 {
 public:
+   struct Signature {
+      std::string name;
+      std::vector<std::string> arg_names;
+   };
+
    unsigned no;
-   std::string name;
-   std::vector<Arg> args;
+   const Signature *sig;
+   std::vector<Value *> args;
    Value *ret;
 
-   Call() : ret(0) { }
+   Call(Signature *_sig) : sig(_sig), ret(0) { }
+
+   inline const std::string name(void) const {
+       return sig->name;
+   }
 
    inline Value & arg(unsigned index) {
-       return *(args[index].second);
+       return *(args[index]);
    }
 };