QCommenceCursor Class Reference

Dumont-Enhanced Commence-Cursor. More...

#include <QCommenceDB.h>

Inheritance diagram for QCommenceCursor:

Inheritance graph

List of all members.

Public Slots

virtual QString category (void)
 Name of the underlying Commence Category.
virtual QString categoryName (void)
 Name of the underlying Commence Category.
QCommenceCategoryDefcategoryDef (void)
 Reference to the Commence Category Definition.
virtual long rowCount (void)
 Get the Row Count.
virtual long columnCount (void)
virtual bool shared (void)
virtual long maxFieldSize (void)
virtual long maxRows (void)
virtual bool setFilter (QString v_filter, long v_flags=0)
virtual bool setLogic (QString v_logic, long v_flags=0)
virtual bool setSort (QString v_sort, long v_flags=0)
virtual long seekRow (long v_origin, long v_rows)
virtual long seekRowApprox (long v_numerator, long v_denominator)
virtual bool isField (QString i_fieldName)
virtual bool isConnection (QString i_connectionName)
virtual bool setColumn (long v_column, QString v_name, long v_flags=0)
 Set Field Column.
virtual QString columns (void)
virtual QCommenceQueryRowSetgetQueryRowSet (long v_count, long v_flags=0)
virtual QCommenceQueryRowSetgetQueryRowSetByID (QString v_rowID, long v_flags=0)
virtual QCommenceAddRowSetgetAddRowSet (long v_count, long v_flags=0)
virtual QCommenceEditRowSetgetEditRowSet (long v_count, long v_flags=0)
virtual QCommenceEditRowSetgetEditRowSetByID (QString v_rowID, long v_flags=0)
virtual QCommenceDeleteRowSetgetDeleteRowSet (long v_count, long v_flags=0)
virtual QCommenceDeleteRowSetgetDeleteRowSetByID (QString v_rowID, long v_flags=0)
virtual QCommenceCursorgetRelatedCursor (QString i_connectionName, QString i_parentKey="")
 Get a cursor from a related column.
virtual bool setActiveItem (QString v_categoryName, QString v_rowID, long flags=0)
virtual bool setActiveDate (QString v_date, long flags=0)
virtual bool setActiveDateRange (QString v_startDate, QString v_endDate, long flags=0)
virtual bool setRelatedColumn (long v_column, QString v_connName, QString v_catName, QString v_name, long v_flags=0)
virtual bool setRelatedColumn (long v_column, QString v_connName, QString v_catName, QString v_field, QString v_element)
virtual void saveToXmlFile (QString i_fileName, QString i_header="", long i_flags=0)
 Save the cursor to an xml file.
virtual long lastError (void)

Public Member Functions

 QCommenceCursor (void)
 QCommenceCursor (QCocDispatch *i_unknown, QCommenceDatabase *i_database)
virtual ~QCommenceCursor ()
QCommenceDatabaseDB (void)
virtual QDomElement toXml (QDomDocument &doc, QDomElement &parent, int &depth, long i_flags=0)
 Dump the category to an xml document.
QStringList filters (void)

Protected Member Functions

virtual bool set (DISPID v_dispid, QString v_setVar, long v_flags=0)

Private Attributes

QPointer< QCommenceDatabasem_database
long m_lastError
QStringList m_columnNames
QStringList m_relatedColumnNames
QStringList m_filters
QPointer< QCommenceCategoryDefm_categoryDef


Detailed Description

Dumont-Enhanced Commence-Cursor.

inline_dotgraph_11.dot

This object provides all the basic Commence.Cursor object functionality and includes some additional functionality not found in the regular Commence cursor object. The following methods are part of the regular Commence cursor API:

Standard Commence cursor API calls

Definition at line 5391 of file QCommenceDB.h.


Constructor & Destructor Documentation

QCommenceCursor::QCommenceCursor ( void   )  [inline]

Definition at line 5397 of file QCommenceDB.h.

QCommenceCursor::QCommenceCursor ( QCocDispatch i_unknown,
QCommenceDatabase i_database 
)

Definition at line 6350 of file QCommenceDB.cpp.

QCommenceCursor::~QCommenceCursor (  )  [virtual]

Definition at line 6366 of file QCommenceDB.cpp.


Member Function Documentation

QString QCommenceCursor::category ( void   )  [virtual, slot]

Name of the underlying Commence Category.

vbScript Example:
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.form(Form)
 dim crsr: set crsr = dfrm.DB.getCursor( 0, "MyCategoryName", 0 )

 msgbox crsr.category ' should reveal "MyCategoryName"

Definition at line 6372 of file QCommenceDB.cpp.

QCommenceCategoryDef * QCommenceCursor::categoryDef ( void   )  [slot]

Reference to the Commence Category Definition.

vbScript Example:
 dim ddll: set ddll = createObject("DumontDLL")
 dim dfrm: set dfrm = ddll.form(Form)
 dim crsr: set crsr = dfrm.DB.getCursor( 0, "MyCategoryName", 0 )
 dim cdef: set cdef = crsr.definition

 dim i: for i = cdef.fieldDefs.count - 1
   dim fieldDef: set fieldDef = cdef.fieldDefs.get(i)
   ddll.debug _
     fieldDef.name          & chr(9) & _
     fieldDef.typeName      & chr(9) & _
     fieldDef.isMandatory   & chr(9) & _
     fieldDef.defaultString
 next

Definition at line 6378 of file QCommenceDB.cpp.

virtual QString QCommenceCursor::categoryName ( void   )  [inline, virtual, slot]

Name of the underlying Commence Category.

This is a duplicate function call, identical to category(). It is provided because many of the other object use a categoryName() function call and so it's easier to remember.

Definition at line 5447 of file QCommenceDB.h.

long QCommenceCursor::columnCount ( void   )  [virtual, slot]

Definition at line 6393 of file QCommenceDB.cpp.

QString QCommenceCursor::columns ( void   )  [virtual, slot]

Definition at line 6728 of file QCommenceDB.cpp.

QCommenceDatabase* QCommenceCursor::DB ( void   )  [inline]

Definition at line 5403 of file QCommenceDB.h.

QStringList QCommenceCursor::filters ( void   )  [inline]

Definition at line 5419 of file QCommenceDB.h.

