FairCom Corporation


c-treeDB C++ API Layer Class Reference
This document lists the c-treeDB C++ API layer class references with a brief explanation of each class and methods.
CTBase Class
class CTBase The basic class, upon which most of the other classes are built.
CTBase Methods
CTBase::CTBase Creates a CTBase object text.
CTBase::~CTBase Destroys a CTBase Object and resets all the dependent objects.
CTBase::Abort Aborts a transaction started with a call to Begin.
CTBase::Begin Begins a transaction.
CTBase::ClearError Resets the error code
CTBase::Commit Commits a transaction started with a call to Begin.
CTBase::GetDefDateType Retrieves the default date type.
CTBase::GetDefFloatFormat Sets the default floating point string format to be used in sprintf and sscanf.
CTBase::GetDefTimeType Sets the default time type.
CTBase::GetError Returns the error code associated with the handle.
CTBase::GetHandle Returns the handle.
CTBase::GetHandleId Returns the handle ID.
CTBase::GetLockMode Retrieves the current record lock mode for session- wide locks.
CTBase::GetUserTag Retrieves the user tag.
CTBase::IsLockActive Indicates if a session-wide lock is active.
CTBase::IsTransActive Indicates if a transaction has been started with a call to Begin(),but not terminated with a call to Commit() or Abort().
CTBase::Lock Enables or disables session-wide locks.
CTBase::RestoreSavePoint Restore a previously set save point.
CTBase::SetDefDateType Sets the default date type.
CTBase::SetDefFloatFormat Sets the default floating point string format to be used in sprintf.
CTBase::SetDefTimeType Sets the default time type.
CTBase::SetError Sets the error code.
CTBase::SetHandle Sets the object.
CTBase::SetSavePoint Sets a new transaction save point, and returns this value.
CTBase::SetUserTag Sets the user tag.
CTBase::Unlock Frees all session-wide locks held by the program.
CTBigint Class
class CTBigint Represents big integer objects. Big integer objects are 64-bit integers.
CTBigint Methods
CTBigint::CTBigint This is the constructor for the CTBigint object.
CTBigint::~CTBigint This is the destructor for the CTBigint object.
CTBigint::AsBigint Retrieve the C big integer type.
CTBigint::AsFloat Converts a CTBigint object to DOUBLE.
CTBigint::AsLong Converts a CTBigint object to LONG.
CTBigint::AsMoney Convert CTBigint (64-bit) to CTMoney (32-bit).
CTBigint::AsString Converts a CTBigint object to a CTString object.
CTBigint::IsZero IsZero indicates if a big integer value is zero.
CTBigint::SetBigint Initializes the CTBigint object.
CTBigint::Zero Zero sets a Bigint value to zero.
CTBlob Class
class CTBlob The CTBlob class represents Blob objects.
CTBlob Methods
CTBlob::CTBlob This is the constructor for the CTBlob object.
CTBlob::~CTBlob This is the destructor for the CTBlob object.
CTBlob::AsString Returns a CTBLOB object as a CTString object.
CTBlob::Get Retrieves the CTBlob object.
CTBlob::GetBlob Retrieves the CTBlob object.
CTBlob::GetSize Retrieves the CTBlob object size.
CTBlob::Resize Resizes the CTBlob object.
CTBlob::SetBlob Initializes the CTBlob object.
CTBlob::UpdateBlob Updates one existing CTBlob object.
CTCurrency Class
class CTCurrency The CTCurrency class represents Currency objects. Currency objects are 64-bit integers representing currency values.
CTCurrency Methods
CTCurrency::CTCurrency This is the constructor for the CTCurrency object.
CTCurrency::~CTCurrency This is the destructor for the CTCurrency object.
CTCurrency::AsBigint Convert a CTCurrency object to big integer.
CTCurrency::AsCurrency Retrieve the C currency type.
CTCurrency::AsFloat Converts a CTCurrency object to DOUBLE.
CTCurrency::AsLong Converts a CTCurrency object to LONG.
CTCurrency::AsMoney Convert a CTCurrency object (64-bit) to a CTMoney object (32-bit).
CTCurrency::AsString Converts a CTCurrency object to a CTString object.
CTCurrency::IsZero Indicates if a currency value is zero.
CTCurrency::Round Rounds a CTCurrency to a specified number of decimal places.
CTCurrency::SetCurrency Initializes the CTCurrency object.
CTCurrency::StringToCurrency Converts a CTString object to a CTCurrency object.
CTCurrency::Zero Sets a CTCurrency object value to zero.
CTDatabase Class
class CTDatabase The CTDatabase class deals with the Database concept. The Database can be thought as a collection of tables. Multiple databases can be con- nected at the same time, within the same session. The same database may open at different sessions. CTDatabase class is derived from the CTBase class.
CTDatabase Methods
CTDatabase::CTDatabase This is the constructor for the CTDatabase class.
CTDatabase::~CTDatabase This is the destructor for the CTDatabase class.
CTDatabase::AddTable Adds an existing table to the database.
CTDatabase::CloseAll Closes all active tables associated with the database.
CTDatabase::Connect Connects to a database.
CTDatabase::Create Creates a new database.
CTDatabase::DeleteTable Drops a table from the database, and delete the files from disk.
CTDatabase::Disconnect Disconnects a specific database.
CTDatabase::DropTable Drops a table from the database, but does not delete the files from disk.
CTDatabase::FindActive Retrieves active table.
CTDatabase::FindTable Locates a table in a database.
CTDatabase::FirstTable Locates the first table in a database.
CTDatabase::GetFirstActive Retrieves the first active table in the database.
CTDatabase::GetName Retrieves the database name.
CTDatabase::GetNextActive Retrieves the next active table in the database.
CTDatabase::GetPath Retrieves the database path.
CTDatabase::GetTableCount Retrieves the number of tables in the database dictionary.
CTDatabase::GetTableUID Retrieves the table UID.
CTDatabase::IsActive Retrieves the active state of a database (connected or disconnected state).
CTDatabase::NextTable Locates the next table in a database.
CTDate Class
class CTDate The CTDate class represents Date objects.
CTDate Methods
CTDate::CTDate This is the constructor for the CTDate object.
CTDate::~CTDate This is the destructor for the CTDate object.
CTDate::CurrentDate Retrieves the current system date.
CTDate::DateToString Converts a packed CTDATE type value to a CTString object.
CTDate::Day Retrieves the day component of a packed CTDATE type value.
CTDate::DayOfWeek Retrieves the day of the week from a packed CTDATE type value.
CTDate::GetDate Retrieves the date.
CTDate::IsLeapYear Indicates if the year component of a packed CTDATE type value is a leap year.
CTDate::Month Retrieves the month component of a packed CTDATE type value.
CTDate::Pack Packs a year, month and day value into a CTDATE type value.
CTDate::SetDate Sets the date to the CTDate object.
CTDate::StringToDate Converts a CTString object to a date object.
CTDate::Unpack Unpacks a CTDATE type value into a year, month and day val- ues.
CTDate::Year Retrieves the year component of a packed CTDATE type value.
CTDateTime Class
class CTDateTime The CTDateTime class represents DateTime objects.
CTDateTime Methods
CTDateTime::CTDateTime This is the constructor for the CTDateTime object.
CTDateTime::~CTDateTime This is the destructor for the CTDateTime object.
CTDateTime::CurrentDate Retrieves the current system date and sets the time to zero.
CTDateTime::CurrentDateTime Retrieves the current system date and time.
CTDateTime::DateTimeToString Converts a packed CTDATETIME type value to a CTString object.
CTDateTime::Day Retrieves the day component from a CTDATETIME object.
CTDateTime::DayOfWeek Retrieves the day of the week from the date part of the CTDATETIME object.
CTDateTime::GetDate Retrieves a CTDate object from a CTDateTime object.
CTDateTime::GetDateTime Retrieves the DateTime.
CTDateTime::GetTime Retrieves a CTTime object from a CTDateTime object.
CTDateTime::IsLeapYear Indicates if the year component from a CTDATETIME object is a leap year.
CTDateTime::Hour Retrieves the hour component from a CTDATETIME object.
CTDateTime::Minute Retrieves the minute component from a CTDATETIME object.
CTDateTime::Month Retrieves the month component from a CTDATETIME object.
CTDateTime::Pack Packs an hour, minute and second value into a CTDA- TETIME object.
CTDateTime::Second Retrieves the second component from a CTDATETIME object.
CTDateTime::SetDateTime Sets the DateTime to the CTDateTime object.
CTDateTime::StringToDateTime Converts a CTString object to a DateTime object.
CTDateTime::Unpack Unpacks a CTDATETIME type value into hour, minute and second values.
CTDateTime::Year Retrieves the year component of a CTDATETIME object.
CTException Class
class CTException The CTException Class is the base exception handling class for the c-treeDB C++ layer. It is used to throw an error message, when one exception occurs.
CTException Methods
CTException::CTException This is the constructor for the CTException class.
CTException::~CTException This is the destructor for the CTException class.
CTException::GetErrorCode Returns the last error code.
CTException::GetErrorMsg Returns a CTString object with the last error mes- sage.
CTException::GetLineNumber Returns the line number of the C++ source file that generated the error, or zero if no line number is available.
CTException::GetSourceFile Returns the CTString object with the C++ source file (including path) that generated the last error.
CTField Class
class CTField The CTField class deals with the field concept. The field is the basic component from the table. Any table may be composed of as many fields as one wish. It uses CTBase as the base class, and implements the constructor/destructor allocat- ing/freeing memory to the field operations.
CTField Methods
CTField::CTField This is the constructor for the CTField object.
CTField::~CTField This is the destructor for the CTField object.
CTField::GetLength Retrieves the field length.
CTField::GetName Retrieves the field name.
CTField::GetNullFlag Retrieves the field null flag.
CTField::GetNumber Retrieves the field position index in the table field list.
CTField::GetPrecision Retrieves the field precision.
CTField::GetScale Retrieves the field scale.
CTField::GetType Retrieves the field type.
CTField::IsNumeric Indicates if the field represents a numeric value.
CTField::SetLength Sets the field length.
CTField::SetName Sets the field name.
CTField::SetNullFlag Sets the new null flag value.
CTField::SetPrecision Sets the field precision.
CTField::SetScale Sets the field scale.
CTField::SetType Sets the field type.
CTIndex Class
class CTIndex The CTIndex class deal with the index concept. The index is part of the table, and represent one field, or parts of one field, or parts of several fields. One sin- gle index may be composed of several segments.
CTIndex Methods
CTIndex::CTIndex This is the constructor for the CTIndex object.
CTIndex::~CTIndex This is the destructor for the CTIndex object.
CTIndex::AddSegment Adds a new segment to the index at the end of the index.
CTIndex::DelSegment Deletes a segment from the index.
CTIndex::GetDuplicateFlag Retrieves the allow duplicated flag for this index.
CTIndex::GetEmptyChar Retrieves the index empty char.
CTIndex::GetKeyLength Retrieves the key length.
CTIndex::GetKeyType Retrieves the key type.
CTIndex::GetName Retrieves the index name.
CTIndex::GetNullFlag Retrieves the null flag.
CTIndex::GetNumber Retrieves the index position in table indices list.
CTIndex::GetSegment Retrieves an index segment.
CTIndex::GetSegmentCount Retrieves the index segments count.
CTIndex::GetTemporaryFlag Retrieves the temporary flag.
CTIndex::GetUID Retrieves the index UID.
CTIndex::InsertSegment Inserts a new segment to the index, in a specified position.
CTIndex::SetDuplicateFlag Sets the allow duplicates flag. If set to YES, this index allows duplicated values.
CTIndex::SetEmptyChar Sets the empty char property.
CTIndex::SetNullFlag Sets the null flag. If set to YES, the system checks for NULL or missing key values after the index has been concatenated.
CTIndex::SetTemporaryFlag Sets the temporary flag. If set to YES, this index is a temporary index.
CTMoney Class
class CTMoney The CTMoney class represents Money objects.
CTMoney Methods
CTMoney::CTMoney This is the constructor for the CTMoney object.
CTMoney::~CTMoney This is the destructor for the CTMoney object.
CTMoney::AsFloat Converts a CTMoney object to float.
CTMoney::AsLong Converts a CTMoney object to LONG.
CTMoney::AsMoney Converts a CTMONEY object to a CTMoney object.
CTMoney::AsString Converts a CTMONEY object to a CTString object.
CTMoney::SetMoney Initializes the CTMoney object.
CTMoney::StringToMoney StringToMoney converts a CTString object to a CTMoney object.
CTNumber Class
class CTNumber The CTNumber class represents number objects.
CTNumber Methods
CTNumber::CTNumber This is the constructor for the CTNumber object.
CTNumber::~CTNumber This is the destructor for the CTNumber object.
CTNumber::AsBigint Convert CTNumber to a big integer object.
CTNumber::AsCurrency Convert CTNumber to CTCurrency.
CTNumber::AsFloat Converts a CTNumber object to double.
CTNumber::AsLong Converts a CTNumber object to LONG.
CTNumber::AsMoney Convert CTNumber to CTMoney.
CTNumber::AsNumber Retrieve the C CTNumber type.
CTNumber::AsString Converts a CTNumber object to a CTString object.
CTNumber::DecimalDigits Gets the number of digits after the decimal point.
CTNumber::IntegralDigits IntegralDigits gets the number of digits before the decimal point.
CTNumber::IsZero IsZero indicates if a CTNumber value is zero.
CTNumber::Round Rounds a number to a specified number of decimal places.
CTNumber::SetNumber Initializes the CTNumber object.
CTNumber::Zero Zero sets a CTNumber value to zero.
CTRecord Class
class CTRecord The CTRecord class deals with the record concept. The CTRecord object is the "atomic" or basic element of the database system, in the sense that it has the smallest piece of integrated information. It represents the information in the data structure defined in the table. Multiple records may belong to one table, but a record belongs to only one table. The records are several times defined as the "rows" in the tables.
CTRecord Methods
CTRecord::CTRecord This is the constructor for the CTRecord class.
CTRecord::~CTRecord This is the destructor for the CTRecord class. It frees the allocated memory to the Record.
CTRecord::BuildTargetKey Build a target key based on data in record buffer
CTRecord::Clear Clears the record buffer. With this, c-treeDB no longer has a current record.
CTRecord::ClearField Clears the contents of a field.
CTRecord::Delete Deletes the current record from table. The record must be locked with one of the write locks before it is deleted.
CTRecord::Find Looks for the record in the table.
CTRecord::FindRowid Verifies if a record exist at a given rowid value.
CTRecord::FindTarget Looks for one specified record in the table.
CTRecord::First Moves to first record in table.
CTRecord::GetDefaultIndex Retrieves the default record index number.
CTRecord::GetDefaultIndexName Retrieves the default record index name.
CTRecord::GetFieldAddress Retrieves the field address in the record buffer.
CTRecord::GetFieldAsBigint Retrieves the field contents as a big integer (64- bit).
CTRecord::GetFieldAsBlob Retrieves the field contents as a CTBlob object.
CTRecord::GetFieldAsBool Retrieves the field contents as a boolean value.
CTRecord::GetFieldAsByte Retrieves the field contents as a UTEXT value (unsigned one-byte integer).
CTRecord::GetFieldAsChar Retrieves the field contents as a char value.
CTRecord::GetFieldAsCurrency Retrieves the field contents as a CTCurrency object.
CTRecord::GetFieldAsDate Retrieves the field contents as a CTDate object.
CTRecord::GetFieldAsDateTime Retrieves the field contents as a CTDateTime object.
CTRecord::GetFieldAsFloat Retrieves the field contents as a float value.
CTRecord::GetFieldAsMoney Retrieves the field contents as a CTMoney object.
CTRecord::GetFieldAsNumber Retrieves the field contents as a CTNumber object.
CTRecord::GetFieldAsShort Retrieves the field contents as a 2-bytes signed integer (COUNT) value.
CTRecord::GetFieldAsSigned Retrieves the field contents as a signed value.
CTRecord::GetFieldAsString Retrieves the field contents as a CTString object.
CTRecord::GetFieldAsTime Retrieves the field contents as a CTTime object.
CTRecord::GetFieldAsUnsigned Retrieves the field contents as an unsigned value.
CTRecord::GetFieldAsWord Retrieves the field contents as an unsigned two- bytes integer value (UCOUNT).
CTRecord::GetFieldByName Retrieves the field number based on the field name.
CTRecord::GetFieldLength Retrieves the actual field data length.
CTRecord::GetFieldName Retrieves the field name based on the field number.
CTRecord::GetFieldOffset Retrieves the field record offset.
CTRecord::GetFieldSize Retrieves the field defined size.
CTRecord::GetFieldType Retrieves the field type based on the field number or name.
CTRecord::GetRecordBuffer Retrieves the record buffer object.
CTRecord::GetRecordCount Retrieves the number of records in table. It may be used in conjunction with First and Next to retrieve all records in the table.
CTRecord::GetRecordLength Retrieves the record length.
CTRecord::GetRecordPos Retrieves the current record offset position.
CTRecord::GetRecordSize Retrieves the allocated record size.
CTRecord::GetRowid Retrieves the record's rowid value.
CTRecord::IsEdited Indicates if a record buffer has been modified.
CTRecord::IsNew Indicates if a record buffer is cleared.
CTRecord::IsNullField Indicates if the field specified by field number or name is a null field.
CTRecord::IsVariableField Indicates if a field is in the variable portion of a record
CTRecord::Last Moves to the last record in the table.
CTRecord::LockRecord Locks the current record.
CTRecord::Next Moves to the next record in the table.
CTRecord::Prev Moves to the previous record in the table.
CTRecord::Read Reads the current record.
CTRecord::RecordSetOff Deactivates record sets.
CTRecord::RecordSetOn Activates record sets.
CTRecord::Reset Resets the record buffer to its initial condition.
CTRecord::SeekRecord Moves the record to the position pointed to by offset.
CTRecord::SetDefaultIndex Sets the new record default index.
CTRecord::SetEdited Sets the changed record flag.
CTRecord::SetFieldAsBigint Sets the field contents as a big integer object (64- bit).
CTRecord::SetFieldAsBlob Sets the field contents as a blob object.
CTRecord::SetFieldAsBool Sets the field contents as a boolean value.
CTRecord::SetFieldAsByte Sets the field contents as a byte value (unsigned one-byte integer).
CTRecord::SetFieldAsChar Sets the field contents as a TEXT value (signed one-byte integer).
CTRecord::SetFieldAsCurrency Sets the field contents as a CTCurrency (64- bit) object.
CTRecord::SetFieldAsDate Sets the field contents as a date object.
CTRecord::SetFieldAsDateTime Sets the field contents as a date and time object.