gusimplewhiteboard
guWhiteboard::PolarCoordinate Class Reference

Provides a C++ wrapper around wb_polar_coordinate. More...

#include <PolarCoordinate.hpp>

Inheritance diagram for guWhiteboard::PolarCoordinate:
Collaboration diagram for guWhiteboard::PolarCoordinate:

Public Member Functions

 PolarCoordinate (int16_t t_direction=0, uint16_t t_distance=0)
 Create a new PolarCoordinate. More...
 
 PolarCoordinate (const PolarCoordinate &t_other)
 Copy Constructor. More...
 
 PolarCoordinate (const struct wb_polar_coordinate &t_other)
 Copy Constructor. More...
 
PolarCoordinateoperator= (const PolarCoordinate &t_other)
 Copy Assignment Operator. More...
 
PolarCoordinateoperator= (const struct wb_polar_coordinate &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const PolarCoordinate &t_other) const
 
bool operator!= (const PolarCoordinate &t_other) const
 
bool operator== (const wb_polar_coordinate &t_other) const
 
bool operator!= (const wb_polar_coordinate &t_other) const
 
int16_t & direction ()
 
const int16_t & direction () const
 
void set_direction (const int16_t &t_newValue)
 
uint16_t & distance ()
 
const uint16_t & distance () const
 
void set_distance (const uint16_t &t_newValue)
 
 PolarCoordinate (const std::string &t_str)
 String Constructor. More...
 
std::string description ()
 
std::string to_string ()
 
void from_string (const std::string &t_str)
 

Additional Inherited Members

- Public Attributes inherited from wb_polar_coordinate
int16_t direction
 degrees, relative to the center of the nao torso. More...
 
uint16_t distance
 CM distance to the center point of the sighting. More...
 

Detailed Description

Provides a C++ wrapper around wb_polar_coordinate.

Definition at line 83 of file PolarCoordinate.hpp.

Constructor & Destructor Documentation

◆ PolarCoordinate() [1/4]

guWhiteboard::PolarCoordinate::PolarCoordinate ( int16_t  t_direction = 0,
uint16_t  t_distance = 0 
)
inline

Create a new PolarCoordinate.

Definition at line 100 of file PolarCoordinate.hpp.

Referenced by operator==().

◆ PolarCoordinate() [2/4]

guWhiteboard::PolarCoordinate::PolarCoordinate ( const PolarCoordinate t_other)
inline

Copy Constructor.

Definition at line 107 of file PolarCoordinate.hpp.

References direction(), and distance().

◆ PolarCoordinate() [3/4]

guWhiteboard::PolarCoordinate::PolarCoordinate ( const struct wb_polar_coordinate t_other)
inline

Copy Constructor.

Definition at line 114 of file PolarCoordinate.hpp.

References wb_polar_coordinate::direction, and wb_polar_coordinate::distance.

◆ PolarCoordinate() [4/4]

guWhiteboard::PolarCoordinate::PolarCoordinate ( const std::string &  t_str)
inline

String Constructor.

Definition at line 189 of file PolarCoordinate.hpp.

References from_string().

Member Function Documentation

◆ description()

std::string guWhiteboard::PolarCoordinate::description ( )
inline

◆ direction() [1/2]

int16_t & guWhiteboard::PolarCoordinate::direction ( )
inline

◆ direction() [2/2]

const int16_t & guWhiteboard::PolarCoordinate::direction ( ) const
inline

Definition at line 160 of file PolarCoordinate.hpp.

References wb_polar_coordinate::direction.

◆ distance() [1/2]

uint16_t & guWhiteboard::PolarCoordinate::distance ( )
inline

◆ distance() [2/2]

const uint16_t & guWhiteboard::PolarCoordinate::distance ( ) const
inline

Definition at line 175 of file PolarCoordinate.hpp.

References wb_polar_coordinate::distance.

◆ from_string()

void guWhiteboard::PolarCoordinate::from_string ( const std::string &  t_str)
inline

◆ operator!=() [1/2]

bool guWhiteboard::PolarCoordinate::operator!= ( const PolarCoordinate t_other) const
inline

Definition at line 140 of file PolarCoordinate.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::PolarCoordinate::operator!= ( const wb_polar_coordinate t_other) const
inline

Definition at line 150 of file PolarCoordinate.hpp.

◆ operator=() [1/2]

PolarCoordinate & guWhiteboard::PolarCoordinate::operator= ( const PolarCoordinate t_other)
inline

Copy Assignment Operator.

Definition at line 121 of file PolarCoordinate.hpp.

References direction(), and distance().

◆ operator=() [2/2]

PolarCoordinate & guWhiteboard::PolarCoordinate::operator= ( const struct wb_polar_coordinate t_other)
inline

Copy Assignment Operator.

Definition at line 129 of file PolarCoordinate.hpp.

References wb_polar_coordinate::direction, and wb_polar_coordinate::distance.

◆ operator==() [1/2]

bool guWhiteboard::PolarCoordinate::operator== ( const PolarCoordinate t_other) const
inline

Definition at line 134 of file PolarCoordinate.hpp.

References direction(), and distance().

◆ operator==() [2/2]

bool guWhiteboard::PolarCoordinate::operator== ( const wb_polar_coordinate t_other) const
inline

Definition at line 145 of file PolarCoordinate.hpp.

References PolarCoordinate().

◆ set_direction()

void guWhiteboard::PolarCoordinate::set_direction ( const int16_t &  t_newValue)
inline

Definition at line 165 of file PolarCoordinate.hpp.

References wb_polar_coordinate::direction.

Referenced by from_string().

◆ set_distance()

void guWhiteboard::PolarCoordinate::set_distance ( const uint16_t &  t_newValue)
inline

Definition at line 180 of file PolarCoordinate.hpp.

References wb_polar_coordinate::distance.

Referenced by from_string().

◆ to_string()

std::string guWhiteboard::PolarCoordinate::to_string ( )
inline

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