summaryrefslogtreecommitdiff
path: root/docs/doxygen/latex/xbfile_8h_source.tex
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doxygen/latex/xbfile_8h_source.tex')
-rw-r--r--docs/doxygen/latex/xbfile_8h_source.tex180
1 files changed, 180 insertions, 0 deletions
diff --git a/docs/doxygen/latex/xbfile_8h_source.tex b/docs/doxygen/latex/xbfile_8h_source.tex
new file mode 100644
index 0000000..19fb9c7
--- /dev/null
+++ b/docs/doxygen/latex/xbfile_8h_source.tex
@@ -0,0 +1,180 @@
+\hypertarget{xbfile_8h_source}{}\doxysection{xbfile.\+h}
+\label{xbfile_8h_source}\index{/mnt/1Tdata/xbase/xbase64-\/4.0.2/src/include/xbfile.h@{/mnt/1Tdata/xbase/xbase64-\/4.0.2/src/include/xbfile.h}}
+\mbox{\hyperlink{xbfile_8h}{Go to the documentation of this file.}}
+\begin{DoxyCode}{0}
+\DoxyCodeLine{1 \textcolor{comment}{/* xbfile.h}}
+\DoxyCodeLine{2 \textcolor{comment}{}}
+\DoxyCodeLine{3 \textcolor{comment}{XBase64 Software Library}}
+\DoxyCodeLine{4 \textcolor{comment}{}}
+\DoxyCodeLine{5 \textcolor{comment}{Copyright (c) 1997,2003,2014,2022 Gary A Kunkel}}
+\DoxyCodeLine{6 \textcolor{comment}{}}
+\DoxyCodeLine{7 \textcolor{comment}{The xb64 software library is covered under the terms of the GPL Version 3, 2007 license.}}
+\DoxyCodeLine{8 \textcolor{comment}{}}
+\DoxyCodeLine{9 \textcolor{comment}{Email Contact:}}
+\DoxyCodeLine{10 \textcolor{comment}{}}
+\DoxyCodeLine{11 \textcolor{comment}{ XDB-\/devel@lists.sourceforge.net}}
+\DoxyCodeLine{12 \textcolor{comment}{ XDB-\/users@lists.sourceforge.net}}
+\DoxyCodeLine{13 \textcolor{comment}{}}
+\DoxyCodeLine{14 \textcolor{comment}{*/}}
+\DoxyCodeLine{15 }
+\DoxyCodeLine{16 \textcolor{preprocessor}{\#ifndef \_\_XB\_FILE\_H\_\_}}
+\DoxyCodeLine{17 \textcolor{preprocessor}{\#define \_\_XB\_FILE\_H\_\_}}
+\DoxyCodeLine{18 }
+\DoxyCodeLine{19 \textcolor{preprocessor}{\#ifdef CMAKE\_COMPILER\_IS\_GNUCC}}
+\DoxyCodeLine{20 \textcolor{preprocessor}{\#pragma interface}}
+\DoxyCodeLine{21 \textcolor{preprocessor}{\#endif}}
+\DoxyCodeLine{22 }
+\DoxyCodeLine{23 \textcolor{comment}{/*****************************/}}
+\DoxyCodeLine{24 \textcolor{comment}{/* File Open Modes */}}
+\DoxyCodeLine{25 \textcolor{preprocessor}{\#define XB\_READ 0}}
+\DoxyCodeLine{26 \textcolor{preprocessor}{\#define XB\_READ\_WRITE 1}}
+\DoxyCodeLine{27 \textcolor{preprocessor}{\#define XB\_WRITE 2}}
+\DoxyCodeLine{28 }
+\DoxyCodeLine{29 \textcolor{comment}{/*****************************/}}
+\DoxyCodeLine{30 \textcolor{comment}{/* File Access Modes */}}
+\DoxyCodeLine{31 \textcolor{preprocessor}{\#define XB\_SINGLE\_USER 0 }\textcolor{comment}{// file buffering on}}
+\DoxyCodeLine{32 \textcolor{preprocessor}{\#define XB\_MULTI\_USER 1 }\textcolor{comment}{// file buffering off}}
+\DoxyCodeLine{33 }
+\DoxyCodeLine{34 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespacexb}{xb}}\{}
+\DoxyCodeLine{35 }
+\DoxyCodeLine{56 \textcolor{keyword}{class }XBDLLEXPORT \mbox{\hyperlink{classxb_1_1xbFile}{xbFile}} : \textcolor{keyword}{public} \mbox{\hyperlink{classxb_1_1xbSsv}{xbSsv}} \{}
+\DoxyCodeLine{57 }
+\DoxyCodeLine{58 \textcolor{keyword}{public}:}
+\DoxyCodeLine{59 \textcolor{comment}{// xbFile();}}
+\DoxyCodeLine{60 \mbox{\hyperlink{classxb_1_1xbFile}{xbFile}}( \mbox{\hyperlink{classxb_1_1xbXBase}{xbXBase}} * x );}
+\DoxyCodeLine{61 }
+\DoxyCodeLine{62 \mbox{\hyperlink{classxb_1_1xbFile}{\string~xbFile}}();}
+\DoxyCodeLine{63 xbInt16 CreateUniqueFileName( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sDirIn, \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sExtIn, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFqnOut );}
+\DoxyCodeLine{64 xbInt16 CreateUniqueFileName( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sDirIn, \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sExtIn, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFqnOut, xbInt16 iOption );}
+\DoxyCodeLine{65 }
+\DoxyCodeLine{66 \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}}\& GetDirectory() \textcolor{keyword}{const};}
+\DoxyCodeLine{67 \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}}\& GetFileName() \textcolor{keyword}{const};}
+\DoxyCodeLine{68 \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}}\& GetFqFileName() \textcolor{keyword}{const};}
+\DoxyCodeLine{69 }
+\DoxyCodeLine{70 \textcolor{keywordtype}{void} SetDirectory ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sDirectory);}
+\DoxyCodeLine{71 \textcolor{keywordtype}{void} SetFileName ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName );}
+\DoxyCodeLine{72 \textcolor{keywordtype}{void} SetFqFileName( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFqName );}
+\DoxyCodeLine{73 }
+\DoxyCodeLine{74 xbUInt32 GetBlockSize () \textcolor{keyword}{const};}
+\DoxyCodeLine{75 xbInt16 SetBlockSize ( xbUInt32 ulBlockSize );}
+\DoxyCodeLine{76 }
+\DoxyCodeLine{77 xbInt16 GetOpenMode () \textcolor{keyword}{const};}
+\DoxyCodeLine{78 xbInt16 GetShareMode () \textcolor{keyword}{const};}
+\DoxyCodeLine{79 }
+\DoxyCodeLine{80 xbInt16 GetFileDirPart ( \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileDirPartOut ) \textcolor{keyword}{const};}
+\DoxyCodeLine{81 xbInt16 GetFileDirPart ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sCompleteFileNameIn, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileDirPartOut ) \textcolor{keyword}{const};}
+\DoxyCodeLine{82 xbInt16 GetFileExtPart ( \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileExtPartOut ) \textcolor{keyword}{const};}
+\DoxyCodeLine{83 xbInt16 GetFileExtPart ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sCompleteFileNameIn, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileExtPartOut ) \textcolor{keyword}{const};}
+\DoxyCodeLine{84 xbInt16 GetFileNamePart( \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileNamePartOut ) \textcolor{keyword}{const};}
+\DoxyCodeLine{85 xbInt16 GetFileNamePart( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sCompleteFileNameIn, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileNamePartOut ) \textcolor{keyword}{const};}
+\DoxyCodeLine{86 xbInt16 GetFileType ( \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileType ) \textcolor{keyword}{const};}
+\DoxyCodeLine{87 }
+\DoxyCodeLine{88 xbInt16 GetXbaseFileTypeByte( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, xbInt16 \&iVersion );}
+\DoxyCodeLine{89 xbInt16 GetXbaseFileTypeByte( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \&cFileTypeByte );}
+\DoxyCodeLine{90 xbInt16 GetXbaseFileTypeByte( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} \&cFileTypeByte, xbInt16 \&iVersion );}
+\DoxyCodeLine{91 xbInt16 DetermineXbaseTableVersion( \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} cFileTypeByte ) \textcolor{keyword}{const};}
+\DoxyCodeLine{92 xbInt16 DetermineXbaseMemoVersion( \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} cFileTypeByte ) \textcolor{keyword}{const};}
+\DoxyCodeLine{93 }
+\DoxyCodeLine{94 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} FileExists () \textcolor{keyword}{const};}
+\DoxyCodeLine{95 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} FileExists ( xbInt16 iOption ) \textcolor{keyword}{const};}
+\DoxyCodeLine{96 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} FileExists ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName ) \textcolor{keyword}{const};}
+\DoxyCodeLine{97 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} FileExists ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, xbInt16 iOption ) \textcolor{keyword}{const};}
+\DoxyCodeLine{98 }
+\DoxyCodeLine{99 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} FileIsOpen () \textcolor{keyword}{const};}
+\DoxyCodeLine{100 }
+\DoxyCodeLine{101 xbInt16 ReadBlock ( xbUInt32 ulBlockNo, \textcolor{keywordtype}{size\_t} readSize, \textcolor{keywordtype}{void} *buf );}
+\DoxyCodeLine{102 xbInt16 ReadBlock ( xbUInt32 ulBlockNo, xbUInt32 ulBlockSize, \textcolor{keywordtype}{size\_t} readSize, \textcolor{keywordtype}{void} *buf );}
+\DoxyCodeLine{103 xbInt16 WriteBlock( xbUInt32 ulBlockNo, \textcolor{keywordtype}{size\_t} writeSize, \textcolor{keywordtype}{void} *buf );}
+\DoxyCodeLine{104 }
+\DoxyCodeLine{105 xbInt16 GetFileSize( xbUInt64 \&ullFileSize );}
+\DoxyCodeLine{106 xbInt16 GetFileMtime( time\_t \&mtime );}
+\DoxyCodeLine{107 }
+\DoxyCodeLine{108 \mbox{\hyperlink{namespacexb_a25f47b226ce924a5c78f97989b0744a2}{xbDouble}} eGetDouble( \textcolor{keyword}{const} \textcolor{keywordtype}{char} *p ) \textcolor{keyword}{const};}
+\DoxyCodeLine{109 xbInt32 eGetInt32 ( \textcolor{keyword}{const} \textcolor{keywordtype}{char} *p ) \textcolor{keyword}{const};}
+\DoxyCodeLine{110 xbUInt32 eGetUInt32( \textcolor{keyword}{const} \textcolor{keywordtype}{char} *p ) \textcolor{keyword}{const};}
+\DoxyCodeLine{111 xbInt16 eGetInt16 ( \textcolor{keyword}{const} \textcolor{keywordtype}{char} *p ) \textcolor{keyword}{const};}
+\DoxyCodeLine{112 xbUInt16 eGetUInt16( \textcolor{keyword}{const} \textcolor{keywordtype}{char} *p ) \textcolor{keyword}{const};}
+\DoxyCodeLine{113 \textcolor{keywordtype}{void} ePutDouble( \textcolor{keywordtype}{char} *p, \mbox{\hyperlink{namespacexb_a25f47b226ce924a5c78f97989b0744a2}{xbDouble}} d );}
+\DoxyCodeLine{114 \textcolor{keywordtype}{void} ePutInt32 ( \textcolor{keywordtype}{char} *p, xbInt32 l );}
+\DoxyCodeLine{115 \textcolor{keywordtype}{void} ePutUInt32( \textcolor{keywordtype}{char} *p, xbUInt32 ul );}
+\DoxyCodeLine{116 \textcolor{keywordtype}{void} ePutInt16 ( \textcolor{keywordtype}{char} *p, xbInt16 s );}
+\DoxyCodeLine{117 \textcolor{keywordtype}{void} ePutUInt16( \textcolor{keywordtype}{char} *p, xbUInt16 s );}
+\DoxyCodeLine{118 }
+\DoxyCodeLine{119 xbInt16 xbFclose ();}
+\DoxyCodeLine{120 xbInt16 xbFeof ();}
+\DoxyCodeLine{121 xbInt16 xbFflush ();}
+\DoxyCodeLine{122 xbInt16 xbFgetc ( xbInt32 \&c );}
+\DoxyCodeLine{123 xbInt16 xbFgetc ( \textcolor{keywordtype}{char} \&c );}
+\DoxyCodeLine{124 }
+\DoxyCodeLine{125 \textcolor{preprocessor}{ \#ifdef XB\_LOCKING\_SUPPORT}}
+\DoxyCodeLine{126 xbInt16 xbLock ( xbInt16 iFunction, xbInt64 llOffset, \textcolor{keywordtype}{size\_t} stLen );}
+\DoxyCodeLine{127 xbInt16 GetLockRetryCount() \textcolor{keyword}{const};}
+\DoxyCodeLine{128 \textcolor{keywordtype}{void} SetLockRetryCount( xbInt16 iLockRetries );}
+\DoxyCodeLine{129 \textcolor{preprocessor}{ \#endif}}
+\DoxyCodeLine{130 }
+\DoxyCodeLine{131 xbInt16 \mbox{\hyperlink{classxb_1_1xbFile_a7cdfef5ede9ac98d44a28a6b7a70972c}{xbFopen}} ( xbInt16 iOpenMode );}
+\DoxyCodeLine{132 xbInt16 xbFopen ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sOpenMode, xbInt16 iShareMode );}
+\DoxyCodeLine{133 xbInt16 xbFopen ( xbInt16 iOpenMode, xbInt16 iShareMode );}
+\DoxyCodeLine{134 xbInt16 xbFopen ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sMode, \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, xbInt16 iShareMode );}
+\DoxyCodeLine{135 }
+\DoxyCodeLine{136 xbInt16 xbFputc ( xbInt32 c );}
+\DoxyCodeLine{137 xbInt16 xbFputc ( xbInt32 c, xbInt32 iNoTimes );}
+\DoxyCodeLine{138 xbInt16 xbFputs ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&s );}
+\DoxyCodeLine{139 xbInt16 xbFread ( \textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{size\_t} size, \textcolor{keywordtype}{size\_t} nmemb );}
+\DoxyCodeLine{140 xbInt16 xbFgets ( \textcolor{keywordtype}{size\_t} lSize, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sLine );}
+\DoxyCodeLine{141 }
+\DoxyCodeLine{142 \textcolor{keywordtype}{size\_t} xbFtell ();}
+\DoxyCodeLine{143 xbInt16 xbFseek ( xbInt64 llOffset, xbInt32 whence );}
+\DoxyCodeLine{144 }
+\DoxyCodeLine{145 \textcolor{keywordtype}{void} xbFTurnOffFileBuffering();}
+\DoxyCodeLine{146 xbInt16 xbFwrite ( \textcolor{keyword}{const} \textcolor{keywordtype}{void} *ptr, \textcolor{keywordtype}{size\_t} lSize, \textcolor{keywordtype}{size\_t} lNmemb );}
+\DoxyCodeLine{147 }
+\DoxyCodeLine{148 xbInt16 xbReadUntil ( \textcolor{keyword}{const} \textcolor{keywordtype}{char} cDelim, \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sOut );}
+\DoxyCodeLine{149 xbInt16 xbRemove ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, xbInt16 iOption );}
+\DoxyCodeLine{150 xbInt16 xbRemove ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName );}
+\DoxyCodeLine{151 xbInt16 xbRemove ();}
+\DoxyCodeLine{152 }
+\DoxyCodeLine{153 xbInt16 xbRename ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sOldName, \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sNewName );}
+\DoxyCodeLine{154 xbInt16 xbRename ( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sOldName, \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sNewName, xbInt16 iOption );}
+\DoxyCodeLine{155 \textcolor{keywordtype}{void} xbRewind ();}
+\DoxyCodeLine{156 }
+\DoxyCodeLine{157 xbInt16 xbTruncate ( xbInt64 llSize );}
+\DoxyCodeLine{158 xbInt16 NameSuffixMissing( \textcolor{keyword}{const} \mbox{\hyperlink{classxb_1_1xbString}{xbString}} \&sFileName, xbInt16 iOption ) \textcolor{keyword}{const};}
+\DoxyCodeLine{159 }
+\DoxyCodeLine{160 \textcolor{preprocessor}{ \#ifdef XB\_DEBUG\_SUPPORT}}
+\DoxyCodeLine{161 xbInt16 DumpBlockToDisk( xbUInt32 ulBlockNo, \textcolor{keywordtype}{size\_t} lBlockSize );}
+\DoxyCodeLine{162 \textcolor{preprocessor}{ \#endif}}
+\DoxyCodeLine{163 }
+\DoxyCodeLine{164 }
+\DoxyCodeLine{165 \textcolor{keyword}{protected}:}
+\DoxyCodeLine{166 }
+\DoxyCodeLine{167 \mbox{\hyperlink{classxb_1_1xbXBase}{xbXBase}} *\mbox{\hyperlink{classxb_1_1xbFile_ae39a67ea391b46055d4ca299cb222004}{xbase}}; \textcolor{comment}{/* pointer to the main structures */}}
+\DoxyCodeLine{168 }
+\DoxyCodeLine{169 \textcolor{keyword}{private}:}
+\DoxyCodeLine{170 FILE *fp;}
+\DoxyCodeLine{171 \mbox{\hyperlink{classxb_1_1xbString}{xbString}} sFqFileName; \textcolor{comment}{/* fully qualified file name */}}
+\DoxyCodeLine{172 \mbox{\hyperlink{classxb_1_1xbString}{xbString}} sFileName; \textcolor{comment}{/* file name */}}
+\DoxyCodeLine{173 \mbox{\hyperlink{classxb_1_1xbString}{xbString}} sDirectory; \textcolor{comment}{/* directory, ends with / or \(\backslash\) */}}
+\DoxyCodeLine{174 \mbox{\hyperlink{namespacexb_ab1a750481dd487f0d384aa1d200dff0f}{xbBool}} bFileOpen; \textcolor{comment}{/* true if file is open */}}
+\DoxyCodeLine{175 xbUInt32 ulBlockSize; \textcolor{comment}{/* used for memo and index files */}}
+\DoxyCodeLine{176 }
+\DoxyCodeLine{177 xbInt16 iOpenMode; \textcolor{comment}{/* XB\_READ || XB\_READ\_WRITE || XB\_WRITE */}}
+\DoxyCodeLine{178 xbInt16 iShareMode; \textcolor{comment}{/* XB\_SINGLE\_USER || XB\_MULTI\_USER -\/ set file buffering */}}
+\DoxyCodeLine{179 xbInt32 iFileNo; \textcolor{comment}{/* Library File No */}}
+\DoxyCodeLine{180 }
+\DoxyCodeLine{181 \textcolor{preprocessor}{ \#ifdef XB\_LOCKING\_SUPPORT}}
+\DoxyCodeLine{182 xbInt16 iLockRetries; \textcolor{comment}{/* file override number of lock attempts */}}
+\DoxyCodeLine{183 \textcolor{preprocessor}{ \#endif}}
+\DoxyCodeLine{184 }
+\DoxyCodeLine{185 \textcolor{preprocessor}{ \#ifdef HAVE\_SETENDOFFILE\_F}}
+\DoxyCodeLine{186 HANDLE fHandle;}
+\DoxyCodeLine{187 \textcolor{preprocessor}{ \#endif}}
+\DoxyCodeLine{188 }
+\DoxyCodeLine{189 }
+\DoxyCodeLine{190 \};}
+\DoxyCodeLine{191 }
+\DoxyCodeLine{192 \} \textcolor{comment}{/* namespace */}}
+\DoxyCodeLine{193 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_\_XBFILE\_H\_\_ */}\textcolor{preprocessor}{}}
+\DoxyCodeLine{194 }
+
+\end{DoxyCode}