Debian Codegraph @

storage/connect/filamvct.h

raw symbols SCIP
1 /************** FilAMVct H Declares Source Code File (.H) **************/cxx . . $ `<file>/storage/connect/filamvct.h`/
2 /* Name: FILAMVCT.H Version 1.5 */
3 /* */
4 /* (C) Copyright to the author Olivier BERTRAND 2005-2012 */
5 /* */
6 /* This file contains the VCT file access method classes declares. */
7 /***********************************************************************/
8 #ifndef __FILAMVCT__
9 #define __FILAMVCT__cxx . . $ `storage/connect/filamvct.h:9:9`!
10
11 #include "filamfix.h"cxx . . $ `<file>/storage/connect/filamfix.h`/
12
13 typedef class VCTFAMcxx . . $ VCTFAM# *PVCTFAMcxx . . $ PVCTFAM#;
14 typedef class VCTCOLcxx . . $ VCTCOL# *PVCTCOLcxx . . $ PVCTCOL#;
15 typedef class VCMFAMcxx . . $ VCMFAM# *PVCMFAMcxx . . $ PVCMFAM#;
16 typedef class VECFAMcxx . . $ VECFAM# *PVECFAMcxx . . $ PVECFAM#;
17 typedef class VMPFAMcxx . . $ VMPFAM# *PVMPFAMcxx . . $ PVMPFAM#;
18 typedef class BGVFAMcxx . . $ BGVFAM# *PBGVFAMcxx . . $ PBGVFAM#;
19
20 /***********************************************************************/
21 /* This is the DOS/UNIX Access Method class declaration for files */
22 /* in vector format. If MaxBlk=0, each block containing "Elements" */
23 /* records, values of each columns are consecutively stored (vector). */
24 /* Otherwise, data is arranged by column in the file and MaxBlk is */
25 /* used to set the maximum number of blocks. This leave some white */
26 /* space allowing to insert new values up to this maximum size. */
27 /***********************************************************************/
28 class DllExportcxx . . $ `storage/connect/block.h:30:9`! VCTFAMcxx . . $ VCTFAM# : public FIXFAMcxx . . $ FIXFAM# {
29 friend class TDBVCTcxx . . $ TDBVCT#;
30 friend class VCTCOLcxx . . $ VCTCOL#;
31 public:
32 // Constructor
33 VCTFAMcxx . . $ VCTFAM#VCTFAM(b42dfeac9fc41ed3).(PVCTDEFcxx . . $ PVCTDEF# tdp);
34 VCTFAMcxx . . $ VCTFAM#VCTFAM(dbfee15ee13ceb0a).(PVCTFAMcxx . . $ PVCTFAM# txfp);
35
36 // Implementation
37 AMTcxx . . $ AMT# GetAmTypecxx . . $ VCTFAM#GetAmType(9db94b1f9a8d7a79).(void) override {return TYPE_AM_VCTcxx . . $ TYPE_AM_VCT.;}
38 PTXFcxx . . $ PTXF# Duplicatecxx . . $ VCTFAM#Duplicate(4263347f72351b4a).(PGLOBAL g) override
39 {return (PTXFcxx . . $ PTXF#)new(g) VCTFAMcxx . . $ VCTFAM#VCTFAM(dbfee15ee13ceb0a).(this);}
40 int GetFileLengthcxx . . $ VCTFAM#GetFileLength(7bccf160c61251e2).(PGLOBAL g) override;
41
42 // Methods
43 void Resetcxx . . $ VCTFAM#Reset(49f6e7a06ebc5aa8).(void) override;
44 int MaxBlkSizecxx . . $ VCTFAM#MaxBlkSize(25a4a41e78aa2f29).(PGLOBAL g, int s) override;
45 bool AllocateBuffercxx . . $ VCTFAM#AllocateBuffer(1f3dbd0b0227397d).(PGLOBAL g) override;
46 virtual bool InitInsertcxx . . $ VCTFAM#InitInsert(1f3dbd0b0227397d).(PGLOBAL g);
47 void ResetBuffercxx . . $ VCTFAM#ResetBuffer(acb6fe1693458838).(PGLOBAL g) override {}
48 int Cardinalitycxx . . $ VCTFAM#Cardinality(7bccf160c61251e2).(PGLOBAL g) override;
49 int GetRowIDcxx . . $ VCTFAM#GetRowID(b126dc7c1de90089).(void) override;
50
51 // Database routines
52 bool OpenTableFilecxx . . $ VCTFAM#OpenTableFile(1f3dbd0b0227397d).(PGLOBAL g) override;
53 int ReadBuffercxx . . $ VCTFAM#ReadBuffer(7bccf160c61251e2).(PGLOBAL g) override;
54 int WriteBuffercxx . . $ VCTFAM#WriteBuffer(7bccf160c61251e2).(PGLOBAL g) override;
55 int DeleteRecordscxx . . $ VCTFAM#DeleteRecords(25a4a41e78aa2f29).(PGLOBAL g, int irc) override;
56 void CloseTableFilecxx . . $ VCTFAM#CloseTableFile(40330b902e6ea410).(PGLOBAL g, bool abort) override;
57 void Rewindcxx . . $ VCTFAM#Rewind(49f6e7a06ebc5aa8).(void) override;
58
59 // Specific functions
60 virtual bool ReadBlockcxx . . $ VCTFAM#ReadBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp);
61 virtual bool WriteBlockcxx . . $ VCTFAM#WriteBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp);
62
63 protected:
64 virtual bool MakeEmptyFilecxx . . $ VCTFAM#MakeEmptyFile(af80bd8c83ab924a).(PGLOBAL g, PCSZcxx . . $ PCSZ# fn);
65 bool OpenTempFilecxx . . $ VCTFAM#OpenTempFile(1f3dbd0b0227397d).(PGLOBAL g) override;
66 virtual bool MoveLinescxx . . $ VCTFAM#MoveLines(1f3dbd0b0227397d).(PGLOBAL g) {return false;}
67 bool MoveIntermediateLinescxx . . $ VCTFAM#MoveIntermediateLines(853688dbc737ab80).(PGLOBAL g, bool *b = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) override;
68 virtual bool CleanUnusedSpacecxx . . $ VCTFAM#CleanUnusedSpace(1f3dbd0b0227397d).(PGLOBAL g);
69 virtual int GetBlockInfocxx . . $ VCTFAM#GetBlockInfo(7bccf160c61251e2).(PGLOBAL g);
70 virtual bool SetBlockInfocxx . . $ VCTFAM#SetBlockInfo(1f3dbd0b0227397d).(PGLOBAL g);
71 bool ResetTableSizecxx . . $ VCTFAM#ResetTableSize(6016f3359c6b7d12).(PGLOBAL g, int block, int last);
72
73 // Members
74 char *NewBlockcxx . . $ VCTFAM#NewBlock.; // To block written on Insert
75 char *Colfncxx . . $ VCTFAM#Colfn.; // Pattern for column file names (VEC)
76 char *Tempatcxx . . $ VCTFAM#Tempat.; // Pattern for temp file names (VEC)
77 int *Clenscxx . . $ VCTFAM#Clens.; // Pointer to col size array
78 int *Deplaccxx . . $ VCTFAM#Deplac.; // Pointer to col start position array
79 bool *Isnumcxx . . $ VCTFAM#Isnum.; // Pointer to buffer type isnum result
80 bool AddBlockcxx . . $ VCTFAM#AddBlock.; // True when adding new blocks on Insert
81 bool Splitcxx . . $ VCTFAM#Split.; // true: split column file vector format
82 int Headercxx . . $ VCTFAM#Header.; // 0: no, 1: separate, 2: in data file
83 int MaxBlkcxx . . $ VCTFAM#MaxBlk.; // Max number of blocks (True vector format)
84 int Bsizecxx . . $ VCTFAM#Bsize.; // Because Nrec can be modified
85 int Ncolcxx . . $ VCTFAM#Ncol.; // The number of columns;
86 }; // end of class VCTFAM
87
88 /***********************************************************************/
89 /* This is the DOS/UNIX Access Method class declaration for files */
90 /* in vector format accessed using file mapping. */
91 /***********************************************************************/
92 class DllExportcxx . . $ `storage/connect/block.h:30:9`! VCMFAMcxx . . $ VCMFAM# : public VCTFAMcxx . . $ VCTFAM# {
93 friend class TDBVCTcxx . . $ TDBVCT#;
94 friend class VCTCOLcxx . . $ VCTCOL#;
95 public:
96 // Constructor
97 VCMFAMcxx . . $ VCMFAM#VCMFAM(b42dfeac9fc41ed3).(PVCTDEFcxx . . $ PVCTDEF# tdp);
98 VCMFAMcxx . . $ VCMFAM#VCMFAM(b6d19697f23eeb15).(PVCMFAMcxx . . $ PVCMFAM# txfp);
99
100 // Implementation
101 AMTcxx . . $ AMT# GetAmTypecxx . . $ VCMFAM#GetAmType(9db94b1f9a8d7a79).(void) override {return TYPE_AM_VMPcxx . . $ TYPE_AM_VMP.;}
102 PTXFcxx . . $ PTXF# Duplicatecxx . . $ VCMFAM#Duplicate(4263347f72351b4a).(PGLOBAL g) override
103 {return (PTXFcxx . . $ PTXF#)new(g) VCMFAMcxx . . $ VCMFAM#VCMFAM(b6d19697f23eeb15).(this);}
104
105 // Methods
106 bool AllocateBuffercxx . . $ VCMFAM#AllocateBuffer(1f3dbd0b0227397d).(PGLOBAL g) override;
107 bool InitInsertcxx . . $ VCMFAM#InitInsert(1f3dbd0b0227397d).(PGLOBAL g) override;
108
109 // Database routines
110 bool OpenTableFilecxx . . $ VCMFAM#OpenTableFile(1f3dbd0b0227397d).(PGLOBAL g) override;
111 int WriteBuffercxx . . $ VCMFAM#WriteBuffer(7bccf160c61251e2).(PGLOBAL g) override;
112 int DeleteRecordscxx . . $ VCMFAM#DeleteRecords(25a4a41e78aa2f29).(PGLOBAL g, int irc) override;
113 void CloseTableFilecxx . . $ VCMFAM#CloseTableFile(40330b902e6ea410).(PGLOBAL g, bool abort) override;
114
115 protected:
116 // Specific functions
117 bool MoveIntermediateLinescxx . . $ VCMFAM#MoveIntermediateLines(853688dbc737ab80).(PGLOBAL g, bool *b = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) override;
118 bool ReadBlockcxx . . $ VCMFAM#ReadBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp) override;
119 bool WriteBlockcxx . . $ VCMFAM#WriteBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp) override;
120
121 // Members
122 char* Memorycxx . . $ VCMFAM#Memory.; // Pointer on file mapping view.
123 char* *Memcolcxx . . $ VCMFAM#Memcol.; // Pointer on column start.
124 }; // end of class VCMFAM
125
126 /***********************************************************************/
127 /* This is the DOS/UNIX Access Method class declaration for files */
128 /* in full vertical format. Each column is contained in a separate */
129 /* file whose name is the table name followed by the column number. */
130 /***********************************************************************/
131 class DllExportcxx . . $ `storage/connect/block.h:30:9`! VECFAMcxx . . $ VECFAM# : public VCTFAMcxx . . $ VCTFAM# {
132 friend class TDBVCTcxx . . $ TDBVCT#;
133 friend class VCTCOLcxx . . $ VCTCOL#;
134 public:
135 // Constructor
136 VECFAMcxx . . $ VECFAM#VECFAM(b42dfeac9fc41ed3).(PVCTDEFcxx . . $ PVCTDEF# tdp);
137 VECFAMcxx . . $ VECFAM#VECFAM(46afc3618692a504).(PVECFAMcxx . . $ PVECFAM# txfp);
138
139 // Implementation
140 PTXFcxx . . $ PTXF# Duplicatecxx . . $ VECFAM#Duplicate(4263347f72351b4a).(PGLOBAL g) override
141 {return (PTXFcxx . . $ PTXF#)new(g) VECFAMcxx . . $ VECFAM#VECFAM(46afc3618692a504).(this);}
142
143 // Methods
144 bool AllocateBuffercxx . . $ VECFAM#AllocateBuffer(1f3dbd0b0227397d).(PGLOBAL g) override;
145 bool InitInsertcxx . . $ VECFAM#InitInsert(1f3dbd0b0227397d).(PGLOBAL g) override;
146 void ResetBuffercxx . . $ VECFAM#ResetBuffer(acb6fe1693458838).(PGLOBAL g) override;
147
148 // Database routines
149 bool OpenTableFilecxx . . $ VECFAM#OpenTableFile(1f3dbd0b0227397d).(PGLOBAL g) override;
150 int WriteBuffercxx . . $ VECFAM#WriteBuffer(7bccf160c61251e2).(PGLOBAL g) override;
151 int DeleteRecordscxx . . $ VECFAM#DeleteRecords(25a4a41e78aa2f29).(PGLOBAL g, int irc) override;
152 void CloseTableFilecxx . . $ VECFAM#CloseTableFile(40330b902e6ea410).(PGLOBAL g, bool abort) override;
153
154 // Specific functions
155 bool ReadBlockcxx . . $ VECFAM#ReadBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp) override;
156 bool WriteBlockcxx . . $ VECFAM#WriteBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp) override;
157
158 protected:
159 bool OpenTempFilecxx . . $ VECFAM#OpenTempFile(1f3dbd0b0227397d).(PGLOBAL g) override;
160 bool MoveLinescxx . . $ VECFAM#MoveLines(1f3dbd0b0227397d).(PGLOBAL g) override;
161 bool MoveIntermediateLinescxx . . $ VECFAM#MoveIntermediateLines(853688dbc737ab80).(PGLOBAL g, bool *b = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) override;
162 int RenameTempFilecxx . . $ VECFAM#RenameTempFile(7bccf160c61251e2).(PGLOBAL g) override;
163 bool OpenColumnFilecxx . . $ VECFAM#OpenColumnFile(587f370561ce8b57).(PGLOBAL g, PCSZcxx . . $ PCSZ# opmode, int i);
164
165 // Members
166 FILE* *Streamscxx . . $ VECFAM#Streams.; // Points to Dos file structure array
167 FILE* *T_Streamscxx . . $ VECFAM#T_Streams.; // Points to temp file structure array
168 PFBLOCKcxx . . $ PFBLOCK# *To_Fbscxx . . $ VECFAM#To_Fbs.; // Pointer to file block array
169 PFBLOCKcxx . . $ PFBLOCK# *T_Fbscxx . . $ VECFAM#T_Fbs.; // Pointer to temp file block array
170 void* *To_Bufscxx . . $ VECFAM#To_Bufs.; // Pointer to col val block array
171 bool InitUpdatecxx . . $ VECFAM#InitUpdate.; // Used to initialize updating
172 }; // end of class VECFAM
173
174 /***********************************************************************/
175 /* This is the DOS/UNIX Access Method class declaration for files */
176 /* in full vertical format accessed using file mapping. */
177 /***********************************************************************/
178 class DllExportcxx . . $ `storage/connect/block.h:30:9`! VMPFAMcxx . . $ VMPFAM# : public VCMFAMcxx . . $ VCMFAM# {
179 friend class TDBVCTcxx . . $ TDBVCT#;
180 friend class VCTCOLcxx . . $ VCTCOL#;
181 public:
182 // Constructor
183 VMPFAMcxx . . $ VMPFAM#VMPFAM(b42dfeac9fc41ed3).(PVCTDEFcxx . . $ PVCTDEF# tdp);
184 VMPFAMcxx . . $ VMPFAM#VMPFAM(a53aa27638e576d3).(PVMPFAMcxx . . $ PVMPFAM# txfp);
185
186 // Implementation
187 PTXFcxx . . $ PTXF# Duplicatecxx . . $ VMPFAM#Duplicate(4263347f72351b4a).(PGLOBAL g) override
188 {return (PTXFcxx . . $ PTXF#)new(g) VMPFAMcxx . . $ VMPFAM#VMPFAM(a53aa27638e576d3).(this);}
189
190 // Methods
191 bool AllocateBuffercxx . . $ VMPFAM#AllocateBuffer(1f3dbd0b0227397d).(PGLOBAL g) override;
192
193 // Database routines
194 bool OpenTableFilecxx . . $ VMPFAM#OpenTableFile(1f3dbd0b0227397d).(PGLOBAL g) override;
195 int DeleteRecordscxx . . $ VMPFAM#DeleteRecords(25a4a41e78aa2f29).(PGLOBAL g, int irc) override;
196 void CloseTableFilecxx . . $ VMPFAM#CloseTableFile(40330b902e6ea410).(PGLOBAL g, bool abort) override;
197
198 protected:
199 bool MapColumnFilecxx . . $ VMPFAM#MapColumnFile(a4059d67c817c38d).(PGLOBAL g, MODEcxx . . $ MODE# mode, int i);
200
201 // Members
202 PFBLOCKcxx . . $ PFBLOCK# *To_Fbscxx . . $ VMPFAM#To_Fbs.; // Pointer to file block array
203 }; // end of class VMPFAM
204
205 /***********************************************************************/
206 /* This is the DOS/UNIX Access Method class declaration for files */
207 /* in (possibly blocked) vector format that can be larger than 2GB. */
208 /***********************************************************************/
209 class BGVFAMcxx . . $ BGVFAM# : public VCTFAMcxx . . $ VCTFAM# {
210 friend class VCTCOLcxx . . $ VCTCOL#;
211 public:
212 // Constructors
213 BGVFAMcxx . . $ BGVFAM#BGVFAM(b42dfeac9fc41ed3).(PVCTDEFcxx . . $ PVCTDEF# tdp);
214 BGVFAMcxx . . $ BGVFAM#BGVFAM(208f2dc519d531d7).(PBGVFAMcxx . . $ PBGVFAM# txfp);
215
216 // Implementation
217 PTXFcxx . . $ PTXF# Duplicatecxx . . $ BGVFAM#Duplicate(4263347f72351b4a).(PGLOBAL g) override
218 {return (PTXFcxx . . $ PTXF#)new(g) BGVFAMcxx . . $ BGVFAM#BGVFAM(208f2dc519d531d7).(this);}
219
220 // Methods
221 bool AllocateBuffercxx . . $ BGVFAM#AllocateBuffer(1f3dbd0b0227397d).(PGLOBAL g) override;
222
223 // Database routines
224 bool OpenTableFilecxx . . $ BGVFAM#OpenTableFile(1f3dbd0b0227397d).(PGLOBAL g) override;
225 int WriteBuffercxx . . $ BGVFAM#WriteBuffer(7bccf160c61251e2).(PGLOBAL g) override;
226 int DeleteRecordscxx . . $ BGVFAM#DeleteRecords(25a4a41e78aa2f29).(PGLOBAL g, int irc) override;
227 void CloseTableFilecxx . . $ BGVFAM#CloseTableFile(40330b902e6ea410).(PGLOBAL g, bool abort) override;
228 void Rewindcxx . . $ BGVFAM#Rewind(49f6e7a06ebc5aa8).(void) override;
229
230 // Specific functions
231 bool ReadBlockcxx . . $ BGVFAM#ReadBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp) override;
232 bool WriteBlockcxx . . $ BGVFAM#WriteBlock(725f5338c0fc37b6).(PGLOBAL g, PVCTCOLcxx . . $ PVCTCOL# colp) override;
233
234 protected:
235 bool BigSeekcxx . . $ BGVFAM#BigSeek(ba378b3f9b82fd47).(PGLOBAL g, HANDLEcxx . . $ HANDLE# h, BIGINTcxx . . $ BIGINT# pos, bool b = false);
236 bool BigReadcxx . . $ BGVFAM#BigRead(9029abd615dfda82).(PGLOBAL g, HANDLEcxx . . $ HANDLE# h, void *inbuf, int req);
237 bool BigWritecxx . . $ BGVFAM#BigWrite(9029abd615dfda82).(PGLOBAL g, HANDLEcxx . . $ HANDLE# h, void *inbuf, int req);
238 bool MakeEmptyFilecxx . . $ BGVFAM#MakeEmptyFile(af80bd8c83ab924a).(PGLOBAL g, PCSZcxx . . $ PCSZ# fn) override;
239 bool OpenTempFilecxx . . $ BGVFAM#OpenTempFile(1f3dbd0b0227397d).(PGLOBAL g) override;
240 bool MoveIntermediateLinescxx . . $ BGVFAM#MoveIntermediateLines(853688dbc737ab80).(PGLOBAL g, bool *b = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!) override;
241 bool CleanUnusedSpacecxx . . $ BGVFAM#CleanUnusedSpace(1f3dbd0b0227397d).(PGLOBAL g) override;
242 bool SetBlockInfocxx . . $ BGVFAM#SetBlockInfo(1f3dbd0b0227397d).(PGLOBAL g) override;
243 int GetBlockInfocxx . . $ BGVFAM#GetBlockInfo(7bccf160c61251e2).(PGLOBAL g) override;
244
245 // Members
246 HANDLEcxx . . $ HANDLE# Hfilecxx . . $ BGVFAM#Hfile.; // Handle to big file
247 HANDLEcxx . . $ HANDLE# Tfilecxx . . $ BGVFAM#Tfile.; // Handle to temporary file
248 BIGINTcxx . . $ BIGINT# *BigDepcxx . . $ BGVFAM#BigDep.; // Pointer to col start position array
249 }; // end of class BGVFAM
250
251 #endif // __FILAMVCT__
252