#ifndef INavlib_HPP_INCLUDED
#define INavlib_HPP_INCLUDED
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (c) 2018-2021 3Dconnexion.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see .
*/
/**
* @file INavlib.hpp
* @brief Interface to access the navigation library.
*/
#include
namespace TDx {
namespace SpaceMouse {
namespace Navigation3D {
///
/// The interface to access the navigation library properties.
///
class INavlibProperty {
public:
///
/// Writes the value of a property to the navlib.
///
/// The name of the navlib property to
/// write.
/// The to write.
/// 0 =no error, otherwise a value from .
/// No connection to the navlib / 3D Mouse.
virtual long Write(const std::string &propertyName, const navlib::value &value) = 0;
///
/// Reads the value of a navlib property.
///
/// The name of the navlib property to
/// read.
/// The to read.
/// 0 =no error, otherwise a value from .
/// No connection to the navlib / 3D Mouse.
virtual long Read(const std::string &propertyName, navlib::value &value) const = 0;
///
/// Reads the value of a navlib string property.
///
/// The name of the navlib property to
/// read.
/// The value of the property.
/// 0 =no error, otherwise a value from .
/// No connection to the navlib.
virtual long Read(const std::string &propertyName, std::string &string) const = 0;
};
///
/// The interface to access the navigation library.
///
class INavlib : public INavlibProperty {
public:
///
/// Close the connection to the 3D navigation library.
///
virtual void Close() = 0;
///
/// Opens a connection to the 3D navigation library.
///
virtual void Open() = 0;
///
/// Opens a connection to the 3D navigation library
///
/// The name of the 3Dconnexion profile to use.
/// The connection to the library is already open.
/// Cannot create a connection to the library.
/// The name of the profile is empty.
virtual void Open(std::string profileName) = 0;
};
} // namespace Navigation3D
} // namespace SpaceMouse
} // namespace TDx
#endif // INavlib_HPP_INCLUDED