F´ Flight Software - C/C++ Documentation  NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AArrayAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title A.hpp
3 // \author Auto-generated
4 // \brief hpp file for A
5 //
6 // \copyright
7 // Copyright (C) 2020 California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged. Any commercial use must be negotiated with the Office
10 // of Technology Transfer at the California Institute of Technology.
11 //
12 // This software may be subject to U.S. export control laws and
13 // regulations. By accepting this document, the user agrees to comply
14 // with all U.S. export laws and regulations. User has the
15 // responsibility to obtain export licenses, or other export authority
16 // as may be required before exporting such information to foreign
17 // countries or providing access to foreign persons.
18 // ======================================================================
19 
20 #ifndef _A_HPP
21 #define _A_HPP
22 
23 #include "Fw/Types/EightyCharString.hpp"
24 #include "Fw/Types/BasicTypes.hpp"
25 #include "Fw/Types/Serializable.hpp"
26 #include <T.hpp>
27 
28  class A : public Fw::Serializable
29  {
30  public:
31 
32  // ----------------------------------------------------------------------
33  // Helper Types
34  // ----------------------------------------------------------------------
35 
36  typedef T ElementType;
37 
38  enum {
39  SIZE=3,
42  };
43 
44  public:
45 
46  // ----------------------------------------------------------------------
47  // Constructors
48  // ----------------------------------------------------------------------
49 
51  A(void);
52 
54  A(
55  const ElementType (&a)[SIZE]
56  );
57 
59  A(
60  const ElementType& e
61  );
62 
64  A(
65  const ElementType (&e1),
66  const ElementType (&e2),
67  const ElementType (&e3)
68  );
69 
71  A(
72  const A& other
73  );
74 
75  public:
76 
77  // ----------------------------------------------------------------------
78  // Public operators
79  // ----------------------------------------------------------------------
80 
83  const U32 i
84  );
85 
87  const ElementType& operator[](
88  const U32 i
89  ) const;
90 
92  const A& operator=(
93  const A& other
94  );
95 
97  const A& operator=(
98  const ElementType (&a)[SIZE]
99  );
100 
102  const A& operator=(
103  const ElementType& e
104  );
105 
107  bool operator==(
108  const A& other
109  ) const;
110 
112  bool operator!=(
113  const A& other
114  ) const;
115 
116 #if 0
117  friend std::ostream& operator<<(
119  std::ostream& os,
120  const A& obj
121  );
122 #endif
123 
124  public:
125 
126  // ----------------------------------------------------------------------
127  // Public methods
128  // ----------------------------------------------------------------------
129 
132  Fw::SerializeBufferBase& buffer
133  ) const;
134 
137  Fw::SerializeBufferBase& buffer
138  );
139 
140 #if 0
141  void toString(Fw::StringBase& text) const;
142 #endif
143 
144  protected:
145 
146  enum {
147  TYPE_ID = 0x6CB4E96B
148  };
149 
150  private:
151 
152  // ----------------------------------------------------------------------
153  // Private member variables
154  // ----------------------------------------------------------------------
155 
157  ElementType elements[SIZE];
158 
159  };
160 
161 
162 #endif
A
Definition: AArrayAc.hpp:28
A::SIZE
@ SIZE
Definition: AArrayAc.hpp:39
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
A::TYPE_ID
@ TYPE_ID
type id
Definition: AArrayAc.hpp:147
Fw::StringBase
Definition: StringType.hpp:23
A::operator==
bool operator==(const A &other) const
Equality operator.
Definition: AArrayAc.cpp:134
A::deserialize
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
Definition: AArrayAc.cpp:206
T
Definition: T.hpp:9
Fw::Serializable
forward declaration
Definition: Serializable.hpp:26
A::ElementType
T ElementType
Definition: AArrayAc.hpp:36
A::serialize
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
Definition: AArrayAc.cpp:193
A::operator=
const A & operator=(const A &other)
Assignment operator.
Definition: AArrayAc.cpp:107
A::A
A(void)
Construct a A with default initialization.
Definition: AArrayAc.cpp:34
A::operator[]
ElementType & operator[](const U32 i)
Subscript operator.
Definition: AArrayAc.cpp:92
T.hpp
A::operator!=
bool operator!=(const A &other) const
Inequality operator.
Definition: AArrayAc.cpp:145
T::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition: T.hpp:16
A::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition: AArrayAc.hpp:40