ADTF File Library
Loading...
Searching...
No Matches
indexedfile_types.h
Go to the documentation of this file.
1
16
17#pragma once
18
20
29namespace ifhd
30{
31
33static constexpr size_t max_indexed_streams = 512;
34
36static constexpr size_t max_file_extension_identifier_length = 384;
37
39static constexpr size_t max_streamname_length = 228;
40
42static constexpr auto idx_ext_index = "index";
43
45static constexpr auto idx_ext_index_0 = "index0";
46
48static constexpr auto idx_ext_index_additional = "index_add";
49
51static constexpr auto idx_ext_index_additional_0 = "index_add0";
52
55
59enum class Endianess : uint8_t
60{
73};
74
79#define PLATFORM_BYTEORDER_UINT8 static_cast<uint8_t>(ifhd::getCurrentPlatformByteorder())
80
87static inline Endianess getCurrentPlatformByteorder()
88{
89 uint32_t value = 0x01020304;
90 if (((unsigned char*)&value)[0] == 0x04 &&
91 ((unsigned char*)&value)[2] == 0x02)
92 {
94 }
95 else if (((unsigned char*)&value)[0] == 0x01 &&
96 ((unsigned char*)&value)[2] == 0x03)
97 {
99 }
100 else
101 {
103 }
104}
105
126
131#ifndef IFHD_ASSERT
132#ifdef _WIN32
133#ifdef _ASSERTE
134#define IFHD_ASSERT _ASSERTE
135#else
136#define IFHD_ASSERT assert
137#endif
138#else
139#define IFHD_ASSERT assert
140#endif
141#endif
142
143} // namespace
Exception to indicate the end of file was reached.
Definition file.h:61
Indicates a file access error. platform dependent errors can be obtained via code().
Definition file.h:82
Indicates a file access error while creating a file that already exists and File::om_no_overwrite was...
Definition file.h:102
namespace to collect special exceptions for ifhd file operations.
Definition indexedfile_types.h:110
utils5ext::exceptions::ErrorFileAccess ErrorFileAccess
Indicates a file access error. platform dependent errors can be obtained via code().
Definition indexedfile_types.h:119
utils5ext::exceptions::EndOfFile EndOfFile
Exception to indicate the end of file was reached.
Definition indexedfile_types.h:114
utils5ext::exceptions::ErrorFileAlreadyExists ErrorFileAlreadyExists
Indicates a file access error while creating a file that already exists and tOpenMode::om_no_overwrit...
Definition indexedfile_types.h:124
namespace for IFHD File library
Definition indexedfile_types.h:30
Endianess
Definition indexedfile_types.h:60
@ platform_big_endian
platform has big endianess byte order
Definition indexedfile_types.h:72
@ platform_not_supported
unknown platform or unsupported platform
Definition indexedfile_types.h:64
@ platform_little_endian
platform has little endianess byte order
Definition indexedfile_types.h:68
utils5ext::FilePos FilePos
file pos type
Definition indexedfile_types.h:54
int64_t FilePos
Type for a file position.
Definition file.h:37