F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TimeComparisonEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TimeComparisonEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TimeComparison enum
5 // ======================================================================
6 
7 #ifndef Fw_TimeComparisonEnumAc_HPP
8 #define Fw_TimeComparisonEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fw {
15 
17  public Fw::Serializable
18  {
19 
20  public:
21 
22  // ----------------------------------------------------------------------
23  // Types
24  // ----------------------------------------------------------------------
25 
27  typedef I32 SerialType;
28 
30  enum T {
31  LT = -1,
32  EQ = 0,
33  GT = 1,
35  };
36 
38  typedef enum T t;
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Constants
44  // ----------------------------------------------------------------------
45 
46  enum {
51  };
52 
53  public:
54 
55  // ----------------------------------------------------------------------
56  // Constructors
57  // ----------------------------------------------------------------------
58 
61  {
62  this->e = LT;
63  }
64 
67  const enum T e1
68  )
69  {
70  this->e = e1;
71  }
72 
75  const TimeComparison& obj
76  )
77  {
78  this->e = obj.e;
79  }
80 
81  public:
82 
83  // ----------------------------------------------------------------------
84  // Operators
85  // ----------------------------------------------------------------------
86 
89  const TimeComparison& obj
90  );
91 
94  enum T e1
95  );
96 
98  operator enum T() const
99  {
100  return this->e;
101  }
102 
104  bool operator==(enum T e1) const
105  {
106  return this->e == e1;
107  }
108 
110  bool operator!=(enum T e1) const
111  {
112  return !(*this == e1);
113  }
114 
115 #ifdef BUILD_UT
116 
118  friend std::ostream& operator<<(
119  std::ostream& os,
120  const TimeComparison& obj
121  );
122 
123 #endif
124 
125  public:
126 
127  // ----------------------------------------------------------------------
128  // Member functions
129  // ----------------------------------------------------------------------
130 
132  bool isValid() const;
133 
136  Fw::SerialBufferBase& buffer,
138  ) const;
139 
142  Fw::SerialBufferBase& buffer,
144  );
145 
146 #if FW_SERIALIZABLE_TO_STRING
147 
149  void toString(
150  Fw::StringBase& sb
151  ) const;
152 
153 #endif
154 
155  public:
156 
157  // ----------------------------------------------------------------------
158  // Member variables
159  // ----------------------------------------------------------------------
160 
162  enum T e;
163 
164  };
165 
166 }
167 
168 #endif
T
The raw enum type.
TimeComparison(const TimeComparison &obj)
Copy constructor.
I32 SerialType
The serial representation type.
TimeComparison()
Constructor (default value of LT)
bool operator==(enum T e1) const
Equality operator.
SerializeStatus
forward declaration for string
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
enum T t
For backwards compatibility.
TimeComparison & operator=(const TimeComparison &obj)
Copy assignment operator (object)
TimeComparison(const enum T e1)
Constructor (user-provided value)
enum T e
The raw enum value.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
bool operator!=(enum T e1) const
Inequality operator.
Implementation of malloc based allocator.
Endianness
The size of the serial representation.
bool isValid() const
Check raw enum value for validity.
The number of enumerated constants.
Big endian serialization.