Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

NVListIter Class Reference

#include <NVList.h>

List of all members.

Public Member Functions

 NVListIter ()
 NVListIter (NVList &nvl)
 ~NVListIter ()
void attach (NVList &nvl)
void detach ()
void first ()
int valid ()
void next ()
void data (const char **data, unsigned int *szdata)

Private Attributes

NVListl
NVList::Record * pos
NVList::Record * tail


Detailed Description

Author:
Thomas Gschwind
Bug:
Documentation missing

Definition at line 37 of file NVList.h.


Constructor & Destructor Documentation

NVListIter::NVListIter  )  [inline]
 

Definition at line 42 of file NVList.h.

00042                       {
00043                 l = NULL;
00044                 pos = NULL;
00045         } NVListIter(NVList & nvl) {

NVListIter::NVListIter NVList nvl  )  [inline]
 

Definition at line 45 of file NVList.h.

00045                                    {
00046                 l = &nvl;
00047                 l->lock(NVList::ShrdLock);
00048                 pos = NULL;
00049         }

NVListIter::~NVListIter  )  [inline]
 

Definition at line 50 of file NVList.h.

References detach().

00050                       {
00051                 detach();
00052         }


Member Function Documentation

void NVListIter::attach NVList nvl  )  [inline]
 

Definition at line 54 of file NVList.h.

References detach(), NVcontainer::getdata(), NVcontainer::lock(), and NVlist::o2r().

00054                                   {
00055                 detach();
00056                 l = &nvl;
00057                 l->lock(NVList::ShrdLock);
00058                 pos = NULL;
00059                 tail = l->o2r(l->getdata());
00060         }

void NVListIter::data const char **  data,
unsigned int *  szdata
[inline]
 

Definition at line 84 of file NVList.h.

References NVcontainer::mem_p, and NVlist::r2o().

00084                                                            {
00085                 (*data) = l->mem_p + l->r2o(pos) + sizeof(NVList::Record);
00086                 (*szdata) = pos->szdata;
00087         }

void NVListIter::detach  )  [inline]
 

Definition at line 61 of file NVList.h.

References NVcontainer::lock().

Referenced by attach(), and ~NVListIter().

00061                       {
00062                 if (l) {
00063                         l->lock(NVList::UnLock);
00064                 }
00065                 l = NULL;
00066         }

void NVListIter::first  )  [inline]
 

Definition at line 68 of file NVList.h.

References NVlist::o2r().

00068                      {
00069                 if (l)
00070                         pos = l->o2r(tail->next);
00071         }

void NVListIter::next  )  [inline]
 

Definition at line 75 of file NVList.h.

References NVlist::o2r().

00075                     {
00076                 if (pos) {
00077                         if (pos == tail)
00078                                 pos = 0;
00079                         else
00080                                 pos = l->o2r(pos->next);
00081                 }
00082         }

int NVListIter::valid  )  [inline]
 

Definition at line 72 of file NVList.h.

00072                     {
00073                 return pos != NULL;
00074         }


Member Data Documentation

NVList* NVListIter::l [private]
 

Definition at line 38 of file NVList.h.

NVList::Record* NVListIter::pos [private]
 

Definition at line 39 of file NVList.h.

NVList::Record* NVListIter::tail [private]
 

Definition at line 40 of file NVList.h.


The documentation for this class was generated from the following file:
Generated on Sun Oct 24 21:08:24 2004 for NewsCache by doxygen 1.3.6-20040222