SURecordset Class Reference

Multi-purpose recordset class. More...

#include <ShapeUpAPI.h>

Inheritance diagram for SURecordset:

SUObject List of all members.

Public Member Functions

 SURecordset ()
 SURecordset (SUHANDLE hRecordset)
void Next ()
void Prev ()
void First ()
void Last ()
SUHANDLE Get ()
bool Eof ()
bool Bof ()
void Close ()
size_t GetCount ()

Detailed Description

An SURecordset object can be retreived from various sources, e.g. SUWorkspace::GetSelectedThemes() and SUTheme::GetShapesInRect(). Depending on the source, the recordset contains handles to different objects. However, one recordset always manages handles to the same object type.

Once a recordset is opened, it must be closed with a call to Close().


Constructor & Destructor Documentation

SURecordset::SURecordset (  )  [inline]

Default constructor.

SURecordset::SURecordset ( SUHANDLE  hRecordset  )  [inline]

Constructor.

Parameters:
hRecordset is a handle to a ShapeUp recordset.


Member Function Documentation

void SURecordset::Next (  )  [inline]

Advances the recordset cursor to the next record.

void SURecordset::Prev (  )  [inline]

Backs the recordset cursor to the previous record.

void SURecordset::First (  )  [inline]

Sets the recordset cursor to the first record.

void SURecordset::Last (  )  [inline]

Sets the recordset cursor to the last record.

SUHANDLE SURecordset::Get (  )  [inline]

Retreives the element at the recordset cursor. The object return type depends on the source of the recordset. It is safe to store a handle to an object for later use while traversing the recordset.

Returns:
A handle to the ShapeUp object.

bool SURecordset::Eof (  )  [inline]

Checks if the recordset cursor is advanced beyond the last record.

Returns:
true if the recordset cursor is advanced beyond the last record, otherwise false.

bool SURecordset::Bof (  )  [inline]

Checks if the recordset cursor is pointing before the first record.

Returns:
true if the recordset cursor is pointing before the last record, otherwise false.

void SURecordset::Close (  )  [inline]

Closes the recordset, and frees internal resources.

IMPORTANT: All recordsets must be closed to avoid memory leaks.

size_t SURecordset::GetCount (  )  [inline]

Gets the number of records in the recordset.

Returns:
The number of records in the recordset.


The documentation for this class was generated from the following file:
Generated on Thu Apr 15 10:55:35 2010 for ShapeUp API by  doxygen 1.5.2