rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Data Access Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IliMapTable Class Reference

Table class. More...

#include <ilviews/dataccess/maptable.h>

Inheritance diagram for IliMapTable:
IliTable IliSchema IliRefCounted

List of all members.

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 IliMapTableGetBooleanMap (IlvDisplay *display)
 Returns a table with the string representation for Boolean value.

Detailed Description

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.

See also:
IliMapEntry, IliTable.

Constructor & Destructor Documentation

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.

Parameters:
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.

Parameters:
display The display.
input The input stream.

Member Function Documentation

static IliMapTable* IliMapTable::GetBooleanMap ( IlvDisplay display  )  [static]

Returns a table with the string representation for Boolean value.

Parameters:
display The display.
Returns:
A static map table that can be used to map the two Boolean values into a character string representation.
virtual IlInt IliMapTable::getRowsCount (  )  const [virtual]

Returns the number of rows in the table.

Returns:
The count.

Reimplemented from IliTable.

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.

Parameters:
rowno The row position.
colno The column position.
value The value.
Returns:
IlTrue if successful.

Reimplemented from IliTable.

IlBoolean IliMapTable::isLanguageSensitive (  )  const

Returns the language sensitive.

Returns:
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.

Parameters:
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.

Parameters:
output The output stream.

Reimplemented from IliTable.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

© 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.