xosview  1.23
About: xosview is an X Windows based system monitor (cpu, memory, swap and network usage; interrupt and serial activities; load average).
  Fossies Dox: xosview-1.23.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

LList Class Reference

#include <llist.h>

Inheritance diagram for LList:
[legend]
Collaboration diagram for LList:
[legend]

Classes

class  LNode
 

Public Member Functions

 LList (void)
 
 LList (int(*cmp_fun)(void *data, void *key))
 
virtual ~LList (void)
 
int push (void *data)
 
void * pop (void)
 
int enqueue (void *data)
 
void * dequeue (void)
 
int insert (void *data, void *key)
 
void * find (void *key)
 
void * removematch (void *key)
 
int putontop (void *data)
 
void remove (void *data)
 
void * findn (int n)
 
void * operator[] (int n)
 
int index (void *data)
 
void setc (int n, int which=0)
 
void incc (int which=0)
 
void decc (int which=0)
 
void * findc (int which=0)
 
void save (int size, FILE *fp)
 
int restore (int size, FILE *fp)
 
void kill (void)
 
int n (void) const
 

Protected Member Functions

LNodefindnode (void *key)
 
void * deletenode (LNode *ptr)
 
LNodefindnnode (int i)
 

Protected Attributes

int n_
 
LNodetop_
 
LNodebtm_
 
LNodecurr_ [4]
 
int(* cmp_fun_ )(void *data, void *key)
 

Detailed Description

Definition at line 14 of file llist.h.

Constructor & Destructor Documentation

◆ LList() [1/2]

LList::LList ( void  )

Definition at line 16 of file llist.cc.

References btm_, cmp_fun_, curr_, MAXCURR, n_, and top_.

◆ LList() [2/2]

LList::LList ( int(*)(void *data, void *key)  cmp_fun)

Definition at line 25 of file llist.cc.

References btm_, cmp_fun_, curr_, MAXCURR, n_, and top_.

◆ ~LList()

LList::~LList ( void  )
virtual

Definition at line 34 of file llist.cc.

References n_, and pop().

Member Function Documentation

◆ decc()

void LList::decc ( int  which = 0)

Definition at line 224 of file llist.cc.

References curr_, and LList::LNode::prev_.

◆ deletenode()

void * LList::deletenode ( LNode ptr)
protected

Definition at line 288 of file llist.cc.

References btm_, LList::LNode::data_, n_, LList::LNode::next_, LList::LNode::prev_, and top_.

Referenced by remove(), and removematch().

◆ dequeue()

void * LList::dequeue ( void  )

◆ enqueue()

int LList::enqueue ( void *  data)
inline

Definition at line 50 of file llist.h.

References push().

Referenced by PLList< T >::enqueue(), and PSLList< T, K >::enqueue().

◆ find()

void * LList::find ( void *  key)

Definition at line 150 of file llist.cc.

References LList::LNode::data_, and findnode().

Referenced by PSLList< T, K >::find().

◆ findc()

void * LList::findc ( int  which = 0)

Definition at line 228 of file llist.cc.

References curr_.

Referenced by PLList< T >::findc(), PSLList< T, K >::findc(), and save().

◆ findn()

void * LList::findn ( int  n)

Definition at line 195 of file llist.cc.

References LList::LNode::data_, findnnode(), and n().

Referenced by PLList< T >::findn(), PSLList< T, K >::findn(), and operator[]().

◆ findnnode()

LList::LNode * LList::findnnode ( int  i)
protected

Definition at line 326 of file llist.cc.

References btm_, n_, LList::LNode::next_, LList::LNode::prev_, and top_.

Referenced by findn(), and setc().

◆ findnode()

LList::LNode * LList::findnode ( void *  key)
protected

Definition at line 272 of file llist.cc.

References cmp_fun_, LList::LNode::data_, LList::LNode::next_, and top_.

Referenced by find(), and removematch().

◆ incc()

void LList::incc ( int  which = 0)

Definition at line 220 of file llist.cc.

References curr_, and LList::LNode::next_.

Referenced by save().

◆ index()

int LList::index ( void *  data)

Definition at line 203 of file llist.cc.

References LList::LNode::data_, LList::LNode::next_, and top_.

Referenced by PLList< T >::index(), and PSLList< T, K >::index().

◆ insert()

int LList::insert ( void *  data,
void *  key 
)

Definition at line 103 of file llist.cc.

References btm_, cmp_fun_, LList::LNode::data_, n_, LList::LNode::next_, LList::LNode::prev_, and top_.

Referenced by PSLList< T, K >::insert().

◆ kill()

void LList::kill ( void  )

Definition at line 262 of file llist.cc.

◆ n()

int LList::n ( void  ) const
inline

◆ operator[]()

void* LList::operator[] ( int  n)
inline

Definition at line 67 of file llist.h.

References findn(), and n().

◆ pop()

void * LList::pop ( void  )

◆ push()

int LList::push ( void *  data)

Definition at line 39 of file llist.cc.

References btm_, n_, LList::LNode::next_, LList::LNode::prev_, and top_.

Referenced by enqueue(), PLList< T >::push(), PSLList< T, K >::push(), and restore().

◆ putontop()

int LList::putontop ( void *  data)

Definition at line 168 of file llist.cc.

References n_, LList::LNode::next_, LList::LNode::prev_, and top_.

Referenced by PLList< T >::putontop(), and PSLList< T, K >::putontop().

◆ remove()

void LList::remove ( void *  data)

Definition at line 180 of file llist.cc.

References LList::LNode::data_, deletenode(), LList::LNode::next_, and top_.

Referenced by PLList< T >::remove(), and PSLList< T, K >::remove().

◆ removematch()

void * LList::removematch ( void *  key)

Definition at line 158 of file llist.cc.

References deletenode(), and findnode().

Referenced by PSLList< T, K >::removematch().

◆ restore()

int LList::restore ( int  size,
FILE *  fp 
)

Definition at line 248 of file llist.cc.

References push().

◆ save()

void LList::save ( int  size,
FILE *  fp 
)

Definition at line 234 of file llist.cc.

References findc(), incc(), n_, and setc().

◆ setc()

void LList::setc ( int  n,
int  which = 0 
)

Definition at line 216 of file llist.cc.

References curr_, findnnode(), and n().

Referenced by save().

Member Data Documentation

◆ btm_

LNode * LList::btm_
protected

Definition at line 115 of file llist.h.

Referenced by deletenode(), dequeue(), findnnode(), insert(), LList(), pop(), and push().

◆ cmp_fun_

int( * LList::cmp_fun_) (void *data, void *key)
protected

Definition at line 119 of file llist.h.

Referenced by findnode(), insert(), and LList().

◆ curr_

LNode* LList::curr_[4]
protected

Definition at line 116 of file llist.h.

Referenced by decc(), findc(), incc(), LList(), and setc().

◆ n_

int LList::n_
protected

Definition at line 114 of file llist.h.

Referenced by deletenode(), dequeue(), findnnode(), insert(), LList(), n(), pop(), push(), putontop(), save(), and ~LList().

◆ top_

LNode* LList::top_
protected

Definition at line 115 of file llist.h.

Referenced by deletenode(), dequeue(), findnnode(), findnode(), index(), insert(), LList(), pop(), push(), putontop(), and remove().


The documentation for this class was generated from the following files: