virtual double toDouble(void) const;
virtual void *toPointer(void) const;
+ virtual void *toPointer(bool bind);
virtual unsigned long long toUIntPtr(void) const;
virtual const char *toString(void) const;
const Value & operator[](size_t index) const;
+
+ void dump(std::ostream &os, bool color=true);
};
virtual float toFloat(void) const;
virtual double toDouble(void) const;
void *toPointer(void) const;
+ void *toPointer(bool bind);
unsigned long long toUIntPtr(void) const;
const char *toString(void) const;
void visit(Visitor &visitor);
Blob(size_t _size) {
size = _size;
buf = new char[_size];
+ bound = false;
}
~Blob();
bool toBool(void) const;
void *toPointer(void) const;
+ void *toPointer(bool bind);
void visit(Visitor &visitor);
size_t size;
char *buf;
+ bool bound;
};
bool toBool(void) const;
void *toPointer(void) const;
+ void *toPointer(bool bind);
unsigned long long toUIntPtr(void) const;
void visit(Visitor &visitor);
};
};
-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
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 */