Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

c4_Sequence Class Reference

A sequence is an abstract base class for views on ranges of records. More...

#include <mk4.h>

List of all members.

Public Member Functions

 c4_Sequence ()
 Abstract constructor.
virtual int Compare (int, c4_Cursor) const
 Compare the specified row with another one.
virtual bool RestrictSearch (c4_Cursor, int &, int &)
 Restrict the search range for rows.
void SetAt (int, c4_Cursor)
 Replace the contents of a specified row.
virtual int RemapIndex (int, const c4_Sequence *) const
 Remap the index to an underlying view.
void IncRef ()
 Increment the reference count of this sequence.
void DecRef ()
 Decrement the reference count, delete objects when last.
int NumRefs () const
 Return the current reference count.
virtual int NumRows () const =0
 Return the current number of rows.
void Resize (int, int=-1)
 Change number of rows, either by inserting or removing them.
virtual void InsertAt (int, c4_Cursor, int=1)
 Insert one or more rows into this sequence.
virtual void RemoveAt (int, int=1)
 Remove one or more rows from this sequence.
virtual void Move (int, int)
 Move a row to another position.
int NthPropId (int) const
 Return the id of the N-th property.
int PropIndex (int)
 Find the index of a property by its id.
int PropIndex (const c4_Property &)
 Find the index of a property, or create a new entry.
virtual int NumHandlers () const =0
 Return the number of data handlers in this sequence.
virtual c4_Handler & NthHandler (int) const =0
 Return a reference to the N-th handler in this sequence.
virtual const c4_SequenceHandlerContext (int) const =0
 Return the context of the N-th handler in this sequence.
virtual int AddHandler (c4_Handler *)=0
 Add the specified data handler to this sequence.
virtual c4_Handler * CreateHandler (const c4_Property &)=0
 Create a handler of the appropriate type.
virtual int ItemSize (int, int)
 Return width of specified data item.
virtual bool Get (int, int, c4_Bytes &)
 Retrieve one data item from this sequence.
virtual void Set (int, const c4_Property &, const c4_Bytes &)
 Store a data item into this sequence.
void Attach (c4_Sequence *)
 Register a sequence to receive change notifications.
void Detach (c4_Sequence *)
 Unregister a sequence which received change notifications.
c4_Dependencies * GetDependencies () const
 Return a pointer to the dependencies, or null.
virtual c4_Notifier * PreChange (c4_Notifier &)
 Called just before a change is made to the sequence.
virtual void PostChange (c4_Notifier &)
 Called after changes have been made to the sequence.
virtual void SetNumRows (int)=0
 for c4_Table::Sequence setup
c4_BytesBuffer ()
 Gives access to a general purpose temporary buffer.

Protected Attributes

int _propertyLimit
 Optimization: cached property index.
short * _propertyMap
 Optimization: property map for faster access.
c4_Bytes_tempBuf
 allocated on first use by c4_Sequence::Buffer()


Detailed Description

A sequence is an abstract base class for views on ranges of records.


Member Function Documentation

void c4_Sequence::Move int  from_,
int  to_
[virtual]
 

Move a row to another position.

careful, this does no index remapping, wrong for derived seq's

int c4_Sequence::PropIndex int  propId_  ) 
 

Find the index of a property by its id.

CACHING NOTE: derived views will fail if underlying view is restructured

void c4_Sequence::RemoveAt int  index_,
int  count_ = 1
[virtual]
 

Remove one or more rows from this sequence.

careful, this does no index remapping, wrong for derived seq's


The documentation for this class was generated from the following files:

Metakit C++ API Reference - https://www.equi4.com/metakit.html - extracted with Doxygen