The MAUVE Toolchain
AbstractInterface.hpp
1 /*
2  * Copyright 2017 ONERA
3  *
4  * This file is part of the MAUVE Runtime project.
5  *
6  * MAUVE Runtime is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License version 3 as
8  * published by the Free Software Foundation.
9  *
10  * MAUVE Runtime is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with MAUVE. If not, see <https://www.gnu.org/licenses/lgpl-3.0>.
17  */
18 #ifndef MAUVE_RUNTIME_ABSTRACT_INTERFACE_HPP
19 #define MAUVE_RUNTIME_ABSTRACT_INTERFACE_HPP
20 
21 #include "Configurable.hpp"
22 #include "HasProperty.hpp"
23 #include <string>
24 
25 namespace mauve {
26  namespace runtime {
27 
28  class AbstractResource;
29 
30  class Service;
31 
36  : virtual Configurable
37  , public HasProperty
38  {
39  public:
41  std::string type_name() const;
42 
44  virtual const std::vector<Service*> get_services() const = 0;
45 
46  virtual std::size_t get_services_size() const = 0;
47 
49  virtual Service* get_service(std::string const & name) const = 0;
50 
51  virtual Service* get_service(int index) const = 0;
52 
53  virtual int get_service_index(const Service* service) const = 0;
54  };
55  }
56 }
57 
58 #endif
virtual const std::vector< Service * > get_services() const =0
Get the set of services owned by the interface.
std::string type_name() const
Get interface type name.
Abstract Interface class.
Definition: AbstractInterface.hpp:35
Definition: HasProperty.hpp:53
The MAUVE namespace.
Definition: tracing.hpp:24
Configurable trait.
Definition: Configurable.hpp:25
A Service.
Definition: Service.hpp:30
virtual Service * get_service(std::string const &name) const =0
Get a service by name.