Xbase64 4.0.1
C++ Library for handling Xbase (DBF) format type files
|
Class for handling shared system variables. More...
#include <xbssv.h>
Public Member Functions | |
xbSsv () | |
Class Constructor. More... | |
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... | |
xbBool | GetDefaultAutoCommit () const |
Get the default auto commit setting. More... | |
void | SetDefaultAutoCommit (xbBool bDefaultAutoCommit) |
Set the default auto commit. More... | |
xbString & | GetDefaultLogDirectory () const |
xbString & | GetDefaultLogFileName () const |
void | SetDefaultLogDirectory (const xbString &sDefaultLogDirectory) |
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 | |
void | SetEndianType () |
Set the endian type. More... | |
Static Protected Attributes | |
static xbInt16 | iEndianType = 0 |
static xbString | sNullString = "" |
Class for handling shared system variables.
This class defines static variables which are referenced across class instances.
This class is designed to have the variables set when the xbXBase class constructor is called (xbXBase is a derived class). The xbXbase class is designed to be called first in an application programs, and it is only called once. The static values in this class are typically initialized at program startup and don't require additional updates.
xb::xbSsv::xbSsv | ( | ) |
Class Constructor.
xbBool xb::xbSsv::BitSet | ( | unsigned char | c, |
xbInt16 | iBitNo | ||
) | const |
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. |
void xb::xbSsv::DisplayError | ( | xbInt16 | iErrorCode | ) | const |
Display error message on console for a given error number.
iErrorCode | Error number to reference |
xbString & xb::xbSsv::GetDataDirectory | ( | ) | const |
Get the current data directory.
xbBool xb::xbSsv::GetDefaultAutoCommit | ( | ) | const |
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().
xbString & xb::xbSsv::GetDefaultDateFormat | ( | ) | const |
Get the default date format.
xbString & xb::xbSsv::GetDefaultLogDirectory | ( | ) | const |
xbString & xb::xbSsv::GetDefaultLogFileName | ( | ) | const |
xbInt16 xb::xbSsv::GetEndianType | ( | ) | const |
Get the Endian type.
const char * xb::xbSsv::GetErrorMessage | ( | xbInt16 | iErrorCode | ) | const |
Get an error message.
iErrorCode | ErrorCode is the error number of description to be returned. |
xbBool xb::xbSsv::GetMultiUser | ( | ) | const |
Get the multi user setting.
void xb::xbSsv::SetDataDirectory | ( | const xbString & | sDataDirectory | ) |
Set the data directory.
sDataDirectory | Set the data direcroty. |
void xb::xbSsv::SetDefaultAutoCommit | ( | xbBool | bDefaultAutoCommit | ) |
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. |
void xb::xbSsv::SetDefaultDateFormat | ( | const xbString & | sDefaultDateFormat | ) |
Set the default date format.
sDefaultDateFormat | Set the default date format. |
void xb::xbSsv::SetDefaultLogDirectory | ( | const xbString & | sDefaultLogDirectory | ) |
|
protected |
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::xbSsv::SetMultiUser | ( | xbBool | bMultiUser | ) |
Get the multi user setting.
bMultiUser | xbTrue - Turn on Multi user mode. xbFalse - Turn off Multi user mode. |
|
static |
|
staticprotected |
|
staticprotected |