UniqueSet< Elem > Class Template Reference

#include <UniqueSet.h>

List of all members.

Public Member Functions

 UniqueSet (void)
 UniqueSet (int size)
 UniqueSet (const UniqueSet< Elem > &us)
 UniqueSet (const UniqueSet< Elem > *us)
 ~UniqueSet (void)
UniqueSet< Elem > & operator= (const UniqueSet< Elem > &us)
void rehash (void)
int add (const Elem &elem)
int load (const Elem &elem)
int del (const Elem &elem)
int size (void) const
Elem * find (const Elem &elem)
void clear (void)

Friends

class UniqueSetIter< Elem >


Detailed Description

template<class Elem>
class UniqueSet< Elem >

Definition at line 19 of file UniqueSet.h.


Constructor & Destructor Documentation

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

Definition at line 30 of file UniqueSet.h.

00030 { rep = new UniqueSetRaw<Elem>(); rep->refCount = 1; }

template<class Elem>
UniqueSet< Elem >::UniqueSet ( int  size  )  [inline]

Definition at line 32 of file UniqueSet.h.

00032 { rep=new UniqueSetRaw<Elem>(size); rep->refCount=1; }

template<class Elem>
UniqueSet< Elem >::UniqueSet ( const UniqueSet< Elem > &  us  )  [inline]

Definition at line 34 of file UniqueSet.h.

00034                                          {
00035       if (!--rep->refCount) delete rep; rep = us.rep; rep->refCount++; 
00036     }

template<class Elem>
UniqueSet< Elem >::UniqueSet ( const UniqueSet< Elem > *  us  )  [inline]

Definition at line 38 of file UniqueSet.h.

00038                                          { 
00039       if (!--rep->refCount) delete rep; rep = new UniqueSetRaw<Elem>(*us->rep);
00040       rep->refCount = 1;
00041     }

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

Definition at line 43 of file UniqueSet.h.

00043 { if (!--rep->refCount) delete rep; }


Member Function Documentation

template<class Elem>
int UniqueSet< Elem >::add ( const Elem &  elem  )  [inline]

Definition at line 52 of file UniqueSet.h.

Referenced by build12Excls(), build13Excls(), build14Excls(), ProxyMgr::createProxies(), ProxyMgr::createProxy(), ComputeSelfTuples< AnisoElem, aniso, aniso >::initialize(), ComputeHomeTuples< AnisoElem, aniso, aniso >::initialize(), BroadcastMgr::recvBroadcast(), BroadcastMgr::subscribe(), and ParallelIOMgr::wrapCoor().

00052 { return rep->add(elem); }

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

Definition at line 62 of file UniqueSet.h.

Referenced by buildExclusions(), ParallelIOMgr::initialize(), ComputeSelfTuples< AnisoElem, aniso, aniso >::initialize(), ComputeHomeTuples< AnisoElem, aniso, aniso >::initialize(), ParallelIOMgr::recvFinalClusterCoor(), ParallelIOMgr::recvFinalClusterSize(), and ProxyMgr::removeProxies().

00062 { rep->clear(); }

template<class Elem>
int UniqueSet< Elem >::del ( const Elem &  elem  )  [inline]

Definition at line 56 of file UniqueSet.h.

Referenced by ProxyMgr::removeProxy(), and BroadcastMgr::unsubscribe().

00056 { return rep->del(elem); }

template<class Elem>
Elem* UniqueSet< Elem >::find ( const Elem &  elem  )  [inline]

Definition at line 60 of file UniqueSet.h.

Referenced by BroadcastMgr::getbuf(), ComputeHomeTuples< AnisoElem, aniso, aniso >::initialize(), ComputeHomeTuples< AnisoElem, aniso, aniso >::loadTuples(), BroadcastMgr::recvBroadcast(), ParallelIOMgr::recvFinalClusterCoor(), ParallelIOMgr::recvFinalClusterSize(), ProxyMgr::removeProxy(), BroadcastMgr::subscribe(), BroadcastMgr::unsubscribe(), and ParallelIOMgr::wrapCoor().

00060 { return rep->find(elem); }

template<class Elem>
int UniqueSet< Elem >::load ( const Elem &  elem  )  [inline]

Definition at line 54 of file UniqueSet.h.

00054 { return rep->load(elem); }

template<class Elem>
UniqueSet<Elem>& UniqueSet< Elem >::operator= ( const UniqueSet< Elem > &  us  )  [inline]

Definition at line 45 of file UniqueSet.h.

00045                                                            {
00046       if (!--rep->refCount) delete rep; rep = us.rep; rep->refCount++; 
00047       return (*this);
00048     }

template<class Elem>
void UniqueSet< Elem >::rehash ( void   )  [inline]

Definition at line 50 of file UniqueSet.h.

00050 { rep->rehash(); }

template<class Elem>
int UniqueSet< Elem >::size ( void   )  const [inline]

Definition at line 58 of file UniqueSet.h.

Referenced by buildExclusions(), ComputeHomeTuples< AnisoElem, aniso, aniso >::initialize(), BroadcastMgr::recvBroadcast(), BroadcastMgr::unsubscribe(), and ParallelIOMgr::wrapCoor().

00058 { return rep->size(); }


Friends And Related Function Documentation

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

Definition at line 21 of file UniqueSet.h.


The documentation for this class was generated from the following file:
Generated on Wed Nov 22 01:17:23 2017 for NAMD by  doxygen 1.4.7