60#ifndef guWhiteboard_TeleoperationStatus_h
61#define guWhiteboard_TeleoperationStatus_h
63#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
72#undef guWhiteboard_TeleoperationStatus_DEFINED
73#define guWhiteboard_TeleoperationStatus_DEFINED
75#undef TeleoperationStatus_DEFINED
76#define TeleoperationStatus_DEFINED
90 void init(std::string t_sayString =
"") {
91 gu_strlcpy(
const_cast<char *
>(this->
sayString()), t_sayString.c_str(), 30);
100 this->init(t_sayString);
140 return !(*
this == t_other);
150 return !(*
this == t_other);
178#ifdef WHITEBOARD_POSTER_STRING_CONVERSION
188#ifdef USE_WB_TELEOPERATION_STATUS_C_CONVERSION
191 std::string descr = buffer;
194 std::ostringstream ss;
195 if (0 == strncmp(
"", this->
sayString(), 1)) {
196 ss <<
"sayString=" <<
"";
205#ifdef USE_WB_TELEOPERATION_STATUS_C_CONVERSION
208 std::string toString = buffer;
211 std::ostringstream ss;
212 if (0 == strncmp(
"", this->
sayString(), 1)) {
221#ifdef USE_WB_TELEOPERATION_STATUS_C_CONVERSION
226 char * str_cstr =
const_cast<char *
>(t_str.c_str());
227 size_t temp_length = strlen(str_cstr);
228 int length = (temp_length <= INT_MAX) ? static_cast<int>(
static_cast<ssize_t
>(temp_length)) : -1;
233 char* var_str = &var_str_buffer[0];
235 char* key = &key_buffer[0];
242 if (index == 0 && str_cstr[0] ==
'{') {
248 for (
int i = index; i < length; i++) {
250 if (bracecount == 0 && str_cstr[i] ==
'=') {
255 if (bracecount == 0 && isspace(str_cstr[i])) {
262 if (bracecount == 0 && str_cstr[i] ==
',') {
266 if (str_cstr[i] ==
'{') {
270 if (str_cstr[i] ==
'}') {
272 if (bracecount < 0) {
277 if (i == length - 1) {
281 if (endKey >= startKey && endKey - startKey < length) {
282 strncpy(key, str_cstr + startKey,
static_cast<size_t>((endKey - startKey) + 1));
283 key[(endKey - startKey) + 1] = 0;
287 strncpy(var_str, str_cstr + startVar,
static_cast<size_t>((index - startVar) + 1));
288 var_str[(index - startVar) + 1] = 0;
294 if (strlen(key) > 0) {
295 if (0 == strcmp(
"sayString", key)) {
312 }
while(index < length);
Provides a C++ wrapper around wb_teleoperation_status.
char & sayString(int t_i)
TeleoperationStatus(const std::string &t_str)
String Constructor.
TeleoperationStatus(std::string t_sayString="")
Create a new TeleoperationStatus.
TeleoperationStatus & operator=(const TeleoperationStatus &t_other)
Copy Assignment Operator.
TeleoperationStatus(const TeleoperationStatus &t_other)
Copy Constructor.
bool operator==(const TeleoperationStatus &t_other) const
size_t sayString_size() const
TeleoperationStatus(const struct wb_teleoperation_status &t_other)
Copy Constructor.
const char * sayString() const
std::string description()
bool operator!=(const TeleoperationStatus &t_other) const
const char & sayString(int t_i) const
void from_string(const std::string &t_str)
void set_sayString(const char *t_newValue)
WHITEBOARD_POSTER_STRING_CONVERSION.
char sayString[30]
String passed to Say_t.
const char * wb_teleoperation_status_description(const struct wb_teleoperation_status *self, char *descString, size_t bufferSize)
Convert to a description string.
const char * wb_teleoperation_status_to_string(const struct wb_teleoperation_status *self, char *toString, size_t bufferSize)
Convert to a string.
struct wb_teleoperation_status * wb_teleoperation_status_from_string(struct wb_teleoperation_status *self, const char *str)
Convert from a string.
#define TELEOPERATIONSTATUS_TO_STRING_BUFFER_SIZE
#define TELEOPERATIONSTATUS_DESC_BUFFER_SIZE