types.h
Go to the documentation of this file.
1 /****************************************************************************
2  *
3  * fkie_message_filters
4  * Copyright © 2018-2020 Fraunhofer FKIE
5  * Author: Timo Röhling
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  ****************************************************************************/
20 #ifndef INCLUDE_FKIE_MESSAGE_FILTERS_TYPES_H_
21 #define INCLUDE_FKIE_MESSAGE_FILTERS_TYPES_H_
22 
23 #include <boost/signals2/connection.hpp>
24 #include <tuple>
25 #include "helpers/io.h"
26 
27 namespace fkie_message_filters
28 {
29 
31 using Connection = boost::signals2::connection;
32 
48 template<typename... Types>
49 class IO
50 {
51 public:
53  using Tuple = std::tuple<helpers::io_unwrap_t<Types>...>;
55  template<std::size_t N>
56  using Type = typename std::tuple_element<N, std::tuple<helpers::io_unwrap_t<Types>...>>::type;
58  template<std::size_t... Is>
61  template<template<typename...> class Outer>
62  using Rewrap = Outer<helpers::io_unwrap_t<Types>...>;
63 };
64 
65 } // namespace fkie_message_filters
66 
67 #endif /* INCLUDE_FKIE_MESSAGE_FILTERS_TYPES_H_ */
boost::signals2::connection Connection
Tracks connections from sources to sinks.
Definition: types.h:31
Outer< helpers::io_unwrap_t< Types >... > Rewrap
Rewrap the grouped data types in a different wrapper template type.
Definition: types.h:62
Group multiple data types as filter input or output.
Definition: io.h:27
typename std::tuple_element< N, std::tuple< helpers::io_unwrap_t< Types >... > >::type Type
Nth data type of an IO tuple.
Definition: types.h:56
Primary namespace.
Definition: buffer.h:33
std::tuple< helpers::io_unwrap_t< Types >... > Tuple
Tuple of the grouped data types.
Definition: types.h:53


fkie_message_filters
Author(s): Timo Röhling
autogenerated on Sun Sep 12 2021 02:52:12