diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-09-05 16:20:48 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-09-05 16:20:48 +0000 |
commit | c4176c4dc172e8b30536a4eb90ae6f6f80f75436 (patch) | |
tree | fc49547f3c48ecb400fd9c972ee745beef7e0216 /src/list.h | |
parent | a3cb276a2b048ce94b04e95b3ac87f323e075712 (diff) | |
download | libbu++-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 'src/list.h')
-rw-r--r-- | src/list.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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. |