F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
QueueString.cpp
Go to the documentation of this file.
1 #include <Os/QueueString.hpp>
3 
4 namespace Os {
5 
6  QueueString::QueueString(const char* src) : StringBase() {
7  Fw::StringUtils::string_copy(this->m_buf, src, sizeof(this->m_buf));
8  }
9 
10  QueueString::QueueString(const StringBase& src) : StringBase() {
11  Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf));
12  }
13 
14  QueueString::QueueString(const QueueString& src) : StringBase() {
15  Fw::StringUtils::string_copy(this->m_buf, src.toChar(), sizeof(this->m_buf));
16  }
17 
18  QueueString::QueueString() : StringBase() {
19  this->m_buf[0] = 0;
20  }
21 
23  if(this == &other) {
24  return *this;
25  }
26 
27  Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
28  return *this;
29  }
30 
31  QueueString& QueueString::operator=(const StringBase& other) {
32  if(this == &other) {
33  return *this;
34  }
35 
36  Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
37  return *this;
38  }
39 
40  QueueString& QueueString::operator=(const char* other) {
41  Fw::StringUtils::string_copy(this->m_buf, other, sizeof(this->m_buf));
42  return *this;
43  }
44 
46  }
47 
48  const char* QueueString::toChar() const {
49  return this->m_buf;
50  }
51 
54  }
55 }
PlatformUIntType NATIVE_UINT_TYPE
Definition: BasicTypes.h:52
#define FW_QUEUE_NAME_MAX_SIZE
Max size of message queue name.
Definition: FpConfig.h:218
QueueString()
default constructor
Definition: QueueString.cpp:18
const char * toChar() const
get pointer to char buffer
Definition: QueueString.cpp:48
NATIVE_UINT_TYPE getCapacity() const
return size of buffer
Definition: QueueString.cpp:52
QueueString & operator=(const QueueString &other)
assignment operator
Definition: QueueString.cpp:22
~QueueString()
destructor
Definition: QueueString.cpp:45
char * string_copy(char *destination, const char *source, U32 num)
copy string with null-termination guaranteed
Definition: StringUtils.cpp:5
Definition: File.cpp:6