Class for storing an index table of an indexed file.
More...
|
tResult | Create (cIndexedFile *pIndexedFile) |
| Allocates all neccessary resources. More...
|
|
tResult | ReadIndexTable () |
| Build stream index tables. More...
|
|
tResult | Free () |
| Frees all allocated resources. More...
|
|
const tChar * | GetStreamName (tUInt16 ui16StreamId) |
| This function gets the name of a stream by its id. More...
|
|
const IIndexedFile::tStreamInfoHeader * | GetStreamInfo (tUInt16 ui16StreamId) |
| This function gets the information header of a stream by its id. More...
|
|
tTimeStamp | GetFirstTime (tUInt16 ui16StreamId) |
| This function gets the first time stamp of the given stream. More...
|
|
tTimeStamp | GetLastTime (tUInt16 ui16StreamId) |
| This function gets the last time stamp of the given stream. More...
|
|
const void * | GetAdditionalStreamInfo (tUInt16 ui16StreamId) |
| This function gets the additional stream information by its id. More...
|
|
tInt64 | GetItemCount (tUInt16 ui16StreamId) |
| Returns the item count of a stream. More...
|
|
tResult | AdjustChunkHeader (IIndexedFile::tChunkHeader *pHeader) |
| Adjusts the indices in the given chunk header. More...
|
|
tResult | FillChunkHeaderFromIndex (tUInt32 ui32MasterIdx, IIndexedFile::tChunkHeader *pHeader, tInt64 *pChunkIndex, tInt64 *pChunkOffset) |
| Filles a chunk header from a master index entry. More...
|
|
tInt32 | LookupChunkRef (tUInt16 ui16StreamId, tInt64 nPos, tInt nTimeFormat, tInt64 *pChunkIndex, tInt64 *pChunkOffset, tInt64 *pEndChunkIndex, tInt64 *pMasterIndex) |
| This function gets the chunk index of the given file position. More...
|
|
tResult | FindNearestEntryWithFlags (tUInt16 ui16StreamId, tUInt64 nChunkIndex, tUInt16 nChunkFlags, tInt64 *pMasterIndex) |
| Tries to find an entry before or at a given timestamp that has certain flags set. More...
|
|
tResult | ValidateRawMasterIndex (tUInt32 ui32RefMasterTableIndex) |
| Checks if the specified index is valid. More...
|
|
Class for storing an index table of an indexed file.
Definition at line 18 of file indexreadtable.h.
◆ AddMasterIndexTableEntry()
Adds a new item to the master index table.
- Parameters
-
[in] | pRefTbl | Master stream reference table |
[in] | uiCount | Stream reference items count |
- Returns
- Standard result.
◆ AddStreamIndexTableEntry()
tResult AddStreamIndexTableEntry |
( |
tUInt16 |
ui16StreamId, |
|
|
IIndexedFile::tStreamRef * |
pStreamRef, |
|
|
IIndexedFile::tStreamInfoHeader * |
pStreamInfo, |
|
|
tVoid * |
pAdditionalStreamInfo, |
|
|
tUInt64 |
uiCount |
|
) |
| |
|
private |
Adds a new item to the stream index table.
- Parameters
-
[in] | ui16StreamId | The stream id. |
[in] | pStreamRef | Stream reference item. |
[in] | pStreamInfo | Stream info header item. |
[in] | pAdditionalStreamInfo | Additional stream information. |
[in] | uiCount | Stream reference items count |
- Returns
- Standard result.
◆ AdjustChunkHeader()
tResult AdjustChunkHeader |
( |
IIndexedFile::tChunkHeader * |
pHeader | ) |
|
Adjusts the indices in the given chunk header.
- Parameters
-
pHeader | [inout] The header that should be adjusted |
- Returns
- Nothing.
◆ Create()
Allocates all neccessary resources.
- Parameters
-
pIndexedFile | [in] the indexed file from where the header is read from |
- Returns
- Standard result.
◆ FillChunkHeaderFromIndex()
tResult FillChunkHeaderFromIndex |
( |
tUInt32 |
ui32MasterIdx, |
|
|
IIndexedFile::tChunkHeader * |
pHeader, |
|
|
tInt64 * |
pChunkIndex, |
|
|
tInt64 * |
pChunkOffset |
|
) |
| |
Filles a chunk header from a master index entry.
- Parameters
-
ui32MasterIdx | [in] The index of the entry. |
pHeader | [out] The header that should be filled. |
pChunkIndex | [out] The index of the chunk. |
pChunkOffset | [out] The file offset of the chunk. |
- Returns
- Standard result.
◆ FindNearestEntryWithFlags()
Tries to find an entry before or at a given timestamp that has certain flags set.
- Parameters
-
[in] | ui16StreamId | The stream id. |
[in] | nChunkIndex | The limiting chunk. |
[in] | nChunkFlags | The flags to look for. |
[out] | pMasterIndex | The wil be set to the index in the master index table. |
- Returns
- Standard result
◆ Free()
Frees all allocated resources.
- Returns
- Standard result.
◆ GetAdditionalStreamInfo()
const void* GetAdditionalStreamInfo |
( |
tUInt16 |
ui16StreamId | ) |
|
This function gets the additional stream information by its id.
- Parameters
-
ui16StreamId | [in] the stream Id |
- Returns
- Additional stream information
◆ GetFirstTime()
This function gets the first time stamp of the given stream.
- Parameters
-
ui16StreamId | [in] the stream Id |
- Returns
- tTimeStamp
◆ GetItemCount()
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
◆ GetLastTime()
This function gets the last time stamp of the given stream.
- Parameters
-
ui16StreamId | [in] the stream Id |
- Returns
- tTimeStamp
◆ GetStreamInfo()
const IIndexedFile::tStreamInfoHeader* GetStreamInfo |
( |
tUInt16 |
ui16StreamId | ) |
|
This function gets the information header of a stream by its id.
- Parameters
-
ui16StreamId | [in] the stream Id |
- Returns
- Stream information header
◆ GetStreamName()
This function gets the name of a stream by its id.
- Parameters
-
ui16StreamId | [in] the stream Id |
- Returns
- Stream name
◆ GetStreamRef()
tResult GetStreamRef |
( |
tUInt16 |
ui16StreamId, |
|
|
tUInt32 |
ui32StreamIdx, |
|
|
IIndexedFile::tStreamRef * |
pStreamRef |
|
) |
| |
|
private |
This function gets a stream reference of the given id and index.
- Parameters
-
ui16StreamId | [in] the stream Id |
ui32StreamIdx | [in] the stream index |
pStreamRef | [out] stream reference |
- Returns
- Standard result
◆ LookupChunkRef()
This function gets the chunk index of the given file position.
- Parameters
-
[in] | ui16StreamId | the stream Id |
[in] | nPos | the file position |
[in] | nTimeFormat | the format to look for (see IIndexedFile::TF_*) |
[out] | pChunkIndex | the index of the chunk where the search should start. |
[out] | pChunkOffset | the file offset of the chunk where the search should start. |
[out] | pEndChunkIndex | the nearest end chunkindex of nPos |
[out] | pMasterIndex | the index of the nearest master index entry. |
- Returns
- Standard result
◆ ReadIndexTable()
Build stream index tables.
- Returns
- Standard result
◆ SetIndexOffsetInfos()
tResult SetIndexOffsetInfos |
( |
tUInt16 |
ui16StreamId, |
|
|
IIndexedFile::tAdditionalIndexInfo & |
rAdditionalIndexInfo |
|
) |
| |
|
private |
Sets additional index offsets.
- Parameters
-
[in] | ui16StreamId | The stream id. |
[in] | rAdditionalIndexInfo | Additional stream offsets. |
- Returns
- Standard result.
◆ ValidateRawMasterIndex()
Checks if the specified index is valid.
- Parameters
-
[in] | ui32RefMasterTableIndex | The index to be checked |
- Return values
-
ERR_NOERROR | Index is fine |
ERR_OUT_OF_RANGE | Index is not within the valid range. |