mirror of
https://github.com/nasa/fpp.git
synced 2025-12-13 00:06:20 -06:00
152 lines
2.7 KiB
C++
Vendored
152 lines
2.7 KiB
C++
Vendored
// ======================================================================
|
|
// \title IncludingSerializableAc.cpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief cpp file for Including struct
|
|
// ======================================================================
|
|
|
|
#include "Fw/Types/Assert.hpp"
|
|
#include "IncludingSerializableAc.hpp"
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constructors
|
|
// ----------------------------------------------------------------------
|
|
|
|
Including ::
|
|
Including() :
|
|
Serializable(),
|
|
m_x{}
|
|
{
|
|
|
|
}
|
|
|
|
Including ::
|
|
Including(const Included& x) :
|
|
Serializable(),
|
|
m_x(x)
|
|
{
|
|
|
|
}
|
|
|
|
Including ::
|
|
Including(const Including& obj) :
|
|
Serializable(),
|
|
m_x(obj.m_x)
|
|
{
|
|
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Operators
|
|
// ----------------------------------------------------------------------
|
|
|
|
Including& Including ::
|
|
operator=(const Including& obj)
|
|
{
|
|
if (this == &obj) {
|
|
return *this;
|
|
}
|
|
|
|
set(obj.m_x);
|
|
return *this;
|
|
}
|
|
|
|
bool Including ::
|
|
operator==(const Including& obj) const
|
|
{
|
|
return (this->m_x == obj.m_x);
|
|
}
|
|
|
|
bool Including ::
|
|
operator!=(const Including& obj) const
|
|
{
|
|
return !(*this == obj);
|
|
}
|
|
|
|
#ifdef BUILD_UT
|
|
|
|
std::ostream& operator<<(std::ostream& os, const Including& obj) {
|
|
Fw::String s;
|
|
obj.toString(s);
|
|
os << s.toChar();
|
|
return os;
|
|
}
|
|
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
Fw::SerializeStatus Including ::
|
|
serializeTo(
|
|
Fw::SerialBufferBase& buffer,
|
|
Fw::Endianness mode
|
|
) const
|
|
{
|
|
Fw::SerializeStatus status;
|
|
|
|
status = buffer.serializeFrom(this->m_x, mode);
|
|
if (status != Fw::FW_SERIALIZE_OK) {
|
|
return status;
|
|
}
|
|
|
|
return status;
|
|
}
|
|
|
|
Fw::SerializeStatus Including ::
|
|
deserializeFrom(
|
|
Fw::SerialBufferBase& buffer,
|
|
Fw::Endianness mode
|
|
)
|
|
{
|
|
Fw::SerializeStatus status;
|
|
|
|
status = buffer.deserializeTo(this->m_x, mode);
|
|
if (status != Fw::FW_SERIALIZE_OK) {
|
|
return status;
|
|
}
|
|
|
|
return status;
|
|
}
|
|
|
|
FwSizeType Including ::
|
|
serializedSize() const
|
|
{
|
|
FwSizeType size = 0;
|
|
size += this->m_x.serializedSize();
|
|
return size;
|
|
}
|
|
|
|
#if FW_SERIALIZABLE_TO_STRING
|
|
|
|
void Including ::
|
|
toString(Fw::StringBase& sb) const
|
|
{
|
|
Fw::String tmp;
|
|
sb = "( ";
|
|
|
|
// Format x
|
|
sb += "x = ";
|
|
this->m_x.toString(tmp);
|
|
sb += tmp;
|
|
sb += " )";
|
|
}
|
|
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Setter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
void Including ::
|
|
set(const Included& x)
|
|
{
|
|
this->m_x = x;
|
|
}
|
|
|
|
void Including ::
|
|
set_x(const Included& x)
|
|
{
|
|
this->m_x = x;
|
|
}
|