#include <yarp/dev/Map2DPath.h>
Inheritance diagram for yarp::dev::Nav2D::Map2DPath:Public Types | |
| using | iterator = std::vector< Map2DLocation >::iterator |
| using | const_iterator = std::vector< Map2DLocation >::const_iterator |
Public Types inherited from yarp::dev::Map2DPathData | |
| typedef yarp::os::idl::Unwrapped< Map2DPathData > | unwrapped |
Public Member Functions | |
| Map2DPath (const std::vector< yarp::dev::Nav2D::Map2DLocation > map_waypoints) | |
| Constructor. More... | |
| Map2DPath () | |
| Default constructor: the map name is empty, coordinates are set to zero. More... | |
| std::string | toString () const |
| Returns text representation of the path. More... | |
| bool | operator!= (const Map2DPath &r) const |
| Compares two Map2DPath. More... | |
| bool | operator== (const Map2DPath &r) const |
| Compares two Map2DArea. More... | |
| yarp::dev::Nav2D::Map2DLocation & | operator[] (size_t index) |
| Returns a waypoint in the path. More... | |
| size_t | size () const |
| Returns the size of the path. More... | |
| double | getLength () const |
| Returns the length of the path. More... | |
| bool | isOnSingleMap () const |
| Checks if all the waypoints of the path belong to the same map return true if the test is successful. More... | |
| bool | read (yarp::os::idl::WireReader &reader) override |
| bool | write (const yarp::os::idl::WireWriter &writer) const override |
| bool | read (yarp::os::ConnectionReader &reader) override |
| Read this object from a network connection. More... | |
| bool | write (yarp::os::ConnectionWriter &writer) const override |
| Write this object to a network connection. More... | |
| void | clear () |
| Remove all elements from the path. More... | |
| iterator | begin () noexcept |
| Returns an iterator to the begin of the Path. More... | |
| iterator | end () noexcept |
| Returns an iterator to the end of the Path. More... | |
| const_iterator | cbegin () const noexcept |
| Returns a const iterator to the begin of the Path. More... | |
| const_iterator | cend () const noexcept |
| Returns a const iterator to the end of the Path. More... | |
| void | push_back (yarp::dev::Nav2D::Map2DLocation loc) |
| Inserts a new location into the path @loc the location to be inserted. More... | |
Public Member Functions inherited from yarp::dev::Map2DPathData | |
| Map2DPathData () | |
| Map2DPathData (const std::vector< yarp::dev::Nav2D::Map2DLocation > &waypoints) | |
| std::string | toString () const |
Public Member Functions inherited from yarp::os::idl::WirePortable | |
| virtual bool | readBare (yarp::os::ConnectionReader &reader) |
| virtual bool | writeBare (yarp::os::ConnectionWriter &writer) const |
| virtual bool | readBottle (yarp::os::ConnectionReader &reader) |
| virtual bool | writeBottle (yarp::os::ConnectionWriter &writer) const |
Public Member Functions inherited from yarp::os::Portable | |
| virtual Type | getType () const |
Public Member Functions inherited from yarp::os::PortReader | |
| virtual | ~PortReader () |
| Destructor. More... | |
| virtual Type | getReadType () const |
Public Member Functions inherited from yarp::os::PortWriter | |
| virtual | ~PortWriter () |
| Destructor. More... | |
| virtual void | onCompletion () const |
| This is called when the port has finished all writing operations. More... | |
| virtual void | onCommencement () const |
| This is called when the port is about to begin writing operations. More... | |
| virtual yarp::os::Type | getWriteType () const |
Additional Inherited Members | |
Static Public Member Functions inherited from yarp::os::Portable | |
| static bool | copyPortable (const PortWriter &writer, PortReader &reader) |
| Copy one portable to another, via writing and reading. More... | |
Public Attributes inherited from yarp::dev::Map2DPathData | |
| std::vector< yarp::dev::Nav2D::Map2DLocation > | waypoints |
Definition at line 26 of file Map2DPath.h.
| using yarp::dev::Nav2D::Map2DPath::const_iterator = std::vector<Map2DLocation>::const_iterator |
Definition at line 96 of file Map2DPath.h.
| using yarp::dev::Nav2D::Map2DPath::iterator = std::vector<Map2DLocation>::iterator |
Definition at line 95 of file Map2DPath.h.
| Map2DPath::Map2DPath | ( | const std::vector< yarp::dev::Nav2D::Map2DLocation > | map_waypoints | ) |
Constructor.
| area_points | a set of Map2DLocations defining the path. |
Definition at line 63 of file Map2DPath.cpp.
| Map2DPath::Map2DPath | ( | ) |
Default constructor: the map name is empty, coordinates are set to zero.
Definition at line 71 of file Map2DPath.cpp.
|
noexcept |
Returns an iterator to the begin of the Path.
Definition at line 106 of file Map2DPath.cpp.
|
noexcept |
Returns a const iterator to the begin of the Path.
Definition at line 117 of file Map2DPath.cpp.
|
noexcept |
Returns a const iterator to the end of the Path.
Definition at line 122 of file Map2DPath.cpp.
| void Map2DPath::clear | ( | ) |
Remove all elements from the path.
Definition at line 58 of file Map2DPath.cpp.
|
noexcept |
Returns an iterator to the end of the Path.
Definition at line 112 of file Map2DPath.cpp.
| double Map2DPath::getLength | ( | ) | const |
Returns the length of the path.
Definition at line 85 of file Map2DPath.cpp.
| bool Map2DPath::isOnSingleMap | ( | ) | const |
Checks if all the waypoints of the path belong to the same map return true if the test is successful.
Definition at line 95 of file Map2DPath.cpp.
| bool Map2DPath::operator!= | ( | const Map2DPath & | r | ) | const |
Compares two Map2DPath.
Definition at line 26 of file Map2DPath.cpp.
| bool Map2DPath::operator== | ( | const Map2DPath & | r | ) | const |
Compares two Map2DArea.
Definition at line 36 of file Map2DPath.cpp.
| Map2DLocation & Map2DPath::operator[] | ( | size_t | index | ) |
Returns a waypoint in the path.
| index | the waypoint index |
Definition at line 75 of file Map2DPath.cpp.
| void Map2DPath::push_back | ( | yarp::dev::Nav2D::Map2DLocation | loc | ) |
Inserts a new location into the path @loc the location to be inserted.
Definition at line 127 of file Map2DPath.cpp.
|
inlineoverridevirtual |
Read this object from a network connection.
Override this for your particular class.
| reader | an interface to the network connection for reading |
Reimplemented from yarp::dev::Map2DPathData.
Definition at line 86 of file Map2DPath.h.
|
inlineoverridevirtual |
Reimplemented from yarp::dev::Map2DPathData.
Definition at line 84 of file Map2DPath.h.
| size_t Map2DPath::size | ( | ) | const |
Returns the size of the path.
Definition at line 80 of file Map2DPath.cpp.
| std::string Map2DPath::toString | ( | ) | const |
Returns text representation of the path.
Definition at line 46 of file Map2DPath.cpp.
|
inlineoverridevirtual |
Reimplemented from yarp::dev::Map2DPathData.
Definition at line 85 of file Map2DPath.h.
|
inlineoverridevirtual |
Write this object to a network connection.
Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write
| writer | an interface to the network connection for writing |
Reimplemented from yarp::dev::Map2DPathData.
Definition at line 87 of file Map2DPath.h.