+class Repr : public Value
+{
+public:
+ Repr(Value *human, Value *machine) :
+ humanValue(human),
+ machineValue(machine)
+ {}
+
+ /** Human-readible value */
+ Value *humanValue;
+
+ /** Machine-readible value */
+ Value *machineValue;
+
+ virtual bool toBool(void) const;
+ virtual signed long long toSInt(void) const;
+ virtual unsigned long long toUInt(void) const;
+ virtual float toFloat(void) const;
+ 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;
+
+ void visit(Visitor &visitor);
+};
+
+struct RawStackFrame {
+ Id id;
+ const char * module;
+ const char * function;
+ const char * filename;
+ int linenumber;
+ long long offset;
+ RawStackFrame() :
+ module(0),
+ function(0),
+ filename(0),
+ linenumber(-1),
+ offset(-1)
+ {
+ }
+
+ void dump(std::ostream &os) {
+ os << (this->module ? this->module : "?");
+ if (this->function != NULL) {
+ os << ": " << this->function;
+ }
+ if (this->offset >= 0) {
+ os << "+0x" << std::hex << this->offset << std::dec;
+ }
+ if (this->filename != NULL) {
+ os << ": " << this->filename;
+ if (this->linenumber >= 0) {
+ os << ":" << this->linenumber;
+ }
+ }
+ }
+};
+
+class StackFrame : public RawStackFrame {
+public:
+ ~StackFrame();
+};
+
+typedef std::vector<StackFrame *> Backtrace;
+