WOscCallbackList Class Reference

#include <WOscMethod.h>

List of all members.

Public Member Functions

 WOscCallbackList (unsigned int initialCapacity=32)
virtual ~WOscCallbackList ()
void Reset ()
void Append (WOscMethod *method)
void Invoke (const WOscMessage *message, const WOscTimeTag &when, const WOscNetReturn *networkReturnAddress)
unsigned int GetCount () const

Detailed Description

Callback list. Gets filled with matching methods from an OSC address space. Adjusts its size as soon its capacity is too low but keeps its size to avoid unnecessary memory allocations.

Definition at line 149 of file WOscMethod.h.


Constructor & Destructor Documentation

WOscCallbackList::WOscCallbackList ( unsigned int  initialCapacity = 32  )  [inline]

Constructor.

Parameters:
initialCapacity Initial (default) capacity of the call-back list.

Definition at line 171 of file WOscMethod.h.

00172     {
00173         m_methods = new WOscMethod*[initialCapacity];
00174         m_capacity = initialCapacity;
00175         m_count = 0;
00176     }

virtual WOscCallbackList::~WOscCallbackList (  )  [inline, virtual]

Destructor.

Definition at line 178 of file WOscMethod.h.

00179     {
00180         delete [] m_methods;
00181     }


Member Function Documentation

void WOscCallbackList::Append ( WOscMethod method  )  [inline]

Append a method to the call-back list.

Definition at line 188 of file WOscMethod.h.

00189     {
00190         if ( m_count >= m_capacity )
00191             Double();
00192         m_methods[m_count++] = method;
00193     }

unsigned int WOscCallbackList::GetCount (  )  const [inline]

Returns the number of items in the call-back list.

Definition at line 203 of file WOscMethod.h.

00203 { return m_count; }

void WOscCallbackList::Reset (  )  [inline]

Just sets the number of callback items to zero but keeps the allocated buffer which is reused the next time items are filled into the call-back list.

Definition at line 186 of file WOscMethod.h.

00186 { m_count = 0; }


The documentation for this class was generated from the following file:
Generated on Sat Oct 23 03:05:59 2010 for WOscLib by  doxygen 1.6.3