template ZSequence<class T> overview

Declared in: API\zsequence.h
Included by: zmodeler.h

Description

Sequences are used to represent dynamic linear arrays in ZModeler and provide all required operations to deal with internal buffer and entries. Memory buffer is allocated contiguously and reallocation occures when required or on demand. Automatic reallocation uses the following length increase uproach:

newLength = requestedLength+1+requestedLength<<2;

In other words, when sequences hits it's upper boundary it reallocates new buffer to be "plus 25% bigger" than actually requested.

Declarations

ZModeler defines and instantates the the following templates for standard data types, so the following types are prefered to use when needed:

typedef ZSequence <bool>   tBoolSeq;
typedef ZSequence <BYTE>   tBYTESeq;
typedef ZSequence <long>   tLongSeq;
typedef ZSequence <short>  tShortSeq;
typedef ZSequence <float>  tFloatSeq;
typedef ZSequence <DWORD>  tULongSeq;
typedef ZSequence <WORD>   tUShortSeq;
typedef ZSequence <CWnd*>  tCWndSeq;

Thus, for example, tUShortSeq sequence type is directly used by native class ZPolyBuf.

See Also:
ZSequence class members
Templates overview