Single Occupancy cell accessor for accessing the occupants of locations in a Grid.
More...
#include <SingleOccupancy.h>
|
T * | get (const Point< GPType > &location) const |
| Gets the object found at the specified location. More...
|
|
void | getAll (const Point< GPType > &location, std::vector< T * > &out) const |
| Gets the item found at the specified location. More...
|
|
bool | put (boost::shared_ptr< T > &agent, const Point< GPType > &location) |
| Puts the specified item at the specified location. More...
|
|
void | remove (boost::shared_ptr< T > &agent, const Point< GPType > &location) |
| Removes the specified item from the specified location. More...
|
|
template<typename T, typename GPType>
class repast::SingleOccupancy< T, GPType >
Single Occupancy cell accessor for accessing the occupants of locations in a Grid.
Each locations can have only a single occupant.
- Parameters
-
T | the type of object in the Grid |
GPType | the coordinate type of the grid point locations. This must be an int or a double. |
◆ get()
template<typename T , typename GPType >
Gets the object found at the specified location.
- Parameters
-
location | the location to get the object at |
- Returns
- the first object found at the specified location or 0 if there are no objects at the specified location.
◆ getAll()
template<typename T , typename GPType >
Gets the item found at the specified location.
- Parameters
-
| location | the location to get the item at |
[out] | the | found item will be returned in this vector |
◆ put()
template<typename T , typename GPType >
Puts the specified item at the specified location.
- Parameters
-
agent | the item to put |
location | the location to put the item at |
◆ remove()
template<typename T , typename GPType >
Removes the specified item from the specified location.
- Parameters
-
agent | the item to remove |
location | the location to remove the item from |
The documentation for this class was generated from the following file: