F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
PrmDb_PrmWriteErrorEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PrmDb_PrmWriteErrorEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PrmDb_PrmWriteError enum
5 // ======================================================================
6 
7 #ifndef Svc_PrmDb_PrmDb_PrmWriteErrorEnumAc_HPP
8 #define Svc_PrmDb_PrmDb_PrmWriteErrorEnumAc_HPP
9 
10 #include "FpConfig.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef I32 SerialType;
29 
31  enum T {
32  OPEN = 0,
33  DELIMITER = 1,
41  };
42 
44  typedef T t;
45 
46  public:
47 
48  // ----------------------------------------------------------------------
49  // Constants
50  // ----------------------------------------------------------------------
51 
52  enum {
57  };
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Constructors
63  // ----------------------------------------------------------------------
64 
67  {
68  this->e = OPEN;
69  }
70 
73  const T e1
74  )
75  {
76  this->e = e1;
77  }
78 
81  const PrmDb_PrmWriteError& obj
82  )
83  {
84  this->e = obj.e;
85  }
86 
87  public:
88 
89  // ----------------------------------------------------------------------
90  // Operators
91  // ----------------------------------------------------------------------
92 
95  const PrmDb_PrmWriteError& obj
96  );
97 
100  T e1
101  );
102 
104  operator T() const
105  {
106  return this->e;
107  }
108 
110  bool operator==(T e1) const
111  {
112  return this->e == e1;
113  }
114 
116  bool operator!=(T e1) const
117  {
118  return !(*this == e1);
119  }
120 
121 #ifdef BUILD_UT
122 
124  friend std::ostream& operator<<(
125  std::ostream& os,
126  const PrmDb_PrmWriteError& obj
127  );
128 
129 #endif
130 
131  public:
132 
133  // ----------------------------------------------------------------------
134  // Member functions
135  // ----------------------------------------------------------------------
136 
138  bool isValid() const;
139 
142  Fw::SerializeBufferBase& buffer
143  ) const;
144 
147  Fw::SerializeBufferBase& buffer
148  );
149 
150 #if FW_SERIALIZABLE_TO_STRING
151 
153  void toString(
154  Fw::StringBase& sb
155  ) const;
156 
157 #endif
158 
159  public:
160 
161  // ----------------------------------------------------------------------
162  // Member variables
163  // ----------------------------------------------------------------------
164 
166  T e;
167 
168  };
169 
170 }
171 
172 #endif
C++-compatible configuration header for fprime configuration.
forward declaration
bool operator==(T e1) const
Equality operator.
bool isValid() const
Check raw enum value for validity.
@ SERIALIZED_SIZE
The size of the serial representation.
@ NUM_CONSTANTS
The number of enumerated constants.
I32 SerialType
The serial representation type.
PrmDb_PrmWriteError(const T e1)
Constructor (user-provided value)
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
PrmDb_PrmWriteError & operator=(const PrmDb_PrmWriteError &obj)
Copy assignment operator (object)
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
PrmDb_PrmWriteError(const PrmDb_PrmWriteError &obj)
Copy constructor.
PrmDb_PrmWriteError()
Constructor (default value of OPEN)
bool operator!=(T e1) const
Inequality operator.
T t
For backwards compatibility.
SerializeStatus
forward declaration for string