![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Class managing a set of entities.
Unlike the TSLEntitySet class, the entities stored in this class are not owned by the TSLEntityReferenceSet. This class is intended as a parameter passing mechanism for passing arrays of entities across the SDK boundary without introducing explicit dependencies on STL libraries etc.
NOTE : Instances of TSLEntityReferenceSet must be allocated on the heap since the allocation is redirected to MapLink. To prevent users creating these objects statically, automatically or embedded, the destructor is private. To destroy a TSLEntityReferenceSet, call the public destroy method, rather than the delete operator.
Public Member Functions | |
TSLEntityReferenceSet () | |
TSLEntityReferenceSet (const TSLEntityReferenceSet &other) | |
TSLEntityReferenceSet (const TSLEntity **entities, int numEntities) | |
bool | add (const TSLEntity *entity, int index=-1) |
bool | clear () |
void | destroy () |
const TSLEntity * | elementAt (int index) const |
const TSLEntity * | operator[] (int index) const |
int | size () const |
bool | remove (int index) |
bool | remove (const TSLEntity *entity) |
void * | operator new (size_t size) TSL_NO_THROW |
void * | operator new (size_t size, char *filename, int line) |
TSLEntityReferenceSet::TSLEntityReferenceSet | ( | ) |
Default constructor.
Creates an empty entity reference set
Use the destroy method to destroy an instance of this class, rather than the delete operator.
TSLEntityReferenceSet::TSLEntityReferenceSet | ( | const TSLEntityReferenceSet & | other | ) |
Copy constructor.
Creates an entity reference set that is a copy of that specified.
Use the destroy method to destroy an instance of this class, rather than the delete operator.
TSLEntityReferenceSet::TSLEntityReferenceSet | ( | const TSLEntity ** | entities, |
int | numEntities ) |
Constructor to create an entity reference set from a number of entities
entities | Pointer to beginning of entities array |
numEntities | Number of entities in array |
Use the destroy method to destroy an instance of this class, rather than the delete operator.
bool TSLEntityReferenceSet::add | ( | const TSLEntity * | entity, |
int | index = -1 ) |
Add a new entity reference to the set.
entity | New entity to append |
index | Position for new entity. If value is out of range, then new entity is appended. |
bool TSLEntityReferenceSet::clear | ( | ) |
Clears the entity reference set.
void TSLEntityReferenceSet::destroy | ( | ) |
Destroy this entity reference set.
These must be destroyed using this call rather that being deleted.
const TSLEntity * TSLEntityReferenceSet::elementAt | ( | int | index | ) | const |
Access the entity at the specified index.
index | Index into entity reference set |
void * TSLEntityReferenceSet::operator new | ( | size_t | size | ) |
These are here to avoid being documented Allocation redirection for API.
void * TSLEntityReferenceSet::operator new | ( | size_t | size, |
char * | filename, | ||
int | line ) |
When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.
const TSLEntity * TSLEntityReferenceSet::operator[] | ( | int | index | ) | const |
Access the entity reference at the specified index.
index | Index into entity reference set |
bool TSLEntityReferenceSet::remove | ( | const TSLEntity * | entity | ) |
Remove an entity reference from the set.
entity | Entity to remove. |
bool TSLEntityReferenceSet::remove | ( | int | index | ) |
Remove an entity reference from the set.
index | Position of entity to remove. If value is out of range, then last entity is appended. |
int TSLEntityReferenceSet::size | ( | ) | const |
Query the number of entities in the entity reference set.