// ====================================================================== // \title Enum1ArrayAc.hpp // \author Generated by fpp-to-cpp // \brief hpp file for Enum1 array // ====================================================================== #ifndef Enum1ArrayAc_HPP #define Enum1ArrayAc_HPP #include "E1EnumAc.hpp" #include "FpConfig.hpp" #include "Fw/Types/Serializable.hpp" #include "Fw/Types/String.hpp" //! Array with enum argument class Enum1 : public Fw::Serializable { public: // ---------------------------------------------------------------------- // Types // ---------------------------------------------------------------------- //! The element type typedef M::E1 ElementType; public: // ---------------------------------------------------------------------- // Constants // ---------------------------------------------------------------------- enum { //! The size of the array SIZE = 2, //! The size of the serial representation SERIALIZED_SIZE = SIZE * M::E1::SERIALIZED_SIZE, }; public: // ---------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------- //! Constructor (default value) Enum1(); //! Constructor (user-provided value) Enum1( const ElementType (&a)[SIZE] //!< The array ); //! Constructor (single element) Enum1( const ElementType& e //!< The element ); //! Constructor (multiple elements) Enum1( const ElementType& e1, //!< Element 1 const ElementType& e2 //!< Element 2 ); //! Copy Constructor Enum1( const Enum1& obj //!< The source object ); public: // ---------------------------------------------------------------------- // Operators // ---------------------------------------------------------------------- //! Subscript operator ElementType& operator[]( const U32 i //!< The subscript index ); //! Const subscript operator const ElementType& operator[]( const U32 i //!< The subscript index ) const; //! Copy assignment operator (object) Enum1& operator=( const Enum1& obj //!< The source object ); //! Copy assignment operator (raw array) Enum1& operator=( const ElementType (&a)[SIZE] //!< The source array ); //! Copy assignment operator (single element) Enum1& operator=( const ElementType& e //!< The element ); //! Equality operator bool operator==( const Enum1& obj //!< The other object ) const; //! Inequality operator bool operator!=( const Enum1& obj //!< The other object ) const; #ifdef BUILD_UT //! Ostream operator friend std::ostream& operator<<( std::ostream& os, //!< The ostream const Enum1& obj //!< The object ); #endif 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_ARRAY_TO_STRING //! Convert array to string void toString( Fw::StringBase& sb //!< The StringBase object to hold the result ) const; #endif private: // ---------------------------------------------------------------------- // Member variables // ---------------------------------------------------------------------- //! The array elements ElementType elements[SIZE]; }; #endif