Rogue Wave Server/Rogue Wave Views Integration > Server/Views Mapping > Accessing Server/Views Representation Objects > Manipulating Rogue Wave Views Data Sources
 
Manipulating Rogue Wave Views Data Sources
Unless you derive the classes IlsSwRepresentation, IlsSwTable or IlsSwRow, all accesses to those objects should be performed through the Rogue Wave Views API by manipulating the data sources or their underlying memory tables. A set of utility functions is provided to enable you to retrieve representation objects connected to Rogue Wave Views memory tables or data sources:
*IlsSwMemoryTable::getTable
*IlsSwGetSwTable
*IlsSwGetDs
*IlsSwTable::getRow
You may want to use those functions to call the API representation objects directly at IlsRpObject level or to use these representation objects when manipulating user-defined mappings.
You can manipulate the IlsSwMemoryTable objects created by Rogue Wave Server data sources like any other Rogue Wave Views table, by using their regular API. One way to do this is to scan the panel that holds all your objects and to use data source-aware gadgets to retrieve their data source and table, as shown in the code sample below:
#include <ilmvsw/util.h>
IlvGadgetContainer* cont = ...;
IlvUInt count;
IlvGraphic* const* objects = cont -> getObjects(count);
for (int i = 0; i < count; i++) {
if (IlvSwIsAField(objects[i])) {
IlvSwFieldItf* itf = IlvSwGraphicToField(objects[i]);
IlvSwMemoryDataSource* mds = IlsSwGetDs(itf);
if (mds) {
IlsSwTable* swTable = IlsSwGetSwTable(mds);
IlsSwMemoryTable* memTable = IlsSwGetMemoryTable(mds);
/* ... */
}
}
}

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.