OpcUaCanOpen
CANopen OPC-UA server
LogSinks.cpp
Go to the documentation of this file.
1
/* © Copyright CERN, 2015. All rights not expressly granted are reserved.
2
* LogSinks.cpp
3
*
4
* Created on: Aug 18, 2015
5
* Author: Benjamin Farnham <benjamin.farnham@cern.ch>
6
*
7
* This file is part of Quasar.
8
*
9
* Quasar is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU Lesser General Public Licence as published by
11
* the Free Software Foundation, either version 3 of the Licence.
12
*
13
* Quasar is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Lesser General Public Licence for more details.
17
*
18
* You should have received a copy of the GNU Lesser General Public License
19
* along with Quasar. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
#include "
LogSinks.h
"
22
23
using
std::vector;
24
25
LogSinks::LogSinks
()
26
{}
27
31
LogSinks::~LogSinks
()
32
{
33
for
(vector<LogSinkInterface*>::iterator it =
m_sinks
.begin(); it!=
m_sinks
.end(); ++it)
34
{
35
delete
*it;
36
}
37
}
38
42
void
LogSinks::addSink
(
LogSinkInterface
* sink)
43
{
44
m_sinks
.push_back(sink);
45
}
46
47
void
LogSinks::logMessage
(
const
std::string
& logMsg)
48
{
49
for
(vector<LogSinkInterface*>::iterator it =
m_sinks
.begin(); it!=
m_sinks
.end(); ++it)
50
{
51
(*it)->logMessage(logMsg);
52
}
53
}
LogIt
src
LogSinks.cpp
Generated on Fri Sep 11 2020 14:30:10 for OpcUaCanOpen by
1.8.14