/*
 * 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.

#include <IMap2DMsgs.h>

#include <yarp/os/idl/WireTypes.h>

class IMap2DMsgs_clear_all_maps_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_clear_all_maps_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_clear_all_maps_RPC_helper::s_return_helper = {};

IMap2DMsgs_clear_all_maps_RPC_helper::IMap2DMsgs_clear_all_maps_RPC_helper()
{
    s_return_helper = {};
}

bool IMap2DMsgs_clear_all_maps_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("clear_all_maps_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_clear_all_maps_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_store_map_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_store_map_RPC_helper(const yarp::dev::Nav2D::MapGrid2D& themap);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    yarp::dev::Nav2D::MapGrid2D m_themap;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_store_map_RPC_helper::s_return_helper = {};

IMap2DMsgs_store_map_RPC_helper::IMap2DMsgs_store_map_RPC_helper(const yarp::dev::Nav2D::MapGrid2D& themap) :
        m_themap{themap}
{
    s_return_helper = {};
}

bool IMap2DMsgs_store_map_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("store_map_RPC", 1, 3)) {
        return false;
    }
    if (!writer.write(m_themap)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_store_map_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_map_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_map_RPC_helper(const std::string& map_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_map_name;

    thread_local static return_get_map s_return_helper;
};

thread_local return_get_map IMap2DMsgs_get_map_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_map_RPC_helper::IMap2DMsgs_get_map_RPC_helper(const std::string& map_name) :
        m_map_name{map_name}
{
}

bool IMap2DMsgs_get_map_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_map_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_map_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_map_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_map_names_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_map_names_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_map_names s_return_helper;
};

thread_local return_get_map_names IMap2DMsgs_get_map_names_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_map_names_RPC_helper::IMap2DMsgs_get_map_names_RPC_helper()
{
}

bool IMap2DMsgs_get_map_names_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_map_names_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_map_names_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_remove_map_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_remove_map_RPC_helper(const std::string& map_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_map_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_remove_map_RPC_helper::s_return_helper = {};

IMap2DMsgs_remove_map_RPC_helper::IMap2DMsgs_remove_map_RPC_helper(const std::string& map_name) :
        m_map_name{map_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_remove_map_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("remove_map_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_map_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_remove_map_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_store_location_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_store_location_RPC_helper(const std::string& location_name, const yarp::dev::Nav2D::Map2DLocation& loc);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_location_name;
    yarp::dev::Nav2D::Map2DLocation m_loc;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_store_location_RPC_helper::s_return_helper = {};

IMap2DMsgs_store_location_RPC_helper::IMap2DMsgs_store_location_RPC_helper(const std::string& location_name, const yarp::dev::Nav2D::Map2DLocation& loc) :
        m_location_name{location_name},
        m_loc{loc}
{
    s_return_helper = {};
}

bool IMap2DMsgs_store_location_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("store_location_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_location_name)) {
        return false;
    }
    if (!writer.write(m_loc)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_store_location_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_store_area_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_store_area_RPC_helper(const std::string& area_name, const yarp::dev::Nav2D::Map2DArea& area);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_area_name;
    yarp::dev::Nav2D::Map2DArea m_area;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_store_area_RPC_helper::s_return_helper = {};

IMap2DMsgs_store_area_RPC_helper::IMap2DMsgs_store_area_RPC_helper(const std::string& area_name, const yarp::dev::Nav2D::Map2DArea& area) :
        m_area_name{area_name},
        m_area{area}
{
    s_return_helper = {};
}

bool IMap2DMsgs_store_area_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("store_area_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_area_name)) {
        return false;
    }
    if (!writer.write(m_area)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_store_area_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_store_path_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_store_path_RPC_helper(const std::string& path_name, const yarp::dev::Nav2D::Map2DPath& path);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_path_name;
    yarp::dev::Nav2D::Map2DPath m_path;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_store_path_RPC_helper::s_return_helper = {};

IMap2DMsgs_store_path_RPC_helper::IMap2DMsgs_store_path_RPC_helper(const std::string& path_name, const yarp::dev::Nav2D::Map2DPath& path) :
        m_path_name{path_name},
        m_path{path}
{
    s_return_helper = {};
}

bool IMap2DMsgs_store_path_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("store_path_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_path_name)) {
        return false;
    }
    if (!writer.write(m_path)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_store_path_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_location_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_location_RPC_helper(const std::string& location_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_location_name;

    thread_local static return_get_location s_return_helper;
};

thread_local return_get_location IMap2DMsgs_get_location_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_location_RPC_helper::IMap2DMsgs_get_location_RPC_helper(const std::string& location_name) :
        m_location_name{location_name}
{
}

bool IMap2DMsgs_get_location_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_location_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_location_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_location_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_area_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_area_RPC_helper(const std::string& area_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_area_name;

    thread_local static return_get_area s_return_helper;
};

thread_local return_get_area IMap2DMsgs_get_area_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_area_RPC_helper::IMap2DMsgs_get_area_RPC_helper(const std::string& area_name) :
        m_area_name{area_name}
{
}

bool IMap2DMsgs_get_area_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_area_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_area_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_area_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_path_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_path_RPC_helper(const std::string& path_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_path_name;

    thread_local static return_get_path s_return_helper;
};

thread_local return_get_path IMap2DMsgs_get_path_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_path_RPC_helper::IMap2DMsgs_get_path_RPC_helper(const std::string& path_name) :
        m_path_name{path_name}
{
}

bool IMap2DMsgs_get_path_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_path_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_path_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_path_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_locations_list_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_locations_list_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_locations_list s_return_helper;
};

thread_local return_get_locations_list IMap2DMsgs_get_locations_list_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_locations_list_RPC_helper::IMap2DMsgs_get_locations_list_RPC_helper()
{
}

bool IMap2DMsgs_get_locations_list_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_locations_list_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_locations_list_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_areas_list_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_areas_list_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_areas_list s_return_helper;
};

thread_local return_get_areas_list IMap2DMsgs_get_areas_list_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_areas_list_RPC_helper::IMap2DMsgs_get_areas_list_RPC_helper()
{
}

bool IMap2DMsgs_get_areas_list_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_areas_list_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_areas_list_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_paths_list_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_paths_list_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_paths_list s_return_helper;
};

thread_local return_get_paths_list IMap2DMsgs_get_paths_list_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_paths_list_RPC_helper::IMap2DMsgs_get_paths_list_RPC_helper()
{
}

bool IMap2DMsgs_get_paths_list_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_paths_list_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_paths_list_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_all_locations_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_all_locations_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_all_locations s_return_helper;
};

thread_local return_get_all_locations IMap2DMsgs_get_all_locations_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_all_locations_RPC_helper::IMap2DMsgs_get_all_locations_RPC_helper()
{
}

bool IMap2DMsgs_get_all_locations_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_all_locations_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_all_locations_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_all_areas_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_all_areas_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_all_areas s_return_helper;
};

thread_local return_get_all_areas IMap2DMsgs_get_all_areas_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_all_areas_RPC_helper::IMap2DMsgs_get_all_areas_RPC_helper()
{
}

bool IMap2DMsgs_get_all_areas_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_all_areas_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_all_areas_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_get_all_paths_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_get_all_paths_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static return_get_all_paths s_return_helper;
};

thread_local return_get_all_paths IMap2DMsgs_get_all_paths_RPC_helper::s_return_helper = {};

IMap2DMsgs_get_all_paths_RPC_helper::IMap2DMsgs_get_all_paths_RPC_helper()
{
}

bool IMap2DMsgs_get_all_paths_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("get_all_paths_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_get_all_paths_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.read(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_rename_location_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_rename_location_RPC_helper(const std::string& original_name, const std::string& new_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_original_name;
    std::string m_new_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_rename_location_RPC_helper::s_return_helper = {};

IMap2DMsgs_rename_location_RPC_helper::IMap2DMsgs_rename_location_RPC_helper(const std::string& original_name, const std::string& new_name) :
        m_original_name{original_name},
        m_new_name{new_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_rename_location_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("rename_location_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_original_name)) {
        return false;
    }
    if (!writer.writeString(m_new_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_rename_location_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_delete_location_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_delete_location_RPC_helper(const std::string& location_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_location_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_delete_location_RPC_helper::s_return_helper = {};

IMap2DMsgs_delete_location_RPC_helper::IMap2DMsgs_delete_location_RPC_helper(const std::string& location_name) :
        m_location_name{location_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_delete_location_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("delete_location_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_location_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_delete_location_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_delete_path_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_delete_path_RPC_helper(const std::string& path_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_path_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_delete_path_RPC_helper::s_return_helper = {};

IMap2DMsgs_delete_path_RPC_helper::IMap2DMsgs_delete_path_RPC_helper(const std::string& path_name) :
        m_path_name{path_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_delete_path_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("delete_path_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_path_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_delete_path_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_rename_area_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_rename_area_RPC_helper(const std::string& original_name, const std::string& new_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_original_name;
    std::string m_new_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_rename_area_RPC_helper::s_return_helper = {};

IMap2DMsgs_rename_area_RPC_helper::IMap2DMsgs_rename_area_RPC_helper(const std::string& original_name, const std::string& new_name) :
        m_original_name{original_name},
        m_new_name{new_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_rename_area_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("rename_area_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_original_name)) {
        return false;
    }
    if (!writer.writeString(m_new_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_rename_area_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_rename_path_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_rename_path_RPC_helper(const std::string& original_name, const std::string& new_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_original_name;
    std::string m_new_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_rename_path_RPC_helper::s_return_helper = {};

IMap2DMsgs_rename_path_RPC_helper::IMap2DMsgs_rename_path_RPC_helper(const std::string& original_name, const std::string& new_name) :
        m_original_name{original_name},
        m_new_name{new_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_rename_path_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("rename_path_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_original_name)) {
        return false;
    }
    if (!writer.writeString(m_new_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_rename_path_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_delete_area_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_delete_area_RPC_helper(const std::string& area_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_area_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_delete_area_RPC_helper::s_return_helper = {};

IMap2DMsgs_delete_area_RPC_helper::IMap2DMsgs_delete_area_RPC_helper(const std::string& area_name) :
        m_area_name{area_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_delete_area_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("delete_area_RPC", 1, 3)) {
        return false;
    }
    if (!writer.writeString(m_area_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_delete_area_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_clear_all_locations_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_clear_all_locations_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_clear_all_locations_RPC_helper::s_return_helper = {};

IMap2DMsgs_clear_all_locations_RPC_helper::IMap2DMsgs_clear_all_locations_RPC_helper()
{
    s_return_helper = {};
}

bool IMap2DMsgs_clear_all_locations_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("clear_all_locations_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_clear_all_locations_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_clear_all_areas_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_clear_all_areas_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_clear_all_areas_RPC_helper::s_return_helper = {};

IMap2DMsgs_clear_all_areas_RPC_helper::IMap2DMsgs_clear_all_areas_RPC_helper()
{
    s_return_helper = {};
}

bool IMap2DMsgs_clear_all_areas_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("clear_all_areas_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_clear_all_areas_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_clear_all_paths_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_clear_all_paths_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_clear_all_paths_RPC_helper::s_return_helper = {};

IMap2DMsgs_clear_all_paths_RPC_helper::IMap2DMsgs_clear_all_paths_RPC_helper()
{
    s_return_helper = {};
}

bool IMap2DMsgs_clear_all_paths_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(4)) {
        return false;
    }
    if (!writer.writeTag("clear_all_paths_RPC", 1, 4)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_clear_all_paths_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper();
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::s_return_helper = {};

IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper()
{
    s_return_helper = {};
}

bool IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(6)) {
        return false;
    }
    if (!writer.writeTag("clear_all_maps_temporary_flags_RPC", 1, 6)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_clear_map_temporary_flags_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_clear_map_temporary_flags_RPC_helper(const std::string& map_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_map_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_clear_map_temporary_flags_RPC_helper::s_return_helper = {};

IMap2DMsgs_clear_map_temporary_flags_RPC_helper::IMap2DMsgs_clear_map_temporary_flags_RPC_helper(const std::string& map_name) :
        m_map_name{map_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_clear_map_temporary_flags_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(6)) {
        return false;
    }
    if (!writer.writeTag("clear_map_temporary_flags_RPC", 1, 5)) {
        return false;
    }
    if (!writer.writeString(m_map_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_clear_map_temporary_flags_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_save_maps_collection_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_save_maps_collection_RPC_helper(const std::string& maps_collection_file);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_maps_collection_file;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_save_maps_collection_RPC_helper::s_return_helper = {};

IMap2DMsgs_save_maps_collection_RPC_helper::IMap2DMsgs_save_maps_collection_RPC_helper(const std::string& maps_collection_file) :
        m_maps_collection_file{maps_collection_file}
{
    s_return_helper = {};
}

bool IMap2DMsgs_save_maps_collection_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("save_maps_collection_RPC", 1, 4)) {
        return false;
    }
    if (!writer.writeString(m_maps_collection_file)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_save_maps_collection_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_load_maps_collection_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_load_maps_collection_RPC_helper(const std::string& maps_collection_file);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_maps_collection_file;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_load_maps_collection_RPC_helper::s_return_helper = {};

IMap2DMsgs_load_maps_collection_RPC_helper::IMap2DMsgs_load_maps_collection_RPC_helper(const std::string& maps_collection_file) :
        m_maps_collection_file{maps_collection_file}
{
    s_return_helper = {};
}

bool IMap2DMsgs_load_maps_collection_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("load_maps_collection_RPC", 1, 4)) {
        return false;
    }
    if (!writer.writeString(m_maps_collection_file)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_load_maps_collection_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_save_locations_and_extras_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_save_locations_and_extras_RPC_helper(const std::string& locations_collection_file);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_locations_collection_file;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_save_locations_and_extras_RPC_helper::s_return_helper = {};

IMap2DMsgs_save_locations_and_extras_RPC_helper::IMap2DMsgs_save_locations_and_extras_RPC_helper(const std::string& locations_collection_file) :
        m_locations_collection_file{locations_collection_file}
{
    s_return_helper = {};
}

bool IMap2DMsgs_save_locations_and_extras_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(6)) {
        return false;
    }
    if (!writer.writeTag("save_locations_and_extras_RPC", 1, 5)) {
        return false;
    }
    if (!writer.writeString(m_locations_collection_file)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_save_locations_and_extras_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_load_locations_and_extras_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_load_locations_and_extras_RPC_helper(const std::string& locations_collection_file);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_locations_collection_file;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_load_locations_and_extras_RPC_helper::s_return_helper = {};

IMap2DMsgs_load_locations_and_extras_RPC_helper::IMap2DMsgs_load_locations_and_extras_RPC_helper(const std::string& locations_collection_file) :
        m_locations_collection_file{locations_collection_file}
{
    s_return_helper = {};
}

bool IMap2DMsgs_load_locations_and_extras_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(6)) {
        return false;
    }
    if (!writer.writeTag("load_locations_and_extras_RPC", 1, 5)) {
        return false;
    }
    if (!writer.writeString(m_locations_collection_file)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_load_locations_and_extras_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_save_map_to_disk_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_save_map_to_disk_RPC_helper(const std::string& map_name, const std::string& file_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_map_name;
    std::string m_file_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_save_map_to_disk_RPC_helper::s_return_helper = {};

IMap2DMsgs_save_map_to_disk_RPC_helper::IMap2DMsgs_save_map_to_disk_RPC_helper(const std::string& map_name, const std::string& file_name) :
        m_map_name{map_name},
        m_file_name{file_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_save_map_to_disk_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(7)) {
        return false;
    }
    if (!writer.writeTag("save_map_to_disk_RPC", 1, 5)) {
        return false;
    }
    if (!writer.writeString(m_map_name)) {
        return false;
    }
    if (!writer.writeString(m_file_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_save_map_to_disk_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_load_map_from_disk_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_load_map_from_disk_RPC_helper(const std::string& file_name);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    std::string m_file_name;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_load_map_from_disk_RPC_helper::s_return_helper = {};

IMap2DMsgs_load_map_from_disk_RPC_helper::IMap2DMsgs_load_map_from_disk_RPC_helper(const std::string& file_name) :
        m_file_name{file_name}
{
    s_return_helper = {};
}

bool IMap2DMsgs_load_map_from_disk_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(6)) {
        return false;
    }
    if (!writer.writeTag("load_map_from_disk_RPC", 1, 5)) {
        return false;
    }
    if (!writer.writeString(m_file_name)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_load_map_from_disk_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

class IMap2DMsgs_enable_maps_compression_RPC_helper :
        public yarp::os::Portable
{
public:
    explicit IMap2DMsgs_enable_maps_compression_RPC_helper(const bool enable_compression);
    bool write(yarp::os::ConnectionWriter& connection) const override;
    bool read(yarp::os::ConnectionReader& connection) override;

    bool m_enable_compression;

    thread_local static bool s_return_helper;
};

thread_local bool IMap2DMsgs_enable_maps_compression_RPC_helper::s_return_helper = {};

IMap2DMsgs_enable_maps_compression_RPC_helper::IMap2DMsgs_enable_maps_compression_RPC_helper(const bool enable_compression) :
        m_enable_compression{enable_compression}
{
    s_return_helper = {};
}

bool IMap2DMsgs_enable_maps_compression_RPC_helper::write(yarp::os::ConnectionWriter& connection) const
{
    yarp::os::idl::WireWriter writer(connection);
    if (!writer.writeListHeader(5)) {
        return false;
    }
    if (!writer.writeTag("enable_maps_compression_RPC", 1, 4)) {
        return false;
    }
    if (!writer.writeBool(m_enable_compression)) {
        return false;
    }
    return true;
}

bool IMap2DMsgs_enable_maps_compression_RPC_helper::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    if (!reader.readListReturn()) {
        return false;
    }
    if (!reader.readBool(s_return_helper)) {
        reader.fail();
        return false;
    }
    return true;
}

// Constructor
IMap2DMsgs::IMap2DMsgs()
{
    yarp().setOwner(*this);
}

bool IMap2DMsgs::clear_all_maps_RPC()
{
    IMap2DMsgs_clear_all_maps_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::clear_all_maps_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_clear_all_maps_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::store_map_RPC(const yarp::dev::Nav2D::MapGrid2D& themap)
{
    IMap2DMsgs_store_map_RPC_helper helper{themap};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::store_map_RPC(const yarp::dev::Nav2D::MapGrid2D& themap)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_store_map_RPC_helper::s_return_helper : bool{};
}

return_get_map IMap2DMsgs::get_map_RPC(const std::string& map_name)
{
    IMap2DMsgs_get_map_RPC_helper helper{map_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_map IMap2DMsgs::get_map_RPC(const std::string& map_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_map_RPC_helper::s_return_helper : return_get_map{};
}

return_get_map_names IMap2DMsgs::get_map_names_RPC()
{
    IMap2DMsgs_get_map_names_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_map_names IMap2DMsgs::get_map_names_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_map_names_RPC_helper::s_return_helper : return_get_map_names{};
}

bool IMap2DMsgs::remove_map_RPC(const std::string& map_name)
{
    IMap2DMsgs_remove_map_RPC_helper helper{map_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::remove_map_RPC(const std::string& map_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_remove_map_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::store_location_RPC(const std::string& location_name, const yarp::dev::Nav2D::Map2DLocation& loc)
{
    IMap2DMsgs_store_location_RPC_helper helper{location_name, loc};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::store_location_RPC(const std::string& location_name, const yarp::dev::Nav2D::Map2DLocation& loc)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_store_location_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::store_area_RPC(const std::string& area_name, const yarp::dev::Nav2D::Map2DArea& area)
{
    IMap2DMsgs_store_area_RPC_helper helper{area_name, area};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::store_area_RPC(const std::string& area_name, const yarp::dev::Nav2D::Map2DArea& area)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_store_area_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::store_path_RPC(const std::string& path_name, const yarp::dev::Nav2D::Map2DPath& path)
{
    IMap2DMsgs_store_path_RPC_helper helper{path_name, path};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::store_path_RPC(const std::string& path_name, const yarp::dev::Nav2D::Map2DPath& path)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_store_path_RPC_helper::s_return_helper : bool{};
}

return_get_location IMap2DMsgs::get_location_RPC(const std::string& location_name)
{
    IMap2DMsgs_get_location_RPC_helper helper{location_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_location IMap2DMsgs::get_location_RPC(const std::string& location_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_location_RPC_helper::s_return_helper : return_get_location{};
}

return_get_area IMap2DMsgs::get_area_RPC(const std::string& area_name)
{
    IMap2DMsgs_get_area_RPC_helper helper{area_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_area IMap2DMsgs::get_area_RPC(const std::string& area_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_area_RPC_helper::s_return_helper : return_get_area{};
}

return_get_path IMap2DMsgs::get_path_RPC(const std::string& path_name)
{
    IMap2DMsgs_get_path_RPC_helper helper{path_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_path IMap2DMsgs::get_path_RPC(const std::string& path_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_path_RPC_helper::s_return_helper : return_get_path{};
}

return_get_locations_list IMap2DMsgs::get_locations_list_RPC()
{
    IMap2DMsgs_get_locations_list_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_locations_list IMap2DMsgs::get_locations_list_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_locations_list_RPC_helper::s_return_helper : return_get_locations_list{};
}

return_get_areas_list IMap2DMsgs::get_areas_list_RPC()
{
    IMap2DMsgs_get_areas_list_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_areas_list IMap2DMsgs::get_areas_list_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_areas_list_RPC_helper::s_return_helper : return_get_areas_list{};
}

return_get_paths_list IMap2DMsgs::get_paths_list_RPC()
{
    IMap2DMsgs_get_paths_list_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_paths_list IMap2DMsgs::get_paths_list_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_paths_list_RPC_helper::s_return_helper : return_get_paths_list{};
}

return_get_all_locations IMap2DMsgs::get_all_locations_RPC()
{
    IMap2DMsgs_get_all_locations_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_all_locations IMap2DMsgs::get_all_locations_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_all_locations_RPC_helper::s_return_helper : return_get_all_locations{};
}

return_get_all_areas IMap2DMsgs::get_all_areas_RPC()
{
    IMap2DMsgs_get_all_areas_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_all_areas IMap2DMsgs::get_all_areas_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_all_areas_RPC_helper::s_return_helper : return_get_all_areas{};
}

return_get_all_paths IMap2DMsgs::get_all_paths_RPC()
{
    IMap2DMsgs_get_all_paths_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "return_get_all_paths IMap2DMsgs::get_all_paths_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_get_all_paths_RPC_helper::s_return_helper : return_get_all_paths{};
}

bool IMap2DMsgs::rename_location_RPC(const std::string& original_name, const std::string& new_name)
{
    IMap2DMsgs_rename_location_RPC_helper helper{original_name, new_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::rename_location_RPC(const std::string& original_name, const std::string& new_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_rename_location_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::delete_location_RPC(const std::string& location_name)
{
    IMap2DMsgs_delete_location_RPC_helper helper{location_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::delete_location_RPC(const std::string& location_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_delete_location_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::delete_path_RPC(const std::string& path_name)
{
    IMap2DMsgs_delete_path_RPC_helper helper{path_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::delete_path_RPC(const std::string& path_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_delete_path_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::rename_area_RPC(const std::string& original_name, const std::string& new_name)
{
    IMap2DMsgs_rename_area_RPC_helper helper{original_name, new_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::rename_area_RPC(const std::string& original_name, const std::string& new_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_rename_area_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::rename_path_RPC(const std::string& original_name, const std::string& new_name)
{
    IMap2DMsgs_rename_path_RPC_helper helper{original_name, new_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::rename_path_RPC(const std::string& original_name, const std::string& new_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_rename_path_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::delete_area_RPC(const std::string& area_name)
{
    IMap2DMsgs_delete_area_RPC_helper helper{area_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::delete_area_RPC(const std::string& area_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_delete_area_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::clear_all_locations_RPC()
{
    IMap2DMsgs_clear_all_locations_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::clear_all_locations_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_clear_all_locations_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::clear_all_areas_RPC()
{
    IMap2DMsgs_clear_all_areas_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::clear_all_areas_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_clear_all_areas_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::clear_all_paths_RPC()
{
    IMap2DMsgs_clear_all_paths_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::clear_all_paths_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_clear_all_paths_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::clear_all_maps_temporary_flags_RPC()
{
    IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper helper{};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::clear_all_maps_temporary_flags_RPC()");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::clear_map_temporary_flags_RPC(const std::string& map_name)
{
    IMap2DMsgs_clear_map_temporary_flags_RPC_helper helper{map_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::clear_map_temporary_flags_RPC(const std::string& map_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_clear_map_temporary_flags_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::save_maps_collection_RPC(const std::string& maps_collection_file)
{
    IMap2DMsgs_save_maps_collection_RPC_helper helper{maps_collection_file};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::save_maps_collection_RPC(const std::string& maps_collection_file)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_save_maps_collection_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::load_maps_collection_RPC(const std::string& maps_collection_file)
{
    IMap2DMsgs_load_maps_collection_RPC_helper helper{maps_collection_file};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::load_maps_collection_RPC(const std::string& maps_collection_file)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_load_maps_collection_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::save_locations_and_extras_RPC(const std::string& locations_collection_file)
{
    IMap2DMsgs_save_locations_and_extras_RPC_helper helper{locations_collection_file};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::save_locations_and_extras_RPC(const std::string& locations_collection_file)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_save_locations_and_extras_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::load_locations_and_extras_RPC(const std::string& locations_collection_file)
{
    IMap2DMsgs_load_locations_and_extras_RPC_helper helper{locations_collection_file};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::load_locations_and_extras_RPC(const std::string& locations_collection_file)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_load_locations_and_extras_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::save_map_to_disk_RPC(const std::string& map_name, const std::string& file_name)
{
    IMap2DMsgs_save_map_to_disk_RPC_helper helper{map_name, file_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::save_map_to_disk_RPC(const std::string& map_name, const std::string& file_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_save_map_to_disk_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::load_map_from_disk_RPC(const std::string& file_name)
{
    IMap2DMsgs_load_map_from_disk_RPC_helper helper{file_name};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::load_map_from_disk_RPC(const std::string& file_name)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_load_map_from_disk_RPC_helper::s_return_helper : bool{};
}

bool IMap2DMsgs::enable_maps_compression_RPC(const bool enable_compression)
{
    IMap2DMsgs_enable_maps_compression_RPC_helper helper{enable_compression};
    if (!yarp().canWrite()) {
        yError("Missing server method '%s'?", "bool IMap2DMsgs::enable_maps_compression_RPC(const bool enable_compression)");
    }
    bool ok = yarp().write(helper, helper);
    return ok ? IMap2DMsgs_enable_maps_compression_RPC_helper::s_return_helper : bool{};
}

// help method
std::vector<std::string> IMap2DMsgs::help(const std::string& functionName)
{
    bool showAll = (functionName == "--all");
    std::vector<std::string> helpString;
    if (showAll) {
        helpString.emplace_back("*** Available commands:");
        helpString.emplace_back("clear_all_maps_RPC");
        helpString.emplace_back("store_map_RPC");
        helpString.emplace_back("get_map_RPC");
        helpString.emplace_back("get_map_names_RPC");
        helpString.emplace_back("remove_map_RPC");
        helpString.emplace_back("store_location_RPC");
        helpString.emplace_back("store_area_RPC");
        helpString.emplace_back("store_path_RPC");
        helpString.emplace_back("get_location_RPC");
        helpString.emplace_back("get_area_RPC");
        helpString.emplace_back("get_path_RPC");
        helpString.emplace_back("get_locations_list_RPC");
        helpString.emplace_back("get_areas_list_RPC");
        helpString.emplace_back("get_paths_list_RPC");
        helpString.emplace_back("get_all_locations_RPC");
        helpString.emplace_back("get_all_areas_RPC");
        helpString.emplace_back("get_all_paths_RPC");
        helpString.emplace_back("rename_location_RPC");
        helpString.emplace_back("delete_location_RPC");
        helpString.emplace_back("delete_path_RPC");
        helpString.emplace_back("rename_area_RPC");
        helpString.emplace_back("rename_path_RPC");
        helpString.emplace_back("delete_area_RPC");
        helpString.emplace_back("clear_all_locations_RPC");
        helpString.emplace_back("clear_all_areas_RPC");
        helpString.emplace_back("clear_all_paths_RPC");
        helpString.emplace_back("clear_all_maps_temporary_flags_RPC");
        helpString.emplace_back("clear_map_temporary_flags_RPC");
        helpString.emplace_back("save_maps_collection_RPC");
        helpString.emplace_back("load_maps_collection_RPC");
        helpString.emplace_back("save_locations_and_extras_RPC");
        helpString.emplace_back("load_locations_and_extras_RPC");
        helpString.emplace_back("save_map_to_disk_RPC");
        helpString.emplace_back("load_map_from_disk_RPC");
        helpString.emplace_back("enable_maps_compression_RPC");
        helpString.emplace_back("help");
    } else {
        if (functionName == "clear_all_maps_RPC") {
            helpString.emplace_back("bool clear_all_maps_RPC() ");
        }
        if (functionName == "store_map_RPC") {
            helpString.emplace_back("bool store_map_RPC(const yarp::dev::Nav2D::MapGrid2D& themap) ");
        }
        if (functionName == "get_map_RPC") {
            helpString.emplace_back("return_get_map get_map_RPC(const std::string& map_name) ");
        }
        if (functionName == "get_map_names_RPC") {
            helpString.emplace_back("return_get_map_names get_map_names_RPC() ");
        }
        if (functionName == "remove_map_RPC") {
            helpString.emplace_back("bool remove_map_RPC(const std::string& map_name) ");
        }
        if (functionName == "store_location_RPC") {
            helpString.emplace_back("bool store_location_RPC(const std::string& location_name, const yarp::dev::Nav2D::Map2DLocation& loc) ");
        }
        if (functionName == "store_area_RPC") {
            helpString.emplace_back("bool store_area_RPC(const std::string& area_name, const yarp::dev::Nav2D::Map2DArea& area) ");
        }
        if (functionName == "store_path_RPC") {
            helpString.emplace_back("bool store_path_RPC(const std::string& path_name, const yarp::dev::Nav2D::Map2DPath& path) ");
        }
        if (functionName == "get_location_RPC") {
            helpString.emplace_back("return_get_location get_location_RPC(const std::string& location_name) ");
        }
        if (functionName == "get_area_RPC") {
            helpString.emplace_back("return_get_area get_area_RPC(const std::string& area_name) ");
        }
        if (functionName == "get_path_RPC") {
            helpString.emplace_back("return_get_path get_path_RPC(const std::string& path_name) ");
        }
        if (functionName == "get_locations_list_RPC") {
            helpString.emplace_back("return_get_locations_list get_locations_list_RPC() ");
        }
        if (functionName == "get_areas_list_RPC") {
            helpString.emplace_back("return_get_areas_list get_areas_list_RPC() ");
        }
        if (functionName == "get_paths_list_RPC") {
            helpString.emplace_back("return_get_paths_list get_paths_list_RPC() ");
        }
        if (functionName == "get_all_locations_RPC") {
            helpString.emplace_back("return_get_all_locations get_all_locations_RPC() ");
        }
        if (functionName == "get_all_areas_RPC") {
            helpString.emplace_back("return_get_all_areas get_all_areas_RPC() ");
        }
        if (functionName == "get_all_paths_RPC") {
            helpString.emplace_back("return_get_all_paths get_all_paths_RPC() ");
        }
        if (functionName == "rename_location_RPC") {
            helpString.emplace_back("bool rename_location_RPC(const std::string& original_name, const std::string& new_name) ");
        }
        if (functionName == "delete_location_RPC") {
            helpString.emplace_back("bool delete_location_RPC(const std::string& location_name) ");
        }
        if (functionName == "delete_path_RPC") {
            helpString.emplace_back("bool delete_path_RPC(const std::string& path_name) ");
        }
        if (functionName == "rename_area_RPC") {
            helpString.emplace_back("bool rename_area_RPC(const std::string& original_name, const std::string& new_name) ");
        }
        if (functionName == "rename_path_RPC") {
            helpString.emplace_back("bool rename_path_RPC(const std::string& original_name, const std::string& new_name) ");
        }
        if (functionName == "delete_area_RPC") {
            helpString.emplace_back("bool delete_area_RPC(const std::string& area_name) ");
        }
        if (functionName == "clear_all_locations_RPC") {
            helpString.emplace_back("bool clear_all_locations_RPC() ");
        }
        if (functionName == "clear_all_areas_RPC") {
            helpString.emplace_back("bool clear_all_areas_RPC() ");
        }
        if (functionName == "clear_all_paths_RPC") {
            helpString.emplace_back("bool clear_all_paths_RPC() ");
        }
        if (functionName == "clear_all_maps_temporary_flags_RPC") {
            helpString.emplace_back("bool clear_all_maps_temporary_flags_RPC() ");
        }
        if (functionName == "clear_map_temporary_flags_RPC") {
            helpString.emplace_back("bool clear_map_temporary_flags_RPC(const std::string& map_name) ");
        }
        if (functionName == "save_maps_collection_RPC") {
            helpString.emplace_back("bool save_maps_collection_RPC(const std::string& maps_collection_file) ");
        }
        if (functionName == "load_maps_collection_RPC") {
            helpString.emplace_back("bool load_maps_collection_RPC(const std::string& maps_collection_file) ");
        }
        if (functionName == "save_locations_and_extras_RPC") {
            helpString.emplace_back("bool save_locations_and_extras_RPC(const std::string& locations_collection_file) ");
        }
        if (functionName == "load_locations_and_extras_RPC") {
            helpString.emplace_back("bool load_locations_and_extras_RPC(const std::string& locations_collection_file) ");
        }
        if (functionName == "save_map_to_disk_RPC") {
            helpString.emplace_back("bool save_map_to_disk_RPC(const std::string& map_name, const std::string& file_name) ");
        }
        if (functionName == "load_map_from_disk_RPC") {
            helpString.emplace_back("bool load_map_from_disk_RPC(const std::string& file_name) ");
        }
        if (functionName == "enable_maps_compression_RPC") {
            helpString.emplace_back("bool enable_maps_compression_RPC(const bool enable_compression) ");
        }
        if (functionName == "help") {
            helpString.emplace_back("std::vector<std::string> help(const std::string& functionName = \"--all\")");
            helpString.emplace_back("Return list of available commands, or help message for a specific function");
            helpString.emplace_back("@param functionName name of command for which to get a detailed description. If none or '--all' is provided, print list of available commands");
            helpString.emplace_back("@return list of strings (one string per line)");
        }
    }
    if (helpString.empty()) {
        helpString.emplace_back("Command not found");
    }
    return helpString;
}

// read from ConnectionReader
bool IMap2DMsgs::read(yarp::os::ConnectionReader& connection)
{
    yarp::os::idl::WireReader reader(connection);
    reader.expectAccept();
    if (!reader.readListHeader()) {
        reader.fail();
        return false;
    }

    std::string tag = reader.readTag();
    bool direct = (tag == "__direct__");
    if (direct) {
        tag = reader.readTag();
    }
    while (!reader.isError()) {
        if (tag == "clear_all_maps_RPC") {
            IMap2DMsgs_clear_all_maps_RPC_helper::s_return_helper = clear_all_maps_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_clear_all_maps_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "store_map_RPC") {
            yarp::dev::Nav2D::MapGrid2D themap;
            if (!reader.read(themap)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_store_map_RPC_helper::s_return_helper = store_map_RPC(themap);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_store_map_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_map_RPC") {
            std::string map_name;
            if (!reader.readString(map_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_get_map_RPC_helper::s_return_helper = get_map_RPC(map_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_map_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_map_names_RPC") {
            IMap2DMsgs_get_map_names_RPC_helper::s_return_helper = get_map_names_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_map_names_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "remove_map_RPC") {
            std::string map_name;
            if (!reader.readString(map_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_remove_map_RPC_helper::s_return_helper = remove_map_RPC(map_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_remove_map_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "store_location_RPC") {
            std::string location_name;
            yarp::dev::Nav2D::Map2DLocation loc;
            if (!reader.readString(location_name)) {
                reader.fail();
                return false;
            }
            if (!reader.read(loc)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_store_location_RPC_helper::s_return_helper = store_location_RPC(location_name, loc);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_store_location_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "store_area_RPC") {
            std::string area_name;
            yarp::dev::Nav2D::Map2DArea area;
            if (!reader.readString(area_name)) {
                reader.fail();
                return false;
            }
            if (!reader.read(area)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_store_area_RPC_helper::s_return_helper = store_area_RPC(area_name, area);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_store_area_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "store_path_RPC") {
            std::string path_name;
            yarp::dev::Nav2D::Map2DPath path;
            if (!reader.readString(path_name)) {
                reader.fail();
                return false;
            }
            if (!reader.read(path)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_store_path_RPC_helper::s_return_helper = store_path_RPC(path_name, path);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_store_path_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_location_RPC") {
            std::string location_name;
            if (!reader.readString(location_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_get_location_RPC_helper::s_return_helper = get_location_RPC(location_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_location_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_area_RPC") {
            std::string area_name;
            if (!reader.readString(area_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_get_area_RPC_helper::s_return_helper = get_area_RPC(area_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_area_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_path_RPC") {
            std::string path_name;
            if (!reader.readString(path_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_get_path_RPC_helper::s_return_helper = get_path_RPC(path_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_path_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_locations_list_RPC") {
            IMap2DMsgs_get_locations_list_RPC_helper::s_return_helper = get_locations_list_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_locations_list_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_areas_list_RPC") {
            IMap2DMsgs_get_areas_list_RPC_helper::s_return_helper = get_areas_list_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_areas_list_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_paths_list_RPC") {
            IMap2DMsgs_get_paths_list_RPC_helper::s_return_helper = get_paths_list_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_paths_list_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_all_locations_RPC") {
            IMap2DMsgs_get_all_locations_RPC_helper::s_return_helper = get_all_locations_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_all_locations_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_all_areas_RPC") {
            IMap2DMsgs_get_all_areas_RPC_helper::s_return_helper = get_all_areas_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_all_areas_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "get_all_paths_RPC") {
            IMap2DMsgs_get_all_paths_RPC_helper::s_return_helper = get_all_paths_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.write(IMap2DMsgs_get_all_paths_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "rename_location_RPC") {
            std::string original_name;
            std::string new_name;
            if (!reader.readString(original_name)) {
                reader.fail();
                return false;
            }
            if (!reader.readString(new_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_rename_location_RPC_helper::s_return_helper = rename_location_RPC(original_name, new_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_rename_location_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "delete_location_RPC") {
            std::string location_name;
            if (!reader.readString(location_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_delete_location_RPC_helper::s_return_helper = delete_location_RPC(location_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_delete_location_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "delete_path_RPC") {
            std::string path_name;
            if (!reader.readString(path_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_delete_path_RPC_helper::s_return_helper = delete_path_RPC(path_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_delete_path_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "rename_area_RPC") {
            std::string original_name;
            std::string new_name;
            if (!reader.readString(original_name)) {
                reader.fail();
                return false;
            }
            if (!reader.readString(new_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_rename_area_RPC_helper::s_return_helper = rename_area_RPC(original_name, new_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_rename_area_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "rename_path_RPC") {
            std::string original_name;
            std::string new_name;
            if (!reader.readString(original_name)) {
                reader.fail();
                return false;
            }
            if (!reader.readString(new_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_rename_path_RPC_helper::s_return_helper = rename_path_RPC(original_name, new_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_rename_path_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "delete_area_RPC") {
            std::string area_name;
            if (!reader.readString(area_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_delete_area_RPC_helper::s_return_helper = delete_area_RPC(area_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_delete_area_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "clear_all_locations_RPC") {
            IMap2DMsgs_clear_all_locations_RPC_helper::s_return_helper = clear_all_locations_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_clear_all_locations_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "clear_all_areas_RPC") {
            IMap2DMsgs_clear_all_areas_RPC_helper::s_return_helper = clear_all_areas_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_clear_all_areas_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "clear_all_paths_RPC") {
            IMap2DMsgs_clear_all_paths_RPC_helper::s_return_helper = clear_all_paths_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_clear_all_paths_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "clear_all_maps_temporary_flags_RPC") {
            IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::s_return_helper = clear_all_maps_temporary_flags_RPC();
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_clear_all_maps_temporary_flags_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "clear_map_temporary_flags_RPC") {
            std::string map_name;
            if (!reader.readString(map_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_clear_map_temporary_flags_RPC_helper::s_return_helper = clear_map_temporary_flags_RPC(map_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_clear_map_temporary_flags_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "save_maps_collection_RPC") {
            std::string maps_collection_file;
            if (!reader.readString(maps_collection_file)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_save_maps_collection_RPC_helper::s_return_helper = save_maps_collection_RPC(maps_collection_file);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_save_maps_collection_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "load_maps_collection_RPC") {
            std::string maps_collection_file;
            if (!reader.readString(maps_collection_file)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_load_maps_collection_RPC_helper::s_return_helper = load_maps_collection_RPC(maps_collection_file);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_load_maps_collection_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "save_locations_and_extras_RPC") {
            std::string locations_collection_file;
            if (!reader.readString(locations_collection_file)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_save_locations_and_extras_RPC_helper::s_return_helper = save_locations_and_extras_RPC(locations_collection_file);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_save_locations_and_extras_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "load_locations_and_extras_RPC") {
            std::string locations_collection_file;
            if (!reader.readString(locations_collection_file)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_load_locations_and_extras_RPC_helper::s_return_helper = load_locations_and_extras_RPC(locations_collection_file);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_load_locations_and_extras_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "save_map_to_disk_RPC") {
            std::string map_name;
            std::string file_name;
            if (!reader.readString(map_name)) {
                reader.fail();
                return false;
            }
            if (!reader.readString(file_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_save_map_to_disk_RPC_helper::s_return_helper = save_map_to_disk_RPC(map_name, file_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_save_map_to_disk_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "load_map_from_disk_RPC") {
            std::string file_name;
            if (!reader.readString(file_name)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_load_map_from_disk_RPC_helper::s_return_helper = load_map_from_disk_RPC(file_name);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_load_map_from_disk_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "enable_maps_compression_RPC") {
            bool enable_compression;
            if (!reader.readBool(enable_compression)) {
                reader.fail();
                return false;
            }
            IMap2DMsgs_enable_maps_compression_RPC_helper::s_return_helper = enable_maps_compression_RPC(enable_compression);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(1)) {
                    return false;
                }
                if (!writer.writeBool(IMap2DMsgs_enable_maps_compression_RPC_helper::s_return_helper)) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (tag == "help") {
            std::string functionName;
            if (!reader.readString(functionName)) {
                functionName = "--all";
            }
            auto help_strings = help(functionName);
            yarp::os::idl::WireWriter writer(reader);
            if (!writer.isNull()) {
                if (!writer.writeListHeader(2)) {
                    return false;
                }
                if (!writer.writeTag("many", 1, 0)) {
                    return false;
                }
                if (!writer.writeListBegin(BOTTLE_TAG_INT32, static_cast<uint32_t>(help_strings.size()))) {
                    return false;
                }
                for (const auto& help_string : help_strings) {
                    if (!writer.writeString(help_string)) {
                        return false;
                    }
                }
                if (!writer.writeListEnd()) {
                    return false;
                }
            }
            reader.accept();
            return true;
        }
        if (reader.noMore()) {
            reader.fail();
            return false;
        }
        std::string next_tag = reader.readTag();
        if (next_tag == "") {
            break;
        }
        tag.append("_").append(next_tag);
    }
    return false;
}
