![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Entity specific DataSet access methods.
Allows access to the Data held by an individual TSLEntity.
Public Member Functions | |
bool | addData (const TSLVariant *values, int count) |
bool | addData (const TSLVariant &value) |
void | copy (const TSLDataSet *source) |
TSLDataHandler * | dataHandler () const |
const char * | findKey (const char *field_name) const |
const char * | findName (const char *field_key) const |
bool | getAvailableField (int index, TSLSimpleString &field) const |
bool | getAvailableKey (int index, TSLSimpleString &key) const |
const TSLVariant * | getData (int position, bool search_external=false) const |
const TSLVariant * | getData (const char *id, int nth_copy=0, bool search_external=false) const |
bool | readOnly () const |
int | numAvailableFields () const |
int | numAvailableKeys () const |
bool | removeData (int position) |
bool | removeData (const char *id, int nth_copy=0) |
int | sizeData (bool search_external=false) const |
int | sizeData (const char *id, bool search_external=false) const |
bool | updateData (const TSLVariant &value, int position) |
bool | updateData (const TSLVariant &value, const char *id, int nth_copy=0) |
bool TSLDataSet::addData | ( | const TSLVariant & | value | ) |
Handles the addition of a single variants to the TSLDataSet. Addition is not allowed if the TSLDataSet is read only as in the case of TSLDataSet for TSLEntities retrieved from a TSLMapDataLayer.
value | reference to a single TSLVariant object to be added. |
bool TSLDataSet::addData | ( | const TSLVariant * | values, |
int | count ) |
Handles the addition of a set of variants to the TSLDataSet. Addition is not allowed if the TSLDataSet is read only as in the case of TSLDataSet for TSLEntities retrieved from a TSLMapDataLayer.
values | pointer to the first of a set of TSLVariants |
count | number of TSLVariants being passed in pass |
void TSLDataSet::copy | ( | const TSLDataSet * | source | ) |
Copies the contents of the given TSLDataSet into this TSLDataSet. This operation erases any existing data within this dataset.
The TSLDataHandler associated with this dataset (if any) is unaffected by this operation.
source | The TSLDataSet to copy the contents of. |
TSLDataHandler * TSLDataSet::dataHandler | ( | ) | const |
Returns a pointer to the data handler for this dataset.
The data handler can be used to determine the name, and optionally the type and length, for a given field key.
const char * TSLDataSet::findKey | ( | const char * | field_name | ) | const |
Gets the two character field key which identifies a data attribute associated with the specified human readable field name for an entity of the feature type which owns the TSLDataSet.
field_name | human readable field name. |
const char * TSLDataSet::findName | ( | const char * | field_key | ) | const |
Gets the human readable field name which identifies a data attribute associated with the specified 2 character field_key for an entity of the feature type which owns the TSLDataSet.
field_key | The two character identifier for which data attribute to recover. |
bool TSLDataSet::getAvailableField | ( | int | index, |
TSLSimpleString & | field ) const |
Gets the indexed field name
index | index to the field name to retrieve. This should be less than the return value for numAvailableFields. |
field | This will be populated with the field found at the passed index, should one exist. |
bool TSLDataSet::getAvailableKey | ( | int | index, |
TSLSimpleString & | key ) const |
Gets the indexed key name.
index | index to the key name to retrieve. This should be less than the return value for numAvailableKeys. |
key | This will be populated with the key found at the passed index, should one exist. |
const TSLVariant * TSLDataSet::getData | ( | const char * | id, |
int | nth_copy = 0, | ||
bool | search_external = false ) const |
Gets the nth_copy of a data attribute identified by id. If search external is set it will also search any external data sources if available.
id | Identifier for the data element to be retrieved. This may be the two character code of the TSLVariant to retrieve or the human readable version of the code. |
nth_copy | The count of the data identified by "id" to be retrieved. If no position is given the first occurrence is to be retrieved. Otherwise the valid range of inputs is from 1 (the first item) to the value returned by sizeData( id ) (the last item). |
search_external | Indicates if any external data sources should be searched. If no value is given no external search will be undertaken. |
const TSLVariant * TSLDataSet::getData | ( | int | position, |
bool | search_external = false ) const |
Gets the data attribute at the position specified. If search external is set it will also search any external data sources if available.
position | The position of the data attribute to retrieve. |
search_external | Indicates if any external data sources should be searched. If no value is given no external search will be undertaken. |
int TSLDataSet::numAvailableFields | ( | ) | const |
Counts the available human readable field names for this dataset
int TSLDataSet::numAvailableKeys | ( | ) | const |
Count of the available keys understood by this TSLDataSet
bool TSLDataSet::readOnly | ( | ) | const |
Indicates if the TSLDataSet is read only.
bool TSLDataSet::removeData | ( | const char * | id, |
int | nth_copy = 0 ) |
Removes nth_copy of the data attribute identified by the given id. Removal is not allowed if the TSLDataSet is read only as in the case of TSLDataSet for TSLEntities retrieved from a TSLMapDataLayer.
id | Identifier for the data element to be removed. |
nth_copy | The index of the data attribute with the given id that is to be removed. |
bool TSLDataSet::removeData | ( | int | position | ) |
Removes data at the given position.
Removal is not allowed if the TSLDataSet is read only as in the case of TSLDataSet for TSLEntities retrieved from a TSLMapDataLayer.
position | the position of the data attribute to remove |
int TSLDataSet::sizeData | ( | bool | search_external = false | ) | const |
Counts the number of available items in the TSLDataSet
search_external | indicates if any external data sources should be searched when calculating the count. |
int TSLDataSet::sizeData | ( | const char * | id, |
bool | search_external = false ) const |
Counts the number of available items with the given id.
id | the id of the attribute to get |
search_external | indicates if any external data sources should be searched when calculating the count. |
bool TSLDataSet::updateData | ( | const TSLVariant & | value, |
const char * | id, | ||
int | nth_copy = 0 ) |
Updates the nth copy of the specific variant id.
Not allowed if the TSLDataSet is read only.
This will not allow changes to any of the MapLink specific attributes or to any external data items. Note that this does not change the 'key' or 'id', merely update the value.
value | reference to the TSLVariant object that is to update the TSLDataSet |
id | Identifier for the data element to be updated. This may be the two character code of the TSLVariant to retrieve or the human readable version of the code. |
nth_copy | The count of the data identified by "id" to be retrieved. If no position is given the first occurrence is to be updated. |
bool TSLDataSet::updateData | ( | const TSLVariant & | value, |
int | position ) |
Updates the variant at the specified position for the entity.
Not allowed if the TSLDataSet is read only.
This will not allow changes to any of the MapLink specific attributes or to any external data items. Note that this method replaces the variant totally, not just updating the value. This means that the 'id' or 'key' could change.
value | reference to the TSLVariant object that is to update the TSLDataSet |
position | the position of the data attribute in the TSLDataSet to update. |