F´ Flight Software - C/C++ Documentation  NASA-v1.6.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
Fw::StringBase Class Referenceabstract

#include <cmake-build-debug/fpp-tools/src/docs/users-guide/examples/impl-abs-type/Fw/Types/StringType.hpp>

Inheritance diagram for Fw::StringBase:
Fw::Serializable Fw::CmdStringArg Fw::EightyCharString Fw::InternalInterfaceString Fw::LogStringArg Fw::ParamString Fw::String Fw::TextLogString Fw::TlmString Os::QueueString Os::TaskString

Public Member Functions

virtual const char * toChar (void) const =0
 
virtual NATIVE_UINT_TYPE length (void) const =0
 Get length of string. More...
 
const char * operator+= (const char *src)
 Concatenate a char*. More...
 
const StringBaseoperator+= (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...
 
const char * operator= (const char *src)
 Assign char*. More...
 
const StringBaseoperator= (const StringBase &src)
 Assign another StringBase. More...
 
void appendBuff (const char *buff, NATIVE_UINT_TYPE size)
 
void format (const char *formatString,...)
 write formatted string to buffer More...
 
virtual const CHARtoChar () const =0
 
virtual NATIVE_UINT_TYPE getCapacity () const =0
 return size of buffer More...
 
NATIVE_UINT_TYPE length () const
 Get length of string. More...
 
const CHARoperator+= (const CHAR *src)
 Concatenate a CHAR*. More...
 
const StringBaseoperator+= (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...
 
StringBaseoperator= (const CHAR *src)
 Assign CHAR*. More...
 
StringBaseoperator= (const StringBase &src)
 Assign another StringBase. More...
 
void format (const CHAR *formatString,...)
 write formatted string to buffer More...
 
virtual SerializeStatus serialize (SerializeBufferBase &buffer) const
 serialization function More...
 
virtual SerializeStatus serialize (SerializeBufferBase &buffer, NATIVE_UINT_TYPE maxLen) const
 serialization function More...
 
virtual SerializeStatus deserialize (SerializeBufferBase &buffer)
 deserialization function More...
 

Protected Member Functions

 StringBase (void)
 
virtual ~StringBase (void)
 
virtual void copyBuff (const char *buff, NATIVE_UINT_TYPE size)=0
 
virtual NATIVE_UINT_TYPE getCapacity (void) const =0
 return size of buffer More...
 
 StringBase ()
 
virtual ~StringBase ()
 
void appendBuff (const CHAR *buff, NATIVE_UINT_TYPE size)
 
- Protected Member Functions inherited from Fw::Serializable
 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 destructor More...
 
 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 destructor More...
 

Detailed Description

Definition at line 23 of file StringType.hpp.

Constructor & Destructor Documentation

◆ StringBase() [1/2]

Fw::StringBase::StringBase ( void  )
protected

Definition at line 23 of file StringType.cpp.

◆ ~StringBase() [1/2]

Fw::StringBase::~StringBase ( void  )
protectedvirtual

Definition at line 26 of file StringType.cpp.

◆ StringBase() [2/2]

Fw::StringBase::StringBase ( )
protected

◆ ~StringBase() [2/2]

virtual Fw::StringBase::~StringBase ( )
protectedvirtual

Member Function Documentation

◆ appendBuff() [1/2]

void Fw::StringBase::appendBuff ( const char *  buff,
NATIVE_UINT_TYPE  size 
)

Definition at line 105 of file StringType.cpp.

◆ appendBuff() [2/2]

void Fw::StringBase::appendBuff ( const CHAR buff,
NATIVE_UINT_TYPE  size 
)
protected

◆ copyBuff()

virtual void Fw::StringBase::copyBuff ( const char *  buff,
NATIVE_UINT_TYPE  size 
)
protectedpure virtual

◆ deserialize()

SerializeStatus Fw::StringBase::deserialize ( SerializeBufferBase buffer)
virtual

deserialization function

Implements Fw::Serializable.

Reimplemented in Fw::LogStringArg, Fw::TlmString, and Fw::EightyCharString.

Definition at line 136 of file StringType.cpp.

◆ format() [1/2]

void Fw::StringBase::format ( const CHAR formatString,
  ... 
)

write formatted string to buffer

◆ format() [2/2]

void Fw::StringBase::format ( const char *  formatString,
  ... 
)

write formatted string to buffer

Definition at line 61 of file StringType.cpp.

◆ getCapacity() [1/2]

virtual NATIVE_UINT_TYPE Fw::StringBase::getCapacity ( ) const
pure virtual

◆ getCapacity() [2/2]

virtual NATIVE_UINT_TYPE Fw::StringBase::getCapacity ( void  ) const
protectedpure virtual

◆ length() [1/2]

NATIVE_UINT_TYPE Fw::StringBase::length ( ) const

Get length of string.

◆ length() [2/2]

NATIVE_UINT_TYPE Fw::StringBase::length ( void  ) const
pure virtual

Get length of string.

Implemented in Fw::EightyCharString.

Definition at line 123 of file StringType.cpp.

◆ operator!=() [1/4]

bool Fw::StringBase::operator!= ( const char *  other) const

Inequality with char*.

Definition at line 77 of file StringType.cpp.

◆ operator!=() [2/4]

bool Fw::StringBase::operator!= ( const CHAR other) const

Inequality with CHAR*.

◆ operator!=() [3/4]

bool Fw::StringBase::operator!= ( const StringBase other) const

Inequality with StringBase.

Definition at line 73 of file StringType.cpp.

◆ operator!=() [4/4]

bool Fw::StringBase::operator!= ( const StringBase other) const

Inequality with StringBase.

◆ operator+=() [1/4]

const CHAR * Fw::StringBase::operator+= ( const char *  src)

Concatenate a char*.

Definition at line 29 of file StringType.cpp.

◆ operator+=() [2/4]

const CHAR* Fw::StringBase::operator+= ( const CHAR src)

Concatenate a CHAR*.

◆ operator+=() [3/4]

const StringBase & Fw::StringBase::operator+= ( const StringBase src)

Concatenate a StringBase.

Definition at line 34 of file StringType.cpp.

◆ operator+=() [4/4]

const StringBase& Fw::StringBase::operator+= ( const StringBase src)

Concatenate a StringBase.

◆ operator=() [1/4]

StringBase & Fw::StringBase::operator= ( const char *  src)

Assign char*.

Definition at line 100 of file StringType.cpp.

◆ operator=() [2/4]

StringBase& Fw::StringBase::operator= ( const CHAR src)

Assign CHAR*.

◆ operator=() [3/4]

StringBase & Fw::StringBase::operator= ( const StringBase src)

Assign another StringBase.

Definition at line 95 of file StringType.cpp.

◆ operator=() [4/4]

StringBase& Fw::StringBase::operator= ( const StringBase src)

Assign another StringBase.

◆ operator==() [1/4]

bool Fw::StringBase::operator== ( const char *  other) const

Check for equality with char*.

Definition at line 48 of file StringType.cpp.

◆ operator==() [2/4]

bool Fw::StringBase::operator== ( const CHAR other) const

Check for equality with CHAR*.

◆ operator==() [3/4]

bool Fw::StringBase::operator== ( const StringBase other) const

Check for equality with StringBase.

Definition at line 39 of file StringType.cpp.

◆ operator==() [4/4]

bool Fw::StringBase::operator== ( const StringBase other) const

Check for equality with StringBase.

◆ serialize() [1/2]

SerializeStatus Fw::StringBase::serialize ( SerializeBufferBase buffer) const
virtual

serialization function

Implements Fw::Serializable.

Reimplemented in Fw::LogStringArg, Fw::TlmString, and Fw::EightyCharString.

Definition at line 127 of file StringType.cpp.

◆ serialize() [2/2]

SerializeStatus Fw::StringBase::serialize ( SerializeBufferBase buffer,
NATIVE_UINT_TYPE  maxLen 
) const
virtual

serialization function

Reimplemented in Fw::LogStringArg, and Fw::TlmString.

Definition at line 131 of file StringType.cpp.

◆ toChar() [1/2]

◆ toChar() [2/2]


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