![]() |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Table class. More...
#include <ilviews/dataccess/maptable.h>
Public Member Functions | |
| IliMapTable (IlvDisplay *, const IliMapEntry *map, IlBoolean owner=IlFalse) | |
| Constructor. More... | |
| IliMapTable (const IliMapTable &table) | |
| Copy constructor. More... | |
| IliMapTable (IlvDisplay *display, IL_STDPREF istream &input) | |
| Stream constructor. More... | |
| virtual IlInt | getRowsCount () const |
| Returns the number of rows in the table. More... | |
| virtual IlBoolean | getValue (IlInt rowno, IlInt colno, IliValue &val) const |
| Returns a value. More... | |
| IlBoolean | isLanguageSensitive () const |
| Returns the language sensitive. More... | |
| void | setLanguageSensitive (IlBoolean f) |
| Sets the language sensitive. More... | |
| virtual void | write (IL_STDPREF ostream &output) const |
| Writes to stream. More... | |
Public Member Functions inherited from IliTable | |
| void | addErrorSink (IliErrorSink *sink) |
| Adds an error sink. More... | |
| virtual IlBoolean | allowRowMove () const |
Returns IlTrue if the table (or subclass of the table) allows row move operations. More... | |
| IlInt | appendParameter (const char *paramName, const IliDatatype *type, IlInt maxlen=-1) |
| Appends a new parameter to the table parameters. More... | |
| IlInt | appendRow (IliTableBuffer *tblBuf) |
| Appends a new row defined by the table buffer. More... | |
| IlInt | appendRowInCache (IliTableBuffer *tblBuf) |
| Appends a new row defined by the table buffer. More... | |
| virtual IlBoolean | applyQueryMode (IliTable *queryTable) |
| Applies the query specified by the conditions contained in the provided table. More... | |
| IliValue | at (IlInt rowno, IlInt colno) const |
| Returns a value. More... | |
| IliValue | at (IlInt rowno, IliName colname) const |
| Returns a value. More... | |
| virtual IlBoolean | checkConstraints (IlInt rowno, IliTableBuffer *buff) const |
| Validates the table buffer data. More... | |
| virtual void | clearRows () |
| Deletes all rows. More... | |
| IliTable * | copyTable () const |
| Returns a copy of the table. More... | |
| void | deleteParameter (IlInt paramno) |
| Deletes a parameter. More... | |
| virtual IlBoolean | deleteRow (IlInt rowno) |
| Deletes a row. More... | |
| virtual IlBoolean | deleteRowInCache (IlInt rowno) |
| Deletes a row. More... | |
| void | enableColumnCompletion (IlInt colno, IlBoolean flag) |
| Specifies whether completion is enabled for the column. More... | |
| virtual IlBoolean | exchangeRows (IlInt rowno1, IlInt rowno2) |
| Exchanges two rows. More... | |
| virtual IlBoolean | exchangeRowsInCache (IlInt rowno1, IlInt rowno2) |
| Exchanges two rows. More... | |
| virtual IlInt | fetchAll () |
| Fetches all remaining rows and stores them in the local row cache. More... | |
| virtual IlBoolean | fetchCompleted () const |
Returns IlTrue, if all the rows have been fetched from the database and stored in the local row cache. More... | |
| virtual IlInt | fetchNext (IlInt count=1) |
| Fetches up a number of rows from the database and stores them in the local row cache. More... | |
| IlInt | findFirstRow (const IliValue &value, IlInt colno, IlBoolean complete, IlInt fromRow=0, IlInt toRow=-1) const |
| Searches for a row located between two positions. More... | |
| IlInt | findRow (const IliValue &value, IlInt colno, IlBoolean complete, IlInt fromRow=0, IlInt toRow=-1) const |
| Searches for a row located between two positions. More... | |
| IliTableBuffer * | getBuffer () |
| Returns a table buffer for the table. More... | |
| IlBoolean | getColumnDisplayValue (IlInt colno, const IliValue &value, IliValue &displayValue, IlvGraphicHolder *h=NULL) |
| Returns the display value for a value. More... | |
| IliTable * | getColumnEffectiveForeignTable (IlInt colno, IlvGraphicHolder *h=NULL) const |
| Returns the effective foreign table. More... | |
| const char * | getColumnForeignDataSourceName (IlInt colno) const |
| Returns the name of the data source that will provide a foreign table for one column. More... | |
| const char * | getColumnForeignDisplayColumn (IlInt colno) const |
| Returns the name of the display column in the foreign table. More... | |
| IliTable * | getColumnForeignTable (IlInt colno) const |
| Returns the foreign table of one column. More... | |
| const char * | getColumnForeignValueColumn (IlInt colno) const |
| Returns the name of the value column in the foreign table. More... | |
| IlAny | getCompareData () const |
| Returns the user data that can be used to compare two rows. More... | |
| IliCompareFunction | getCompareFunction () const |
| Returns the function that is used to compare two rows. More... | |
| const IliTablePropertyManager * | getDefaultPropertyManager () const |
| Returns the default property manager. More... | |
| IliTablePropertyManager * | getDefaultPropertyManager () |
| Returns the default property manager. More... | |
| IlvGadgetHolder * | getGadgetHolder () const |
| Returns the gadget holder to which the table is attached. More... | |
| IliTablePropertyManager * | getNamedPropertyManager (const char *name) const |
| Returns a property manager from its name. More... | |
| IlInt | getNamedPropertyManagerCount () const |
| Returns the number of named property managers. More... | |
| const char * | getParameterColumnName (IlInt paramno) const |
| Returns the name of the column, which the parameter is attached to. More... | |
| const char * | getParameterDataSourceName (IlInt paramno) const |
| Returns the name of the data source which the parameter is attached to. More... | |
| IliValue | getParameterDataSourceValue (IlInt paramno) const |
| Returns the current value of one parameter. More... | |
| IlInt | getParameterIndex (const char *name) const |
| Returns the position of one parameter. More... | |
| IlInt | getParameterMaxLength (IlInt paramno) const |
| Returns the maximum length allowed for one parameter. More... | |
| const char * | getParameterName (IlInt paramno) const |
| Returns a parameter name. More... | |
| IlInt | getParametersCount () const |
| Returns the number of parameters defined for this table. More... | |
| const IliDatatype * | getParameterType (IlInt paramno) const |
| Returns the parameter type. More... | |
| IliValue | getParameterValue (IlInt paramno) const |
| Returns the current value of one parameter. More... | |
| IliValue | getParameterValue (IliName paramName) const |
| Returns the current value of one parameter. More... | |
| IlBoolean | getProperty (IlInt rowno, IlInt colno, const IlvSymbol *propName, IliValue &propVal) const |
| Returns a property value attached to the part of the table. More... | |
| IlInt | getPropertyCount (IlInt rowno, IlInt colno) const |
| Returns the property count attached to the part of the table. More... | |
| const char * | getPropertyManagerNameAt (IlInt idx) const |
| Returns the name of the named property manager. More... | |
| const IlvSymbol * | getPropertyNameAt (IlInt rowno, IlInt colno, IlInt propIndex) const |
| Returns a property name attached to the part of the table. More... | |
| IliRowPtr | getRowPtr (IlInt rowno=-1) const |
Returns an IliRowPtr that points to one row. More... | |
| virtual IliRowStatus | getRowStatus (IlInt rowno) const |
| Returns the status of one row. More... | |
| IliTransactionManager * | getTransactionManager () const |
| Returns the transaction manager managing the table. More... | |
| const char * | getTransactionManagerName () const |
| Returns the name of the transaction manager that manages the table. More... | |
| virtual IlBoolean | insertRow (IlInt rowno, IliTableBuffer *buff) |
| Inserts a row that is defined by the table buffer. More... | |
| virtual IlBoolean | insertRowInCache (IlInt rowno, IliTableBuffer *buff) |
| Inserts a row that is defined by the table buffer. More... | |
| virtual IlBoolean | insertRowsFrom (const IliTable *src, IlInt srcFromRow=0, IlInt srcToRow=-1, IlBoolean stopAtFirstError=IlTrue, IlInt insertAt=-1) |
| Inserts rows into this table by copying them from another table. More... | |
| IlBoolean | isColumnCompletionEnabled (IlInt colno) const |
Returns IlTrue if completion is enabled for the column. More... | |
| IlBoolean | isColumnValueConstrained (IlInt colno) const |
Returns IlTrue if the column is constrained to taking its values from the domain of the value column of the foreign table. More... | |
| IlBoolean | isModified () const |
Returns IlTrue if the rows of the table have been modified since the last time. More... | |
| virtual IlBoolean | isQueryModeSupported () const |
Returns IlTrue if the table supports query mode. More... | |
| virtual IlBoolean | isSelectDone () const |
Returns IlTrue if the select member function has been called since the object was constructed. More... | |
| virtual IliTable * | makeQueryTable () const |
| Returns a memory table having the same number of columns as this table. More... | |
| virtual IlBoolean | moveRow (IlInt from, IlInt to) |
| Moves a row. More... | |
| virtual IlBoolean | moveRowInCache (IlInt from, IlInt to) |
| Moves a row. More... | |
| IliTablePropertyManager * | newNamedPropertyManager (const char *name) |
| Creates and returns a new named property manager. More... | |
| virtual IliTablePropertyManager * | newPropertyManager () |
| Creates and returns a new anonymous property manager. More... | |
| virtual IlBoolean | refreshAndLockRow (IlInt rowno) |
| Refreshes and lock a row. More... | |
| virtual IlBoolean | refreshRow (IlInt rowno) |
| Refreshes a row. More... | |
| void | releaseBuffer (IliTableBuffer *buff) |
| Releases a table buffer. More... | |
| void | removeErrorSink (IliErrorSink *sink) |
| Removes an error sink from this table. More... | |
| void | removeNamedPropertyManager (const char *name) |
| Removes a property manager. More... | |
| void | removeProperty (IlInt rowno, IlInt colno, const IlvSymbol *propName) |
| Removes a property from the part of the table. More... | |
| virtual IlBoolean | select () |
| Reads all rows from a remote database. More... | |
| IlBoolean | set (IlInt rowno, IlInt colno, const IliValue &value) |
| Sets a value. More... | |
| IlBoolean | set (IlInt rowno, IliName colname, const IliValue &value) |
| Sets a value. More... | |
| void | setColumnForeignDataSourceName (IlInt colno, const char *dsname) |
| Sets the name of the foreign data source for one column. More... | |
| void | setColumnForeignDisplayColumn (IlInt colno, const char *name) |
| Sets the name of the display column in the foreign table. More... | |
| void | setColumnForeignTable (IlInt colno, IliTable *table) |
| Sets the foreign table of one column. More... | |
| void | setColumnForeignValueColumn (IlInt colno, const char *name) |
| Sets the name of the value column in the foreign table. More... | |
| void | setColumnValueConstrained (IlInt colno, IlBoolean flag) |
| Specifies that the column is constrained to take its values from the domain of the value column of the foreign table. More... | |
| void | setCompareFunction (IliCompareFunction fct, IlAny arg=0) |
| Defines the function and user data that must be used to compare two rows. More... | |
| void | setGadgetHolder (IlvGadgetHolder *gadHold) |
| Attaches the table to a gadget holder. More... | |
| IlBoolean | setInCache (IlInt rowno, IlInt colno, const IliValue &value) |
| Sets a value. More... | |
| virtual void | setModified (IlBoolean flag) |
| Sets the value of the modified property of the table. More... | |
| void | setParameterColumnName (IlInt paramno, const char *colname) |
| Attaches a parameter to one column. More... | |
| void | setParameterDataSourceName (IlInt paramno, const char *dsname) |
| Attaches one parameter to one data source. More... | |
| void | setParameterMaxLength (IlInt paramno, IlInt maxlen) |
| Sets the maximum length allowed for the parameter. More... | |
| void | setParameterName (IlInt paramno, const char *name) |
| Sets a parameter name. More... | |
| void | setParameterType (IlInt paramno, const IliDatatype *type) |
| Sets the type of one parameter. More... | |
| void | setParameterValue (IlInt paramno, const IliValue &value) |
| Sets the value of one parameter. More... | |
| void | setParameterValue (IliName paramName, const IliValue &value) |
| Sets the value of one parameter. More... | |
| void | setProperty (IlInt rowno, IlInt colno, const IlvSymbol *propName, const IliValue &propVal) |
| Sets a property value to a part of the table. More... | |
| void | setTransactionManager (IliTransactionManager *tm) |
| Changes the transaction that manages this table. More... | |
| void | setTransactionManagerName (const char *name) |
| Changes the transaction that manages this table. More... | |
| void | sortRows (const IlInt *colnoArray, IlInt columnsCount, IlInt fromRow=0, IlInt toRow=-1, IliCompareFunction fct=0, IlAny data=0) |
| Sorts a set of rows. More... | |
| virtual IlBoolean | updateRow (IlInt rowno, IliTableBuffer *buff) |
| Updates a row with the values in the table buffer. More... | |
| virtual IlBoolean | updateRowInCache (IlInt rowno, IliTableBuffer *buff) |
| Updates a row. More... | |
| void | writeTable (IL_STDPREF ostream &output) const |
Writes the definition of the table to an output stream, in a form suitable to be read back by the ReadTable static member function. More... | |
Public Member Functions inherited from IliSchema | |
| IliSchema (IlvDisplay *display) | |
| This constructor initializes a schema object. More... | |
| IliSchema (const IliSchema &) | |
This is the copy constructor of the IliSchema class. | |
| IliSchema (IlvDisplay *display, IL_STDPREF istream &input) | |
| This constructor initializes a schema by reading its definition from an input stream. More... | |
| void | addHook (IliTableHook *hook) |
| Adds a hook to the list of hooks of the schema object. More... | |
| virtual IlBoolean | allowColumnMove () const |
Returns IlTrue if columns can be moved to this schema. More... | |
| IlInt | appendColumn (const char *name, const IliDatatype *type, IlInt maxlen=-1) |
| Appends a new column to the schema. More... | |
| const IliDatatype * | asDatatype () const |
| Returns the data type that is defined by this schema. More... | |
| virtual IlBoolean | deleteColumn (IlInt colno) |
| Deletes a column. More... | |
| void | endOfBatch () |
Used in conjunction with the startOfBatch member function to terminate a series of modifications on the schema. More... | |
| IlvAlignment | getColumnAlignment (IlInt colno) const |
| Returns the column alignment. More... | |
| const char * | getColumnDefault (IlInt colno) const |
| Returns the default value for one column. More... | |
| IlInt | getColumnDisplayWidth (IlInt colno) const |
| Returns the display width, in pixels, of one column. More... | |
| const IliFormat & | getColumnFormat (IlInt colno) const |
| Returns the format of one column. More... | |
| IlInt | getColumnIndex (const char *name) const |
| Returns the position of the column. More... | |
| IlInt | getColumnIndex (IlInt token) const |
| Returns the position of the column. More... | |
| const char * | getColumnLabel (IlInt colno) const |
| Returns the label of one column. More... | |
| const IliInputMask & | getColumnMask (IlInt colno) const |
| Returns the input mask of one column. More... | |
| IlInt | getColumnMaxLength (IlInt colno) const |
| Returns the maximum length allowed for one column. More... | |
| const char * | getColumnName (IlInt colno) const |
| Returns the name of the column. More... | |
| IlInt | getColumnsCount () const |
| Returns the number of columns in the schema. More... | |
| const char * | getColumnTitle (IlInt colno) const |
| Returns the title of one column. More... | |
| IlInt | getColumnToken (IlInt colno) const |
| Returns the token of the column. More... | |
| const IliDatatype * | getColumnType (IlInt colno) const |
| Returns the type of the column. More... | |
| IlvDisplay * | getDisplay () const |
| Returns the display of the schema object. More... | |
| const char * | getElementTypeName () const |
| Returns the type name of the objects in the collection. More... | |
| const IliSchema * | getNestedSchema (const IliAttributePath &path) const |
| Returns the nested schema. More... | |
| IliSchema * | getNestedSchema (const IliAttributePath &path) |
| Returns the nested schema. More... | |
| const char * | getSchemaName () const |
| Returns the schema name. More... | |
| IlBoolean | hasHook (IliTableHook *hook) const |
| Returns True if the hook is already into the list of hooks of the schema object. More... | |
| virtual IlBoolean | insertColumn (IlInt colno, const char *colname, const IliDatatype *type, IlInt maxlen=-1) |
| Inserts a new column in the schema. More... | |
| IlBoolean | isACollection () const |
Returns IlTrue if the schema defines a type that is a collection of objects or values. More... | |
| IlBoolean | isASimpleCollection () const |
Returns IlTrue if the schema is defined as a simple collection type. More... | |
| IlBoolean | isColumnNullable (IlInt colno) const |
Returns IlTrue if the column allows null values. More... | |
| IlBoolean | isColumnPartOfKey (IlInt colno) const |
Returns IlTrue if the column is part of the primary key of the schema. More... | |
| IlBoolean | isColumnReadOnly (IlInt colno) const |
Returns IlTrue if the column is read-only. More... | |
| IlBoolean | isColumnVisible (IlInt colno) const |
Returns IlTrue if the column should be visible. More... | |
| IlBoolean | isPrimaryKeyDefined () const |
Returns IlTrue if the schema has one or more columns defined as being part of the primary key. More... | |
| virtual IlBoolean | moveColumn (IlInt from, IlInt to) |
| Moves a column. More... | |
| void | removeHook (IliTableHook *hook) |
| Removes a hook from the list of hooks of the schema object. More... | |
| void | setAsCollection (IlBoolean flag) |
| Sets the schema as a collection type. More... | |
| void | setAsSimpleCollection (IlBoolean flag) |
| Sets the schema as a simple collection type. More... | |
| virtual void | setColumnAlignment (IlInt colno, IlvAlignment align) |
| Sets the alignment of one column. More... | |
| virtual void | setColumnDefault (IlInt colno, const char *val) |
| Sets the default value for one column. More... | |
| virtual void | setColumnDisplayWidth (IlInt colno, IlInt width) |
| Sets the display width of one column. More... | |
| virtual void | setColumnFormat (IlInt colno, const IliFormat &fmt) |
| Sets the format of the column. More... | |
| virtual void | setColumnLabel (IlInt colno, const char *label) |
| Sets the label of one column. More... | |
| virtual void | setColumnMask (IlInt colno, const IliInputMask &mask) |
| Sets the input mask of one column. More... | |
| virtual void | setColumnMaxLength (IlInt colno, IlInt maxlen) |
| Sets the maximum length for one column. More... | |
| virtual void | setColumnName (IlInt colno, const char *colname) |
| Sets the name of the column. More... | |
| virtual void | setColumnNullable (IlInt colno, IlBoolean nullable) |
Determines if the column positioned at colno is nullable (that is, may contain null values). More... | |
| virtual void | setColumnPartOfKey (IlInt colno, IlBoolean partOfKey) |
| Specifies whether the column is part of the primary key. More... | |
| virtual void | setColumnReadOnly (IlInt colno, IlBoolean readOnly) |
| Specifies whether a column is read-only. More... | |
| virtual void | setColumnTitle (IlInt colno, const char *title) |
| Sets the title of one column. More... | |
| virtual void | setColumnType (IlInt colno, const IliDatatype *type) |
| Sets the type of the column. More... | |
| virtual void | setColumnVisible (IlInt colno, IlBoolean visible) |
| Sets the column visibility. More... | |
| void | setElementTypeName (const char *name) |
| Sets the element type name. More... | |
| void | setSchemaName (const char *name) |
| Sets the schema name. More... | |
| void | startOfBatch () |
| Used to start a series of modifications on the schema object. More... | |
Public Member Functions inherited from IliRefCounted | |
| IlInt | getRefCount () const |
Returns the reference count of the object. Initially, this property is set to 0. More... | |
| void | lock () const |
| Increments the reference count of the object. | |
| void | unLock () const |
| Decrements the reference count of the object. More... | |
Static Public Member Functions | |
| static IliMapTable * | GetBooleanMap (IlvDisplay *display) |
| Returns a table with the string representation for Boolean value. More... | |
Static Public Member Functions inherited from IliTable | |
| static IliTable * | ReadTable (IlvDisplay *disp, IL_STDPREF istream &input) |
Constructs and returns an instance of a subclass of IliTable by reading its definition from an input stream. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from IliTable | |
| virtual void | cellChanged (IlInt rowno, IlInt colno) |
| Called just after a cell has changed. More... | |
| virtual void | raiseError (const IliErrorMessage &msg) const |
| Called each time an error occurs. More... | |
| virtual void | rowChanged (IlInt rowno) |
Called just after the row at position rowno has changed (that is, when one or more values in the row have changed). More... | |
| virtual void | rowDeleted (IlInt rowno) |
| Called just after a row has been removed from the table. More... | |
| virtual void | rowFetched (IlInt rowno) |
| Called just after a new row has been fetched from a remote database and inserted. More... | |
| virtual void | rowInserted (IlInt rowno) |
| Called just after a new row has been inserted. More... | |
| virtual void | rowMoved (IlInt src, IlInt dest) |
| Called just after a row has moved. More... | |
| virtual void | rowToBeChanged (IlInt rowno) |
| Called just before the row is changed. More... | |
| virtual void | rowToBeDeleted (IlInt rowno) |
| Called just before a row is removed from the table. More... | |
| virtual void | tableChanged () |
Called when the IliTable object has undergone a significant number of changes. More... | |
Table class.
Library: dataccess
The IliMapTable class defines read-only tables that are typically used as maps to convert values from one set into values from another set. An IliMapTable instance consists of two columns: the first contains objects of type integer, and the second contains objects of type character string.
| IliMapTable::IliMapTable | ( | IlvDisplay * | , |
| const IliMapEntry * | map, | ||
| IlBoolean | owner = IlFalse |
||
| ) |
Constructor.
This constructor creates a map table where the rows are taken from the mapEntries parameter, which must point to an array of IliMapEntry structures. The last structure in the array must contain 0 for both the value and the label members. The owner parameter specifies whether the newly created map table will own the mapEntries array, or not.
| IliMapTable::IliMapTable | ( | const IliMapTable & | table | ) |
Copy constructor.
This is the copy constructor of the IliMapTable class.
| table | The origin table. |
| IliMapTable::IliMapTable | ( | IlvDisplay * | display, |
| IL_STDPREF istream & | input | ||
| ) |
Stream constructor.
This constructor creates a map table by reading an input stream.
| display | The display. |
| input | The input stream. |
|
static |
Returns a table with the string representation for Boolean value.
| display | The display. |
|
virtual |
|
virtual |
Returns a value.
This member function handles the fetching of the row (and all preceding rows) as necessary.
| rowno | The row position. |
| colno | The column position. |
| value | The value. |
IlTrue if successful. Reimplemented from IliTable.
| IlBoolean IliMapTable::isLanguageSensitive | ( | ) | const |
Returns the language sensitive.
IlTrue if the map table uses the message database of the display to translate the values of the second column. | void IliMapTable::setLanguageSensitive | ( | IlBoolean | f | ) |
Sets the language sensitive.
Sets the language-sensitive property of the map table.
| f | The sensitive. |
|
virtual |
Writes to stream.
Writes out a map table to an output stream in a form suitable to be read back by the stream-oriented IliMapTable constructor.
| output | The output stream. |
Reimplemented from IliTable.
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.