Entry< Elem > Class Template Reference

#include <UniqueSetRaw.h>

List of all members.

Public Member Functions

 ~Entry (void)
void clear (void)
Entry< Elem > * next (void) const
int isUsed (void) const
Entry< Elem > * removeSelf (void)
Entry< Elem > & operator= (const Elem &e)
Entry< Elem > * setNext (Entry< Elem > *e)

Static Public Member Functions

static void clearChain (Entry< Elem > *e)

Public Attributes

Elem obj

Friends

class UniqueSetRaw< Elem >
class EntryGlob< Elem >

Detailed Description

template<class Elem>
class Entry< Elem >

Definition at line 23 of file UniqueSetRaw.h.


Constructor & Destructor Documentation

template<class Elem>
Entry< Elem >::~Entry ( void   )  [inline]

Definition at line 38 of file UniqueSetRaw.h.

00038 { clear(); }


Member Function Documentation

template<class Elem>
void Entry< Elem >::clear ( void   )  [inline]

Definition at line 40 of file UniqueSetRaw.h.

Referenced by Entry< ProxyElem >::clearChain(), Entry< ProxyElem >::removeSelf(), and Entry< ProxyElem >::~Entry().

00040                      { 
00041       if (used) obj.~Elem();
00042       used = 0;
00043     }

template<class Elem>
static void Entry< Elem >::clearChain ( Entry< Elem > *  e  )  [inline, static]

Definition at line 49 of file UniqueSetRaw.h.

00049                                            {
00050       while(e) {
00051         Entry<Elem> *tmp = e->next();
00052         e->clear();
00053         e = tmp;
00054       }
00055     }

template<class Elem>
int Entry< Elem >::isUsed ( void   )  const [inline]

Definition at line 47 of file UniqueSetRaw.h.

Referenced by UniqueSetIter< T >::gotoUsed().

00047 { return used; }

template<class Elem>
Entry<Elem>* Entry< Elem >::next ( void   )  const [inline]
template<class Elem>
Entry<Elem>& Entry< Elem >::operator= ( const Elem &  e  )  [inline]

Definition at line 65 of file UniqueSetRaw.h.

00065                                           {
00066       if (!used)
00067         new(&obj) Elem;
00068       obj = e;
00069       used = 1;
00070       return (*this);
00071     }

template<class Elem>
Entry<Elem>* Entry< Elem >::removeSelf ( void   )  [inline]

Definition at line 58 of file UniqueSetRaw.h.

Referenced by UniqueSetRaw< ProxyElem >::del().

00058                                   {
00059       Entry<Elem> *e = this->next();
00060       clear();
00061       return (e);
00062     }

template<class Elem>
Entry<Elem>* Entry< Elem >::setNext ( Entry< Elem > *  e  )  [inline]

Definition at line 74 of file UniqueSetRaw.h.

Referenced by UniqueSetRaw< ProxyElem >::add(), UniqueSetRaw< ProxyElem >::del(), and UniqueSetRaw< ProxyElem >::load().

00074                                          {
00075       this->_next = e;
00076       return this;
00077     }


Friends And Related Function Documentation

template<class Elem>
friend class EntryGlob< Elem > [friend]

Definition at line 26 of file UniqueSetRaw.h.

template<class Elem>
friend class UniqueSetRaw< Elem > [friend]

Definition at line 25 of file UniqueSetRaw.h.


Member Data Documentation

template<class Elem>
Elem Entry< Elem >::obj

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

Generated on 8 Dec 2019 for NAMD by  doxygen 1.6.1