F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
VersionEnumEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title VersionEnumEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for VersionEnum enum
5 // ======================================================================
6 
7 #ifndef Svc_VersionCfg_VersionEnumEnumAc_HPP
8 #define Svc_VersionCfg_VersionEnumEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
16  namespace VersionCfg {
17 
20  class VersionEnum :
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Types
28  // ----------------------------------------------------------------------
29 
31  typedef U32 SerialType;
32 
34  enum T {
55  };
56 
58  typedef T t;
59 
60  public:
61 
62  // ----------------------------------------------------------------------
63  // Constants
64  // ----------------------------------------------------------------------
65 
66  enum {
71  };
72 
73  public:
74 
75  // ----------------------------------------------------------------------
76  // Constructors
77  // ----------------------------------------------------------------------
78 
81  {
82  this->e = PROJECT_VERSION_00;
83  }
84 
87  const T e1
88  )
89  {
90  this->e = e1;
91  }
92 
95  const VersionEnum& obj
96  )
97  {
98  this->e = obj.e;
99  }
100 
101  public:
102 
103  // ----------------------------------------------------------------------
104  // Operators
105  // ----------------------------------------------------------------------
106 
109  const VersionEnum& obj
110  );
111 
114  T e1
115  );
116 
118  operator T() const
119  {
120  return this->e;
121  }
122 
124  bool operator==(T e1) const
125  {
126  return this->e == e1;
127  }
128 
130  bool operator!=(T e1) const
131  {
132  return !(*this == e1);
133  }
134 
135 #ifdef BUILD_UT
136 
138  friend std::ostream& operator<<(
139  std::ostream& os,
140  const VersionEnum& obj
141  );
142 
143 #endif
144 
145  public:
146 
147  // ----------------------------------------------------------------------
148  // Member functions
149  // ----------------------------------------------------------------------
150 
152  bool isValid() const;
153 
156  Fw::SerialBufferBase& buffer,
158  ) const;
159 
162  Fw::SerialBufferBase& buffer,
164  );
165 
166 #if FW_SERIALIZABLE_TO_STRING
167 
169  void toString(
170  Fw::StringBase& sb
171  ) const;
172 
173 #endif
174 
175  public:
176 
177  // ----------------------------------------------------------------------
178  // Member variables
179  // ----------------------------------------------------------------------
180 
182  T e;
183 
184  };
185 
186  }
187 
188 }
189 
190 #endif
U32 SerialType
The serial representation type.
bool operator!=(T e1) const
Inequality operator.
The size of the serial representation.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
SerializeStatus
forward declaration for string
VersionEnum()
Constructor (default value of PROJECT_VERSION_00)
VersionEnum(const VersionEnum &obj)
Copy constructor.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
VersionEnum(const T e1)
Constructor (user-provided value)
bool operator==(T e1) const
Equality operator.
VersionEnum & operator=(const VersionEnum &obj)
Copy assignment operator (object)
The number of enumerated constants.
T t
For backwards compatibility.
bool isValid() const
Check raw enum value for validity.
RateGroupDivider component implementation.
Endianness
Big endian serialization.