Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ObstacleGrid::PutFunc Class Reference

The PutFunc class is used by for_each_2d_vector (used by put ()) and puts the pointer to the Obstacle in each of the squares that it is in. More...

#include <obstacle_grid.h>

Inherits ObstacleGrid::MyFuncBase.

Inheritance diagram for ObstacleGrid::PutFunc:

Inheritance graph
[legend]
Collaboration diagram for ObstacleGrid::PutFunc:

Collaboration graph
[legend]
List of all members.

Public Methods

 PutFunc (ObstacleGrid *myparent, Obstacle *obstacle)
void operator() (Vector pos)
 The () operator is called by for_each_2d_vector so that a functoin can be done for each Vector . More...


Detailed Description

The PutFunc class is used by for_each_2d_vector (used by put ()) and puts the pointer to the Obstacle in each of the squares that it is in.


Constructor & Destructor Documentation

ObstacleGrid::PutFunc::PutFunc ObstacleGrid   myparent,
Obstacle   obstacle
[inline]
 

00097 : MyFuncBase(myparent,obstacle){}


Member Function Documentation

void ObstacleGrid::PutFunc::operator() Vector    pos [inline]
 

The () operator is called by for_each_2d_vector so that a functoin can be done for each Vector .

00099                                            {
00100             ObstMap::iterator iter=parent->collObst.insert (ObstMap::value_type(VectorHash (pos), obst));
00101             printf ("Adding %X (%f,%f)\n",&(*iter),pos.i,pos.j);
00102         }


The documentation for this class was generated from the following file:
Generated on Mon Jul 7 21:13:55 2003 for Ethereal by doxygen1.2.15