F´ Flight Software - C/C++ Documentation  NASA-v2.1.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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(void) : StringBase() {
19  this->m_buf[0] = 0;
20  }
21 
23  Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
24  return *this;
25  }
26 
27  QueueString& QueueString::operator=(const StringBase& other) {
28  Fw::StringUtils::string_copy(this->m_buf, other.toChar(), sizeof(this->m_buf));
29  return *this;
30  }
31 
32  QueueString& QueueString::operator=(const char* other) {
33  Fw::StringUtils::string_copy(this->m_buf, other, sizeof(this->m_buf));
34  return *this;
35  }
36 
38  }
39 
40  const char* QueueString::toChar(void) const {
41  return this->m_buf;
42  }
43 
46  }
47 }
Os
Definition: File.cpp:7
StringUtils.hpp
Os::QueueString::~QueueString
~QueueString(void)
destructor
Definition: QueueString.cpp:37
QueueString.hpp
Os::QueueString
Definition: QueueString.hpp:10
Fw::StringUtils::string_copy
char * string_copy(char *destination, const char *source, U32 num)
copy string with null-termination guaranteed
Definition: StringUtils.cpp:5
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
Os::QueueString::toChar
const char * toChar(void) const
get pointer to char buffer
Definition: QueueString.cpp:40
Os::QueueString::QueueString
QueueString(void)
default constructor
Definition: QueueString.cpp:18
Os::QueueString::operator=
QueueString & operator=(const QueueString &other)
assignment operator
Definition: QueueString.cpp:22
Os::QueueString::getCapacity
NATIVE_UINT_TYPE getCapacity(void) const
return size of buffer
Definition: QueueString.cpp:44
FW_QUEUE_NAME_MAX_SIZE
#define FW_QUEUE_NAME_MAX_SIZE
Max size of message queue name.
Definition: FpConfig.hpp:214