This topic describes the structure of a table. A table is an item that can be stored in the Comms Database.
A table is a set of records. All records in a table are the same type. A table is also a container and an element.
There are two types of table:
a table that has records defined at system compile time - these records have named fields and are defined by Symbian platform.
a table that consists of records defined at run time - these records are user defined records - they are not known to Symbian platform when Symbian platform is built.
A table that has records defined at system compile time
is represented by the templated class CMDBRecordSet <T>
.
The template parameter defines the record type. The template parameter is
a Symbian platform defined record.
You create a table
object on the heap. You use the new (Eleave)
construction
to create this object.
The CommsDat API implements the table as an array of records and
uses RPointerArray <T>
as
the array. The CommsDat API implements RPointerArray<T>
in
the base class CMDBRecordSetBase, because
this behaviour is common to all tables. Tools and applications can access
the array and can use the sort behaviour provided by RPointerArray<T>
to
sort records.
A table that has user defined records is represented by the CMDBGenericRecord. The class has the behaviour that allows it to represent a record and a set of records. Internally, the class has an array that can contain the records.
You use the CommsDat::CCDRecordBase::RecordFactoryL() factory function to create a CMDBGenericRecord object.