F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
PolyDbEntryEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PolyDbEntryEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PolyDbEntry enum
5 // ======================================================================
6 
7 #ifndef Svc_PolyDbCfg_PolyDbEntryEnumAc_HPP
8 #define Svc_PolyDbCfg_PolyDbEntryEnumAc_HPP
9 
10 #include "FpConfig.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
16  namespace PolyDbCfg {
17 
20  class PolyDbEntry :
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Types
28  // ----------------------------------------------------------------------
29 
31  typedef U32 SerialType;
32 
34  enum T {
53  };
54 
56  typedef T t;
57 
58  public:
59 
60  // ----------------------------------------------------------------------
61  // Constants
62  // ----------------------------------------------------------------------
63 
64  enum {
69  };
70 
71  public:
72 
73  // ----------------------------------------------------------------------
74  // Constructors
75  // ----------------------------------------------------------------------
76 
79  {
80  this->e = POLYDB_ENTRY_00;
81  }
82 
85  const T e1
86  )
87  {
88  this->e = e1;
89  }
90 
93  const PolyDbEntry& obj
94  )
95  {
96  this->e = obj.e;
97  }
98 
99  public:
100 
101  // ----------------------------------------------------------------------
102  // Operators
103  // ----------------------------------------------------------------------
104 
107  const PolyDbEntry& obj
108  );
109 
112  T e1
113  );
114 
116  operator T() const
117  {
118  return this->e;
119  }
120 
122  bool operator==(T e1) const
123  {
124  return this->e == e1;
125  }
126 
128  bool operator!=(T e1) const
129  {
130  return !(*this == e1);
131  }
132 
133 #ifdef BUILD_UT
134 
136  friend std::ostream& operator<<(
137  std::ostream& os,
138  const PolyDbEntry& obj
139  );
140 
141 #endif
142 
143  public:
144 
145  // ----------------------------------------------------------------------
146  // Member functions
147  // ----------------------------------------------------------------------
148 
150  bool isValid() const;
151 
154  Fw::SerializeBufferBase& buffer
155  ) const;
156 
159  Fw::SerializeBufferBase& buffer
160  );
161 
162 #if FW_SERIALIZABLE_TO_STRING
163 
165  void toString(
166  Fw::StringBase& sb
167  ) const;
168 
169 #endif
170 
171  public:
172 
173  // ----------------------------------------------------------------------
174  // Member variables
175  // ----------------------------------------------------------------------
176 
178  T e;
179 
180  };
181 
182  }
183 
184 }
185 
186 #endif
C++-compatible configuration header for fprime configuration.
forward declaration
bool isValid() const
Check raw enum value for validity.
U32 SerialType
The serial representation type.
PolyDbEntry & operator=(const PolyDbEntry &obj)
Copy assignment operator (object)
bool operator==(T e1) const
Equality operator.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
PolyDbEntry()
Constructor (default value of POLYDB_ENTRY_00)
T t
For backwards compatibility.
@ SERIALIZED_SIZE
The size of the serial representation.
@ NUM_CONSTANTS
The number of enumerated constants.
PolyDbEntry(const PolyDbEntry &obj)
Copy constructor.
bool operator!=(T e1) const
Inequality operator.
T e
The raw enum value.
T
The raw enum type.
@ POLYDB_ENTRY_01
Entry 1.
@ POLYDB_ENTRY_09
Entry 9.
@ POLYDB_ENTRY_06
Entry 6.
@ POLYDB_ENTRY_05
Entry 5.
@ POLYDB_ENTRY_00
Entry 0.
@ POLYDB_ENTRY_04
Entry 4.
@ POLYDB_ENTRY_03
Entry 2.
@ POLYDB_ENTRY_07
Entry 7.
@ POLYDB_ENTRY_08
Entry 8.
PolyDbEntry(const T e1)
Constructor (user-provided value)
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
SerializeStatus
forward declaration for string