mirror of
https://github.com/nasa/fpp.git
synced 2025-12-11 11:16:42 -06:00
187 lines
4.6 KiB
C++
Vendored
187 lines
4.6 KiB
C++
Vendored
// ======================================================================
|
|
// \title NamespaceSerializableAc.hpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief hpp file for Namespace struct
|
|
// ======================================================================
|
|
|
|
#ifndef NamespaceSerializableAc_HPP
|
|
#define NamespaceSerializableAc_HPP
|
|
|
|
#include "Fw/FPrimeBasicTypes.hpp"
|
|
#include "Fw/Types/ExternalString.hpp"
|
|
#include "Fw/Types/Serializable.hpp"
|
|
#include "Fw/Types/String.hpp"
|
|
#include "NamespacedAliasType2AliasAc.hpp"
|
|
#include "NamespacedAliasTypeAliasAc.hpp"
|
|
#include "SimpleCType2AliasAc.hpp"
|
|
#include "SimpleCTypeAliasAc.hpp"
|
|
|
|
class Namespace :
|
|
public Fw::Serializable
|
|
{
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constants
|
|
// ----------------------------------------------------------------------
|
|
|
|
enum {
|
|
//! The size of the serial representation
|
|
SERIALIZED_SIZE =
|
|
sizeof(SimpleCType) +
|
|
sizeof(SimpleCType2) +
|
|
sizeof(M::M2::NamespacedAliasType) +
|
|
sizeof(M::NamespacedAliasType2)
|
|
};
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constructors
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Constructor (default value)
|
|
Namespace();
|
|
|
|
//! Member constructor
|
|
Namespace(
|
|
SimpleCType A,
|
|
SimpleCType2 B,
|
|
M::M2::NamespacedAliasType C,
|
|
M::NamespacedAliasType2 D
|
|
);
|
|
|
|
//! Copy constructor
|
|
Namespace(
|
|
const Namespace& obj //!< The source object
|
|
);
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Operators
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Copy assignment operator
|
|
Namespace& operator=(
|
|
const Namespace& obj //!< The source object
|
|
);
|
|
|
|
//! Equality operator
|
|
bool operator==(
|
|
const Namespace& obj //!< The other object
|
|
) const;
|
|
|
|
//! Inequality operator
|
|
bool operator!=(
|
|
const Namespace& obj //!< The other object
|
|
) const;
|
|
|
|
#ifdef BUILD_UT
|
|
|
|
//! Ostream operator
|
|
friend std::ostream& operator<<(
|
|
std::ostream& os, //!< The ostream
|
|
const Namespace& obj //!< The object
|
|
);
|
|
|
|
#endif
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Serialization
|
|
Fw::SerializeStatus serializeTo(
|
|
Fw::SerializeBufferBase& buffer, //!< The serial buffer
|
|
Fw::Endianness mode = Fw::Endianness::BIG //!< Endianness of serialized buffer
|
|
) const;
|
|
|
|
//! Deserialization
|
|
Fw::SerializeStatus deserializeFrom(
|
|
Fw::SerializeBufferBase& 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 A
|
|
SimpleCType get_A() const
|
|
{
|
|
return this->m_A;
|
|
}
|
|
|
|
//! Get member B
|
|
SimpleCType2 get_B() const
|
|
{
|
|
return this->m_B;
|
|
}
|
|
|
|
//! Get member C
|
|
M::M2::NamespacedAliasType get_C() const
|
|
{
|
|
return this->m_C;
|
|
}
|
|
|
|
//! Get member D
|
|
M::NamespacedAliasType2 get_D() const
|
|
{
|
|
return this->m_D;
|
|
}
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Setter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Set all members
|
|
void set(
|
|
SimpleCType A,
|
|
SimpleCType2 B,
|
|
M::M2::NamespacedAliasType C,
|
|
M::NamespacedAliasType2 D
|
|
);
|
|
|
|
//! Set member A
|
|
void set_A(SimpleCType A);
|
|
|
|
//! Set member B
|
|
void set_B(SimpleCType2 B);
|
|
|
|
//! Set member C
|
|
void set_C(M::M2::NamespacedAliasType C);
|
|
|
|
//! Set member D
|
|
void set_D(M::NamespacedAliasType2 D);
|
|
|
|
protected:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member variables
|
|
// ----------------------------------------------------------------------
|
|
|
|
SimpleCType m_A;
|
|
SimpleCType2 m_B;
|
|
M::M2::NamespacedAliasType m_C;
|
|
M::NamespacedAliasType2 m_D;
|
|
|
|
};
|
|
|
|
#endif
|