The Cursor base class. More...
#include "cpp-cursor.h"
Public Member Functions | |
Cursor (void) throw () | |
Cursor Default Constructor. More... | |
Cursor (const Cursor &cursor) throw () | |
Cursor Copy Constructor. More... | |
Cursor & | operator= (const Cursor &cursor) throw () |
Cursor assignment operator. More... | |
~Cursor () | |
Cursor Destructor. More... | |
RDM_TABLE_ID | GetTableId (void) const |
Get the id for the table the cursor is based on. More... | |
RDM_RETCODE | GetReturnCode (void) const |
Get the current info status value. More... | |
uint64_t | GetCount (void) const |
Get a count of the number of rows contained in a cursor collection. More... | |
RDM_LOCK_STATUS | GetLockStatus (void) const |
Get a current lock status of the table a cursor is based on. More... | |
Cursor | DeleteRow (void) const |
Delete the row at the current cursor position. More... | |
Cursor | UnlinkAndDeleteRow (void) const |
Disconnect and Delete the row at the current cursor position. More... | |
const Cursor & | MoveToFirst (void) const |
Navigate to the first row in the Cursor collection. More... | |
const Cursor & | MoveToNext (void) const |
Navigate to the next row in the Cursor collection. More... | |
const Cursor & | MoveToPrev (void) const |
Navigate to the previous row in the Cursor collection. More... | |
const Cursor & | MoveToLast (void) const |
Navigate to the last row in the Cursor collection. More... | |
const Cursor & | operator++ (void) const |
Prefix increment operator. More... | |
const Cursor & | operator-- (void) const |
Prefix decrement operator. More... | |
Cursor | GetRows (void) const |
Obtain a Cursor for the current table ordered by rowId. More... | |
Cursor | GetSelf (void) const |
Obtain a singleton Cursor for the source cursor's current row. More... | |
Cursor | GetClone (void) const |
Clone a cursor. More... | |
bool | IsBeforeFirst (void) const |
Check to see if the Cursor in the the BeforeFirst position. More... | |
void | MoveToBeforeFirst (void) const |
Position the cursor to BeforeFirst. More... | |
bool | IsAfterLast (void) const |
Check to see if the Cursor in the the AfterLast position. More... | |
void | MoveToAfterLast (void) const |
Position the cursor to AfterLast. More... | |
RDM_CURSOR_STATUS | GetStatus (void) const |
Check to see where the cursor is positioned. More... | |
bool | IsBefore (const Cursor &cursor) const |
Check to see if passed in cursor is positioned before the source cursor's current position. More... | |
bool | IsBeforeAt (const Cursor &cursor) const |
Check to see if passed in cursor is positioned before or at the source cursor's current position. More... | |
bool | IsAt (const Cursor &cursor) const |
Check to see if passed in cursor is positioned at the same row as the source cursor. More... | |
bool | IsAfterAt (const Cursor &cursor) const |
Check to see if passed in cursor is positioned after or at the source cursor's current position. More... | |
bool | IsAfter (const Cursor &cursor) const |
Check to see if passed in cursor is positioned after the source cursor's current position. More... | |
bool | IsNotAt (const Cursor &cursor) const |
Check to see if passed in cursor is positioned to a different row than the source cursor. More... | |
bool | operator< (const Cursor &cursor) const |
Less than operator. More... | |
bool | operator<= (const Cursor &cursor) const |
Less than or equal to operator. More... | |
bool | operator== (const Cursor &cursor) const |
Equal to operator. More... | |
bool | operator>= (const Cursor &cursor) const |
Greater than or equal to operator. More... | |
bool | operator> (const Cursor &cursor) const |
Greater than operator. More... | |
bool | operator!= (const Cursor &cursor) const |
Not equal to operator. More... | |
Db | GetDb (void) |
Get the Db object associated with the Cursor. More... | |
RDM_ROWID_T | GetRowId () const |
Get the rowid of Cursor's current row. More... | |
void | GetRowStatus (RDM_ROW_STATUS_INFO &rowStat) const |
Get the row status information of a status cursor. More... | |
void | MoveToRowId (const RDM_ROWID_T rowId) const |
Position a cursor to a particular row by database address. More... | |
void | AddMember (const Cursor &member) const |
Add a new member to a set cursor. More... | |
void | RemoveMember (void) const |
Remove the current row from a set cursor. More... | |
Cursor & | Release (void) |
Static Public Member Functions | |
static RDM_TABLE_ID | NoMoreTables (void) throw () |
Mark the end of an array of table ids. More... | |
static Cursor | GetBeforeFirst (void) throw () |
Obtain the static BeforeFirst Cursor. More... | |
static Cursor | GetAfterLast (void) throw () |
Obtain the static AfterLast Cursor. More... | |
Friends | |
class | Db |
The Cursor base class.
This Cursor class provides the base cursor implementation.
This is a class with very little overhead - a single pointer - that is a 'smart pointer' (i.e. will automatically get destroyed when the last reference is removed).
RDM_CPP::Cursor::Cursor | ( | void | ) | ||
throw | ( | ||||
) |
Cursor Default Constructor.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Cursor interface and it's generated subclasses. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The default constructor will initialize the number of references to the underlying implementation object to one.
RDM_CPP::Cursor::Cursor | ( | const Cursor & | cursor | ) | |
throw | ( | ||||
) |
Cursor Copy Constructor.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Cursor interface and it's generated subclasses. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The copy constructor will increment the number of references to the underlying implementation object by one.
RDM_CPP::Cursor::~Cursor | ( | ) |
Cursor Destructor.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Cursor interface and it's generated subclasses. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The destructor will decrement the number of references to the underlying implementation object by one.
void RDM_CPP::Cursor::AddMember | ( | const Cursor & | member | ) | const |
Add a new member to a set cursor.
This method will add a new member row to a set cursor. The passed in cursor must be positioned to a row that is a valid member of the set the source cursor is based on. The current row of the passed in cursor will be added as a member of the set the source cursor is based on and will be associated to the current owner row of the source cursor.
An exception will be thrown if the source cursor is not a set cursor or if the member cursor is not positioned to a valid member row.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOCURRENTROW, eNOTLOCKED, eNOSTARTUPDATE) |
member | A cursor positioned to a row that is a valid member for the set the source Cursor is based on |
Cursor RDM_CPP::Cursor::DeleteRow | ( | void | ) | const |
Delete the row at the current cursor position.
This method removes the current row of cursor from the database.
After the row has been removed the cursor will no longer have a current row as it has been removed from the database. However it will maintain a virtual position which be the position between the rows neighboring the row that was deleted. The neighboring rows are dependent upon on the type of the source cursor.
|
static |
|
static |
|
inline |
Clone a cursor.
This method crates a cursor as a clone of the source cursor. The resulting cursor will be of the same type, contain the same rows, and will have the same position and current row as the source cursor.
This is method will be intentionally hidden by the generated class derived for a specific database.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP) |
uint64_t RDM_CPP::Cursor::GetCount | ( | void | ) | const |
Get a count of the number of rows contained in a cursor collection.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eNOTLOCKED) |
Db RDM_CPP::Cursor::GetDb | ( | void | ) |
Get the Db object associated with the Cursor.
Each active cursor is associated with a Db object. This method allows a user to get a reference to the Db object associated with the source Cursor.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP) |
RDM_LOCK_STATUS RDM_CPP::Cursor::GetLockStatus | ( | void | ) | const |
Get a current lock status of the table a cursor is based on.
This method returns the current lock status for the table the cursor is based on. The lock status on specifies if the cursor currently has access to the table, it does not check if the table is locked by other sessions.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP) |
RDM_RETCODE RDM_CPP::Cursor::GetReturnCode | ( | void | ) | const |
Get the current info status value.
The Cursor object does not throw exceptions for status codes. This function allows you to get the return code from the last method call. If the previous method call did not throw and exception this will either be sOKAY or a status code value. If the previous method call did throw an exception this will be the error code related to that exception.
RDM_ROWID_T RDM_CPP::Cursor::GetRowId | ( | ) | const |
Get the rowid of Cursor's current row.
This method returns the database address of the current row for the Cursor.
If the cursor is not at a valid row a rdm_exception will be thrown.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOCURRENTROW, eNOMEMORY, eNOTLOCKED) |
Cursor RDM_CPP::Cursor::GetRows | ( | void | ) | const |
Obtain a Cursor for the current table ordered by rowId.
Create a new TableScan Cursor of rows of the same type as the current row of the source cursor. Position the new cursor to the same row as the source cursor is positioned to.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eNOMEMORY) |
void RDM_CPP::Cursor::GetRowStatus | ( | RDM_ROW_STATUS_INFO & | rowStat | ) | const |
Get the row status information of a status cursor.
This retrieves returns the RDM_ROW_STATUS_INFO for a status cursor. A status cursor can be retrieved from a bulk insert operation.
If the cursor is not at a valid entry a rdm_exception will be thrown.
rdm_exception | (eINVCURSOROP, eNOCURRENTROW) |
|
inline |
Obtain a singleton Cursor for the source cursor's current row.
Create a new singleton cursor positioned to the same row as the source cursor.
If the source cursor is not at a valid row then a /ref rdm_exception will be thrown.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eNOMEMORY, eOWNERDELETED, eSINGLETONDELETED, eNOCURRENTROW) |
RDM_CURSOR_STATUS RDM_CPP::Cursor::GetStatus | ( | void | ) | const |
Check to see where the cursor is positioned.
This function will return information about special conditions for a cursor's position. See RDM_CURSOR_STATUS for possible cursor status definitions.
As you navigate (using MoveToNext(), MoveToPrev(), MoveToFirst(), MoveToLast(), MoveToBeforeFirst(), MoveToAfterLast(), or any of the Find* functions), use InsertRow(), or create a cursor using any of the Db class Get methods the cursor will be in any of these states CURSOR_AT_ROW, CURSOR_BETWEEN, or CURSOR_BEFORE_FIRST. Changes to the row through this cursor or any other cursor may put the cursor in some other state. Clone will make an exact copy with the exact same state, position, and current row.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
RDM_TABLE_ID RDM_CPP::Cursor::GetTableId | ( | void | ) | const |
Get the id for the table the cursor is based on.
bool RDM_CPP::Cursor::IsAfter | ( | const Cursor & | cursor | ) | const |
Check to see if passed in cursor is positioned after the source cursor's current position.
This method compares the current position of source cursor relative to secondary (passed in) cursor and will return TRUE if the position for the primary cursor is after the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondar cursor is positioned after the source cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
Referenced by operator>().
bool RDM_CPP::Cursor::IsAfterAt | ( | const Cursor & | cursor | ) | const |
Check to see if passed in cursor is positioned after or at the source cursor's current position.
This method compares the current position of source cursor relative to secondary (passed in) cursor and will return TRUE if the position for the primary cursor is at or after the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor is positioned after or at the source cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
Referenced by operator>=().
bool RDM_CPP::Cursor::IsAfterLast | ( | void | ) | const |
Check to see if the Cursor in the the AfterLast position.
true | If the current cursor position is after the last row in the collection |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED) |
bool RDM_CPP::Cursor::IsAt | ( | const Cursor & | cursor | ) | const |
Check to see if passed in cursor is positioned at the same row as the source cursor.
This method compares the current position of source cursor relative to secondary (passed in) cursor and will return TRUE if the position for the primary cursor is at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor is positioned to the same row as the source cursor |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
Referenced by operator==().
bool RDM_CPP::Cursor::IsBefore | ( | const Cursor & | cursor | ) | const |
Check to see if passed in cursor is positioned before the source cursor's current position.
This method compares the current position of source cursor relative to secondary (passed in) cursor and will return TRUE if the position for the primary cursor is before the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is before the source cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
Referenced by operator<().
bool RDM_CPP::Cursor::IsBeforeAt | ( | const Cursor & | cursor | ) | const |
Check to see if passed in cursor is positioned before or at the source cursor's current position.
This method compares the current position of source cursor relative to secondary (passed in) cursor and will return TRUE if the position for the primary cursor is before or at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is before or at the source cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
Referenced by operator<=().
bool RDM_CPP::Cursor::IsBeforeFirst | ( | void | ) | const |
Check to see if the Cursor in the the BeforeFirst position.
true | If the current cursor position is before the first row in the collection |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED) |
bool RDM_CPP::Cursor::IsNotAt | ( | const Cursor & | cursor | ) | const |
Check to see if passed in cursor is positioned to a different row than the source cursor.
This method compares the current position of source cursor relative to secondary (passed in) cursor and will return TRUE if the position for the primary cursor is not at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor is positioned to a different row than the source cursor. |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
Referenced by operator!=().
void RDM_CPP::Cursor::MoveToAfterLast | ( | void | ) | const |
Position the cursor to AfterLast.
Position the cursor to the special AfterLast position.
Navigating to the previous position from this special position will position the cursor to the last row in the cursor collection. Navigating forward will throw a /ref rdm_exception with the eINVITERATION error code.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED) |
void RDM_CPP::Cursor::MoveToBeforeFirst | ( | void | ) | const |
Position the cursor to BeforeFirst.
Position the cursor to the special BeforeFirst position.
Navigating to the previous position from this special position will position the cursor to the last row in the cursor collection. Navigating forward will throw a /ref rdm_exception with the eINVITERATION error code.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED) |
|
inline |
Navigate to the first row in the Cursor collection.
This method will position a cursor to the first row in the collection. If there are no rows in the collection then the cursor will be positioned to AfterLast.
There is a type specific version of this method in all generated subclasses.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTLOCKED) |
|
inline |
Navigate to the last row in the Cursor collection.
This method will position a cursor to the last row in the collection. If there are no rows in the collection then the cursor will be positioned to BeforeFirst.
There is a type specific version of this method in all generated subclasses.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTLOCKED) |
|
inline |
Navigate to the next row in the Cursor collection.
This method will position a cursor to the next row in the collection.
If the cursor was positioned to the last row in the collection then the cursor will be positioned to AfterLast.
If cursor was positioned to AfterLast then the function will throw a /ref rdm_exception with the eINVITERATION error code.
There is a type specific version of this method in all generated subclasses.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTLOCKED) |
Referenced by operator++().
|
inline |
Navigate to the previous row in the Cursor collection.
This method will position a cursor to the previous row in the collection.
If the cursor was positioned to the first row in the collection then the cursor will be positioned to BeforeFirst.
If the cursor was positioned to BeforeFirst then the function will throw /ref rdm_exception with the eINVITERATION error code.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTLOCKED) |
Referenced by operator--().
void RDM_CPP::Cursor::MoveToRowId | ( | const RDM_ROWID_T | rowId | ) | const |
Position a cursor to a particular row by database address.
This method will position a cursor to the row at database address specified by rowid. The cursor can be any type of cursor and does not need to be a row scan cursor.
If there is no exact match found then:
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | rowId | The id of the row the Cursor is to be positioned to |
|
inlinestatic |
Mark the end of an array of table ids.
Use this when setting up an array of table ids passed in to StartRead() or StartUpdate().
|
inline |
Not equal to operator.
This operator compares the current position of primary (left-most) cursor relative to secondary (right-most) cursor and will return TRUE if the position for the primary cursor is not at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is not the same as the primary cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
References IsNotAt().
|
inline |
Prefix increment operator.
This method will position a cursor to the next row in the collection.
If cursor was positioned to the last row in the collection then the cursor will be positioned to AfterLast.
If cursor was positioned to AfterLast then the method will throw a /ref rdm_exception with the error code eINVITERATION.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTLOCKED, eINVITERATION) |
References MoveToNext().
|
inline |
Prefix decrement operator.
This method will position a cursor to the previous row in the collection.
If cursor was positioned to the first row in the collection then the cursor will be positioned to BeforeFirst.
If cursor was positioned to BeforeFirst then the method will throw a /ref rdm_exception with the error code eINVITERATION.
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTLOCKED, eINVITERATION) |
References MoveToPrev().
|
inline |
Less than operator.
This operator compares the current position of primary (left-most) cursor relative to secondary (right-most) cursor and will return TRUE if the position for the primary cursor is before the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is before the primary cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED, eNOTINCURSOR) |
[in] | cursor | The Cursor to compare against |
References IsBefore().
|
inline |
Less than or equal to operator.
This operator compares the current position of primary (left-most) cursor relative to secondary (right-most) cursor and will return TRUE if the position for the primary cursor is before or at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is before or at the primary cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
References IsBeforeAt().
Cursor assignment operator.
The default constructor, copy constructor, assignment operator, and destructor implement a smart pointer for the Cursor interface and it's generated subclasses. The number of references to the underlying implementation object will be maintained. When the number of references to an implementation object is down to zero the object will be released.
The assignment will increment the number of references to the underlying implementation object by one for the new reference.
|
inline |
Equal to operator.
This operator compares the current position of primary (left-most) cursor relative to secondary (right-most) cursor and will return TRUE if the position for the primary cursor is at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is at the primary cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
References IsAt().
|
inline |
Greater than operator.
This operator compares the current position of primary (left-most) cursor relative to secondary (right-most) cursor and will return TRUE if the position for the primary cursor is after the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is after the primary cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
References IsAfter().
|
inline |
Greater than or equal to operator.
This operator compares the current position of primary (left-most) cursor relative to secondary (right-most) cursor and will return TRUE if the position for the primary cursor is after or at the position of the secondary cursor.
If the cursor types are not the same the current row of the secondary cursor will be used and then converted to a position in the cursor type of source cursor. If the current row of the secondary cursor is not a valid cursor position in the source a /ref rdm_exception will be thrown.
This more specifically means:
If the row at the current position of the secondary cursor is not in the collection of the source cursor a /ref rdm_exception will be thrown.
There are two distinct types of errors for the /ref rdm_exception when the row in the secondary cursor is not found in the collection of the source cursor:
If the secondary cursor is in a special position (BeforeFirst/AfterLast) then the cursors must be of the same type to have a meaningful comparison (both key cursors based on the same key, both set cursors with the same owner, etc.). If that is not the case a /ref rdm_exception with the eNOTINCURSOR error code is thrown.
true | If the secondary cursor's position is after or at the primary cursor's current position |
false | Otherwise |
rdm_exception | (ePRECOMMITTED, eINVCURSOROP, eOWNERDELETED, eSINGLETONDELETED, eNOTRELATED) |
[in] | cursor | The Cursor to compare against |
References IsAfterAt().
Cursor& RDM_CPP::Cursor::Release | ( | void | ) |
void RDM_CPP::Cursor::RemoveMember | ( | void | ) | const |
Remove the current row from a set cursor.
This function disconnects the current row of the source cursor from the set associated with the cursor. The source cursor must be based on a set (obtained from a call to a GetMember* method).
The source cursor will maintain the original current row and position even though the current row is no longer in the set. Calling next/prev will position the cursor relative to the original position.
Cursor RDM_CPP::Cursor::UnlinkAndDeleteRow | ( | void | ) | const |
Disconnect and Delete the row at the current cursor position.
This method disconnects the current row of cursor from all sets and removes it from the database.
After the row has been removed the cursor will no longer have a current row as it has been removed from the database. However it will maintain a virtual position which be the position between the rows neighboring the row that was deleted. The neighboring rows are dependent upon on the type of the source cursor.
|
friend |