Debian Codegraph @

src/internal/provider-ready-configuration.cpp

raw symbols SCIP
1 /*
2 * %injeqt copyright begin%
3 * Copyright 2014 Rafał Malinowski ([email protected])
4 * %injeqt copyright end%
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "provider-ready-configuration.h"
22
23 #include "provider-ready.h"
24
25 #include <cassert>
26
27 namespace injeqt { namespace internal {
28
29 provider_ready_configuration::provider_ready_configuration(type object_type, QObject *object) :
30 _object_type{std::move(object_type)},
31 _object{object}
32 {
33 assert(!_object_type.is_empty());
34 }
35
36 provider_ready_configuration::~provider_ready_configuration()
37 {
38 }
39
40 std::vector<type> provider_ready_configuration::types() const
41 {
42 return {_object_type};
43 }
44
45 std::unique_ptr<provider> provider_ready_configuration::create_provider(const types_by_name &) const
46 {
47 auto i = internal::make_implementation(_object_type, _object);
48 return std::unique_ptr<provider>{new provider_ready{i}};
49 }
50
51 }}