aboutsummaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-09-05 16:20:48 +0000
committerMike Buland <eichlan@xagasoft.com>2007-09-05 16:20:48 +0000
commitc4176c4dc172e8b30536a4eb90ae6f6f80f75436 (patch)
treefc49547f3c48ecb400fd9c972ee745beef7e0216 /src/list.h
parenta3cb276a2b048ce94b04e95b3ac87f323e075712 (diff)
downloadlibbu++-c4176c4dc172e8b30536a4eb90ae6f6f80f75436.tar.gz
libbu++-c4176c4dc172e8b30536a4eb90ae6f6f80f75436.tar.bz2
libbu++-c4176c4dc172e8b30536a4eb90ae6f6f80f75436.tar.xz
libbu++-c4176c4dc172e8b30536a4eb90ae6f6f80f75436.zip
This commit has part of an Array class, I'm just not sure I really need it
right now. Unfortunately it doesn't compile right now, if you want to build this version, just delete array. On the other hand, Bu::List now has enqueue/dequeue functions.
Diffstat (limited to '')
-rw-r--r--src/list.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
index 839494d..ec0c195 100644
--- a/src/list.h
+++ b/src/list.h
@@ -91,6 +91,21 @@ namespace Bu
91 nSize = 0; 91 nSize = 0;
92 } 92 }
93 93
94 void enqueue( const value &v )
95 {
96 append( v );
97 }
98
99 value dequeue()
100 {
101 value v = *pFirst->pValue;
102
103 erase( begin() );
104
105 return v;
106 }
107
108
94 /** 109 /**
95 * Append a value to the list. 110 * Append a value to the list.
96 *@param v (const value_type &) The value to append. 111 *@param v (const value_type &) The value to append.