Xbase Class Library  2.0.0
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
xbXBase Class Reference

xbXBase class More...

#include <xbase.h>

Inheritance diagram for xbXBase:
xbDate

Public Member Functions

 ~xbXBase ()
 Destructor. More...
 
 xbXBase ()
 Constructor. More...
 
xbShort AddDbfToDbfList (xbDbf *d, const char *DatabaseName)
 Add dbf to dbf list. More...
 
xbDbfGetDbfPtr (const char *Name)
 Get pointer to named dbf. More...
 
xbShort DirectoryExistsInName (const char *Name)
 Get offset of last PATH_SEPARATOR in Name. More...
 
xbShort GetEndianType (void)
 
void DisplayError (const xbShort ErrorCode) const
 Display description of error code. More...
 
xbDouble GetDouble (const char *p)
 Get a portable double value. More...
 
xbLong GetLong (const char *p)
 Get a portable long value. More...
 
xbULong GetULong (const char *p)
 Get a portable unsigned long value. More...
 
xbShort GetShort (const char *p)
 Get a portable short value. More...
 
void PutLong (char *p, const xbLong l)
 Put a portable long value. More...
 
void PutShort (char *p, const xbShort s)
 Put a portable short value. More...
 
void PutULong (char *p, const xbULong l)
 Put a portable unsigned long value. More...
 
void PutUShort (char *p, const xbUShort s)
 Put a portable unsigned short value. More...
 
void PutDouble (char *p, const xbDouble d)
 Put a portable double value. More...
 
xbShort RemoveDbfFromDbfList (xbDbf *)
 Remove dbf from dbf list. More...
 
- Public Member Functions inherited from xbDate
 xbDate ()
 Short description. More...
 
 xbDate (const char *Date8)
 Short description. More...
 
 xbDate (const xbString &Date8)
 Short description. More...
 
const xbStringGetDate () const
 Short description. More...
 
xbStringGetDate ()
 Short description. More...
 
const xbStringGetFormattedDate () const
 Short description. More...
 
xbStringGetFormattedDate ()
 Short description. More...
 
int SetDate (const char *Date8)
 Short description. More...
 
int SetDate (const xbString &Date8)
 Short description. More...
 
long JulianDays (const char *Date8) const
 Short description. More...
 
long JulianDays (const xbString &Date8) const
 Short description. More...
 
long JulianDays () const
 Short description. More...
 
int YearOf (const char *Date8) const
 Short description. More...
 
int YearOf (const xbString &Date8) const
 Short description. More...
 
int YearOf () const
 Short description. More...
 
int MonthOf (const char *Date8) const
 Short description. More...
 
int MonthOf (const xbString &Date8) const
 Short description. More...
 
int MonthOf () const
 Short description. More...
 
int DayOf (int Format, const char *Date8) const
 Short description. More...
 
int DayOf (int Format, const xbString &Date8) const
 Short description. More...
 
int DayOf (int Format) const
 Short description. More...
 
int IsLeapYear (const char *Date8) const
 Short description. More...
 
int IsLeapYear (const xbString &Date8) const
 Short description. More...
 
int IsLeapYear () const
 Short description. More...
 
int DateIsValid (const char *Date8) const
 Short description. More...
 
int DateIsValid (const xbString &Date8) const
 Short description. More...
 
xbStringLastDayOfMonth (const char *Date8)
 Short description. More...
 
xbStringLastDayOfMonth (const xbString &Date8)
 Short description. More...
 
xbStringLastDayOfMonth ()
 Short description. More...
 
xbStringSysdate ()
 Short description. More...
 
xbStringJulToDate8 (long)
 Short description. More...
 
xbStringFormatDate (const char *Format, const char *Date8)
 Short description. More...
 
xbStringFormatDate (const xbString &Format, const char *Date8)
 Short description. More...
 
xbStringFormatDate (const char *Format, const xbString &Date8)
 Short description. More...
 
xbStringFormatDate (const xbString &Format, const xbString &Date8)
 Short description. More...
 
xbStringFormatDate (const char *Format)
 Short description. More...
 
xbStringFormatDate (const xbString &Format)
 Short description. More...
 
xbStringCharDayOf (const char *Date8)
 Short description. More...
 
xbStringCharDayOf (const xbString &Date8)
 Short description. More...
 
xbStringCharDayOf ()
 Short description. More...
 
xbStringCharMonthOf (const char *Date8)
 Short description. More...
 
xbStringCharMonthOf (const xbString &Date8)
 Short description. More...
 
xbStringCharMonthOf ()
 Short description. More...
 
xbStringoperator+= (int)
 Short description. More...
 
xbStringoperator-= (int)
 Short description. More...
 
xbStringoperator++ (int)
 Short description. More...
 
xbStringoperator-- (int)
 Short description. More...
 
xbStringoperator+ (int)
 Short description. More...
 
xbStringoperator- (int)
 Short description. More...
 
long operator- (const xbDate &) const
 Short description. More...
 
int operator== (const xbDate &) const
 Short description. More...
 
int operator!= (const xbDate &) const
 Short description. More...
 
int operator< (const xbDate &) const
 Short description. More...
 
int operator> (const xbDate &) const
 Short description. More...
 
int operator<= (const xbDate &) const
 Short description. More...
 
