/*
 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
 * SPDX-License-Identifier: BSD-3-Clause
 */

// Autogenerated by Thrift Compiler (0.14.1-yarped)
//
// This is an automatically generated file.
// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.

#ifndef YARP_THRIFT_GENERATOR_STRUCT_MAP2DPATHDATA_H
#define YARP_THRIFT_GENERATOR_STRUCT_MAP2DPATHDATA_H

#include <yarp/dev/api.h>

#include <yarp/os/Wire.h>
#include <yarp/os/idl/WireTypes.h>
#include <yarp/dev/Map2DLocation.h>

namespace yarp::dev {

class YARP_dev_API Map2DPathData :
        public yarp::os::idl::WirePortable
{
public:
    // Fields
    /**
     * list of waypoints which define the path
     */
    std::vector<yarp::dev::Nav2D::Map2DLocation> waypoints{};
    /**
     * user defined string
     */
    std::string description{};

    // Default constructor
    Map2DPathData() = default;

    // Constructor with field values
    Map2DPathData(const std::vector<yarp::dev::Nav2D::Map2DLocation>& waypoints,
                  const std::string& description);

    // Read structure on a Wire
    bool read(yarp::os::idl::WireReader& reader) override;

    // Read structure on a Connection
    bool read(yarp::os::ConnectionReader& connection) override;

    // Write structure on a Wire
    bool write(const yarp::os::idl::WireWriter& writer) const override;

    // Write structure on a Connection
    bool write(yarp::os::ConnectionWriter& connection) const override;

    // Convert to a printable string
    std::string toString() const;

    // If you want to serialize this class without nesting, use this helper
    typedef yarp::os::idl::Unwrapped<Map2DPathData> unwrapped;

private:
    // read/write waypoints field
    bool read_waypoints(yarp::os::idl::WireReader& reader);
    bool write_waypoints(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_waypoints(yarp::os::idl::WireReader& reader);
    bool nested_write_waypoints(const yarp::os::idl::WireWriter& writer) const;

    // read/write description field
    bool read_description(yarp::os::idl::WireReader& reader);
    bool write_description(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_description(yarp::os::idl::WireReader& reader);
    bool nested_write_description(const yarp::os::idl::WireWriter& writer) const;
};

} // namespace yarp::dev

#endif // YARP_THRIFT_GENERATOR_STRUCT_MAP2DPATHDATA_H
