akregator
c4_CustomViewer Class Reference
#include <mk4.h>
Inherited by c4_BlockedViewer, c4_ConcatViewer, c4_GroupByViewer, c4_HashViewer, c4_IndexedViewer, c4_JoinPropViewer, c4_JoinViewer, c4_OrderedViewer, c4_PairViewer, c4_ProductViewer, c4_ReadOnlyViewer, c4_RemapWithViewer, c4_RenameViewer, and c4_SliceViewer.
Detailed Description
Abstract base class for definition of custom views.A custom view is a view which can be accessed like any other view, using row and property operations, but which is fully managed by a customized "viewer" class. The viewer will eventually handle all requests for the view, such as defining its structure and size, as well as providing the actual data values when requested.
Custom views cannot propagate changes.
To implement a custom view, you must derive your viewer from this base class and define each of the virtual members. Then create a new object of this type on the heap and pass it to the c4_View constructor. Your viewer will automatically be destroyed when the last reference to its view goes away. See the DBF2MK sample code for an example of a viewer.
Definition at line 766 of file mk4.h.
Public Member Functions | |
| virtual bool | GetItem (int, int, c4_Bytes &)=0 |
| virtual int | GetSize ()=0 |
| virtual c4_View | GetTemplate ()=0 |
| virtual bool | InsertRows (int, c4_Cursor, int=1) |
| bool | InsertRows (int, const c4_RowRef &, int=1) |
| virtual int | Lookup (c4_Cursor, int &) |
| int | Lookup (const c4_RowRef &, int &) |
| virtual bool | RemoveRows (int, int=1) |
| virtual bool | SetItem (int, int, const c4_Bytes &) |
| virtual | ~c4_CustomViewer () |
Protected Member Functions | |
| c4_CustomViewer () | |
Constructor & Destructor Documentation
| c4_CustomViewer::c4_CustomViewer | ( | ) | [protected] |
Constructor, must be overridden in derived class.
| c4_CustomViewer::~c4_CustomViewer | ( | ) | [virtual] |
Member Function Documentation
| virtual bool c4_CustomViewer::GetItem | ( | int | , | |
| int | , | |||
| c4_Bytes & | ||||
| ) | [pure virtual] |
Fetch one data item, return it as a generic data value.
| virtual int c4_CustomViewer::GetSize | ( | ) | [pure virtual] |
Return the number of rows in this view.
| virtual c4_View c4_CustomViewer::GetTemplate | ( | ) | [pure virtual] |
Return the structure of this view (initialization, called once).
| bool c4_CustomViewer::InsertRows | ( | int | , | |
| c4_Cursor | , | |||
| int | = 1 | |||
| ) | [virtual] |
| bool c4_CustomViewer::InsertRows | ( | int | , | |
| const c4_RowRef & | , | |||
| int | = 1 | |||
| ) |
| int c4_CustomViewer::Lookup | ( | c4_Cursor | , | |
| int & | count_ | |||
| ) | [virtual] |
| int c4_CustomViewer::Lookup | ( | const c4_RowRef & | , | |
| int & | ||||
| ) |
| bool c4_CustomViewer::RemoveRows | ( | int | , | |
| int | = 1 | |||
| ) | [virtual] |
| bool c4_CustomViewer::SetItem | ( | int | , | |
| int | , | |||
| const c4_Bytes & | ||||
| ) | [virtual] |
The documentation for this class was generated from the following files:
KDE 4.2 API Reference