GBytePipe::Block Struct Reference

#include <GContainers.h>

List of all members.

Public Attributes

int Next
int Used
int Size


Detailed Description

Data block. These can contain a mix of 3 types of data: 1) Bytes that have been read (always at the start of the block) 2) Bytes that have been written (always in the middle) 3) Unwritten buffer space (always at the end)

Initially a block starts out as completely type 3 bytes, just garbage data waiting to be written to. Then something writes into the pipe and bytes are stored into this free space, and the 'Used' variable is set to show how much of the available buffer is used. At this point we have type 2 and type 3 bytes in the block. The buffer can fill up completely in which case Used == Size and there are no type 3 bytes left. Also at some point something can start reading bytes out of the block which causes the 'Next' value to be increased, at which point the block starts with 'Next' bytes of type 1. Crystal?


Member Data Documentation

Number of bytes in this block that have been read Type 1 or 'read' bytes are in [0,Next-1].

Referenced by GBytePipe::Peek(), GStringPipe::Pop(), GBytePipe::Read(), GBytePipe::StringAt(), and GBytePipe::Write().

Total size of the memory block Type 3 or 'unused' bytes are in [Used,Size-1].

Referenced by GBytePipe::Peek(), and GBytePipe::Write().

Number of bytes that are used in this block include read bytes. Type 2 or 'used' bytes are in [Next,Used-1].

Referenced by GStringPipe::Pop(), GBytePipe::Read(), GBytePipe::StringAt(), and GBytePipe::Write().


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

Generated on Wed Dec 1 15:41:02 2010 for Lgi by  doxygen 1.5.7.1