F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 
14 namespace Os {
15 
17  class FileMode :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef I32 SerialType;
29 
31  enum T {
35  OPEN_READ = 1,
44  };
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 
145  Fw::SerializeBufferBase& buffer
146  ) const;
147 
150  Fw::SerializeBufferBase& buffer
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 
169  T e;
170 
171  };
172 
173 }
174 
175 #endif
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
Open file for writing and truncates file if it exists, ie same flags as creat()
The size of the serial representation.
Open file for writing; writes don&#39;t return until data is on disk.
Open file for writing.
T e
The raw enum value.
bool operator!=(T e1) const
Inequality operator.
FileMode()
Constructor (default value of OPEN_NO_MODE)
FileMode(const T e1)
Constructor (user-provided value)
SerializeStatus
forward declaration for string
FileMode(const FileMode &obj)
Copy constructor.
FPP shadow-enum representing Os::File::Mode.
File mode not yet selected.
The number of enumerated constants.
bool isValid() const
Check raw enum value for validity.
Open file for appending.
C++-compatible configuration header for fprime configuration.
Open file for reading.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
T t
For backwards compatibility.
forward declaration
FileMode & operator=(const FileMode &obj)
Copy assignment operator (object)
T
The raw enum type.
bool operator==(T e1) const
Equality operator.
I32 SerialType
The serial representation type.