gusimplewhiteboard
guWhiteboard::NaoObstacleDirection Class Reference

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

#include <NaoObstacleDirection.hpp>

Inheritance diagram for guWhiteboard::NaoObstacleDirection:
Collaboration diagram for guWhiteboard::NaoObstacleDirection:

Public Member Functions

 NaoObstacleDirection (bool t_left=false, bool t_right=false, bool t_front=false)
 Create a new NaoObstacleDirection. More...
 
 NaoObstacleDirection (const NaoObstacleDirection &t_other)
 Copy Constructor. More...
 
 NaoObstacleDirection (const struct wb_nao_obstacle_direction &t_other)
 Copy Constructor. More...
 
NaoObstacleDirectionoperator= (const NaoObstacleDirection &t_other)
 Copy Assignment Operator. More...
 
NaoObstacleDirectionoperator= (const struct wb_nao_obstacle_direction &t_other)
 Copy Assignment Operator. More...
 
bool operator== (const NaoObstacleDirection &t_other) const
 
bool operator!= (const NaoObstacleDirection &t_other) const
 
bool operator== (const wb_nao_obstacle_direction &t_other) const
 
bool operator!= (const wb_nao_obstacle_direction &t_other) const
 
bool & left ()
 
const bool & left () const
 
void set_left (const bool &t_newValue)
 
bool & right ()
 
const bool & right () const
 
void set_right (const bool &t_newValue)
 
bool & front ()
 
const bool & front () const
 
void set_front (const bool &t_newValue)
 
 NaoObstacleDirection (const std::string &t_str)
 String Constructor. More...
 
std::string description ()
 
std::string to_string ()
 
void from_string (const std::string &t_str)
 

Static Public Member Functions

static NaoObstacleDirection sonar_direction (bool _left, bool _front, bool _right)
 WHITEBOARD_POSTER_STRING_CONVERSION. More...
 

Additional Inherited Members

- Public Attributes inherited from wb_nao_obstacle_direction
bool left
 Do I have an obstacle 40 cm to my left (check SMSubsumption machine methods) More...
 
bool right
 Do I have an obstacle 40 cm to my left (check SMSubsumption machine methods) More...
 
bool front
 Do I have an obstacle 40 cm to my left (check SMSubsumption machine methods) More...
 

Detailed Description

Provides a C++ wrapper around wb_nao_obstacle_direction.

Definition at line 85 of file NaoObstacleDirection.hpp.

Constructor & Destructor Documentation

◆ NaoObstacleDirection() [1/4]

guWhiteboard::NaoObstacleDirection::NaoObstacleDirection ( bool  t_left = false,
bool  t_right = false,
bool  t_front = false 
)
inline

Create a new NaoObstacleDirection.

Definition at line 103 of file NaoObstacleDirection.hpp.

Referenced by operator==(), and sonar_direction().

◆ NaoObstacleDirection() [2/4]

guWhiteboard::NaoObstacleDirection::NaoObstacleDirection ( const NaoObstacleDirection t_other)
inline

Copy Constructor.

Definition at line 110 of file NaoObstacleDirection.hpp.

References front(), left(), and right().

◆ NaoObstacleDirection() [3/4]

guWhiteboard::NaoObstacleDirection::NaoObstacleDirection ( const struct wb_nao_obstacle_direction t_other)
inline

◆ NaoObstacleDirection() [4/4]

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

String Constructor.

Definition at line 208 of file NaoObstacleDirection.hpp.

References from_string().

Member Function Documentation

◆ description()

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

USE_WB_NAO_OBSTACLE_DIRECTION_C_CONVERSION

Definition at line 213 of file NaoObstacleDirection.hpp.

References front(), left(), NAO_OBSTACLE_DIRECTION_DESC_BUFFER_SIZE, right(), and wb_nao_obstacle_direction_description().

◆ from_string()

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

USE_WB_NAO_OBSTACLE_DIRECTION_C_CONVERSION

