MultiConnectorMixin.cti
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
14 /** \file
15  \brief MultiConnectorMixin inline template implementation */
16 
17 #include "MultiConnectorMixin.ih"
18 
19 // Custom includes
20 
21 #define prefix_ inline
22 //-/////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 //-/////////////////////////////////////////////////////////////////////////////////////////////////
25 // senf::ppi::module::detail::MultiConnectorWrapper<Module,Connector>
26 
27 template <class Module, class Connector>
28 prefix_ void senf::ppi::module::detail::MultiConnectorWrapper<Module, Connector>::v_disconnected()
29 {
30  Connector::v_disconnected();
31  static_cast<Module&>(this->module()).disconnected(*this);
32 }
33 
34 //-/////////////////////////////////////////////////////////////////////////////////////////////////
35 // senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>
36 
37 template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
38 prefix_ ContainerType_ &
39 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::connectors()
40 {
41  return connectors_;
42 }
43 
44 template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
45 prefix_ ContainerType_ const &
46 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::
47 connectors()
48  const
49 {
50  return connectors_;
51 }
52 
53 template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
54 prefix_ void
55 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::
56 connectorDestroy(ConnectorType const &)
57 {}
58 
59 //-/////////////////////////////////////////////////////////////////////////////////////////////////
60 // senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>
61 
62 template <class Self_, class ConnectorType_, class ContainerType_>
63 prefix_ ContainerType_ &
64 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::connectors()
65 {
66  return connectors_;
67 }
68 
69 template <class Self_, class ConnectorType_, class ContainerType_>
70 prefix_ ContainerType_ const &
71 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::connectors()
72  const
73 {
74  return connectors_;
75 }
76 
77 template <class Self_, class ConnectorType_, class ContainerType_>
78 prefix_ void
79 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::
80 connectorDestroy(ConnectorType const &)
81 {}
82 
83 //-/////////////////////////////////////////////////////////////////////////////////////////////////
84 // senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,void>
85 
86 template <class Self_, class ConnectorType_>
87 prefix_ void
88 senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,void>::
89 disconnected(ConnectorType_ const & c)
90 {
91  static_cast<Self_*>(this)->connectorDestroy(&c);
92 }
93 
94 //-/////////////////////////////////////////////////////////////////////////////////////////////////
95 
96 #ifndef DOXYGEN
97 
98 // Include 'Implementation' from MultiConnectorMixin.mpp
99 #define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
100  0, \
101  SENF_MULTI_CONNECTOR_MAX_ARGS, \
102  SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \
103  3 ))
104 #include BOOST_PP_ITERATE()
105 
106 #endif
107 
108 //-/////////////////////////////////////////////////////////////////////////////////////////////////
109 #undef prefix_
110 
111 
112 // Local Variables:
113 // mode: c++
114 // fill-column: 100
115 // comment-column: 40
116 // c-file-style: "senf"
117 // indent-tabs-mode: nil
118 // ispell-local-dictionary: "american"
119 // compile-command: "scons -u test"
120 // End: