GNSS-SDR  0.0.13
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  * Copyright (C) 2010-2020 (see AUTHORS file for a list of contributors)
13  *
14  * GNSS-SDR is a software defined Global Navigation
15  * Satellite Systems receiver
16  *
17  * This file is part of GNSS-SDR.
18  *
19  * SPDX-License-Identifier: GPL-3.0-or-later
20  *
21  * -----------------------------------------------------------------------------
22  */
23 
24 #ifndef GNSS_SDR_CONFIGURATION_INTERFACE_H
25 #define GNSS_SDR_CONFIGURATION_INTERFACE_H
26 
27 #include <cstdint>
28 #include <string>
29 
30 /*!
31  * \brief This abstract class represents an interface to configuration parameters.
32  *
33  * The interface defines an accessor method that gets a parameter name as input
34  * and returns the value of this parameter, a string, as output.
35  * Property names are defined here. This is an abstract class for interfaces.
36  * Since all its methods are virtual,
37  * this class cannot be instantiated directly, and a subclass can only be
38  * instantiated directly if all inherited pure virtual methods have been
39  * implemented by that class or a parent class.
40  */
42 {
43 public:
44  virtual ~ConfigurationInterface() = default;
45  virtual std::string property(std::string property_name, std::string default_value) const = 0;
46  virtual bool property(std::string property_name, bool default_value) const = 0;
47  virtual int64_t property(std::string property_name, int64_t default_value) const = 0;
48  virtual uint64_t property(std::string property_name, uint64_t default_value) const = 0;
49  virtual int32_t property(std::string property_name, int32_t default_value) const = 0;
50  virtual uint32_t property(std::string property_name, uint32_t default_value) const = 0;
51  virtual int16_t property(std::string property_name, int16_t default_value) const = 0;
52  virtual uint16_t property(std::string property_name, uint16_t default_value) const = 0;
53  virtual float property(std::string property_name, float default_value) const = 0;
54  virtual double property(std::string property_name, double default_value) const = 0;
55  virtual void set_property(std::string property_name, std::string value) = 0;
56 };
57 
58 #endif // GNSS_SDR_CONFIGURATION_INTERFACE_H
This abstract class represents an interface to configuration parameters.