F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
EightyCharString.cpp
Go to the documentation of this file.
1
#include <
Fw/Types/EightyCharString.hpp
>
2
#include <
Fw/Types/StringUtils.hpp
>
3
4
namespace
Fw
{
5
6
EightyCharString::EightyCharString
(
const
char
* src) :
StringBase
() {
7
Fw::StringUtils::string_copy
(this->m_buf, src,
sizeof
(this->m_buf));
8
}
9
10
EightyCharString::EightyCharString
(
const
StringBase
& src) :
StringBase
() {
11
Fw::StringUtils::string_copy
(this->m_buf, src.
toChar
(),
sizeof
(this->m_buf));
12
}
13
14
EightyCharString::EightyCharString
(
const
EightyCharString
& src) :
StringBase
() {
15
Fw::StringUtils::string_copy
(this->m_buf, src.
toChar
(),
sizeof
(this->m_buf));
16
}
17
18
EightyCharString::EightyCharString
() :
StringBase
() {
19
this->m_buf[0] = 0;
20
}
21
22
EightyCharString
&
EightyCharString::operator=
(
const
EightyCharString
& other) {
23
if
(
this
== &other) {
24
return
*
this
;
25
}
26
27
Fw::StringUtils::string_copy
(this->m_buf, other.
toChar
(),
sizeof
(this->m_buf));
28
return
*
this
;
29
}
30
31
EightyCharString
&
EightyCharString::operator=
(
const
StringBase
& other) {
32
if
(
this
== &other) {
33
return
*
this
;
34
}
35
36
Fw::StringUtils::string_copy
(this->m_buf, other.
toChar
(),
sizeof
(this->m_buf));
37
return
*
this
;
38
}
39
40
EightyCharString
&
EightyCharString::operator=
(
const
char
* other) {
41
Fw::StringUtils::string_copy
(this->m_buf, other,
sizeof
(this->m_buf));
42
return
*
this
;
43
}
44
45
EightyCharString::~EightyCharString
() {
46
}
47
48
const
char
*
EightyCharString::toChar
()
const
{
49
return
this->m_buf;
50
}
51
52
NATIVE_UINT_TYPE
EightyCharString::getCapacity
()
const
{
53
return
STRING_SIZE
;
54
}
55
}
NATIVE_UINT_TYPE
PlatformUIntType NATIVE_UINT_TYPE
Definition
BasicTypes.h:52
EightyCharString.hpp
StringUtils.hpp
Fw::EightyCharString
Definition
EightyCharString.hpp:10
Fw::EightyCharString::toChar
const char * toChar() const
gets char buffer
Definition
EightyCharString.cpp:48
Fw::EightyCharString::STRING_SIZE
@ STRING_SIZE
Storage for string.
Definition
EightyCharString.hpp:15
Fw::EightyCharString::EightyCharString
EightyCharString()
default constructor
Definition
EightyCharString.cpp:18
Fw::EightyCharString::operator=
EightyCharString & operator=(const EightyCharString &other)
assignment operator
Definition
EightyCharString.cpp:22
Fw::EightyCharString::~EightyCharString
~EightyCharString()
destructor
Definition
EightyCharString.cpp:45
Fw::EightyCharString::getCapacity
NATIVE_UINT_TYPE getCapacity() const
return buffer size
Definition
EightyCharString.cpp:52
Fw::StringBase
Definition
StringType.hpp:23
Fw::StringBase::toChar
virtual const CHAR * toChar() const =0
Fw::StringUtils::string_copy
char * string_copy(char *destination, const char *source, U32 num)
copy string with null-termination guaranteed
Definition
StringUtils.cpp:5
Fw
Definition
Buffer.cpp:21
Fw
Types
EightyCharString.cpp
Generated by
1.9.7