diff options
Diffstat (limited to 'CommonLibs/Vector.h')
-rw-r--r-- | CommonLibs/Vector.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/CommonLibs/Vector.h b/CommonLibs/Vector.h index 62cb6fb..38dc8d5 100644 --- a/CommonLibs/Vector.h +++ b/CommonLibs/Vector.h @@ -32,6 +32,10 @@ #include <string.h> #include <iostream> #include <assert.h> +// We cant use Logger.h in this file... +extern int gVectorDebug; +#define BVDEBUG(msg) if (gVectorDebug) {std::cout << msg;} + /** @@ -59,6 +63,14 @@ template <class T> class Vector { public: + /**** + char *inspect() { + static char buf[100]; + sprintf(buf," mData=%p mStart=%p mEnd=%p ",mData,mStart,mEnd); + return buf; + } + ***/ + /** Return the size of the Vector. */ size_t size() const { @@ -246,6 +258,7 @@ template <class T> class Vector { T* begin() { return mStart; } const T* end() const { return mEnd; } T* end() { return mEnd; } + bool isOwner() { return !!mData; } // Do we own any memory ourselves? //@} |