![]() |
F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
|
#include <Fw/Types/StringBase.hpp>
Public Types | |
| using | SizeType = FwSizeType |
Public Types inherited from Fw::Serializable | |
| using | SizeType = FwSizeType |
Public Member Functions | |
| virtual const CHAR * | toChar () const =0 |
| virtual SizeType | getCapacity () const =0 |
| return size of buffer More... | |
| SizeType | length () const |
| Get length of string. More... | |
| SizeType | maxLength () const |
| Get the maximum length of a string that the buffer can hold (which is capacity - 1) More... | |
| SizeType | serializedSize () const |
| SizeType | serializedTruncatedSize (FwSizeType maxLength) const |
| const CHAR * | operator+= (const CHAR *src) |
| Concatenate a CHAR*. More... | |
| const StringBase & | operator+= (const StringBase &src) |
| Concatenate a StringBase. More... | |
| bool | operator== (const StringBase &other) const |
| Check for equality with StringBase. More... | |
| bool | operator== (const CHAR *other) const |
| Check for equality with CHAR*. More... | |
| bool | operator!= (const StringBase &other) const |
| Inequality with StringBase. More... | |
| bool | operator!= (const CHAR *other) const |
| Inequality with CHAR*. More... | |
| StringBase & | operator= (const CHAR *src) |
| Assign CHAR*. More... | |
| StringBase & | operator= (const StringBase &src) |
| Assign another StringBase. More... | |
| FormatStatus | format (const CHAR *formatString,...) |
| write formatted string to buffer More... | |
| FormatStatus | vformat (const CHAR *formatString, va_list args) |
| write formatted string to buffer using va_list More... | |
| SerializeStatus | serializeTo (SerializeBufferBase &buffer) const override |
| serialize contents to buffer More... | |
| virtual SerializeStatus | serializeTo (SerializeBufferBase &buffer, SizeType maxLen) const |
| SerializeStatus | deserializeFrom (SerializeBufferBase &buffer) override |
| deserialize contents from buffer More... | |
| SerializeStatus | serialize (SerializeBufferBase &buffer) const |
| virtual SerializeStatus | serialize (SerializeBufferBase &buffer, SizeType maxLen) const |
Public Member Functions inherited from Fw::Serializable | |
| SerializeStatus | serialize (SerializeBufferBase &buffer) const |
| SerializeStatus | deserialize (SerializeBufferBase &buffer) |
Static Public Member Functions | |
| static constexpr SizeType | STATIC_SERIALIZED_SIZE (SizeType maxLength) |
| static constexpr SizeType | BUFFER_SIZE (SizeType maxLength) |
| Get the size of a null-terminated string buffer. More... | |
Protected Member Functions | |
| StringBase () | |
| virtual | ~StringBase () |
| void | appendBuff (const CHAR *buff, SizeType size) |
Protected Member Functions inherited from Fw::Serializable | |
| Serializable () | |
| Default constructor. More... | |
| virtual | ~Serializable () |
| destructor More... | |
Definition at line 25 of file StringBase.hpp.
| using Fw::StringBase::SizeType = FwSizeType |
Definition at line 27 of file StringBase.hpp.
|
protected |
Definition at line 21 of file StringBase.cpp.
|
protectedvirtual |
Definition at line 23 of file StringBase.cpp.
Definition at line 108 of file StringBase.cpp.
Get the size of a null-terminated string buffer.
| maxLength | The maximum string length |
Definition at line 42 of file StringBase.hpp.
|
overridevirtual |
deserialize contents from buffer
Implements Fw::Serializable.
Definition at line 162 of file StringBase.cpp.
| FormatStatus Fw::StringBase::format | ( | const CHAR * | formatString, |
| ... | |||
| ) |
write formatted string to buffer
Definition at line 55 of file StringBase.cpp.
|
pure virtual |
return size of buffer
Implemented in Fw::ExternalString, Fw::FileNameString, Fw::InternalInterfaceString, Fw::CmdStringArg, Fw::LogStringArg, Fw::TextLogString, Fw::ParamString, Fw::TlmString, Fw::ObjectName, Fw::String, Fw::StringTemplate< size >, Os::QueueString, and Os::TaskString.
| StringBase::SizeType Fw::StringBase::length | ( | ) | const |
Get length of string.
Definition at line 121 of file StringBase.cpp.
| StringBase::SizeType Fw::StringBase::maxLength | ( | ) | const |
Get the maximum length of a string that the buffer can hold (which is capacity - 1)
Definition at line 128 of file StringBase.cpp.
| bool Fw::StringBase::operator!= | ( | const StringBase & | other | ) | const |
Inequality with StringBase.
Definition at line 73 of file StringBase.cpp.
| bool Fw::StringBase::operator!= | ( | const CHAR * | other | ) | const |
Inequality with CHAR*.
Definition at line 77 of file StringBase.cpp.
Concatenate a CHAR*.
Definition at line 25 of file StringBase.cpp.
| const StringBase & Fw::StringBase::operator+= | ( | const StringBase & | src | ) |
Concatenate a StringBase.
Definition at line 30 of file StringBase.cpp.
| StringBase & Fw::StringBase::operator= | ( | const CHAR * | src | ) |
Assign CHAR*.
Definition at line 103 of file StringBase.cpp.
| StringBase & Fw::StringBase::operator= | ( | const StringBase & | src | ) |
Assign another StringBase.
Definition at line 94 of file StringBase.cpp.
| bool Fw::StringBase::operator== | ( | const StringBase & | other | ) | const |
Check for equality with StringBase.
Definition at line 35 of file StringBase.cpp.
| bool Fw::StringBase::operator== | ( | const CHAR * | other | ) | const |
Check for equality with CHAR*.
Definition at line 44 of file StringBase.cpp.
| SerializeStatus Fw::StringBase::serialize | ( | SerializeBufferBase & | buffer | ) | const |
Definition at line 153 of file StringBase.cpp.
|
virtual |
Definition at line 158 of file StringBase.cpp.
| StringBase::SizeType Fw::StringBase::serializedSize | ( | ) | const |
Get the dynamic serialized size of a string This is the length of the string plus the size of the stored size
Definition at line 134 of file StringBase.cpp.
| StringBase::SizeType Fw::StringBase::serializedTruncatedSize | ( | FwSizeType | maxLength | ) | const |
Get the serialized truncated size of a string This is the minimum of the dynamic serialized size and the max length
| maxLength | The max string length |
Definition at line 138 of file StringBase.cpp.
|
overridevirtual |
serialize contents to buffer
Implements Fw::Serializable.
Definition at line 142 of file StringBase.cpp.
|
virtual |
Definition at line 146 of file StringBase.cpp.
Get the static serialized size of a string This is the max length of the string plus the size of the stored size
| maxLength | The maximum string length |
Definition at line 36 of file StringBase.hpp.
|
pure virtual |
| FormatStatus Fw::StringBase::vformat | ( | const CHAR * | formatString, |
| va_list | args | ||
| ) |
write formatted string to buffer using va_list
Definition at line 63 of file StringBase.cpp.