12 #ifndef FW_CONST_STRING_BASE_HPP 13 #define FW_CONST_STRING_BASE_HPP 76 "Use serializeTo(SerializeBufferBase& buffer) instead") {
81 "Use serializeTo(SerializeBufferBase& buffer, SizeType maxLen) instead") {
87 friend std::ostream& operator<<(std::ostream& os,
const ConstStringBase& str);
90 #if FW_SERIALIZABLE_TO_STRING || BUILD_UT 91 void toString(
StringBase& text)
const override;
PlatformSizeType FwSizeType
bool operator!=(const ConstStringBase &other) const
Inequality with ConstStringBase.
DEPRECATED(SerializeStatus serialize(SerialBufferBase &buffer) const, "Use serializeTo(SerializeBufferBase& buffer) instead")
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
DEPRECATED(SerializeStatus serialize(SerialBufferBase &buffer, SizeType maxLen) const, "Use serializeTo(SerializeBufferBase& buffer, SizeType maxLen) instead")
SerializeStatus
forward declaration for string
SizeType serializedSize() const
U16 FwSizeStoreType
The type used to serialize a size value.
bool operator==(const ConstStringBase &other) const
Check for equality with ConstStringBase.
SizeType serializedTruncatedSize(FwSizeType maxLength) const
virtual SizeType getCapacity() const =0
Return the size of the buffer.
SizeType maxLength() const
Get the maximum length of a string that the buffer can hold (which is capacity - 1) ...
A read-only abstract superclass for StringBase.
virtual SizeType length() const
Get the length of the string.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
virtual ~ConstStringBase()
Implementation of malloc based allocator.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
SerializeStatus deserializeFrom(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) override
Deserialize the contents of this object from a buffer.
Big endian serialization.
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.