1#ifndef CDATACHUNK_CLASS_H
2#define CDATACHUNK_CLASS_H
11BEGIN_MOOTOOLS_NAMESPACE
13typedef unsigned int DataChunkID;
14#define DATACHUNK_UNKNOWN ((mootools::DataChunkID)(-1))
16typedef enum _DATACHUNK_FLAGS
18 DATACHUNK_NONE = 0x00,
19 DATACHUNK_KEEP_ON_COPY = 0x01,
20 DATACHUNK_MAIN_CHANNEL = 0x02,
21 DATACHUNK_INFO_FLAGS = 0xFF,
24 DATA_CHUNK_REPLACE_DATA = 0x100,
35 void InitDataChunks(
const CDataChunk&
src,
unsigned int size = -1);
36 bool RemoveDataChunk(DataChunkID
dataid);
37 bool HasDataChunk(DataChunkID
dataid)
const;
42 void ExpandDataSize(
unsigned int addsize);
43 unsigned int GetDataSize()
const;
46 void *GetMainData(
unsigned int index)
const;
47 void *GetData(DataChunkID
id,
unsigned int index)
const;
51 unsigned int GetChunksNbr()
const;
52 HashPos GetFirstChunk()
const;
53 void GetNextChunk(HashPos& pos, DataChunkID&
id)
const;
66 void Dump(DataChunkID
id,
unsigned int index)
const;
77 bool constructAllOnce;
78 unsigned int preallocate;
79 unsigned int datasize, growsize;
81 DataChunkID mainChunkID;
84 void UpdateMainChunk();
89inline void *CDataChunk::GetMainData(
unsigned int index)
const
92 return mainArray->ElementAt(index);
95inline void *CDataChunk::GetData(DataChunkID
id,
unsigned int index)
const
97 DataChunkInfo *info = chunks.Find(
id);
101 return info->data->ElementAt(index);
104END_MOOTOOLS_NAMESPACE
An advanced array class containing data that needs to be construct / destruct.
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
Definition DataChunk.h:29
An advanced array class containing data that needs to be construct / destruct.
Definition ElementArray.h:69
@ GROW_KEEP_MODE
Keep the default grow size (SetAtGrow, SetSize)
Definition ElementArray.h:76
CElementMethods is provided to CElementArray and give some information on the data as well as the met...
Definition ElementArray.h:22