Xbase64 4.0.1
C++ Library for handling Xbase (DBF) format type files
|
xbXbase class. More...
#include <xbxbase.h>
Public Member Functions | |
xbXBase () | |
Class Constructor. More... | |
~xbXBase () | |
Class Deconstructor. More... | |
xbInt16 | CloseAllTables () |
Close all tables / files. More... | |
void | DisableMsgLogging () |
void | EnableMsgLogging () |
xbInt16 | FlushLog () |
const xbString & | GetLogDirectory () const |
const xbString & | GetLogFileName () const |
const xbString & | GetLogFqFileName () const |
xbBool | GetLogStatus () const |
xbInt16 | OpenHighestVersion (const xbString &sTableName, const xbString &sAlias, xbDbf &dbf, int dummy) |
xbInt16 | OpenHighestVersion (const xbString &sTableName, const xbString &sAlias, xbDbf **dbf) |
xbDbf * | Open (const xbString &sTableName, xbInt16 &iRc) |
Open highest qualified class available for dbf file. More... | |
xbDbf * | Open (const xbString &sTableName, const xbString &sAlias, xbInt16 iOpenMode, xbInt16 iShareMode, xbInt16 iVersion, xbInt16 &iRc) |
Open highest qualified class available for dbf file. More... | |
void | SetLogDirectory (const xbString &sLogFileDirectory) |
void | SetLogFileName (const xbString &sLogFileName) |
void | SetLogSize (size_t lSize) |
xbInt16 | WriteLogMessage (const xbString &sLogMessage, xbInt16 iOutputOpt=0) |
xbInt16 | WriteLogBytes (xbUInt32 lCnt, const char *p) |
void | xbSleep (xbInt32 lMillisecs) |
Cross platform sleep function. More... | |
xbInt16 | GetCmdLineOpt (xbInt32 lArgc, char **argv, const char *sOptRqst, xbString &sParmOut) |
Parse commmand line options for a given parm request. More... | |
xbInt16 | GetCmdLineOpt (xbInt32 lArgc, char **argv, xbString &sOptRqst, xbString &sParmOut) |
Parse commmand line options for a given parm request. More... | |
xbInt16 | AddTblToTblList (xbDbf *d, const xbString &sFqTblName) |
xbInt16 | AddTblToTblList (xbDbf *d, const xbString &sFqTblName, const xbString &sTblAlias) |
xbInt16 | DisplayTableList () const |
xbDbf * | GetDbfPtr (const xbString &sTblAlias) const |
xbDbf * | GetDbfPtr (xbInt16 sItemNo) const |
xbTblList * | GetTblListEntry (xbDbf *d) |
xbInt16 | GetOpenTableCount () const |
xbInt16 | RemoveTblFromTblList (const xbString &sTblAlias) |
xbInt16 | RemoveTblFromTblList (xbDbf *d) |
void | DisplayError (xbInt16 ErrorCode) const |
Display error message on console for a given error number. More... | |
xbString & | GetDefaultDateFormat () const |
Get the default date format. More... | |
xbString & | GetDataDirectory () const |
Get the current data directory. More... | |
xbInt16 | GetEndianType () const |
Get the Endian type. More... | |
const char * | GetErrorMessage (xbInt16 ErrorCode) const |
Get an error message. More... | |
void | SetDataDirectory (const xbString &sDataDirectory) |
Set the data directory. More... | |
void | SetDefaultDateFormat (const xbString &sDefaultDateFormat) |
Set the default date format. More... | |
xbBool | BitSet (unsigned char c, xbInt16 iBitNo) const |
Check a bit in a one byte field and see if it is set. More... | |
void | BitDump (unsigned char c) const |
void | BitDump (char c) const |
xbBool | GetDefaultAutoCommit () const |
Get the default auto commit setting. More... | |
void | SetDefaultAutoCommit (xbBool bDefaultAutoCommit) |
Set the default auto commit. More... | |
void | GetHomeDir (xbString &sHomeDirOut) |
Get home directory. More... | |
xbBool | GetMultiUser () const |
Get the multi user setting. More... | |
void | SetMultiUser (xbBool bMultiUser) |
Get the multi user setting. More... | |
Static Public Attributes | |
static const char * | ErrorCodeText [] |
Protected Member Functions | |
xbInt16 | GetFunctionInfo (const xbString &sExpLine, char &cReturnType, xbInt16 &iReturnLenCalc, xbInt32 &lReturnLenVal) const |
void | SetEndianType () |
Set the endian type. More... | |
Static Protected Member Functions | |
static xbInt16 | xbMemcmp (const unsigned char *s1, const unsigned char *s2, size_t n) |
Cross memcmp function. More... | |
Static Protected Attributes | |
static xbInt16 | iEndianType = 0 |
static xbString | sNullString = "" |
Friends | |
class | xbBcd |
class | xbExp |
xbXbase class.
The xbXBase class is the core class that needs to be in every application program.
xb::xbXBase::xbXBase | ( | ) |
Class Constructor.
xb::xbXBase::~xbXBase | ( | ) |
Class Deconstructor.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Check a bit in a one byte field and see if it is set.
c | One byte char field to examine. |
iBitNo | which bit to examine. |
xbInt16 xb::xbXBase::CloseAllTables | ( | ) |
void xb::xbXBase::DisableMsgLogging | ( | ) |
|
inherited |
Display error message on console for a given error number.
iErrorCode | Error number to reference |
|
inherited |
void xb::xbXBase::EnableMsgLogging | ( | ) |
xbInt16 xb::xbXBase::FlushLog | ( | ) |
xbInt16 xb::xbXBase::GetCmdLineOpt | ( | xbInt32 | lArgc, |
char ** | sArgv, | ||
const char * | sOptRqst, | ||
xbString & | sParmOut | ||
) |
Parse commmand line options for a given parm request.
lArgc | Value passed from main( argc, argv[] ) |
sArgv | Valued passed from main |
sOptRqst | Option to search for in the arguments list |
sParmOut | String token immediately to the right of the the option request, if found |
xbInt16 xb::xbXBase::GetCmdLineOpt | ( | xbInt32 | lArgc, |
char ** | sArgv, | ||
xbString & | sOptRqst, | ||
xbString & | sParmOut | ||
) |
Parse commmand line options for a given parm request.
lArgc | Value passed from main( argc, argv[] ) |
sArgv | Valued passed from main |
sOptRqst | Option to search for in the arguments list |
sParmOut | String token immediately to the right of the the option request, if found |
|
inherited |
Get the current data directory.
|
inherited |
|
inherited |
Get the default auto commit setting.
When auto commit is enabled, the library will automatically post any updates when moving off an updated record or closing files. If auto commit is disabled, the application program will need to explicitly update the tables using using dbf->Put() and dbf->AppendRecord().
|
inherited |
Get the default date format.
|
inherited |
Get the Endian type.
|
inherited |
Get an error message.
iErrorCode | ErrorCode is the error number of description to be returned. |
|
protected |
|
inherited |
Get home directory.
sHomeDirOut | - Output home directory for current user. |
const xbString & xb::xbXBase::GetLogDirectory | ( | ) | const |
const xbString & xb::xbXBase::GetLogFileName | ( | ) | const |
const xbString & xb::xbXBase::GetLogFqFileName | ( | ) | const |
xbBool xb::xbXBase::GetLogStatus | ( | ) | const |
|
inherited |
Get the multi user setting.
|
inherited |
xbDbf * xb::xbXBase::Open | ( | const xbString & | sTableName, |
const xbString & | sAlias, | ||
xbInt16 | iOpenMode, | ||
xbInt16 | iShareMode, | ||
xbInt16 | iRequestVersion, | ||
xbInt16 & | iRc | ||
) |
Open highest qualified class available for dbf file.
This routine can open various versions of the dbf file dependent on the iVersion field
sTableName | - Table name to open. |
sAlias | - Optional alias name. |
iOpenMode | - XB_READ_WRITE or XB_READ |
iShareMode | - XB_SINGLE_USER or XB_MULTI_USER |
iRequestVersion | 0 - Highest available 4 - Version four dbf 3 - Version three dbf |
iRc | - Return code from open request |
Open highest qualified class available for dbf file.
This routine opens the highest available version of the dbf file. Defaults to XB_READ_WRITE and XB_MULTI_USER mode.
xbInt16 xb::xbXBase::OpenHighestVersion | ( | const xbString & | sTableName, |
const xbString & | sAlias, | ||
xbDbf & | dbf, | ||
int | dummy | ||
) |
xbInt16 xb::xbXBase::OpenHighestVersion | ( | const xbString & | sTableName, |
const xbString & | sAlias, | ||
xbDbf ** | dbf | ||
) |
|
inherited |
|
inherited |
|
inherited |
Set the data directory.
sDataDirectory | Set the data direcroty. |
|
inherited |
Set the default auto commit.
Disabling auto commit requires the application execute explicit updates using dbf->Put() and dbf->AppendRecord(). With auto commit on, the library posts updates automatically when moving off the current record or closing a file.
bDefaultAutoCommit | xbTrue - Enable default auto commit. xbFalse - Disable default auto commit. |
|
inherited |
Set the default date format.
sDefaultDateFormat | Set the default date format. |
|
protectedinherited |
Set the endian type.
This routine determines the Endian-ness at run time instead of compile time as some processers (ie; Sparc,ARM) can be switched either way. This routine is called automatically by the library at startup and does not need to be called in an application program.
void xb::xbXBase::SetLogDirectory | ( | const xbString & | sLogFileDirectory | ) |
void xb::xbXBase::SetLogFileName | ( | const xbString & | sLogFileName | ) |
void xb::xbXBase::SetLogSize | ( | size_t | lSize | ) |
|
inherited |
Get the multi user setting.
bMultiUser | xbTrue - Turn on Multi user mode. xbFalse - Turn off Multi user mode. |
xbInt16 xb::xbXBase::WriteLogBytes | ( | xbUInt32 | lCnt, |
const char * | p | ||
) |
xbInt16 xb::xbXBase::WriteLogMessage | ( | const xbString & | sLogMessage, |
xbInt16 | iOutputOpt = 0 |
||
) |
|
staticprotected |
Cross memcmp function.
s1 | Left operand to compare. |
s2 | Right operand to compare. |
n | Number of bytes to compare. |
void xb::xbXBase::xbSleep | ( | xbInt32 | lMillisecs | ) |
Cross platform sleep function.
lMillisecs | Milliseconds to sleep. |
|
friend |
|
friend |
|
staticinherited |
|
staticprotectedinherited |
|
staticprotectedinherited |