int operator>= (const xbDate &) const
 Short description. More...
 

Static Public Member Functions

static const char * GetErrorMessage (const xbShort ErrorNo)
 Get description of error code. More...
 

Protected Attributes

xbDbListDbfList
 
xbDbListFreeDbfList
 
xbShort EndianType
 
- Protected Attributes inherited from xbDate
xbString cDate8
 
xbString fDate
 

Additional Inherited Members

- Protected Member Functions inherited from xbDate
void SetDateTables ()
 Short description. More...
 
- Static Protected Attributes inherited from xbDate
static int AggregatedDaysInMonths [2][13]
 
static int DaysInMonths [2][13]
 
static const xbStringDays [7]
 
static const xbStringMonths [12]
 

Detailed Description

xbXBase class

Constructor & Destructor Documentation

xbXBase::~xbXBase ( )

Destructor.

xbXBase::xbXBase ( void  )

Constructor.

Member Function Documentation

xbShort xbXBase::AddDbfToDbfList ( xbDbf d,
const char *  DatabaseName 
)

Add dbf to dbf list.

Adds an xbDbf class instance to the list of dbf's.

Parameters
dthe xbDbf instance to be added
DatabaseNamename of the database
Returns
One of the following return codes:

Return CodeDescription
XB_NO_ERRORNo error
XB_NO_MEMORYOut of memory
xbShort xbXBase::DirectoryExistsInName ( const char *  Name)

Get offset of last PATH_SEPARATOR in Name.

Scans the specified Name for the last occurance of PATH_SEPARATOR.

Parameters
Namestring to be scanned.
Returns
offset of last occurance of PATH_SEPARATOR
void xbXBase::DisplayError ( const xbShort  ErrorNo) const

Display description of error code.

Displays a text description of an XBase error code.

Parameters
ErrorNoerror to be displayed
xbDbf * xbXBase::GetDbfPtr ( const char *  Name)

Get pointer to named dbf.

Looks up an open DBF file by Name.

Parameters
Name
Returns
A pointer to the xbDbf class instance if found or NULL if not found.
xbDouble xbXBase::GetDouble ( const char *  p)

Get a portable double value.

Converts a double (64 bit floating point) value stored at p from a portable format to the machine format.

Parameters
ppointer to memory containing the portable double value
Returns
the double value.
xbShort xbXBase::GetEndianType ( void  )
inline
const char * xbXBase::GetErrorMessage ( const xbShort  ErrorNo)
static

Get description of error code.

Returns a pointer to string containing a text description of an error code.

Parameters
ErrorNoerror number of description to be returned
xbLong xbXBase::GetLong ( const char *  p)

Get a portable long value.

Converts a long (32 bit integer) value stored at p from a portable format to the machine format.

Parameters
ppointer to memory containing the portable long value
Returns
the long value.
xbShort xbXBase::GetShort ( const char *  p)

Get a portable short value.

Converts a short (16 bit integer) value stored at p from a portable format to the machine format.

Parameters
ppointer to memory containing the portable short value
Returns
the short value.
xbULong xbXBase::GetULong ( const char *  p)

Get a portable unsigned long value.

Converts an unsigned long (32 bit integer) value stored at p from a portable format to the machine format.

Parameters
ppointer to memory containing the portable unsigned long value
Returns
the unsigned long value.
void xbXBase::PutDouble ( char *  c,
const xbDouble  d 
)

Put a portable double value.

Converts a double (64 floating point) value from machine format to a portable format and stores the converted value in the memory referenced by c.

Parameters
cpointer to memory to hold converted value
svalue to be converted
void xbXBase::PutLong ( char *  c,
const xbLong  l 
)

Put a portable long value.

Converts a long (32 bit integer) value from machine format to a portable format and stores the converted value in the memory referenced by c.

Parameters
cpointer to memory to hold converted value
svalue to be converted
void xbXBase::PutShort ( char *  c,
const xbShort  s 
)

Put a portable short value.

Converts a short (16 bit integer) value from machine format to a portable format and stores the converted value in the memory referenced by c.

Parameters
cpointer to memory to hold converted value
svalue to be converted
void xbXBase::PutULong ( char *  c,
const xbULong  l 
)

Put a portable unsigned long value.

Converts an unsigned long (32 bit integer) value from machine format to a portable format and stores the converted value in the memory referenced by c.

Parameters
cpointer to memory to hold converted value
svalue to be converted
void xbXBase::PutUShort ( char *  c,
const xbUShort  s 
)

Put a portable unsigned short value.

Converts an unsigned long (16 bit integer) value from machine format to a portable format and stores the converted value in the memory referenced by c.

Parameters
cpointer to memory to hold converted value
svalue to be converted
xbShort xbXBase::RemoveDbfFromDbfList ( xbDbf d)

Remove dbf from dbf list.

Removes the specified xbDbf class instance from the list of dbf's.

Parameters
dxbDbf to be removed
Returns
One of the following return codes:

Return CodeDescription
XB_NO_ERRORNo error

Member Data Documentation

xbDbList* xbXBase::DbfList
protected
xbShort xbXBase::EndianType
protected
xbDbList* xbXBase::FreeDbfList
protected

The documentation for this class was generated from the following files: