F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Fw::ConstExternalString Class Referencefinal

A string backed by an immutable string literal. More...

#include <Fw/Types/ConstExternalString.hpp>

Inheritance diagram for Fw::ConstExternalString:
Fw::ConstStringBase Fw::Serializable

Public Member Functions

 ConstExternalString ()
 Constructor (uninitialized buffer) More...
 
 ConstExternalString (const char *bufferPtr, ConstStringBase::SizeType bufferSize)
 Constructor (bufferPtr and bufferSize) More...
 
 ~ConstExternalString ()
 Destructor. More...
 
ConstStringBase::SizeType length () const override
 Get the length of the string. More...
 
const char * toChar () const override
 Gets the char buffer. More...
 
ConstStringBase::SizeType getCapacity () const override
 Returns the buffer size. More...
 
- Public Member Functions inherited from Fw::ConstStringBase
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
 
bool operator== (const ConstStringBase &other) const
 Check for equality with ConstStringBase. More...
 
bool operator== (const CHAR *other) const
 Check for equality with CHAR*. More...
 
bool operator!= (const ConstStringBase &other) const
 Inequality with ConstStringBase. More...
 
bool operator!= (const CHAR *other) const
 Inequality with CHAR*. More...
 
SerializeStatus serializeTo (SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
 Serialize the contents of this object to a buffer. More...
 
virtual SerializeStatus serializeTo (SerialBufferBase &buffer, SizeType maxLen, Endianness mode=Endianness::BIG) const
 
SerializeStatus deserializeFrom (SerialBufferBase &buffer, Endianness mode=Endianness::BIG) override
 Deserialize the contents of this object from a buffer. More...
 
 DEPRECATED (SerializeStatus serialize(SerialBufferBase &buffer) const, "Use serializeTo(SerializeBufferBase& buffer) instead")
 
 DEPRECATED (SerializeStatus serialize(SerialBufferBase &buffer, SizeType maxLen) const, "Use serializeTo(SerializeBufferBase& buffer, SizeType maxLen) instead")
 
- Public Member Functions inherited from Fw::Serializable
Serializableoperator= (const Serializable &src)=default
 TODO: this operator should be deleted, this must be done after RawTime is modified though. More...
 
 DEPRECATED (SerializeStatus serialize(SerialBufferBase &buffer) const, "Use serializeTo(SerialBufferBase& buffer) instead")
 
 DEPRECATED (SerializeStatus deserialize(SerialBufferBase &buffer), "Use deserializeFrom(SerialBufferBase& buffer) instead")
 

Additional Inherited Members

- Public Types inherited from Fw::ConstStringBase
using SizeType = FwSizeType
 
- Public Types inherited from Fw::Serializable
using SizeType = FwSizeType
 
- Static Public Member Functions inherited from Fw::ConstStringBase
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 inherited from Fw::ConstStringBase
 ConstStringBase ()
 
virtual ~ConstStringBase ()
 
- Protected Member Functions inherited from Fw::Serializable
 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 Virtual destructor. More...
 

Detailed Description

A string backed by an immutable string literal.

Definition at line 16 of file ConstExternalString.hpp.

Constructor & Destructor Documentation

◆ ConstExternalString() [1/2]

Fw::ConstExternalString::ConstExternalString ( )
inline

Constructor (uninitialized buffer)

Definition at line 23 of file ConstExternalString.hpp.

◆ ConstExternalString() [2/2]

Fw::ConstExternalString::ConstExternalString ( const char *  bufferPtr,
ConstStringBase::SizeType  bufferSize 
)
inline

Constructor (bufferPtr and bufferSize)

Parameters
bufferPtrThe buffer pointer
bufferSizeThe buffer size

Definition at line 26 of file ConstExternalString.hpp.

◆ ~ConstExternalString()

Fw::ConstExternalString::~ConstExternalString ( )
inline

Destructor.

Definition at line 39 of file ConstExternalString.hpp.

Member Function Documentation

◆ getCapacity()

ConstStringBase::SizeType Fw::ConstExternalString::getCapacity ( ) const
inlineoverridevirtual

Returns the buffer size.

Implements Fw::ConstStringBase.

Definition at line 56 of file ConstExternalString.hpp.

◆ length()

ConstStringBase::SizeType Fw::ConstExternalString::length ( ) const
inlineoverridevirtual

Get the length of the string.

Reimplemented from Fw::ConstStringBase.

Definition at line 47 of file ConstExternalString.hpp.

◆ toChar()

const char* Fw::ConstExternalString::toChar ( ) const
inlineoverridevirtual

Gets the char buffer.

Implements Fw::ConstStringBase.

Definition at line 53 of file ConstExternalString.hpp.


The documentation for this class was generated from the following file: