NAMD
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
Entry< Elem > Class Template Reference

#include <UniqueSetRaw.h>

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.

38 { clear(); }
void clear(void)
Definition: UniqueSetRaw.h:40

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().

40  {
41  if (used) obj.~Elem();
42  used = 0;
43  }
Elem obj
Definition: UniqueSetRaw.h:36
template<class Elem>
static void Entry< Elem >::clearChain ( Entry< Elem > *  e)
inlinestatic

Definition at line 49 of file UniqueSetRaw.h.

49  {
50  while(e) {
51  Entry<Elem> *tmp = e->next();
52  e->clear();
53  e = tmp;
54  }
55  }
Entry< Elem > * next(void) const
Definition: UniqueSetRaw.h:45
void clear(void)
Definition: UniqueSetRaw.h:40
template<class Elem>
int Entry< Elem >::isUsed ( void  ) const
inline

Definition at line 47 of file UniqueSetRaw.h.

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

47 { 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.

65  {
66  if (!used)
67  new(&obj) Elem;
68  obj = e;
69  used = 1;
70  return (*this);
71  }
Elem obj
Definition: UniqueSetRaw.h:36
template<class Elem>
Entry<Elem>* Entry< Elem >::removeSelf ( void  )
inline

Definition at line 58 of file UniqueSetRaw.h.

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

58  {
59  Entry<Elem> *e = this->next();
60  clear();
61  return (e);
62  }
Entry< Elem > * next(void) const
Definition: UniqueSetRaw.h:45
void clear(void)
Definition: UniqueSetRaw.h:40
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().

74  {
75  this->_next = e;
76  return this;
77  }

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: