gusimplewhiteboard
guWhiteboard::Point2D Class Reference

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

#include <Point2D.hpp>

Inheritance diagram for guWhiteboard::Point2D:
Collaboration diagram for guWhiteboard::Point2D:

Public Member Functions

 Point2D (int16_t t_x=0, int16_t t_y=0)
 Create a new Point2D. More...
 
 Point2D (const Point2D &t_other)
 Copy Constructor. More...
 
 Point2D (const struct wb_point2d &t_other)
 Copy Constructor. More...
 
Point2Doperator= (const Point2D &t_other)
 Copy Assignment Operator. More...
 
Point2Doperator= (const struct wb_point2d &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const Point2D &t_other) const
 
bool operator!= (const Point2D &t_other) const
 
bool operator== (const wb_point2d &t_other) const
 
bool operator!= (const wb_point2d &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)
 
 Point2D (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_point2d
int16_t x
 x More...
 
int16_t y
 y More...
 

Detailed Description

Provides a C++ wrapper around wb_point2d.

Definition at line 83 of file Point2D.hpp.

Constructor & Destructor Documentation

◆ Point2D() [1/4]

guWhiteboard::Point2D::Point2D ( int16_t  t_x = 0,
int16_t  t_y = 0 
)
inline

Create a new Point2D.

Definition at line 100 of file Point2D.hpp.

Referenced by operator==().

◆ Point2D() [2/4]

guWhiteboard::Point2D::Point2D ( const Point2D t_other)
inline

Copy Constructor.

Definition at line 107 of file Point2D.hpp.

References x(), and y().

◆ Point2D() [3/4]

guWhiteboard::Point2D::Point2D ( const struct wb_point2d t_other)
inline

Copy Constructor.

Definition at line 114 of file Point2D.hpp.

References wb_point2d::x, and wb_point2d::y.

◆ Point2D() [4/4]

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

String Constructor.

Definition at line 189 of file Point2D.hpp.

References from_string().

Member Function Documentation

◆ description()

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

USE_WB_POINT2D_C_CONVERSION

Definition at line 194 of file Point2D.hpp.

References POINT2D_DESC_BUFFER_SIZE, wb_point2d_description(), x(), and y().

Referenced by guWhiteboard::ParticlePosition::description().

◆ from_string()

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

USE_WB_POINT2D_C_CONVERSION

Definition at line 228 of file Point2D.hpp.

References POINT2D_DESC_BUFFER_SIZE, set_x(), and set_y().

Referenced by Point2D(), and guWhiteboard::ParticlePosition::from_string().

◆ operator!=() [1/2]

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

Definition at line 140 of file Point2D.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::Point2D::operator!= ( const wb_point2d t_other) const
inline

Definition at line 150 of file Point2D.hpp.

◆ operator=() [1/2]

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

Copy Assignment Operator.

Definition at line 121 of file Point2D.hpp.

References x(), and y().

◆ operator=() [2/2]

Point2D & guWhiteboard::Point2D::operator= ( const struct wb_point2d t_other)
inline

Copy Assignment Operator.

Definition at line 129 of file Point2D.hpp.

References wb_point2d::x, and wb_point2d::y.

◆ operator==() [1/2]

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

Definition at line 134 of file Point2D.hpp.

References x(), and y().

◆ operator==() [2/2]

bool guWhiteboard::Point2D::operator== ( const wb_point2d t_other) const
inline

Definition at line 145 of file Point2D.hpp.

References Point2D().

◆ set_x()

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

Definition at line 165 of file Point2D.hpp.

References wb_point2d::x.

Referenced by from_string().

◆ set_y()

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

Definition at line 180 of file Point2D.hpp.

References wb_point2d::y.

Referenced by from_string().

◆ to_string()

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

USE_WB_POINT2D_C_CONVERSION

Definition at line 209 of file Point2D.hpp.

References POINT2D_TO_STRING_BUFFER_SIZE, wb_point2d_to_string(), x(), and y().

Referenced by guWhiteboard::ParticlePosition::to_string().

◆ x() [1/2]

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

Definition at line 155 of file Point2D.hpp.

References wb_point2d::x.

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

◆ x() [2/2]

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

Definition at line 160 of file Point2D.hpp.

References wb_point2d::x.

◆ y() [1/2]

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

Definition at line 170 of file Point2D.hpp.

References wb_point2d::y.

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

◆ y() [2/2]

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

Definition at line 175 of file Point2D.hpp.

References wb_point2d::y.


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