SUMO - Simulation of Urban MObility
NamedRTree Class Reference

A RT-tree for efficient storing of SUMO's Named objects. More...

#include <NamedRTree.h>

Inheritance diagram for NamedRTree:
NAMED_RTREE_QUAL

Public Member Functions

void Insert (const float a_min[2], const float a_max[2], Named *const &a_data)
 Insert entry. More...
 
 NamedRTree ()
 Constructor. More...
 
void Remove (const float a_min[2], const float a_max[2], Named *const &a_data)
 Remove entry. More...
 
void RemoveAll ()
 Remove all enrties. More...
 
int Search (const float a_min[2], const float a_max[2], const Named::StoringVisitor &c) const
 Find all within search rectangle. More...
 
 ~NamedRTree ()
 Destructor. More...
 

Detailed Description

A RT-tree for efficient storing of SUMO's Named objects.

This class specialises the used RT-tree implementation from "rttree.h". It stores names of "Named"-objects.

See also
Named

Definition at line 72 of file NamedRTree.h.

Constructor & Destructor Documentation

NamedRTree::NamedRTree ( )
inline

Constructor.

Definition at line 75 of file NamedRTree.h.

NamedRTree::~NamedRTree ( )
inline

Destructor.

Definition at line 80 of file NamedRTree.h.

Member Function Documentation

void NamedRTree::Insert ( const float  a_min[2],
const float  a_max[2],
Named *const &  a_data 
)
inline

Insert entry.

Parameters
a_minMin of bounding rect
a_maxMax of bounding rect
a_dataThe instance of a Named-object to add (the ID is added)
See also
RTree::Insert

Definition at line 90 of file NamedRTree.h.

Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute(), TraCIServerAPI_Junction::getTree(), TraCIServerAPI_InductionLoop::getTree(), TraCIServerAPI_POI::getTree(), TraCIServerAPI_Polygon::getTree(), and NBNodeCont::insert().

void NamedRTree::Remove ( const float  a_min[2],
const float  a_max[2],
Named *const &  a_data 
)
inline

Remove entry.

Parameters
a_minMin of bounding rect
a_maxMax of bounding rect
a_dataThe instance of a Named-object to remove
See also
RTree::Remove

Definition at line 101 of file NamedRTree.h.

Referenced by NBNodeCont::extract().

void NamedRTree::RemoveAll ( )
inline

Remove all enrties.

See also
RTree::RemoveAll

Definition at line 109 of file NamedRTree.h.

int NamedRTree::Search ( const float  a_min[2],
const float  a_max[2],
const Named::StoringVisitor c 
) const
inline

Find all within search rectangle.

Parameters
a_minMin of search bounding rect
a_maxMax of search bounding rect
a_searchResultSearch result array. Caller should set grow size. Function will reset, not append to array.
a_resultCallbackCallback function to return result. Callback should return 'true' to continue searching
a_contextUser context to pass as parameter to a_resultCallback
Returns
Returns the number of entries found
See also
RTree::Search

Definition at line 123 of file NamedRTree.h.

Referenced by MSDevice_BTreceiver::BTreceiverUpdate::execute(), and NBNodeCont::retrieve().


The documentation for this class was generated from the following file: