YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
CameraDistortionType.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6// Autogenerated by Thrift (based on compiler 0.14.1-yarped)
7// yarpidl_thrift version 2.0 - 11/11/2026
8// This is an automatically generated file.
9// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.
10
11#include <yarp/os/Wire.h>
12#include <yarp/os/LogStream.h>
15
16namespace yarp::sig {
17
18int32_t CameraDistortionTypeConverter::fromString(const std::string& input)
19{
20 if (input=="YARP_DISTORTION_NONE") {
21 return static_cast<int32_t>(YARP_DISTORTION_NONE);
22 }
23 if (input=="YARP_PLUMB_BOB") {
24 return static_cast<int32_t>(YARP_PLUMB_BOB);
25 }
26 if (input=="YARP_FISH_EYE") {
27 return static_cast<int32_t>(YARP_FISH_EYE);
28 }
29 if (input=="YARP_UNSUPPORTED") {
30 return static_cast<int32_t>(YARP_UNSUPPORTED);
31 }
32 yError() << "CameraDistortionTypeConverter: invalid fromString() conversion for input:" << input;
33 return -1;
34}
35
37{
38 switch(static_cast<CameraDistortionType>(input)) {
40 return "YARP_DISTORTION_NONE";
41 case YARP_PLUMB_BOB:
42 return "YARP_PLUMB_BOB";
43 case YARP_FISH_EYE:
44 return "YARP_FISH_EYE";
46 return "YARP_UNSUPPORTED";
47 }
48 yError() << "CameraDistortionTypeConverter: invalid toString() conversion for input:" << input;
49 return "";
50}
51
52} // namespace yarp::sig
#define yError(...)
Definition Log.h:361
static int32_t fromString(const std::string &input)
static std::string toString(int32_t input)