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
String.hpp
Go to the documentation of this file.
1 #ifndef FW_FIXED_LENGTH_STRING_TYPE_HPP
2 #define FW_FIXED_LENGTH_STRING_TYPE_HPP
3 
4 #include <Fw/Types/BasicTypes.hpp>
5 #include <Fw/Types/StringType.hpp>
6 #include <Fw/Cfg/SerIds.hpp>
7 
8 namespace Fw {
9 
10  class String : public Fw::StringBase {
11  public:
12 
13  enum {
17  };
18 
19  String(const char* src);
20  String(const StringBase& src);
21  String(const String& src);
22  String();
23  String& operator=(const String& other);
24  String& operator=(const StringBase& other);
25  String& operator=(const char* other);
26  ~String();
27 
28  const char* toChar() const;
29  NATIVE_UINT_TYPE getCapacity() const ;
30 
31  private:
32 
33  char m_buf[STRING_SIZE];
34  };
35 }
36 
37 #endif
Fw::String::STRING_SIZE
@ STRING_SIZE
Storage for string.
Definition: String.hpp:15
Fw::String::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Serialized size is size of buffer + size field.
Definition: String.hpp:16
Fw::String::String
String()
default constructor
Definition: String.cpp:18
Fw::StringBase
Definition: StringType.hpp:23
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:28
FW_FIXED_LENGTH_STRING_SIZE
#define FW_FIXED_LENGTH_STRING_SIZE
Character array size for the filepath character type.
Definition: FpConfig.hpp:355
Fw::String::toChar
const char * toChar() const
gets char buffer
Definition: String.cpp:48
FwBuffSizeType
#define FwBuffSizeType
Type representation for storing a buffer or string size.
Definition: FpConfig.hpp:79
Fw::String::~String
~String()
destructor
Definition: String.cpp:45
Fw::String::getCapacity
NATIVE_UINT_TYPE getCapacity() const
return buffer size
Definition: String.cpp:52
Fw::String
Definition: String.hpp:10
Fw::FW_TYPEID_FIXED_LENGTH_STRING
@ FW_TYPEID_FIXED_LENGTH_STRING
256 char string Buffer type id
Definition: SerIds.hpp:59
Fw::String::operator=
String & operator=(const String &other)
assignment operator
Definition: String.cpp:22
Fw::String::SERIALIZED_TYPE_ID
@ SERIALIZED_TYPE_ID
typeid for string type
Definition: String.hpp:14
Fw
Definition: SerIds.hpp:20