ReentrantArray< T > Class Template Reference

Reentrant version of the object array. More...

#include <reentrant_array.h>

Inheritance diagram for ReentrantArray< T >:
zmm::Array< T > zmm::Object

Public Member Functions

 ReentrantArray ()
 ReentrantArray (int capacity)
void append (zmm::Ref< T > el)
void set (zmm::Ref< T > el, int index)
zmm::Ref< T > get (int index)
void remove (int index, int count=1)
void removeUnordered (int index)
void insert (int index, zmm::Ref< T > el)
int size ()
void clear ()
void optimize ()
Object ** getObjectArray ()
void retain ()
void release ()
int getRefCount ()

Static Public Member Functions

static void * operator new (size_t size)
static void operator delete (void *ptr)

Protected Attributes

zmm::Ref< Mutexmutex
ArrayBase base
mt_atomic_t _ref_count

Detailed Description

template<class T>
class ReentrantArray< T >

Reentrant version of the object array.

Definition at line 40 of file reentrant_array.h.


Constructor & Destructor Documentation

template<class T >
ReentrantArray< T >::ReentrantArray (  )  [inline]

Definition at line 43 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

template<class T >
ReentrantArray< T >::ReentrantArray ( int  capacity  )  [inline]

Definition at line 47 of file reentrant_array.h.

References ReentrantArray< T >::mutex.


Member Function Documentation

template<class T >
void ReentrantArray< T >::append ( zmm::Ref< T >  el  )  [inline]

Reimplemented from zmm::Array< T >.

Definition at line 51 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

template<class T >
void ReentrantArray< T >::clear (  )  [inline]

Reimplemented from zmm::Array< T >.

Definition at line 97 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

template<class T >
zmm::Ref<T> ReentrantArray< T >::get ( int  index  )  [inline]

Reimplemented from zmm::Array< T >.

Definition at line 63 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

template<class T>
Object** zmm::Array< T >::getObjectArray (  )  [inline, inherited]

Definition at line 120 of file array.h.

int Object::getRefCount (  )  [inherited]

Definition at line 78 of file object.cc.

References zmm::Object::_ref_count, and atomic_get().

template<class T >
void ReentrantArray< T >::insert ( int  index,
zmm::Ref< T >  el 
) [inline]

Reimplemented from zmm::Array< T >.

Definition at line 83 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

void Object::operator delete ( void *  ptr  )  [static, inherited]

Definition at line 87 of file object.cc.

References FREE.

void * Object::operator new ( size_t  size  )  [static, inherited]

Definition at line 83 of file object.cc.

References MALLOC.

template<class T >
void ReentrantArray< T >::optimize (  )  [inline]

Reimplemented from zmm::Array< T >.

Definition at line 103 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

void Object::release (  )  [inherited]
template<class T >
void ReentrantArray< T >::remove ( int  index,
int  count = 1 
) [inline]

Reimplemented from zmm::Array< T >.

Definition at line 71 of file reentrant_array.h.

References ReentrantArray< T >::mutex, and ReentrantArray< T >::set().

template<class T >
void ReentrantArray< T >::removeUnordered ( int  index  )  [inline]

Reimplemented from zmm::Array< T >.

Definition at line 77 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

void Object::retain (  )  [inherited]
template<class T >
void ReentrantArray< T >::set ( zmm::Ref< T >  el,
int  index 
) [inline]

Reimplemented from zmm::Array< T >.

Definition at line 57 of file reentrant_array.h.

References ReentrantArray< T >::mutex.

Referenced by ReentrantArray< T >::remove().

template<class T >
int ReentrantArray< T >::size (  )  [inline]

Reimplemented from zmm::Array< T >.

Definition at line 89 of file reentrant_array.h.

References ReentrantArray< T >::mutex.


Field Documentation

mt_atomic_t zmm::Object::_ref_count [protected, inherited]
template<class T>
ArrayBase zmm::Array< T >::base [protected, inherited]
template<class T >
zmm::Ref<Mutex> ReentrantArray< T >::mutex [protected]

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

Generated on Fri Mar 26 20:16:57 2010 for MediaTomb by  doxygen 1.6.1