F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
WaitEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title WaitEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Wait enum
5 // ======================================================================
6 
7 #ifndef Fw_WaitEnumAc_HPP
8 #define Fw_WaitEnumAc_HPP
9 
10 #include "FpConfig.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fw {
15 
17  class Wait :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef I32 SerialType;
29 
31  enum T {
32  WAIT = 0,
33  NO_WAIT = 1,
34  };
35 
37  typedef T t;
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
45  enum {
50  };
51 
52  public:
53 
54  // ----------------------------------------------------------------------
55  // Constructors
56  // ----------------------------------------------------------------------
57 
59  Wait()
60  {
61  this->e = WAIT;
62  }
63 
66  const T e1
67  )
68  {
69  this->e = e1;
70  }
71 
74  const Wait& obj
75  )
76  {
77  this->e = obj.e;
78  }
79 
80  public:
81 
82  // ----------------------------------------------------------------------
83  // Operators
84  // ----------------------------------------------------------------------
85 
87  Wait& operator=(
88  const Wait& obj
89  );
90 
92  Wait& operator=(
93  T e1
94  );
95 
97  operator T() const
98  {
99  return this->e;
100  }
101 
103  bool operator==(T e1) const
104  {
105  return this->e == e1;
106  }
107 
109  bool operator!=(T e1) const
110  {
111  return !(*this == e1);
112  }
113 
114 #ifdef BUILD_UT
115 
117  friend std::ostream& operator<<(
118  std::ostream& os,
119  const Wait& obj
120  );
121 
122 #endif
123 
124  public:
125 
126  // ----------------------------------------------------------------------
127  // Member functions
128  // ----------------------------------------------------------------------
129 
131  bool isValid() const;
132 
135  Fw::SerializeBufferBase& buffer
136  ) const;
137 
140  Fw::SerializeBufferBase& buffer
141  );
142 
143 #if FW_SERIALIZABLE_TO_STRING
144 
146  void toString(
147  Fw::StringBase& sb
148  ) const;
149 
150 #endif
151 
152  public:
153 
154  // ----------------------------------------------------------------------
155  // Member variables
156  // ----------------------------------------------------------------------
157 
159  T e;
160 
161  };
162 
163 }
164 
165 #endif
C++-compatible configuration header for fprime configuration.
forward declaration
Wait or don't wait for something.
Definition: WaitEnumAc.hpp:19
Wait & operator=(const Wait &obj)
Copy assignment operator (object)
Definition: WaitEnumAc.cpp:20
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
Definition: WaitEnumAc.cpp:55
bool isValid() const
Check raw enum value for validity.
Definition: WaitEnumAc.cpp:49
Wait(const Wait &obj)
Copy constructor.
Definition: WaitEnumAc.hpp:73
T t
For backwards compatibility.
Definition: WaitEnumAc.hpp:37
T e
The raw enum value.
Definition: WaitEnumAc.hpp:159
@ SERIALIZED_SIZE
The size of the serial representation.
Definition: WaitEnumAc.hpp:47
@ NUM_CONSTANTS
The number of enumerated constants.
Definition: WaitEnumAc.hpp:49
I32 SerialType
The serial representation type.
Definition: WaitEnumAc.hpp:28
Wait(const T e1)
Constructor (user-provided value)
Definition: WaitEnumAc.hpp:65
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
Definition: WaitEnumAc.cpp:64
T
The raw enum type.
Definition: WaitEnumAc.hpp:31
bool operator!=(T e1) const
Inequality operator.
Definition: WaitEnumAc.hpp:109
bool operator==(T e1) const
Equality operator.
Definition: WaitEnumAc.hpp:103
Wait()
Constructor (default value of WAIT)
Definition: WaitEnumAc.hpp:59
SerializeStatus
forward declaration for string