Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PSafeSortedList< Base > Class Template Reference

#include <safecoll.h>

Inheritance diagram for PSafeSortedList< Base >:

PSafeColl< PSortedList< Base >, Base > PSafeCollection PObject

List of all members.


Detailed Description

template<class Base>
class PSafeSortedList< Base >

This class defines a thread-safe sorted array of objects. See the PSafeObject class for more details. Especially in regard to enumeration of collections.

Definition at line 945 of file safecoll.h.


Operations

void AllowDeleteObjects (BOOL yes=TRUE)
virtual void DeleteObject (PObject *object) const
virtual BOOL DeleteObjectsToBeRemoved ()
void DisallowDeleteObjects ()
const PMutexGetMutex () const
PINDEX GetSize () const
BOOL IsEmpty () const
virtual void RemoveAll (BOOL synchronous=FALSE)
virtual void SetAutoDeleteObjects ()
virtual BOOL SafeRemove (PSafeObject *obj)
virtual BOOL SafeRemoveAt (PINDEX idx)

Comparison functions

virtual Comparison Compare (const PObject &obj) const
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator>= (const PObject &obj) const
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
virtual BOOL InternalIsDescendant (const char *clsName) const
BOOL IsClass (const char *cls) const
static const char * Class ()

I/O functions

virtual void PrintOn (ostream &strm) const
virtual void ReadFrom (istream &strm)
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

Public Member Functions

Operations
virtual PSafePtr< Base > Append (Base *obj, PSafetyMode mode=PSafeReference)
virtual PSafePtr< Base > FindWithLock (const Base &value, PSafetyMode mode=PSafeReadWrite)
virtual PSafePtr< Base > GetAt (PINDEX idx, PSafetyMode mode=PSafeReadWrite)
virtual BOOL Remove (Base *obj)
virtual BOOL RemoveAt (PINDEX idx)
Miscellaneous functions
virtual PObjectClone () const
virtual PINDEX HashFunction () const

Protected Member Functions

 PDECLARE_NOTIFIER (PTimer, PSafeCollection, DeleteObjectsTimeout)
void SafeRemoveObject (PSafeObject *obj)

Protected Attributes

PCollectioncollection
PMutex collectionMutex
BOOL deleteObjects
PTimer deleteObjectsTimer
PMutex removalMutex
PList< PSafeObjecttoBeRemoved

Friends

class PSafePtrBase

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

Generated by  Doxygen 1.6.0   Back to index