orwell
0.0.0
ReferenceController.hxx
1
/*
2
Copyright (c) Tobias Löw
3
Written by Tobias Löw <https://tobiloew.ch>
4
5
This file is part of orwell.
6
7
gafro is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License version 3 as
9
published by the Free Software Foundation.
10
11
gafro 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
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with gafro. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#pragma once
21
22
#include <orwell/ReferenceController.hpp>
23
24
namespace
orwell
25
{
26
27
template
<
class
Reference,
class
DerivedController>
28
ReferenceController<Reference, DerivedController>::ReferenceController
(
const
sackmesser::Interface::Ptr &interface,
const
std::string &name)
29
: DerivedController(interface, name)
30
{}
31
32
template
<
class
Reference,
class
DerivedController>
33
ReferenceController<Reference, DerivedController>::~ReferenceController
() =
default
;
34
35
template
<
class
Reference,
class
DerivedController>
36
void
ReferenceController<Reference, DerivedController>::setReference
(
const
Reference &reference)
37
{
38
reference_ = reference;
39
}
40
41
template
<
class
Reference,
class
DerivedController>
42
const
Reference &
ReferenceController<Reference, DerivedController>::getReference
()
const
43
{
44
return
reference_;
45
}
46
47
}
// namespace orwell
orwell::ReferenceController
base implementation of a Controller tracking a given Reference
Definition
ReferenceController.hpp:36
orwell::ReferenceController::getReference
const Reference & getReference() const
provide access to the Reference to derived classes
Definition
ReferenceController.hxx:42
orwell::ReferenceController::setReference
void setReference(const Reference &reference)
set Reference
Definition
ReferenceController.hxx:36
orwell::ReferenceController::ReferenceController
ReferenceController(const sackmesser::Interface::Ptr &interface, const std::string &name)
Definition
ReferenceController.hxx:28
src
orwell
ReferenceController.hxx
Generated by
1.11.0