MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLEntityIterator Class Reference

Detailed Description

Entity iterator class.

The TSLEntityIterator allows code to access all the entities in a layer in sequence. The entities returned remain the property of the layer and should not be modified or deleted. The TSLEntities returned from a TSLEntityIterator are only valid for immediate use since the data tiles to which they belong may be removed from memory if the cache is flushed. Entities returned may not persist beyond the next call to the iterator.

The iterator will flush the cache if necessary.

The iterator is not thread safe and should only be used sequentially.

Public Member Functions

const TSLEntitygetNextEntity ()
 
int getNextEntities (int requestedNumber, const TSLEntity **entity)
 
void destroy ()
 

Member Function Documentation

◆ destroy()

void TSLEntityIterator::destroy ( )

Destroy method for the iterator. This should be called rather than deleting the iterator, since the calls are redirected internally to MapLink.

◆ getNextEntities()

int TSLEntityIterator::getNextEntities ( int requestedNumber,
const TSLEntity ** entity )

Fetch the next N entities or the remainder if less than N.

Parameters
requestedNumberThe size of the array of entities to be returned.
entitya pointer to an array of entities. This will be filled with the next requestedNumber of entities if that many exist or the remainder if less.
Returns
the actual number of entities in the array. This may be less than requested if insufficient entities are available in the layer.

◆ getNextEntity()

const TSLEntity * TSLEntityIterator::getNextEntity ( )

Fetches the next entity in the layer.

Returns
the next entity in the layer or NULL if no more entities are available.