threaddb  2.0b
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;
52 
63  typedef struct threadDB_ItemInfo
64  {
66 
67  volatile uint32_t m_PackageSize;
69 
81  typedef struct threadDB_ReadInfo
82  {
84 
85  size_t m_BlockOffset;
86  char* m_pBuffer;
87  uint32_t m_BufferSize;
89 
98  typedef enum {
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.
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_ItemInfo::m_PackageSize
volatile uint32_t m_PackageSize
Size of the data record in bytes.
Definition: threaddbTypes.h:67
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