|
#include <CMemoryDS.h>

Public Member Functions | |
| virtual | ~CMemoryDS () |
| Destructor. | |
| virtual void | clear () |
| Clears all the records. | |
| virtual const CField & | operator[] (uint32_t fieldIndex) const |
| virtual CField & | operator[] (uint32_t fieldIndex) |
| virtual const CField & | operator[] (const char *fieldName) const |
| virtual CField & | operator[] (const char *fieldName) |
| virtual void * | user_data () const |
| Returns user_data associated with the datasource. | |
| virtual uint32_t | fieldCount () const |
| virtual uint32_t | recordCount () const |
| virtual bool | readField (const char *fieldName, CVariant &fieldValue) |
| virtual bool | writeField (const char *fieldName, const CVariant &fieldValue) |
| virtual bool | open () |
| Opens the datasource. Implemented in derved class. | |
| virtual bool | close () |
| Closes the datasource. | |
| virtual bool | first () |
| Moves to the first record of the datasource. | |
| virtual bool | next () |
| Moves to the next record of the datasource. | |
| virtual bool | prior () |
| Moves to the prior record of the datasource. | |
| virtual bool | last () |
| Moves to the last record of the datasource. | |
| virtual bool | find (CVariant position) |
| Finds the record by the record position (defined by record's user_data or key). | |
| virtual bool | eof () const |
| Returns true if there are no more records in the datasource. Implemented in derved class. | |
Protected Member Functions | |
| CMemoryDS () | |
| Default constructor is protected, to prevent creating of the instance of that class. | |
Protected Attributes | |
| std::vector< CFieldList * > | m_list |
| Internal list of the dataset records. | |
| CFieldList * | m_current |
| Current record in the dataset. | |
| uint32_t | m_currentIndex |
| The index of the current record. | |
| bool | m_eof |
| EOF flag for sequentual reading first(),next()..next(). | |
Class CMemoryDS implements a special case of the datasource when the data can be loaded all at once, in the datasource open() operation. It's a base class for several actual datasources.
| virtual uint32_t sptk::CMemoryDS::fieldCount | ( | ) | const [virtual] |
| virtual CField& sptk::CMemoryDS::operator[] | ( | const char * | fieldName | ) | [virtual] |
Field access by the field name, non-const version.
| fieldName | const char *, field name |
Implements sptk::CDataSource.
| virtual const CField& sptk::CMemoryDS::operator[] | ( | const char * | fieldName | ) | const [virtual] |
Field access by the field name, const version.
| fieldName | const char *, field name |
Implements sptk::CDataSource.
| virtual CField& sptk::CMemoryDS::operator[] | ( | uint32_t | fieldIndex | ) | [virtual] |
Field access by the field index, non-const version.
| fieldIndex | int, field index |
Implements sptk::CDataSource.
| virtual const CField& sptk::CMemoryDS::operator[] | ( | uint32_t | fieldIndex | ) | const [virtual] |
Field access by the field index, const version.
| fieldIndex | int, field index |
Implements sptk::CDataSource.
| virtual bool sptk::CMemoryDS::readField | ( | const char * | fieldName, | |
| CVariant & | fieldValue | |||
| ) | [virtual] |
Reads the field by name from the datasource.
| fieldName | const char *, field name | |
| fieldValue | CVariant, field value |
Implements sptk::CDataSource.
| virtual uint32_t sptk::CMemoryDS::recordCount | ( | ) | const [virtual] |
| virtual bool sptk::CMemoryDS::writeField | ( | const char * | fieldName, | |
| const CVariant & | fieldValue | |||
| ) | [virtual] |
Writes the field by name from the datasource.
| fieldName | const char *, field name | |
| fieldValue | CVariant, field value |
Implements sptk::CDataSource.