Table class
Int | Table::CanDelete () Checks if the Delete operation can be done |
Int | Table::CanUpdate () Checks if the Update operation can be done |
Err | Table::Close () Closes the file in which the table is stored |
Char* | Table::CreateTmpFileName () Returns the name of a temporary file for this table |
Err | Table::DeleteRecord () Deletes the last read record (see conditions described in CanDelete) |
Record* | Table::FindFirst ( const Char *aFieldName, const Void *aFieldValue) Kratky_komentar_s_teckou_na_konci |
Record* | Table::FindNext () Kratky_komentar_s_teckou_na_konci |
Record* | Table::First () Returns the first record of the table |
Char* | Table::GetFileName () Returns the name of the file in which this table is kept |
Err | Table::InsertRecord (Record *aRecord) Appends the specified record to the table |
Int | Table::IsFixed () 1 if the stored records are of the same size |
Int | Table::IsOpen () 1 if the table is open |
Record* | Table::NewRecord () Creates an empty record according to the "definition" TableFieldQueue |
Record* | Table::Next () Returns the succeeding record of the table |
Err | Table::Open () Opens the file in which the table is stored |
Record* | Table::ReadRecord () Kratky_komentar_s_teckou_na_konci |
Size | Table::ReadRecordLength () Reads the header part of the record from the file to find out its length |
Err | Table::Remove () Removes the file in which the table is stored |
Table::Table (const Char *fileName, TableFieldQueue *aDefinition, LogFile *aLogFile) Table constructor | |
Err | Table::UpdateRecord (Record *aRecord) Updates the last accessed record (see conditions described in CanUpdate |
Err | Table::WriteRecord (Record *aRecord) Writes the specified record at the current file position |
Table::~Table () Kratky_komentar_s_teckou_na_konci |
methods
|
attributes | |
methods |
Table class. enables to define a table, to insert, update or delete records, to iterate trough the table, to search appropriate records by the value in the specified field.Description: This file contains the Table class which enables persistent "table-like" storage of information with sequential access only. ATTENTION:
Methods First, Next, FindFirst, FindNext return NEW INSTANCE of class Record. Therefore every object returned by these should be disposed off. Table takes no responsibility for freeing searchValue (used in FindFirst and FindNext methods) because searching e.g. for an integer is simply done this way: Int searchFor = 100; Record *r = table->FindFirst("Integer field", searchFor);In such a case there would be no sense to free searchFor, even more it would be a mistake.Remember that changing contents of memory pointed to by searchValue means searching for new value (FindFirst doesn't create its own copy of *searchValue - it cannot, because it would have to know how many bytes it should copy. That seemed ugly to me.).
alphabetic index hierarchy of classes
generated by doc++