// ====================================================================== // \title StringSerializableAc.hpp // \author Generated by fpp-to-cpp // \brief hpp file for String struct // ====================================================================== #ifndef StringSerializableAc_HPP #define StringSerializableAc_HPP #include "Fw/FPrimeBasicTypes.hpp" #include "Fw/Types/ExternalString.hpp" #include "Fw/Types/Serializable.hpp" #include "Fw/Types/String.hpp" class String : public Fw::Serializable { public: // ---------------------------------------------------------------------- // Constants // ---------------------------------------------------------------------- enum { //! The size of the serial representation SERIALIZED_SIZE = Fw::StringBase::STATIC_SERIALIZED_SIZE(80) + Fw::StringBase::STATIC_SERIALIZED_SIZE(40) }; public: // ---------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------- //! Constructor (default value) String(); //! Member constructor String( const Fw::StringBase& s1, const Fw::StringBase& s2 ); //! Copy constructor String( const String& obj //!< The source object ); public: // ---------------------------------------------------------------------- // Operators // ---------------------------------------------------------------------- //! Copy assignment operator String& operator=( const String& obj //!< The source object ); //! Equality operator bool operator==( const String& obj //!< The other object ) const; //! Inequality operator bool operator!=( const String& obj //!< The other object ) const; #ifdef BUILD_UT //! Ostream operator friend std::ostream& operator<<( std::ostream& os, //!< The ostream const String& obj //!< The object ); #endif public: // ---------------------------------------------------------------------- // Member functions // ---------------------------------------------------------------------- //! Serialization Fw::SerializeStatus serializeTo( Fw::SerialBufferBase& buffer, //!< The serial buffer Fw::Endianness mode = Fw::Endianness::BIG //!< Endianness of serialized buffer ) const; //! Deserialization Fw::SerializeStatus deserializeFrom( Fw::SerialBufferBase& 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 s1 Fw::ExternalString& get_s1() { return this->m_s1; } //! Get member s1 (const) const Fw::ExternalString& get_s1() const { return this->m_s1; } //! Get member s2 Fw::ExternalString& get_s2() { return this->m_s2; } //! Get member s2 (const) const Fw::ExternalString& get_s2() const { return this->m_s2; } // ---------------------------------------------------------------------- // Setter functions // ---------------------------------------------------------------------- //! Set all members void set( const Fw::StringBase& s1, const Fw::StringBase& s2 ); //! Set member s1 void set_s1(const Fw::StringBase& s1); //! Set member s2 void set_s2(const Fw::StringBase& 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[Fw::StringBase::BUFFER_SIZE(40)]; Fw::ExternalString m_s2; }; #endif