GNSS-SDR  0.0.19
An Open Source GNSS Software Defined Receiver
configuration_interface.h
Go to the documentation of this file.
1 /*!
2  * \file configuration_interface.h
3  * \brief This class represents an interface to configuration parameters.
4  * \author Carlos Aviles, 2010. carlos.avilesr(at)googlemail.com
5  *
6  * The interface defines an accessor method that gets a parameter name as input
7  * and returns the value of this parameter, a string, as output.
8  * Property names are defined here. This is an abstract class for interfaces.
9  *
10  * -----------------------------------------------------------------------------
11  *
12  * GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
13  * This file is part of GNSS-SDR.
14  *
15  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
16  * SPDX-License-Identifier: GPL-3.0-or-later
17  *
18  * -----------------------------------------------------------------------------
19  */
20 
21 #ifndef GNSS_SDR_CONFIGURATION_INTERFACE_H
22 #define GNSS_SDR_CONFIGURATION_INTERFACE_H
23 
24 #include <cstdint>
25 #include <string>
26 
27 /** \addtogroup Core
28  * \{ */
29 /** \addtogroup GNSS_Block_Interfaces
30  * \{ */
31 
32 
33 /*!
34  * \brief This abstract class represents an interface to configuration parameters.
35  *
36  * The interface defines an accessor method that gets a parameter name as input
37  * and returns the value of this parameter, a string, as output.
38  * Property names are defined here. This is an abstract class for interfaces.
39  * Since all its methods are virtual,
40  * this class cannot be instantiated directly, and a subclass can only be
41  * instantiated directly if all inherited pure virtual methods have been
42  * implemented by that class or a parent class.
43  */
45 {
46 public:
47  virtual ~ConfigurationInterface() = default;
48  virtual std::string property(std::string property_name, std::string default_value) const = 0;
49  virtual bool property(std::string property_name, bool default_value) const = 0;
50  virtual int64_t property(std::string property_name, int64_t default_value) const = 0;
51  virtual uint64_t property(std::string property_name, uint64_t default_value) const = 0;
52  virtual int32_t property(std::string property_name, int32_t default_value) const = 0;
53  virtual uint32_t property(std::string property_name, uint32_t default_value) const = 0;
54  virtual int16_t property(std::string property_name, int16_t default_value) const = 0;
55  virtual uint16_t property(std::string property_name, uint16_t default_value) const = 0;
56  virtual float property(std::string property_name, float default_value) const = 0;
57  virtual double property(std::string property_name, double default_value) const = 0;
58  virtual void set_property(std::string property_name, std::string value) = 0;
59 };
60 
61 
62 /** \} */
63 /** \} */
64 #endif // GNSS_SDR_CONFIGURATION_INTERFACE_H
This abstract class represents an interface to configuration parameters.