Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::containers::DataQueue Structure
C++
struct DataQueue {
  INDEX Top;
  INDEX Bottom;
  INDEX Cnt;
  _32 Lock;
  INDEX Size;
  INDEX ExpandBy;
  _8 data[1];
};
Members 
Description 
INDEX Top; 
This is the next index to be added to. If Top==Bottom, the queue is empty, until an entry is added at Top, and Top increments. 
INDEX Bottom; 
The current bottom index. This is the next one to be returned. 
INDEX Cnt; 
How many elements the queue can hold. If a queue has more elements added to it than it has count, it will be expanded, and a new queue returned. 
_32 Lock; 
thread interlock using InterlockedExchange semaphore 
INDEX Size; 
How big each element in the queue is. 
INDEX ExpandBy; 
How many elements to expand the queue by, when its capacity is reached. 
_8 data[1]; 
The data area of the queue

A queue of structure elements.

The size of each element must be known at stack creation time. Structures are literally copied to and from this stack. This is a stack 'by value'. When extended, the stack will occupy different memory, care must be taken to not duplicate pointers to this stack.

Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!