| threaddb 2.0 A file mapped memory container extension

threaddbTypes.h
Go to the documentation of this file.
1 /*
2 Copyright (c) 2019 by The ThreadDB Project
3 All Rights Reserved.
4
5 ThreadDB undergoes the BSD License 2.0. You should have received a copy along with this program; if not, write to the ThreadDB Project.
6 To obtain a full unlimited version contact thethreaddbproject(at)gmail.com.
7
8 threaddbTypes.h - Basic type definitions
9 */
10
11 #pragma once
12
20 #if defined(_WIN32)
21 #if defined(THREADDB_)
22 #define DLLEXPORT_ __declspec(dllexport)
23 #else
24 #define DLLEXPORT_ __declspec(dllimport)
25 #endif
26 #else
27 #define DLLEXPORT_
28 #endif
29
30 #include <stdint.h>
31 #include <stddef.h>
32
33 #if defined(__cplusplus)
34 extern "C"
35 {
36 #endif
37
46 typedef struct threadDB_LinkInfo
47 {
48 volatile uint64_t m_FilePos;
49 volatile uint32_t m_FileID;
50 volatile uint32_t m_Filling;
51 } threadDB_LinkInfo;
52
63 typedef struct threadDB_ItemInfo
64 {
65 threadDB_LinkInfo m_LinkInfo;
66
67 volatile uint32_t m_PackageSize;
68 } threadDB_ItemInfo;
69
81 typedef struct threadDB_ReadInfo
82 {
83 threadDB_LinkInfo m_LinkInfo;
84
85 size_t m_BlockOffset;
86 char* m_pBuffer;
87 uint32_t m_BufferSize;
88 } threadDB_ReadInfo;
89
98 typedef enum {
99 eCopyFileTo = 0,
100 eMoveFileTo = 1
101 } threadDB_RelocationType;
102
103 typedef int32_t threadDB_ReturnCode;
104
105 #if defined(__cplusplus)
106 }
107 #endif
threadDB_ReadInfo::m_BlockOffset
size_t m_BlockOffset
Position of the current data item in the record.
Definition: threaddbTypes.h:85
threadDB_LinkInfo
struct threadDB_LinkInfo threadDB_LinkInfo
Data item entry index.
threadDB_LinkInfo
Data item entry index.
Definition: threaddbTypes.h:46
threadDB_LinkInfo::m_FilePos
volatile uint64_t m_FilePos
Position of the related record within the temporary database file.
Definition: threaddbTypes.h:48
eCopyFileTo
Indicates copy operation has to be executed.
Definition: threaddbTypes.h:99
threadDB_ItemInfo
struct threadDB_ItemInfo threadDB_ItemInfo
Random access managment information.
threadDB_ItemInfo::m_LinkInfo
threadDB_LinkInfo m_LinkInfo
Unique index of the data item.
Definition: threaddbTypes.h:65
threadDB_ReadInfo
Stream reading control information.
Definition: threaddbTypes.h:81
threadDB_ItemInfo
Random access managment information.
Definition: threaddbTypes.h:63
threadDB_ReadInfo::m_pBuffer
char * m_pBuffer
Temporary read buffer.
Definition: threaddbTypes.h:86
threadDB_ReadInfo::m_LinkInfo
threadDB_LinkInfo m_LinkInfo
Uniquely index of the data item.
Definition: threaddbTypes.h:83
threadDB_ReadInfo::m_BufferSize
uint32_t m_BufferSize
Size of the temporary read buffer.
Definition: threaddbTypes.h:87
threadDB_ReadInfo
struct threadDB_ReadInfo threadDB_ReadInfo
Stream reading control information.
threadDB_LinkInfo::m_FileID
volatile uint32_t m_FileID
Unique database file identification.
Definition: threaddbTypes.h:49
threadDB_ItemInfo::m_PackageSize
volatile uint32_t m_PackageSize
Size of the data record in bytes.
Definition: threaddbTypes.h:67
threadDB_LinkInfo::m_Filling
volatile uint32_t m_Filling
Position of the data item within the data record.
Definition: threaddbTypes.h:50
threadDB_RelocationType
threadDB_RelocationType
Type of action to be performed when relocating a temporary database file.
Definition: threaddbTypes.h:98
threadDB_ReturnCode
int32_t threadDB_ReturnCode
Definition: threaddbTypes.h:103
eMoveFileTo
Indicates move operation has to be exectued.
Definition: threaddbTypes.h:100