mirror of
https://github.com/nasa/fpp.git
synced 2025-12-15 12:58:25 -06:00
116 lines
2.8 KiB
C++
116 lines
2.8 KiB
C++
// ======================================================================
|
|
// \title EnumSerializableAc.hpp
|
|
// \author Generated by fpp-to-cpp
|
|
// \brief hpp file for Enum struct
|
|
// ======================================================================
|
|
|
|
#ifndef EnumSerializableAc_HPP
|
|
#define EnumSerializableAc_HPP
|
|
|
|
#include "Fw/Types/BasicTypes.hpp"
|
|
#include "Fw/Types/Serializable.hpp"
|
|
#include "Fw/Types/String.hpp"
|
|
#include "EEnumAc.hpp"
|
|
|
|
class Enum :
|
|
public Fw::Serializable
|
|
{
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constants
|
|
// ----------------------------------------------------------------------
|
|
|
|
enum {
|
|
//! The size of the serial representation
|
|
SERIALIZED_SIZE =
|
|
M::E::SERIALIZED_SIZE
|
|
};
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Constructors
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Constructor (default value)
|
|
Enum();
|
|
|
|
//! Member constructor
|
|
Enum(const M::E& e);
|
|
|
|
//! Copy constructor
|
|
Enum(
|
|
const Enum& obj //!< The source object
|
|
);
|
|
|
|
//! Copy assignment operator
|
|
Enum& operator=(
|
|
const Enum& obj //!< The source object
|
|
);
|
|
|
|
//! Equality operator
|
|
bool operator==(
|
|
const Enum& obj //!< The other object
|
|
) const;
|
|
|
|
//! Inequality operator
|
|
bool operator!=(
|
|
const Enum& obj //!< The other object
|
|
) const;
|
|
|
|
public:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Serialization
|
|
Fw::SerializeStatus serialize(
|
|
Fw::SerializeBufferBase& buffer //!< The serial buffer
|
|
) const;
|
|
|
|
//! Deserialization
|
|
Fw::SerializeStatus deserialize(
|
|
Fw::SerializeBufferBase& buffer //!< The serial buffer
|
|
);
|
|
|
|
#if FW_SERIALIZABLE_TO_STRING || BUILD_UT
|
|
|
|
//! Convert struct to string
|
|
void toString(
|
|
Fw::StringBase& sb //!< The StringBase object to hold the result
|
|
) const;
|
|
|
|
#endif
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Getter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Get member e
|
|
const M::E& gete() const;
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Setter functions
|
|
// ----------------------------------------------------------------------
|
|
|
|
//! Set all values
|
|
void set(const M::E& e);
|
|
|
|
//! Set member e
|
|
void sete(const M::E& e);
|
|
|
|
private:
|
|
|
|
// ----------------------------------------------------------------------
|
|
// Member variables
|
|
// ----------------------------------------------------------------------
|
|
|
|
M::E e;
|
|
|
|
};
|
|
|
|
#endif
|