ADTF  3.18.2
cIndexWriteTable

Class for storing an index table of an indexed file. More...

Classes

struct  tIndexTable
 
struct  tMasterIndexTable
 
struct  tStreamIndexTable
 

Public Member Functions

tResult Create ()
 Allocates all neccessary resources. More...
 
tResult Free ()
 Frees all allocated resources. More...
 
tInt GetMaxStreamId ()
 Returns the biggest possible stream id. More...
 
tInt64 GetItemCount (tUInt16 ui16StreamId)
 Returns the item count of a stream. More...
 
tInt64 GetBufferSize (tUInt16 ui16StreamId)
 Returns the buffer size of a stream. More...
 
tResult CopyToBuffer (tUInt16 ui16StreamId, tVoid *pvBuffer)
 Copys all stream data into a buffer. More...
 
tResult Append (tUInt16 ui16StreamId, tUInt64 ui64StreamIndex, tUInt64 ui64ChunkIndex, tUInt64 nFilePos, tUInt32 nSize, tTimeStamp nTimeStamp, tUInt32 ui32Flags, tBool &bIndexEntryAppended)
 Appends a new item to the index table. More...
 
tResult Remove (tUInt64 ui64ChunkIndex, tUInt16 ui16StreamId)
 The method removes an index entry from the front of the tables. More...
 
tUInt64 GetIndexOffset (tUInt16 ui16StreamId)
 Returns the offset of the first stream index in the chunk headers fro the given stream. More...
 
tUInt64 GetIndexTableOffset (tUInt16 ui16StreamId)
 Returns the offset of the stream table indices in the chunk header and master/stream references. More...
 

Private Attributes

tMasterIndexTable m_oMasterIndex
 
tStreamIndexTable m_aStreamIndexTables [MAX_INDEXED_STREAMS+1]
 

Static Private Attributes

static tTimeStamp m_nIndexDelay
 The maximum delay betweeen indices (microseconds)
 

Detailed Description

Class for storing an index table of an indexed file.

Definition at line 18 of file indexwritetable.h.

Member Function Documentation

◆ Append()

tResult Append ( tUInt16  ui16StreamId,
tUInt64  ui64StreamIndex,
tUInt64  ui64ChunkIndex,
tUInt64  nFilePos,
tUInt32  nSize,
tTimeStamp  nTimeStamp,
tUInt32  ui32Flags,
tBool bIndexEntryAppended 
)

Appends a new item to the index table.

Parameters
ui16StreamId[in] The stream id.
ui64StreamIndex[in] The stream index.
ui64ChunkIndex[in] The chunk index.
nFilePos[in] The file position.
nSize[in] The size of the item.
nTimeStamp[in] The timestamp.
ui32Flags[in] append flags, see IIndexedFile::tChunkType
bIndexEntryAppended[in, out] return true if index enty is appended for this chunk
Returns
Standard result

◆ CopyToBuffer()

tResult CopyToBuffer ( tUInt16  ui16StreamId,
tVoid pvBuffer 
)

Copys all stream data into a buffer.

No buffer overflow checking is done!

Parameters
ui16StreamId[in] the stream id.
pvBuffer[out] The buffer that is to be filled.
Returns
Standard result.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ Create()

tResult Create ( )

Allocates all neccessary resources.

Returns
Standard result.

◆ Free()

tResult Free ( )

Frees all allocated resources.

Returns
Standard result.

◆ GetBufferSize()

tInt64 GetBufferSize ( tUInt16  ui16StreamId)

Returns the buffer size of a stream.

Parameters
ui16StreamId[in] The stream id.
Returns
The buffer size of the stream.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetIndexOffset()

tUInt64 GetIndexOffset ( tUInt16  ui16StreamId)

Returns the offset of the first stream index in the chunk headers fro the given stream.

Parameters
[in]ui16StreamIdThe stream id.
Returns
the offset of the first stream index in the chunk headers fro the given stream.

◆ GetIndexTableOffset()

tUInt64 GetIndexTableOffset ( tUInt16  ui16StreamId)

Returns the offset of the stream table indices in the chunk header and master/stream references.

Parameters
[in]ui16StreamIdThe stream id.
Returns
the offset of the stream table indices in the chunk header and master/stream references..

◆ GetItemCount()

tInt64 GetItemCount ( tUInt16  ui16StreamId)

Returns the item count of a stream.

Parameters
ui16StreamId[in] The stream id.
Returns
The item count of the stream.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ GetMaxStreamId()

tInt GetMaxStreamId ( )

Returns the biggest possible stream id.

Returns
The biggest possible stream id.
This method is real-time safe.\nSee @ref page_real_time_safe.\n

◆ Remove()

tResult Remove ( tUInt64  ui64ChunkIndex,
tUInt16  ui16StreamId 
)

The method removes an index entry from the front of the tables.

Parameters
[in]ui64ChunkIndexthe chunk index
[in]ui16StreamIdthe stream id
Returns
Standard result.