// ====================================================================== // \title StringArraySerializableAc.hpp // \author Generated by fpp-to-cpp // \brief hpp file for StringArray struct // ====================================================================== #ifndef StringArraySerializableAc_HPP #define StringArraySerializableAc_HPP #include "FpConfig.hpp" #include "Fw/Types/ExternalString.hpp" #include "Fw/Types/Serializable.hpp" #include "Fw/Types/String.hpp" class StringArray : public Fw::Serializable { public: // ---------------------------------------------------------------------- // Types // ---------------------------------------------------------------------- //! The type of s2 using Type_of_s2 = Fw::ExternalString[16]; public: // ---------------------------------------------------------------------- // Constants // ---------------------------------------------------------------------- enum { //! The size of the serial representation SERIALIZED_SIZE = Fw::StringBase::STATIC_SERIALIZED_SIZE(80) + Fw::StringBase::STATIC_SERIALIZED_SIZE(40) * 16 }; public: // ---------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------- //! Constructor (default value) StringArray(); //! Member constructor StringArray( const Fw::StringBase& s1, const Type_of_s2& s2 ); //! Copy constructor StringArray( const StringArray& obj //!< The source object ); //! Member constructor (scalar values for arrays) StringArray( const Fw::StringBase& s1, const Fw::StringBase& s2 ); public: // ---------------------------------------------------------------------- // Operators // ---------------------------------------------------------------------- //! Copy assignment operator StringArray& operator=( const StringArray& obj //!< The source object ); //! Equality operator bool operator==( const StringArray& obj //!< The other object ) const; //! Inequality operator bool operator!=( const StringArray& obj //!< The other object ) const; #ifdef BUILD_UT //! Ostream operator friend std::ostream& operator<<( std::ostream& os, //!< The ostream const StringArray& 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_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 Fw::ExternalString& gets1() { return this->m_s1; } //! Get member s1 (const) const Fw::ExternalString& gets1() const { return this->m_s1; } //! Get member s2 Type_of_s2& gets2() { return this->m_s2; } //! Get member s2 (const) const Type_of_s2& gets2() const { return this->m_s2; } // ---------------------------------------------------------------------- // Setter functions // ---------------------------------------------------------------------- //! Set all members void set( const Fw::StringBase& s1, const Type_of_s2& s2 ); //! Set member s1 void sets1(const Fw::StringBase& s1); //! Set member s2 void sets2(const Type_of_s2& s2); protected: // ---------------------------------------------------------------------- // Member variables // ---------------------------------------------------------------------- char m___fprime_ac_s1_buffer[Fw::StringBase::BUFFER_SIZE(80)]; Fw::ExternalString m_s1; char m___fprime_ac_s2_buffer[16][Fw::StringBase::BUFFER_SIZE(40)]; Fw::ExternalString m_s2[16]; }; #endif