mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 16:29:04 -06:00
* lestarch: adding logical types implementation into Linux/StandardTypes.hpp * lestarch: removing VxWorks StandardTypes from repository * updated fprime types for correct compilation with vxworks and baremetal * lestarch: refactoring types and configuration header w.r.t type design * lestarch: replacing usages of AssertArg with FwAssertArgType * lestarch: missspelled configuration * lestarch: minor compilation fixes * lestarch: renaming StandardTypes.hpp -> PlatformTypes.hpp * lestarch: updating PRI tokens * lestarch: replacing BasicTypes.hpp includes with FpConfig.hpp * lestarch: UT and compilation fixes for types refactor * lestarch: sp * lestarch: fixing RPI issues in PassiveConsoleTextLogger * lestarch: converting RPI build to debug * lestarch: removing duplicate config imports * lestarch: fixing documentation * lestarch: fixing up multiple definitions and RPI compilation problems * lestarch: reverting debug build * lestarch: reverting platform types to class-based constants * lestarch: reworking basic types * lestarch: configured types refactor into classes * lestarch: fixing bugs with static constants in classes * lestarch: fixing platform types spelling and documentation * lestarch: adding include guards to types headers Co-authored-by: Kevin F Ortega <kevin.f.ortega@jpl.nasa.gov>
38 lines
1.2 KiB
C++
38 lines
1.2 KiB
C++
#ifndef TEST_STRING_TYPE_HPP
|
|
#define TEST_STRING_TYPE_HPP
|
|
|
|
#include <FpConfig.hpp>
|
|
#include <Fw/Types/StringType.hpp>
|
|
#include <Fw/Cfg/SerIds.hpp>
|
|
|
|
namespace Test {
|
|
|
|
//! A longer string for testing
|
|
class String : public Fw::StringBase {
|
|
public:
|
|
|
|
enum {
|
|
STRING_SIZE = 256, //!< Storage for string
|
|
SERIALIZED_SIZE = STRING_SIZE + sizeof(FwBuffSizeType) //!< Serialized size is size of buffer + size field
|
|
};
|
|
|
|
String(const char* src); //!< char* source constructor
|
|
String(const StringBase& src); //!< other string constructor
|
|
String(const String& src); //!< String string constructor
|
|
String(); //!< default constructor
|
|
String& operator=(const String& other); //!< assignment operator
|
|
String& operator=(const StringBase& other); //!< other string assignment operator
|
|
String& operator=(const char* other); //!< char* assignment operator
|
|
~String(); //!< destructor
|
|
|
|
const char* toChar() const; //!< gets char buffer
|
|
NATIVE_UINT_TYPE getCapacity() const ; //!< return buffer size
|
|
|
|
private:
|
|
|
|
char m_buf[STRING_SIZE]; //!< storage for string data
|
|
};
|
|
}
|
|
|
|
#endif
|