Support Forum       G3D Web Page     
Classes | Namespaces | Macros
Queue.h File Reference

G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License. More...

Classes

class  G3D::Queue< T >
 
Dynamic queue that uses a circular buffer for performance. More...
 

Namespaces

 G3D
 

Macros

#define FIND_ENDS
 
Locate the indices of the break between of the two sections of the circular queue. More...
 
#define G3D_base_Queue_h
 

Detailed Description

G3D Innovation Engine http://casual-effects.com/g3d Copyright 2000-2019, Morgan McGuire All rights reserved Available under the BSD License.

Macro Definition Documentation

◆ FIND_ENDS

#define FIND_ENDS
Value:
int firstEnd = head + num;\
int secondEnd = 0;\
if (firstEnd > numAllocated) {\
secondEnd = firstEnd - numAllocated;\
firstEnd = numAllocated;\
}


Locate the indices of the break between of the two sections of the circular queue.

These are used to construct two for loops that iterate over the whole sequence without using the modulo operator.

[0 ... secondEnd) [head .... firstEnd)

See also
ThreadsafeQueue

Referenced by G3D::Queue< G3D::_internal::NetworkCallbackInfo >::clear(), G3D::Queue< G3D::_internal::NetworkCallbackInfo >::copyInto(), and G3D::Queue< G3D::_internal::NetworkCallbackInfo >::deleteAll().

◆ G3D_base_Queue_h

#define G3D_base_Queue_h

documentation generated on Wed Nov 24 2021 08:01:51 using doxygen 1.8.15