AURobotServers  4
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
UObstInfo Class Reference

#include <ureactivepath.h>

Public Member Functions

void clear ()
 
int getCnt ()
 
int getMaxSize ()
 
UObstaclegetObst (int index)
 
int getObstInfo (UObstacle *ob)
 
void print (const char *prestring)
 
bool setObstInfo (UObstacle *ob, int value)
 
 UObstInfo ()
 
 ~UObstInfo ()
 

Protected Attributes

int info [LIST_SIZE]
 
int listMax
 
UObstacleobst [LIST_SIZE]
 
int obstCnt
 

Static Protected Attributes

static const int LIST_SIZE = 100
 

Detailed Description

Class to hold a set of obstacle pointers and an associated value. The value could be the side by witch the obstacle has to be passed.

Constructor & Destructor Documentation

UObstInfo::UObstInfo ( )

Constructor

References UReacRoadLines::clear().

UObstInfo::~UObstInfo ( )

Destructor

Member Function Documentation

void UObstInfo::clear ( void  )
inline

Remove all info

int UObstInfo::getCnt ( )
inline

Get count of obstacle list

int UObstInfo::getMaxSize ( )
inline

Get max list size

UObstacle* UObstInfo::getObst ( int  index)
inline

Get obst.

References maxi(), and mini().

int UObstInfo::getObstInfo ( UObstacle ob)

Get obstacle info for this obstacle. Returns -1 if not found, otherwise returns stored info.

Referenced by UReactivePath::avoidObst(), and UReactivePath::getNearObstacle().

void UObstInfo::print ( const char *  prestring)

Print status of obstacle info

References UPosition::x, and UPosition::y.

bool UObstInfo::setObstInfo ( UObstacle ob,
int  value 
)

Set obstacle info for this obstacle. Info should not be '-1', as this signals 'no info'.

Referenced by UReactivePath::avoidObst().

Member Data Documentation

int UObstInfo::info[LIST_SIZE]
protected

Value associated with pointer

const int UObstInfo::LIST_SIZE = 100
staticprotected
int UObstInfo::listMax
protected

Size of list

UObstacle* UObstInfo::obst[LIST_SIZE]
protected

Obstacle pointer

int UObstInfo::obstCnt
protected

Number of pointers stored


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