F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
g
h
i
m
r
s
t
v
w
Variables
Typedefs
a
b
c
d
e
f
h
l
o
p
r
s
t
w
Enumerations
Enumerator
a
b
f
h
i
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
a
b
d
e
f
g
h
i
l
m
n
p
q
r
s
t
u
v
w
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
Functions
i
m
p
s
u
Variables
Typedefs
Enumerations
Enumerator
c
d
e
f
m
o
p
r
s
t
v
Macros
_
a
c
d
f
g
h
i
k
l
m
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
TaskString.cpp
Go to the documentation of this file.
1
#include <
Os/TaskString.hpp
>
2
#include <
Fw/Types/StringUtils.hpp
>
3
4
namespace
Os
{
5
6
TaskString::TaskString
(
const
char
* src) : StringBase() {
7
Fw::StringUtils::string_copy
(this->m_buf, src,
sizeof
(this->m_buf));
8
}
9
10
TaskString::TaskString
(
const
StringBase& src) : StringBase() {
11
Fw::StringUtils::string_copy
(this->m_buf, src.toChar(),
sizeof
(this->m_buf));
12
}
13
14
TaskString::TaskString
(
const
TaskString
& src) : StringBase() {
15
Fw::StringUtils::string_copy
(this->m_buf, src.
toChar
(),
sizeof
(this->m_buf));
16
}
17
18
TaskString::TaskString
() {
19
this->m_buf[0] = 0;
20
}
21
22
TaskString
&
TaskString::operator=
(
const
TaskString
& 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
TaskString
&
TaskString::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
TaskString
&
TaskString::operator=
(
const
char
* other) {
41
Fw::StringUtils::string_copy
(this->m_buf, other,
sizeof
(this->m_buf));
42
return
*
this
;
43
}
44
45
TaskString::~TaskString
() {
46
}
47
48
const
char
*
TaskString::toChar
()
const
{
49
return
this->m_buf;
50
}
51
52
NATIVE_UINT_TYPE
TaskString::getCapacity
()
const
{
53
return
FW_TASK_NAME_MAX_SIZE
;
54
}
55
}
Os
Definition:
File.cpp:7
Os::TaskString::TaskString
TaskString()
default constructor
Definition:
TaskString.cpp:18
StringUtils.hpp
Os::TaskString::operator=
TaskString & operator=(const TaskString &other)
assignment operator
Definition:
TaskString.cpp:22
Os::TaskString::~TaskString
~TaskString()
destructor
Definition:
TaskString.cpp:45
Fw::StringUtils::string_copy
char * string_copy(char *destination, const char *source, U32 num)
copy string with null-termination guaranteed
Definition:
StringUtils.cpp:5
Os::TaskString
Definition:
TaskString.hpp:10
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition:
BasicTypes.hpp:30
TaskString.hpp
Os::TaskString::toChar
const char * toChar() const
get pointer to internal char buffer
Definition:
TaskString.cpp:48
FW_TASK_NAME_MAX_SIZE
#define FW_TASK_NAME_MAX_SIZE
Max size of task name.
Definition:
FpConfig.hpp:216
Os::TaskString::getCapacity
NATIVE_UINT_TYPE getCapacity() const
return buffer size
Definition:
TaskString.cpp:52
Os
TaskString.cpp
Generated by
1.8.17