This class represents a point of interest (POI) More...
#include <PointOfInterest.h>
Public Types | |
enum | PoiType { DEFAULT = 100, VICTIM = 200, OBJECT = 300, GRIPPABLE_OBJECT = 400, PERSON = 600, ROOMBA = 700, HAZARD_MATERIAL = 800, START_POSITION = 900, START_ORIENTATION = 1000 } |
Public Member Functions | |
void | addFloat (std::string key, float data) |
Add a new Float to the FloatMap. | |
void | addInt (std::string key, int data) |
Add a new Int to the IntMap. | |
void | addString (std::string key, std::string data) |
Add a new String to the StringMap. | |
float | getFloat (std::string key) const |
std::map< std::string, float > | getFloatMap () const |
int | getId () const |
int | getInt (std::string key) const |
std::map< std::string, int > | getIntMap () const |
std::string | getName () const |
std::string | getRemarks () const |
std::string | getString (std::string key) const |
std::map< std::string, std::string > | getStringMap () const |
PoiType | getType () const |
bool | hasInName (std::string part) const |
Tests whether this PointOfInterest has the specified string in its name or not, ignoring case. | |
bool | hasName (std::string name) const |
Tests whether this PointOfInterest has the specified name or not, ignoring case. | |
PointOfInterest () | |
PointOfInterest (int id, std::string name, PoiType type, float posX, float posY, std::string remarks, StringMapT stringMap=StringMapT(), FloatMapT floatMap=FloatMapT(), IntMapT intMap=IntMapT()) | |
The constructor. | |
PointOfInterest (int id, std::string name, PoiType type, float posX, float posY, float theta, std::string remarks, StringMapT stringMap=StringMapT(), FloatMapT floatMap=FloatMapT(), IntMapT intMap=IntMapT()) | |
The constructor. | |
PointOfInterest (std::string name, PoiType type, float posX, float posY, std::string remarks) | |
Alternative constructor omitting the id parameter. | |
PointOfInterest (std::string name, PoiType type, float posX, float posY, float theta, std::string remarks) | |
Alternative constructor omitting the id parameter. | |
PointOfInterest (int id, const PointOfInterest *poi) | |
Copy constructor, assigns a new id. | |
void | printOn (std::ostream &strm) const |
print description | |
void | setName (std::string name) |
void | setRemarks (std::string remarks) |
virtual | ~PointOfInterest () |
The standard destructor. | |
Private Member Functions | |
void | init (int id, std::string name, PoiType type, std::string remarks, StringMapT stringMap, FloatMapT floatMap, IntMapT intMap) |
Private Attributes | |
FloatMapT | m_FloatMap |
int | m_Id |
IntMapT | m_IntMap |
std::string | m_Name |
std::string | m_Remarks |
StringMapT | m_StringMap |
PoiType | m_Type |
This class represents a point of interest (POI)
This class represents a point of interest (POI). It is derived from Point2D and thus inherits its methods x(), y(), and theta() to query the world position and orientation.
Definition at line 39 of file PointOfInterest.h.
DEFAULT | |
VICTIM | |
OBJECT | |
GRIPPABLE_OBJECT | |
PERSON | |
ROOMBA | |
HAZARD_MATERIAL | |
START_POSITION | |
START_ORIENTATION |
Definition at line 44 of file PointOfInterest.h.
PointOfInterest::PointOfInterest | ( | int | id, |
std::string | name, | ||
PoiType | type, | ||
float | posX, | ||
float | posY, | ||
std::string | remarks, | ||
StringMapT | stringMap = StringMapT() , |
||
FloatMapT | floatMap = FloatMapT() , |
||
IntMapT | intMap = IntMapT() |
||
) | [inline] |
The constructor.
Creates a point of interest with orientation 0.0.
id | unique identification number |
name | name of the poi |
type | type of the poi (victim, etc.) |
posX,posY | position within the map |
remarks | additional information associated with the poi |
Definition at line 68 of file PointOfInterest.h.
PointOfInterest::PointOfInterest | ( | int | id, |
std::string | name, | ||
PoiType | type, | ||
float | posX, | ||
float | posY, | ||
float | theta, | ||
std::string | remarks, | ||
StringMapT | stringMap = StringMapT() , |
||
FloatMapT | floatMap = FloatMapT() , |
||
IntMapT | intMap = IntMapT() |
||
) | [inline] |
The constructor.
id | unique identification number |
name | name of the poi |
type | type of the poi (victim, etc.) |
posX,posY | position within the map |
theta | orientation of the poi |
remarks | additional information associated with the poi |
Definition at line 84 of file PointOfInterest.h.
PointOfInterest::PointOfInterest | ( | std::string | name, |
PoiType | type, | ||
float | posX, | ||
float | posY, | ||
std::string | remarks | ||
) | [inline] |
Alternative constructor omitting the id parameter.
Definition at line 92 of file PointOfInterest.h.
PointOfInterest::PointOfInterest | ( | std::string | name, |
PoiType | type, | ||
float | posX, | ||
float | posY, | ||
float | theta, | ||
std::string | remarks | ||
) | [inline] |
Alternative constructor omitting the id parameter.
Definition at line 99 of file PointOfInterest.h.
PointOfInterest::PointOfInterest | ( | int | id, |
const PointOfInterest * | poi | ||
) |
Copy constructor, assigns a new id.
virtual PointOfInterest::~PointOfInterest | ( | ) | [inline, virtual] |
The standard destructor.
Definition at line 109 of file PointOfInterest.h.
void PointOfInterest::addFloat | ( | std::string | key, |
float | data | ||
) | [inline] |
Add a new Float to the FloatMap.
Definition at line 134 of file PointOfInterest.h.
void PointOfInterest::addInt | ( | std::string | key, |
int | data | ||
) | [inline] |
Add a new Int to the IntMap.
Definition at line 137 of file PointOfInterest.h.
void PointOfInterest::addString | ( | std::string | key, |
std::string | data | ||
) | [inline] |
Add a new String to the StringMap.
Definition at line 131 of file PointOfInterest.h.
float PointOfInterest::getFloat | ( | std::string | key | ) | const [inline] |
Get the float to the matching string
Definition at line 157 of file PointOfInterest.h.
std::map<std::string, float> PointOfInterest::getFloatMap | ( | ) | const [inline] |
Get the float map
Definition at line 166 of file PointOfInterest.h.
int PointOfInterest::getId | ( | ) | const [inline] |
Definition at line 142 of file PointOfInterest.h.
int PointOfInterest::getInt | ( | std::string | key | ) | const [inline] |
Get the Int to the matching string
Definition at line 160 of file PointOfInterest.h.
std::map<std::string, int> PointOfInterest::getIntMap | ( | ) | const [inline] |
Get the int map
Definition at line 169 of file PointOfInterest.h.
std::string PointOfInterest::getName | ( | void | ) | const [inline] |
Definition at line 145 of file PointOfInterest.h.
std::string PointOfInterest::getRemarks | ( | ) | const [inline] |
Definition at line 151 of file PointOfInterest.h.
std::string PointOfInterest::getString | ( | std::string | key | ) | const [inline] |
Get the string to the matching string
Definition at line 154 of file PointOfInterest.h.
std::map<std::string, std::string> PointOfInterest::getStringMap | ( | ) | const [inline] |
Get the string map
Definition at line 163 of file PointOfInterest.h.
PoiType PointOfInterest::getType | ( | ) | const [inline] |
Definition at line 148 of file PointOfInterest.h.
bool PointOfInterest::hasInName | ( | std::string | part | ) | const |
Tests whether this PointOfInterest has the specified string in its name or not, ignoring case.
part | The string to test. |
bool PointOfInterest::hasName | ( | std::string | name | ) | const |
Tests whether this PointOfInterest has the specified name or not, ignoring case.
name | The name to test as a string. |
void PointOfInterest::init | ( | int | id, |
std::string | name, | ||
PoiType | type, | ||
std::string | remarks, | ||
StringMapT | stringMap, | ||
FloatMapT | floatMap, | ||
IntMapT | intMap | ||
) | [private] |
void PointOfInterest::printOn | ( | std::ostream & | strm | ) | const |
print description
void PointOfInterest::setName | ( | std::string | name | ) | [inline] |
Definition at line 128 of file PointOfInterest.h.
void PointOfInterest::setRemarks | ( | std::string | remarks | ) | [inline] |
remarks | Changes the contents of remarks attribute. |
Definition at line 126 of file PointOfInterest.h.
FloatMapT PointOfInterest::m_FloatMap [private] |
Definition at line 189 of file PointOfInterest.h.
int PointOfInterest::m_Id [private] |
Definition at line 182 of file PointOfInterest.h.
IntMapT PointOfInterest::m_IntMap [private] |
Definition at line 188 of file PointOfInterest.h.
std::string PointOfInterest::m_Name [private] |
Definition at line 183 of file PointOfInterest.h.
std::string PointOfInterest::m_Remarks [private] |
Definition at line 185 of file PointOfInterest.h.
StringMapT PointOfInterest::m_StringMap [private] |
Definition at line 187 of file PointOfInterest.h.
PoiType PointOfInterest::m_Type [private] |
Definition at line 184 of file PointOfInterest.h.