Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsInteractiveElementManager< T, U > Class Template Referenceabstract

Base class for interactive element managers. More...

Inheritance diagram for OnlineMapsInteractiveElementManager< T, U >:
OnlineMapsMarkerManagerBase< T, U >

Public Member Functions

Add (U item)
 Adds an item to the list.
 
void AddRange (IEnumerable< U > collection)
 Adds items to the list.
 
IEnumerator GetEnumerator ()
 Gets the enumerator.
 
int IndexOf (IOnlineMapsInteractiveElement element)
 Index of item.
 
bool Remove (U item, bool dispose=true)
 Remove an item.
 
void RemoveAll (bool dispose=true)
 Remove all items.
 
void RemoveAll (Predicate< U > match, bool dispose=true)
 Removes all items which matches the predicate.
 
RemoveAt (int index, bool dispose=true)
 Remove an item by index.
 

Static Public Member Functions

static U AddItem (U item)
 Adds an item to the list.
 
static void AddItems (IEnumerable< U > collection)
 Adds items to the list.
 
static void Init ()
 Initializes the manager.
 
static void RemoveAllItems ()
 Remove all items.
 
static void RemoveAllItems (Predicate< U > match)
 Removes all items which matches the predicate.
 
static bool RemoveItem (U item, bool dispose=true)
 Remove an item.
 
static U RemoveItemAt (int index)
 Remove an item by index.
 
static void SetItems (IEnumerable< U > collection)
 Sets the collection of items.
 

Static Public Attributes

static Action< U > OnAddItem
 The event that occurs when an item is added.
 
static Action< U > OnRemoveItem
 The event that occurs when an item is removed.
 

Static Protected Member Functions

static void Redraw ()
 Redraws the map.
 

Properties

static T instance [get]
 Instance of the manager.
 
List< U > items [get, set]
 Gets / sets the list of items.
 
OnlineMaps map [get]
 Reference to the map.
 
static int CountItems [get]
 Count items.
 
int Count [get]
 Count items.
 
this[int index] [get, set]
 Gets / sets item by index.
 

Detailed Description

Base class for interactive element managers.

Template Parameters
TType of manager
UType of interactive element
Type Constraints
T :OnlineMapsInteractiveElementManager 
T :T 
T :U 
U :IOnlineMapsInteractiveElement 

Member Function Documentation

◆ Add()

U OnlineMapsInteractiveElementManager< T, U >.Add ( U item)

Adds an item to the list.

Parameters
itemItem
Returns
Item

◆ AddItem()

static U OnlineMapsInteractiveElementManager< T, U >.AddItem ( U item)
static

Adds an item to the list.

Parameters
itemItem
Returns
Item

◆ AddItems()

static void OnlineMapsInteractiveElementManager< T, U >.AddItems ( IEnumerable< U > collection)
static

Adds items to the list.

Parameters
collectionCollection of items

◆ AddRange()

void OnlineMapsInteractiveElementManager< T, U >.AddRange ( IEnumerable< U > collection)

Adds items to the list.

Parameters
collectionCollection of items

◆ GetEnumerator()

IEnumerator OnlineMapsInteractiveElementManager< T, U >.GetEnumerator ( )

Gets the enumerator.

Returns
Enumerator

◆ IndexOf()

Index of item.

Parameters
elementInteractive element
Returns
Index of item

◆ Remove()

bool OnlineMapsInteractiveElementManager< T, U >.Remove ( U item,
bool dispose = true )

Remove an item.

Parameters
itemItem
disposeDispose the item
Returns
True - success, false - otherwise

◆ RemoveAll() [1/2]

void OnlineMapsInteractiveElementManager< T, U >.RemoveAll ( bool dispose = true)

Remove all items.

Parameters
disposeDispose the item

◆ RemoveAll() [2/2]

void OnlineMapsInteractiveElementManager< T, U >.RemoveAll ( Predicate< U > match,
bool dispose = true )

Removes all items which matches the predicate.

Parameters
matchPredicate
disposeDispose the item

◆ RemoveAllItems()

static void OnlineMapsInteractiveElementManager< T, U >.RemoveAllItems ( Predicate< U > match)
static

Removes all items which matches the predicate.

Parameters
matchPredicate

◆ RemoveAt()

U OnlineMapsInteractiveElementManager< T, U >.RemoveAt ( int index,
bool dispose = true )

Remove an item by index.

Parameters
indexIndex of item
disposeDispose the item
Returns
Item that was removed

◆ RemoveItem()

static bool OnlineMapsInteractiveElementManager< T, U >.RemoveItem ( U item,
bool dispose = true )
static

Remove an item.

Parameters
itemItem
disposeDispose the item
Returns
True - success, false - otherwise

◆ RemoveItemAt()

static U OnlineMapsInteractiveElementManager< T, U >.RemoveItemAt ( int index)
static

Remove an item by index.

Parameters
indexIndex of item
Returns
Item that was removed

◆ SetItems()

static void OnlineMapsInteractiveElementManager< T, U >.SetItems ( IEnumerable< U > collection)
static

Sets the collection of items.

Parameters
collectionCollection of items

Property Documentation

◆ this[int index]

U OnlineMapsInteractiveElementManager< T, U >.this[int index]
getset

Gets / sets item by index.

Parameters
indexIndex of the item
Returns
Item