fpp/compiler/tools/fpp-to-cpp/test/array/S2SerializableAc.ref.hpp
2025-11-03 08:51:28 -08:00

147 lines
3.6 KiB
C++
Vendored

// ======================================================================
// \title S2SerializableAc.hpp
// \author Generated by fpp-to-cpp
// \brief hpp file for S2 struct
// ======================================================================
#ifndef S2SerializableAc_HPP
#define S2SerializableAc_HPP
#include "Fw/FPrimeBasicTypes.hpp"
#include "Fw/Types/ExternalString.hpp"
#include "Fw/Types/Serializable.hpp"
#include "Fw/Types/String.hpp"
#include "S1SerializableAc.hpp"
class S2 :
public Fw::Serializable
{
public:
// ----------------------------------------------------------------------
// Constants
// ----------------------------------------------------------------------
enum {
//! The size of the serial representation
SERIALIZED_SIZE =
M::S1::SERIALIZED_SIZE
};
public:
// ----------------------------------------------------------------------
// Constructors
// ----------------------------------------------------------------------
//! Constructor (default value)
S2();
//! Member constructor
S2(const M::S1& s1);
//! Copy constructor
S2(
const S2& obj //!< The source object
);
public:
// ----------------------------------------------------------------------
// Operators
// ----------------------------------------------------------------------
//! Copy assignment operator
S2& operator=(
const S2& obj //!< The source object
);
//! Equality operator
bool operator==(
const S2& obj //!< The other object
) const;
//! Inequality operator
bool operator!=(
const S2& obj //!< The other object
) const;
#ifdef BUILD_UT
//! Ostream operator
friend std::ostream& operator<<(
std::ostream& os, //!< The ostream
const S2& obj //!< The object
);
#endif
public:
// ----------------------------------------------------------------------
// Member functions
// ----------------------------------------------------------------------
//! Serialization
Fw::SerializeStatus serializeTo(
Fw::SerialBufferBase& buffer, //!< The serial buffer
Fw::Endianness mode = Fw::Endianness::BIG //!< Endianness of serialized buffer
) const;
//! Deserialization
Fw::SerializeStatus deserializeFrom(
Fw::SerialBufferBase& buffer, //!< The serial buffer
Fw::Endianness mode = Fw::Endianness::BIG //!< Endianness of serialized buffer
);
//! Get the dynamic serialized size of the struct
FwSizeType serializedSize() const;
#if FW_SERIALIZABLE_TO_STRING
//! Convert struct to string
void toString(
Fw::StringBase& sb //!< The StringBase object to hold the result
) const;
#endif
// ----------------------------------------------------------------------
// Getter functions
// ----------------------------------------------------------------------
//! Get member s1
M::S1& get_s1()
{
return this->m_s1;
}
//! Get member s1 (const)
const M::S1& get_s1() const
{
return this->m_s1;
}
// ----------------------------------------------------------------------
// Setter functions
// ----------------------------------------------------------------------
//! Set all members
void set(const M::S1& s1);
//! Set member s1
void set_s1(const M::S1& s1);
protected:
// ----------------------------------------------------------------------
// Member variables
// ----------------------------------------------------------------------
M::S1 m_s1;
};
#endif