PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | List of all members
PSafeArray< Base > Class Template Reference

This class defines a thread-safe array of objects. More...

`#include <safecoll.h>`

Inheritance diagram for PSafeArray< Base >:
[legend]
Collaboration diagram for PSafeArray< Base >:
[legend]

## Public Types
typedef PSafePtr< Base > | value_type

## Additional Inherited Members
Public Member Functions inherited from PSafeColl< PArray< Base >, Base >
| PSafeColl ()
| Create a safe list collection wrapper around the real collection. More...
| PSafeColl (const PSafeColl &other)
| Copy constructor for safe collection. More...
PSafeColl & | operator= (const PSafeColl &other)
| Assign one safe collection to another. More...
virtual PSafePtr< Base > | Append (Base *obj, PSafetyMode mode=PSafeReference)
| Add an object to the collection. More...
virtual PBoolean | Remove (Base *obj)
| Remove an object to the collection. More...
virtual PBoolean | RemoveAt (PINDEX idx)
| Remove an object to the collection. More...
virtual PSafePtr< Base > | GetAt (PINDEX idx, PSafetyMode mode=PSafeReadWrite)
| Get the instance in the collection of the index. More...
virtual PSafePtr< Base > | FindWithLock (const Base &value, PSafetyMode mode=PSafeReadWrite)
| Find the instance in the collection of an object with the same value. More...
Static Public Member Functions inherited from PObject
static const char * | Class ()
| Get the name of the class as a C string. More...
static __inline const PObject * | PTraceObjectInstance (const char *)
static __inline const PObject * | PTraceObjectInstance (const PObject *obj)
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
| Internal function caled from CompareObjectMemoryDirect() More...
Protected Member Functions inherited from PSafeCollection
void | CopySafeCollection (PCollection *other)
void | CopySafeDictionary (PAbstractDictionary *other)
bool | SafeAddObject (PSafeObject *obj, PSafeObject *old)
void | SafeRemoveObject (PSafeObject *obj)
| PDECLARE_NOTIFIER (PTimer, PSafeCollection, DeleteObjectsTimeout)
virtual PBoolean | SafeRemove (PSafeObject *obj)
| Remove an object to the collection. More...
virtual PBoolean | SafeRemoveAt (PINDEX idx)
| Remove an object to the collection. More...
Protected Attributes inherited from PSafeCollection
PCollection * | collection
PMutex | collectionMutex
bool | deleteObjects
PList< PSafeObject > | toBeRemoved
PMutex | removalMutex
PTimer * | m_deleteObjectsTimer
Friends inherited from PObject

## Detailed Description

### template<class Base>
class PSafeArray< Base >

This class defines a thread-safe array of objects.

See the PSafeObject class for more details. Especially in regard to enumeration of collections.

## Member Typedef Documentation

template<class Base >

typedef PSafePtr<Base> PSafeArray< Base >::value_type

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

- safecoll.h