diff -r e8a3f2617a3e -r f9e21a2ac558 sourcehook/sh_list.h --- a/sourcehook/sh_list.h Sun Oct 07 03:12:19 2007 +0000 +++ b/sourcehook/sh_list.h Sun Oct 07 22:10:07 2007 +0000 @@ -97,6 +97,12 @@ m_Size++; } + + void push_front(const T &obj) + { + insert(begin(), obj); + } + size_t size() const { return m_Size; @@ -122,6 +128,10 @@ { return (m_Size == 0); } + T & front() + { + return m_Head->next->obj; + } T & back() { return m_Head->prev->obj; @@ -207,6 +217,11 @@ { return (m_This == where.m_This); } + + operator bool() + { + return m_This != NULL; + } private: ListNode *m_This; };