summaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-06-06 21:18:15 +0000
committerMike Buland <eichlan@xagasoft.com>2007-06-06 21:18:15 +0000
commit3c846af2fa8e4693c190c5131ec87d967eb58b3e (patch)
tree46ce9a7ae6f83d1dccd79a751a5340cca2eb05bc /src/list.h
parent3144bd7deb950de0cb80e2215c1545bdf8fc81e9 (diff)
downloadlibbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.tar.gz
libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.tar.bz2
libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.tar.xz
libbu++-3c846af2fa8e4693c190c5131ec87d967eb58b3e.zip
The TafReader is more general and much nicer, and about to actually construct
nodes, that part will be exciting. I also fixed some stuff and added some new functions to List, it now has first() and last() which work just like std::list front() and back(), I may add compatibility functions later...
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
index ea67f45..4131987 100644
--- a/src/list.h
+++ b/src/list.h
@@ -344,6 +344,26 @@ namespace Bu
344 { 344 {
345 return nSize; 345 return nSize;
346 } 346 }
347
348 value &first()
349 {
350 return *pFirst->pValue;
351 }
352
353 const value &first() const
354 {
355 return *pFirst->pValue;
356 }
357
358 value &last()
359 {
360 return *pLast->pValue;
361 }
362
363 const value &last() const
364 {
365 return *pLast->pValue;
366 }
347 367
348 private: 368 private:
349 Link *pFirst; 369 Link *pFirst;