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