From 1ce8e28d5976e1ab30099cb9e6943514497d2980 Mon Sep 17 00:00:00 2001 From: Dejan Jovanović Date: Tue, 4 May 2010 03:42:56 +0000 Subject: Type-checking classes and hooks (not tested yet). --- src/util/bitvector.h | 4 ++++ src/util/exception.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/util') diff --git a/src/util/bitvector.h b/src/util/bitvector.h index 1ab13230b..879680fd7 100644 --- a/src/util/bitvector.h +++ b/src/util/bitvector.h @@ -83,6 +83,10 @@ public: std::string toString(unsigned int base = 2) const { return d_value.get_str(base); } + + unsigned getSize() const { + return d_size; + } }; /** diff --git a/src/util/exception.h b/src/util/exception.h index 862597bae..48dcf1244 100644 --- a/src/util/exception.h +++ b/src/util/exception.h @@ -34,7 +34,8 @@ public: virtual ~Exception() throw() {} // NON-VIRTUAL METHOD for setting and printing the error message void setMessage(const std::string& msg) { d_msg = msg; } - // Printing: feel free to redefine toString(). When inherited, + std::string getMessage() const { return d_msg; } + // Printing: feel free to redefine toString(). When inherited, // it's recommended that this method print the type of exception // before the actual message. virtual std::string toString() const { return d_msg; } -- cgit v1.2.3