QCommenceAddRowSet * QCommenceCursor::getAddRowSet ( long  v_count,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6866 of file QCommenceDB.cpp.

QCommenceDeleteRowSet * QCommenceCursor::getDeleteRowSet ( long  v_count,
long  v_flags = 0 
) [virtual, slot]

Definition at line 7053 of file QCommenceDB.cpp.

QCommenceDeleteRowSet * QCommenceCursor::getDeleteRowSetByID ( QString  v_rowID,
long  v_flags = 0 
) [virtual, slot]

Definition at line 7114 of file QCommenceDB.cpp.

QCommenceEditRowSet * QCommenceCursor::getEditRowSet ( long  v_count,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6927 of file QCommenceDB.cpp.

QCommenceEditRowSet * QCommenceCursor::getEditRowSetByID ( QString  v_rowID,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6988 of file QCommenceDB.cpp.

QCommenceQueryRowSet * QCommenceCursor::getQueryRowSet ( long  v_count,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6735 of file QCommenceDB.cpp.

QCommenceQueryRowSet * QCommenceCursor::getQueryRowSetByID ( QString  v_rowID,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6799 of file QCommenceDB.cpp.

QCommenceCursor * QCommenceCursor::getRelatedCursor ( QString  i_connectionName,
QString  i_parentKey = "" 
) [virtual, slot]

Get a cursor from a related column.

This returns a cursor like a sub-query. It can include a filter (and should) but will default to no filter if one isn't specified. If the filter can be derived by a simple parent key (meaning the parent category has a key field (name field) and 'no-duplicates-allowed' is turned on, then this function will apply that (simple) filter directly.

/note If a parent key is specified but this call was unable to apply that filter properly then a NULL cursor will be returned to prevent the caller from attempting to operate on a cursor with too many rows.

Definition at line 7469 of file QCommenceDB.cpp.

bool QCommenceCursor::isConnection ( QString  i_connectionName  )  [virtual, slot]

Definition at line 7459 of file QCommenceDB.cpp.

bool QCommenceCursor::isField ( QString  i_fieldName  )  [virtual, slot]

Definition at line 7454 of file QCommenceDB.cpp.

virtual long QCommenceCursor::lastError ( void   )  [inline, virtual, slot]

Definition at line 5552 of file QCommenceDB.h.

long QCommenceCursor::maxFieldSize ( void   )  [virtual, slot]

Definition at line 6405 of file QCommenceDB.cpp.

long QCommenceCursor::maxRows ( void   )  [virtual, slot]

Definition at line 6411 of file QCommenceDB.cpp.

long QCommenceCursor::rowCount ( void   )  [virtual, slot]

Get the Row Count.

This method returns the row count of the Cursor object.

Definition at line 6386 of file QCommenceDB.cpp.

void QCommenceCursor::saveToXmlFile ( QString  i_fileName,
QString  i_header = "",
long  i_flags = 0 
) [virtual, slot]

Save the cursor to an xml file.

This function takes the cursor in its present state (fields, connections and rows) and dumps the entire contents to an xml file. It uses the contents of the databaseDef.xml file, specifically the 'isPublished' attribute to determine what should be exported and what should not.

Definition at line 7691 of file QCommenceDB.cpp.

long QCommenceCursor::seekRow ( long  v_origin,
long  v_rows 
) [virtual, slot]

Definition at line 6518 of file QCommenceDB.cpp.

long QCommenceCursor::seekRowApprox ( long  v_numerator,
long  v_denominator 
) [virtual, slot]

Definition at line 6575 of file QCommenceDB.cpp.

bool QCommenceCursor::set ( DISPID  v_dispid,
QString  v_setVar,
long  v_flags = 0 
) [protected, virtual]

Definition at line 6418 of file QCommenceDB.cpp.

bool QCommenceCursor::setActiveDate ( QString  v_date,
long  flags = 0 
) [virtual, slot]

Definition at line 7242 of file QCommenceDB.cpp.

bool QCommenceCursor::setActiveDateRange ( QString  v_startDate,
QString  v_endDate,
long  flags = 0 
) [virtual, slot]

Definition at line 7300 of file QCommenceDB.cpp.

bool QCommenceCursor::setActiveItem ( QString  v_categoryName,
QString  v_rowID,
long  flags = 0 
) [virtual, slot]

Definition at line 7180 of file QCommenceDB.cpp.

bool QCommenceCursor::setColumn ( long  v_column,
QString  v_name,
long  v_flags = 0 
) [virtual, slot]

Set Field Column.

Set a column for access by the cursor. Note that if a column is defined more than once then a dialog window will open with an an indication of the offending column.

Definition at line 6639 of file QCommenceDB.cpp.

bool QCommenceCursor::setFilter ( QString  v_filter,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6481 of file QCommenceDB.cpp.

bool QCommenceCursor::setLogic ( QString  v_logic,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6496 of file QCommenceDB.cpp.

bool QCommenceCursor::setRelatedColumn ( long  v_column,
QString  v_connName,
QString  v_catName,
QString  v_field,
QString  v_element 
) [virtual, slot]

Definition at line 7363 of file QCommenceDB.cpp.

bool QCommenceCursor::setRelatedColumn ( long  v_column,
QString  v_connName,
QString  v_catName,
QString  v_name,
long  v_flags = 0 
) [virtual, slot]

Definition at line 7375 of file QCommenceDB.cpp.

bool QCommenceCursor::setSort ( QString  v_sort,
long  v_flags = 0 
) [virtual, slot]

Definition at line 6507 of file QCommenceDB.cpp.

bool QCommenceCursor::shared ( void   )  [virtual, slot]

Definition at line 6399 of file QCommenceDB.cpp.

QDomElement QCommenceCursor::toXml ( QDomDocument &  doc,
QDomElement &  parent,
int &  depth,
long  i_flags = 0 
) [virtual]

Dump the category to an xml document.

This internal function takes the contents of a cursor and dumps it to an xml element which can then be included in a larger xml document. It is recursive in nature - meaning, if it comes across a connection it will drill down into that connection and pull the contents off it as well. It uses the 'isPublished' attribute from the databaseDef.xml file.

Definition at line 7559 of file QCommenceDB.cpp.


Member Data Documentation

Definition at line 5568 of file QCommenceDB.h.

QStringList QCommenceCursor::m_columnNames [private]

Definition at line 5564 of file QCommenceDB.h.

Definition at line 5560 of file QCommenceDB.h.

QStringList QCommenceCursor::m_filters [private]

Definition at line 5566 of file QCommenceDB.h.

Definition at line 5562 of file QCommenceDB.h.

Definition at line 5565 of file QCommenceDB.h.


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




~ ~ ~ ~ ~ ~
Source Code without Comments is like a Cranberry Garland
without the berries. Comment your Code!
 
Commence Database User Support Group Forum
http://newsgroup.showoff-db.org/
~ ~ ~ ~ ~ ~
Author: Mark Petryk
Lorimark Solutions, LLC
mark@lorimarksolutions.com