#include <indexedfilewriter_v201_v301.h>
Inherits ifhd::v201_v301::IndexedFile.
Inherited by ifhd::v400::IndexedFileWriter.
|
| std::string | getTempSaveFileName () |
| |
| void | setPrefixTempFileExtension (bool use_mode) |
| |
| bool | getPrefixTempFileExtensionMode () const |
| |
| std::string | getPrefix () const |
| |
| std::string | getNewFileNameWithPrefix (const std::string &filename) const |
| |
| | IndexedFileWriter () |
| |
| | ~IndexedFileWriter () |
| |
| void | setDateTime (const a_util::datetime::DateTime &date_time) |
| | Sets the date and time of the file.
|
| |
| void | open (const std::string &filename, uint32_t flags=0, uint64_t file_time_offset=0, timestamp_t history=0, utils5ext::FileSize history_size=0, ChunkDroppedCallback *drop_callback=nullptr, timestamp_t index_delay=1000000) |
| |
| void | close () |
| |
| void | writeChunk (uint16_t stream_id, const void *data, uint32_t data_size, timestamp_t time_stamp, uint32_t flags) |
| |
| void | setAdditionalStreamInfo (uint16_t stream_id, const void *info_data, uint32_t info_data_size, bool use_as_reference=false) |
| |
| void | setStreamName (uint16_t stream_id, const char *stream_name) |
| |
| void | quitHistory () |
| |
| std::shared_ptr< OutputStream > | getExtensionStream (const std::string &name, uint32_t user_id, uint32_t type_id, uint32_t file_version_id) |
| | Creates and gets an extension stream to write extension data directly to the underlying file.
|
| |
| | IndexedFile () |
| |
| virtual | ~IndexedFile () |
| |
| virtual std::set< uint32_t > | getSupportedVersions () const |
| | Get a set of all supported versions.
|
| |
| void | setDescription (const std::string &description) |
| |
| std::string | getDescription () const |
| |
| std::string | getGUID () const |
| |
| a_util::datetime::DateTime | getDateTime () const |
| |
| uint8_t | getByteOrder () const |
| |
| size_t | getExtensionCount () const |
| |
| bool | findExtension (const char *identifier, FileExtension **extension_info, void **data) const |
| |
| void | getExtension (size_t index, FileExtension **extension_info, void **data) const |
| |
| void | appendExtension (const char *identifier, const void *data, size_t data_size, uint32_t type_id=0, uint32_t file_version_id=0, uint16_t stream_id=0, uint32_t user_id=0) |
| |
| void | appendExtension (const void *data, const FileExtension *extension_info) |
| |
| void | freeExtensions () |
| |
| void | getHeaderRef (FileHeader **file_header) const |
| |
|
| bool | _use_prefix_temp_file_extension |
| |
|
utils5ext::File | _file |
| | the open file
|
| |
|
FilePos | _file_pos |
| | current filepos
|
| |
|
uint8_t * | _buffer |
| | internal Buffer
|
| |
|
int64_t | _buffer_size |
| | internal Buffer size
|
| |
|
FileHeader * | _file_header |
| | current file header
|
| |
|
bool | _write_guid |
| | protection for writing GUID
|
| |
|
FileExtensionList | _extensions |
| | list with all extensions
|
| |
|
void * | _cache |
| | cache data area
|
| |
|
uint64_t | _cache_size |
| | size of cache
|
| |
|
bool | _write_mode |
| | For internal use only (will be moved to a private implementation).
|
| |
|
|
typedef std::list< FileExtensionStruct > | FileExtensionList |
| | own type definition for a better work with file extension lists
|
| |
| static const uint8_t | byte_order |
| | current value of platform ByteOrder (
|
| |
|
static int64_t | default_block_size |
| | Default block size in bytes.
|
| |
|
static int64_t | default_cache_size |
| | Default cache size in bytes.
|
| |
Class for writing indexed files.
◆ IndexedFileWriter()
| ifhd::v201_v301::IndexedFileWriter::IndexedFileWriter |
( |
| ) |
|
◆ ~IndexedFileWriter()
| ifhd::v201_v301::IndexedFileWriter::~IndexedFileWriter |
( |
| ) |
|
◆ close()
| void ifhd::v201_v301::IndexedFileWriter::close |
( |
| ) |
|
|
virtual |
◆ getExtensionStream()
| std::shared_ptr< OutputStream > ifhd::v201_v301::IndexedFileWriter::getExtensionStream |
( |
const std::string & | name, |
|
|
uint32_t | user_id, |
|
|
uint32_t | type_id, |
|
|
uint32_t | file_version_id ) |
Creates and gets an extension stream to write extension data directly to the underlying file.
- Parameters
-
| name | name of the extension. |
| user_id | the user id for the extension. |
| type_id | the type id for the extension. |
| file_version_id | the file version id for the extension. |
- Returns
- Stream to write the extension data to.
◆ getNewFileNameWithPrefix()
| std::string ifhd::v201_v301::IndexedFileWriter::getNewFileNameWithPrefix |
( |
const std::string & | filename | ) |
const |
Set a prefix to the incoming filename and return the new name
- Parameters
-
| filename | The filename to prefix. |
- Returns
- the new name.
◆ getPrefix()
| std::string ifhd::v201_v301::IndexedFileWriter::getPrefix |
( |
| ) |
const |
Returns the prefix
- Returns
- std::string the prefix.
◆ getPrefixTempFileExtensionMode()
| bool ifhd::v201_v301::IndexedFileWriter::getPrefixTempFileExtensionMode |
( |
| ) |
const |
Retrieves the mode, if the prefix mode was set with setPrefixTempFileExtension.
- Return values
-
| true | The mode is set. |
| false | The mode is set. |
◆ getTempSaveFileName()
| std::string ifhd::v201_v301::IndexedFileWriter::getTempSaveFileName |
( |
| ) |
|
Get the Temp Save File Name (Filename during the Save Mode)
- Returns
- The filename.
◆ initialize()
| void ifhd::v201_v301::IndexedFileWriter::initialize |
( |
| ) |
|
|
protectedvirtual |
◆ open()
Create a new indexed file.
- Parameters
-
| filename | The filename. |
| flags | Creation flags, see OpenMode |
| file_time_offset | unused. |
| history | Timestamp of history. |
| history_size | Size of the history. |
| index_delay | The maximum time difference between index entries. |
| drop_callback | CallBack implementation if chunk was dropped |
- Exceptions
-
◆ quitHistory()
| void ifhd::v201_v301::IndexedFileWriter::quitHistory |
( |
| ) |
|
In case there is a history set up, this switches over to permanent storage.
◆ setAdditionalStreamInfo()
| void ifhd::v201_v301::IndexedFileWriter::setAdditionalStreamInfo |
( |
uint16_t | stream_id, |
|
|
const void * | info_data, |
|
|
uint32_t | info_data_size, |
|
|
bool | use_as_reference = false ) |
Sets additional info for a stream.
- Parameters
-
| stream_id | The stream id. |
| info_data | The info data. |
| info_data_size | The info data size. |
| use_as_reference | Whether to store the data in an internal buffer or not (The data is accessed when the file is closed). |
◆ setDateTime()
Sets the date and time of the file.
- Parameters
-
| date_time | the date and time to set |
- Exceptions
-
◆ setPrefixTempFileExtension()
| void ifhd::v201_v301::IndexedFileWriter::setPrefixTempFileExtension |
( |
bool | use_mode | ) |
|
Set the mode, if a prefix is set by a temp Save File Name or not
- Parameters
-
◆ setStreamName()
| void ifhd::v201_v301::IndexedFileWriter::setStreamName |
( |
uint16_t | stream_id, |
|
|
const char * | stream_name ) |
Set the name of a stream.
- Parameters
-
| stream_id | The stream id. |
| stream_name | The new name. |
◆ updateChecksumsExtension()
| void ifhd::v201_v301::IndexedFileWriter::updateChecksumsExtension |
( |
| ) |
|
|
protected |
Store the hashes in the reserved extension within the file.
◆ writeChunk()
| void ifhd::v201_v301::IndexedFileWriter::writeChunk |
( |
uint16_t | stream_id, |
|
|
const void * | data, |
|
|
uint32_t | data_size, |
|
|
timestamp_t | time_stamp, |
|
|
uint32_t | flags ) |
Writes a new chunk to the file. This function is not thread safe! (sync must be done outside in caller)!
- Parameters
-
| stream_id | The stream id. |
| data | The chunk data. |
| data_size | The data size. |
| time_stamp | The timestamp of the chunk. |
| flags | Chunk flags, see ChunkHeader |
◆ writeFileHeader()
| void ifhd::v201_v301::IndexedFileWriter::writeFileHeader |
( |
bool | store_checksum = false | ) |
|
|
protected |
◆ writeFileHeaderExt()
| void ifhd::v201_v301::IndexedFileWriter::writeFileHeaderExt |
( |
| ) |
|
|
protected |
write the extension file header
◆ writeIndexTable()
| void ifhd::v201_v301::IndexedFileWriter::writeIndexTable |
( |
| ) |
|
|
protected |
◆ _use_prefix_temp_file_extension
| bool ifhd::v201_v301::IndexedFileWriter::_use_prefix_temp_file_extension |
|
protected |
if true the tempfilename (savemode) is used with prefix
The documentation for this class was generated from the following file:
- /workspace/conan/adtf_file_library/0.24.0/dw/stable/package/18e5c2ff233ad5e8bc4435545bee7f12f29c3661/include/ifhd/v201_v301/indexedfilewriter_v201_v301.h