Definition at line 251 of file NaoObstacleDirection.hpp.

References NAO_OBSTACLE_DIRECTION_DESC_BUFFER_SIZE, set_front(), set_left(), and set_right().

Referenced by NaoObstacleDirection().

◆ front() [1/2]

bool & guWhiteboard::NaoObstacleDirection::front ( )
inline

◆ front() [2/2]

const bool & guWhiteboard::NaoObstacleDirection::front ( ) const
inline

Definition at line 194 of file NaoObstacleDirection.hpp.

References wb_nao_obstacle_direction::front.

◆ left() [1/2]

bool & guWhiteboard::NaoObstacleDirection::left ( )
inline

◆ left() [2/2]

const bool & guWhiteboard::NaoObstacleDirection::left ( ) const
inline

Definition at line 164 of file NaoObstacleDirection.hpp.

References wb_nao_obstacle_direction::left.

◆ operator!=() [1/2]

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

Definition at line 144 of file NaoObstacleDirection.hpp.

◆ operator!=() [2/2]

bool guWhiteboard::NaoObstacleDirection::operator!= ( const wb_nao_obstacle_direction t_other) const
inline

Definition at line 154 of file NaoObstacleDirection.hpp.

◆ operator=() [1/2]

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

Copy Assignment Operator.

Definition at line 124 of file NaoObstacleDirection.hpp.

References front(), left(), and right().

◆ operator=() [2/2]

NaoObstacleDirection & guWhiteboard::NaoObstacleDirection::operator= ( const struct wb_nao_obstacle_direction t_other)
inline

◆ operator==() [1/2]

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

Definition at line 137 of file NaoObstacleDirection.hpp.

References front(), left(), and right().

◆ operator==() [2/2]

bool guWhiteboard::NaoObstacleDirection::operator== ( const wb_nao_obstacle_direction t_other) const
inline

Definition at line 149 of file NaoObstacleDirection.hpp.

References NaoObstacleDirection().

◆ right() [1/2]

bool & guWhiteboard::NaoObstacleDirection::right ( )
inline

◆ right() [2/2]

const bool & guWhiteboard::NaoObstacleDirection::right ( ) const
inline

Definition at line 179 of file NaoObstacleDirection.hpp.

References wb_nao_obstacle_direction::right.

◆ set_front()

void guWhiteboard::NaoObstacleDirection::set_front ( const bool &  t_newValue)
inline

Definition at line 199 of file NaoObstacleDirection.hpp.

References wb_nao_obstacle_direction::front.

Referenced by from_string(), and sonar_direction().

◆ set_left()

void guWhiteboard::NaoObstacleDirection::set_left ( const bool &  t_newValue)
inline

Definition at line 169 of file NaoObstacleDirection.hpp.

References wb_nao_obstacle_direction::left.

Referenced by from_string(), and sonar_direction().

◆ set_right()

void guWhiteboard::NaoObstacleDirection::set_right ( const bool &  t_newValue)
inline

Definition at line 184 of file NaoObstacleDirection.hpp.

References wb_nao_obstacle_direction::right.

Referenced by from_string(), and sonar_direction().

◆ sonar_direction()

static NaoObstacleDirection guWhiteboard::NaoObstacleDirection::sonar_direction ( bool  _left,
bool  _front,
bool  _right 
)
inlinestatic

WHITEBOARD_POSTER_STRING_CONVERSION.

Definition at line 361 of file NaoObstacleDirection.hpp.

References NaoObstacleDirection(), set_front(), set_left(), and set_right().

◆ to_string()

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

USE_WB_NAO_OBSTACLE_DIRECTION_C_CONVERSION

Definition at line 230 of file NaoObstacleDirection.hpp.

References front(), left(), NAO_OBSTACLE_DIRECTION_TO_STRING_BUFFER_SIZE, right(), and wb_nao_obstacle_direction_to_string().


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