7 #ifndef FW_EXTERNAL_STRING_HPP
8 #define FW_EXTERNAL_STRING_HPP
33 :
StringBase(), m_bufferPtr(bufferPtr), m_bufferSize(bufferSize) {
42 :
StringBase(), m_bufferPtr(bufferPtr), m_bufferSize(bufferSize) {
51 :
StringBase(), m_bufferPtr(bufferPtr), m_bufferSize(bufferSize) {
65 const char*
toChar()
const {
return this->m_bufferPtr; }
80 this->m_bufferPtr = bufferPtr;
81 this->m_bufferSize = bufferSize;
92 (void)StringBase::operator=(src);
98 (void)StringBase::operator=(src);
104 (void)StringBase::operator=(src);
C++-compatible configuration header for fprime configuration.
Declares F Prime string base class.
A string backed by an external buffer.
ExternalString & operator=(const StringBase &src)
ExternalString(char *bufferPtr, StringBase::SizeType bufferSize, const char *str)
Constructor (bufferPtr, bufferSize, and const char*)
ExternalString(char *bufferPtr, StringBase::SizeType bufferSize)
Constructor (bufferPtr and bufferSize)
StringBase::SizeType getCapacity() const
ExternalString(const ExternalString &)=delete
Deleted copy constructor.
ExternalString()
Constructor (uninitialized buffer)
ExternalString & operator=(const ExternalString &src)
const char * toChar() const
ExternalString & operator=(const char *src)
void setBuffer(char *bufferPtr, StringBase::SizeType bufferSize)
Set the buffer and initialize it to the empty string.
~ExternalString()
Destructor.
ExternalString(char *bufferPtr, StringBase::SizeType bufferSize, const StringBase &sb)
Constructor (bufferPtr, bufferSize, and StringBase)
NATIVE_UINT_TYPE SizeType