gusimplewhiteboard
guWhiteboard::MyPosition Class Reference

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

#include <MyPosition.hpp>

Inheritance diagram for guWhiteboard::MyPosition:
Collaboration diagram for guWhiteboard::MyPosition:

Public Member Functions

 MyPosition (int16_t t_x=0, int16_t t_y=0, int16_t t_heading=0)
 Create a new MyPosition. More...
 
 MyPosition (const MyPosition &t_other)
 Copy Constructor. More...
 
 MyPosition (const struct wb_my_position &t_other)
 Copy Constructor. More...
 
MyPositionoperator= (const MyPosition &t_other)
 Copy Assignment Operator. More...
 
MyPositionoperator= (const struct wb_my_position &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const MyPosition &t_other) const
 
bool operator!= (const MyPosition &t_other) const
 
bool operator== (const wb_my_position &t_other) const
 
bool operator!= (const wb_my_position &t_other) const
 
int16_t & x ()
 
const int16_t & x () const
 
void set_x (const int16_t &t_newValue)
 
int16_t & y ()
 
const int16_t & y () const
 
void set_y (const int16_t &t_newValue)
 
int16_t & heading ()
 
const int16_t & heading () const
 
void set_heading (const int16_t &t_newValue)
 
 MyPosition (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_my_position
int16_t x
 mm More...
 
int16_t y
 mm More...
 
int16_t heading
 degrees More...
 

Detailed Description

Provides a C++ wrapper around wb_my_position.

Definition at line 83 of file MyPosition.hpp.

Constructor & Destructor Documentation

◆ MyPosition() [1/4]

guWhiteboard::MyPosition::MyPosition ( int16_t  t_x = 0,
int16_t  t_y = 0,
int16_t  t_heading = 0 
)
inline

Create a new MyPosition.

Definition at line 101 of file MyPosition.hpp.

Referenced by operator==().

◆ MyPosition() [2/4]

guWhiteboard::MyPosition::MyPosition ( const MyPosition t_other)
inline

Copy Constructor.

Definition at line 108 of file MyPosition.hpp.

References heading(), x(), and y().

◆ MyPosition() [3/4]

guWhiteboard::MyPosition::MyPosition ( const struct wb_my_position t_other)
inline

Copy Constructor.

Definition at line 115 of file MyPosition.hpp.

References wb_my_position::heading, wb_my_position::x, and wb_my_position::y.

◆ MyPosition() [4/4]

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

String Constructor.

Definition at line 206 of file MyPosition.hpp.

References from_string().

Member Function Documentation

◆ description()

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

USE_WB_MY_POSITION_C_CONVERSION

Definition at line 211 of file MyPosition.hpp.

References heading(), MY_POSITION_DESC_BUFFER_SIZE, wb_my_position_description(), x(), and y().

◆ from_string()

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

USE_WB_MY_POSITION_C_CONVERSION

Definition at line 249 of file MyPosition.hpp.

References MY_POSITION_DESC_BUFFER_SIZE, set_heading(), set_x(), and set_y().

Referenced by MyPosition().

◆ heading() [1/2]

int16_t & guWhiteboard::MyPosition::heading ( )
inline

Definition at line 187 of file MyPosition.hpp.

References wb_my_position::heading.

Referenced by MyPosition(), description(), operator=(), operator==(), and to_string().

◆ heading() [2/2]

const int16_t & guWhiteboard::MyPosition::heading ( ) const
inline

Definition at line 192 of file MyPosition.hpp.

References wb_my_position::heading.

◆ operator!=() [1/2]

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

Definition at line 142 of file MyPosition.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::MyPosition::operator!= ( const wb_my_position t_other) const
inline

Definition at line 152 of file MyPosition.hpp.

◆ operator=() [1/2]

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

Copy Assignment Operator.

Definition at line 122 of file MyPosition.hpp.

References heading(), x(), and y().

◆ operator=() [2/2]

MyPosition & guWhiteboard::MyPosition::operator= ( const struct wb_my_position t_other)
inline

Copy Assignment Operator.

Definition at line 130 of file MyPosition.hpp.

References wb_my_position::heading, wb_my_position::x, and wb_my_position::y.

◆ operator==() [1/2]

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

Definition at line 135 of file MyPosition.hpp.

References heading(), x(), and y().

◆ operator==() [2/2]

bool guWhiteboard::MyPosition::operator== ( const wb_my_position t_other) const
inline

Definition at line 147 of file MyPosition.hpp.

References MyPosition().

◆ set_heading()

void guWhiteboard::MyPosition::set_heading ( const int16_t &  t_newValue)
inline

Definition at line 197 of file MyPosition.hpp.

References wb_my_position::heading.

Referenced by from_string().

◆ set_x()

void guWhiteboard::MyPosition::set_x ( const int16_t &  t_newValue)
inline

Definition at line 167 of file MyPosition.hpp.

References wb_my_position::x.

Referenced by from_string().

◆ set_y()

void guWhiteboard::MyPosition::set_y ( const int16_t &  t_newValue)
inline

Definition at line 182 of file MyPosition.hpp.

References wb_my_position::y.

Referenced by from_string().

◆ to_string()

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

USE_WB_MY_POSITION_C_CONVERSION

Definition at line 228 of file MyPosition.hpp.

References heading(), MY_POSITION_TO_STRING_BUFFER_SIZE, wb_my_position_to_string(), x(), and y().

◆ x() [1/2]

int16_t & guWhiteboard::MyPosition::x ( )
inline

Definition at line 157 of file MyPosition.hpp.

References wb_my_position::x.

Referenced by MyPosition(), description(), operator=(), operator==(), and to_string().

◆ x() [2/2]

const int16_t & guWhiteboard::MyPosition::x ( ) const
inline

Definition at line 162 of file MyPosition.hpp.

References wb_my_position::x.

◆ y() [1/2]

int16_t & guWhiteboard::MyPosition::y ( )
inline

Definition at line 172 of file MyPosition.hpp.

References wb_my_position::y.

Referenced by MyPosition(), description(), operator=(), operator==(), and to_string().

◆ y() [2/2]

const int16_t & guWhiteboard::MyPosition::y ( ) const
inline

Definition at line 177 of file MyPosition.hpp.

References wb_my_position::y.


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