GeoList

Since: BlackBerry 10.0.0

#include <bb/platform/geo/GeoList>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

A container of Geographic elements.

Each element's ID must be unique. The element's ID is used as a handle for the element. You can retrieve each element's ID using Geographic.getId().

Object Ownership

The Geographic elements in this list are not owned by this list. When this GeoList is deleted, the elements contained in it still exist. Geographic elements are usually owned by the client application, or by the MapData or DataProvider objects used with MapView.

Reference Type

GeoList is expected to be used as a value type. However, GeoList is a collection of raw pointers to instances of reference type. As such, care needs to be made when referencing this object's contents in multithreaded environments. For example, deletion in one thread can cause a dangling pointer in another thread.


Overview

Public Functions Index

GeoList ()
GeoList (GeoList const &src)
~GeoList ()
booladd (Geographic *element)
voidadd (const GeoList &list)
BoundingBoxboundingBox () const
boolclear ()
intcount () const
GeoListfind (const BoundingBox &boundingBox) const
GeoListfind (const QStringList &ids) const
Geographic *geographic (const QString &id) const
QStringListids () const
boolisEmpty () const
GeoList &operator= (const GeoList &src)
boolremove (const QString &id)
QList< Geographic * >toQList () const

Public Functions

GeoList ()

Constructor.

Since:

BlackBerry 10.0.0

GeoList (

Copy Constructor.

Since:

BlackBerry 10.0.0

~GeoList ()

Destructor.

Since:

BlackBerry 10.0.0

bool add (

Adds a Geographic element to this list.

Since:

BlackBerry 10.0.0

void add (

Copies all Geographic elements in the GeoList given as the parameter to this list.

Parameters
list

The list to copy from.

Since:

BlackBerry 10.0.0

BoundingBox boundingBox ()

Gets the bounding box that contains all the elements in this list.

The borders of the bounding box include all the geographic elements in this list.
Return:

The bounding box surrounding this list of geographic elements.

Since:

BlackBerry 10.0.0

bool clear ()

Removes all Geographic elements from this list.

Return:

true if any changes occurred.

Since:

BlackBerry 10.0.0

int count ()

Retrieves the number of Geographic elements in this list.

Return:

The number of Geographic elements in this list.

Since:

BlackBerry 10.0.0

GeoList find (

Gets all the Geographic elements within the given bounding box from this list.

Since:

BlackBerry 10.0.0

GeoList find (

Gets all the Geographic elements with the given IDs from this list.

Since:

BlackBerry 10.0.0

Geographic * geographic (

Gets the Geographic element with the given ID from this list.

Return:

NULL if the element was not found.

Since:

BlackBerry 10.0.0

QStringList ids ()

Retrieves a list of all the IDs within this list.

Return:

A collection of QString ids.

Since:

BlackBerry 10.0.0

bool isEmpty ()

Determines if this list has any Geographic elements in it.

Return:

true if the number of Geographic elements in this list is zero, false otherwise.

Since:

BlackBerry 10.0.0

GeoList & operator= (

Assignment Operator.

Since:

BlackBerry 10.0.0

bool remove (

Removes the Geographic element with the given ID from this list.

Note: This does not free the memory pointed to by this pointer.

Return:

true if the element existed and was removed; otherwise, returns false.

Since:

BlackBerry 10.0.0

QList< Geographic * > toQList ()

Retrieves a list of all the Geographic elements within this list.

Return:

A collection of Geographic objects.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus