/*
 * 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 <yarp/os/Wire.h>
#include <yarp/os/idl/WireTypes.h>
#include <yarp/test/PointQuality.h>

namespace yarp {
namespace test {

int PointQualityVocab::fromString(const std::string& input)
{
    // definitely needs optimizing :-)
    if (input=="UNKNOWN") {
        return static_cast<int>(UNKNOWN);
    }
    if (input=="GOOD") {
        return static_cast<int>(GOOD);
    }
    if (input=="BAD") {
        return static_cast<int>(BAD);
    }
    return -1;
}
std::string PointQualityVocab::toString(int input) const
{
    switch(static_cast<PointQuality>(input)) {
    case UNKNOWN:
        return "UNKNOWN";
    case GOOD:
        return "GOOD";
    case BAD:
        return "BAD";
    }
    return "";
}

} // namespace yarp
} // namespace test
