![]() Rogue Wave Views 5.5.1 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Table class. More...
#include <ilviews/dataccess/maptable.h>
Public Member Functions | |
| IliMapTable (IlvDisplay *display, IL_STDPREF istream &input) | |
| Stream constructor. | |
| IliMapTable (const IliMapTable &table) | |
| Copy constructor. | |
| IliMapTable (IlvDisplay *, const IliMapEntry *map, IlBoolean owner=IlFalse) | |
| Constructor. | |
| virtual IlInt | getRowsCount () const |
| Returns the number of rows in the table. | |
| virtual IlBoolean | getValue (IlInt rowno, IlInt colno, IliValue &val) const |
| Returns a value. | |
| IlBoolean | isLanguageSensitive () const |
| Returns the language sensitive. | |
| void | setLanguageSensitive (IlBoolean f) |
| Sets the language sensitive. | |
| virtual void | write (IL_STDPREF ostream &output) const |
| Writes to stream. | |
Static Public Member Functions | |
| static IliMapTable * | GetBooleanMap (IlvDisplay *display) |
| Returns a table with the string representation for Boolean value. | |
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.
IlvDisplay* dpy = getDisplay(); const IliMapEntry mapEntries [] = { 1, "One", 2, "Two", 3, "Three", 0, 0 }; IliMapTable* aMapTable = new IliMapTable(dpy,mapEntries,IlFalse);
| 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 IliMapTable* IliMapTable::GetBooleanMap | ( | IlvDisplay * | display | ) | [static] |
Returns a table with the string representation for Boolean value.
| display | The display. |
| virtual IlInt IliMapTable::getRowsCount | ( | ) | const [virtual] |
| virtual IlBoolean IliMapTable::getValue | ( | IlInt | rowno, | |
| IlInt | colno, | |||
| IliValue & | value | |||
| ) | const [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 void IliMapTable::write | ( | IL_STDPREF ostream & | output | ) | const [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 2012, 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.