F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
FileModeEnumAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title FileModeEnumAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for FileMode enum
5// ======================================================================
6
7#ifndef Os_FileModeEnumAc_HPP
8#define Os_FileModeEnumAc_HPP
9
10#include "FpConfig.hpp"
12#include "Fw/Types/String.hpp"
13
14namespace Os {
15
17 class FileMode :
18 public Fw::Serializable
19 {
20
21 public:
22
23 // ----------------------------------------------------------------------
24 // Types
25 // ----------------------------------------------------------------------
26
28 typedef I32 SerialType;
29
45
47 typedef T t;
48
49 public:
50
51 // ----------------------------------------------------------------------
52 // Constants
53 // ----------------------------------------------------------------------
54
55 enum {
60 };
61
62 public:
63
64 // ----------------------------------------------------------------------
65 // Constructors
66 // ----------------------------------------------------------------------
67
70 {
71 this->e = OPEN_NO_MODE;
72 }
73
76 const T e1
77 )
78 {
79 this->e = e1;
80 }
81
84 const FileMode& obj
85 )
86 {
87 this->e = obj.e;
88 }
89
90 public:
91
92 // ----------------------------------------------------------------------
93 // Operators
94 // ----------------------------------------------------------------------
95
98 const FileMode& obj
99 );
100
103 T e1
104 );
105
107 operator T() const
108 {
109 return this->e;
110 }
111
113 bool operator==(T e1) const
114 {
115 return this->e == e1;
116 }
117
119 bool operator!=(T e1) const
120 {
121 return !(*this == e1);
122 }
123
124#ifdef BUILD_UT
125
127 friend std::ostream& operator<<(
128 std::ostream& os,
129 const FileMode& obj
130 );
131
132#endif
133
134 public:
135
136 // ----------------------------------------------------------------------
137 // Member functions
138 // ----------------------------------------------------------------------
139
141 bool isValid() const;
142
146 ) const;
147
151 );
152
153#if FW_SERIALIZABLE_TO_STRING
154
156 void toString(
157 Fw::StringBase& sb
158 ) const;
159
160#endif
161
162 public:
163
164 // ----------------------------------------------------------------------
165 // Member variables
166 // ----------------------------------------------------------------------
167
170
171 };
172
173}
174
175#endif
C++-compatible configuration header for fprime configuration.
forward declaration
FPP shadow-enum representing Os::File::Mode.
FileMode()
Constructor (default value of OPEN_NO_MODE)
I32 SerialType
The serial representation type.
T
The raw enum type.
@ OPEN_READ
Open file for reading.
@ OPEN_NO_MODE
File mode not yet selected.
@ OPEN_CREATE
Open file for writing and truncates file if it exists, ie same flags as creat()
@ OPEN_APPEND
Open file for appending.
@ OPEN_SYNC_WRITE
Open file for writing; writes don't return until data is on disk.
@ OPEN_WRITE
Open file for writing.
FileMode(const T e1)
Constructor (user-provided value)
bool operator!=(T e1) const
Inequality operator.
T t
For backwards compatibility.
bool operator==(T e1) const
Equality operator.
@ SERIALIZED_SIZE
The size of the serial representation.
@ NUM_CONSTANTS
The number of enumerated constants.
T e
The raw enum value.
bool isValid() const
Check raw enum value for validity.
FileMode & operator=(const FileMode &obj)
Copy assignment operator (object)
FileMode(const FileMode &obj)
Copy constructor.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
SerializeStatus
forward declaration for string