Page MenuHomePhorge

MessageHandler.cpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

MessageHandler.cpp

//===-- core/MessageHandler.cpp ---------------------------------*- C++ -*-===//
//
// The RoSA Framework
//
// Distributed under the terms and conditions of the Boost Software License 1.0.
// See accompanying file LICENSE.
//
// If you did not receive a copy of the license file, see
// http://www.boost.org/LICENSE_1_0.txt.
//
//===----------------------------------------------------------------------===//
///
/// \file core/MessageHandler.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2017
///
/// \brief Implementation of rosa/core/MessageHandler.hpp.
///
//===----------------------------------------------------------------------===//
#include "rosa/core/MessageHandler.hpp"
#include <algorithm>
namespace rosa {
MessageHandler::~MessageHandler(void) {
LOG_TRACE("Destroying MessageHandler");
}
bool MessageHandler::canHandle(const Message &Msg) const noexcept {
return std::any_of(Invokers.begin(), Invokers.end(),
[&Msg](const invoker_t &I) { return I->match(Msg); });
}
bool MessageHandler::operator()(const Message &Msg) const noexcept {
return std::any_of(Invokers.begin(), Invokers.end(),
[&Msg](const invoker_t &I) {
return (*I)(Msg) == Invoker::result_t::Invoked;
});
}
} // End namespace rosa

File Metadata

Mime Type
text/x-c++
Expires
Sun, Jun 8, 8:28 PM (23 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
150521
Default Alt Text
MessageHandler.cpp (1 KB)

Event Timeline