aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/Vector.h
diff options
context:
space:
mode:
authorkurtis.heimerl <kurtis.heimerl@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2013-05-31 21:47:25 +0000
committerkurtis.heimerl <kurtis.heimerl@19bc5d8c-e614-43d4-8b26-e1612bc8e597>2013-05-31 21:47:25 +0000
commit5a87247fdf2768a6408e0b87c210cebda85bc996 (patch)
treeb538e7e42f8a7ba6c53e1b0bc22bfb359b1e0ef9 /CommonLibs/Vector.h
parentbec41039bf2ec07c04a6e8b0b586b085ab9cd74c (diff)
syncing commonlibs with Many thanks to Michael Iedema for these patches, makes config a lot better.
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5655 19bc5d8c-e614-43d4-8b26-e1612bc8e597
Diffstat (limited to 'CommonLibs/Vector.h')
-rw-r--r--CommonLibs/Vector.h13
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?
//@}