Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
69956a6a
Commit
69956a6a
authored
15 years ago
by
g0dil
Browse files
Options
Downloads
Patches
Plain Diff
PPI: MultiConnectorMixin documentation fixes
parent
78027db7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
PPI/MultiConnectorMixin.cti
+12
-1
12 additions, 1 deletion
PPI/MultiConnectorMixin.cti
PPI/MultiConnectorMixin.hh
+29
-12
29 additions, 12 deletions
PPI/MultiConnectorMixin.hh
PPI/MultiConnectorMixin.ih
+4
-0
4 additions, 0 deletions
PPI/MultiConnectorMixin.ih
with
45 additions
and
13 deletions
PPI/MultiConnectorMixin.cti
+
12
−
1
View file @
69956a6a
...
@@ -37,6 +37,15 @@ senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerTy
...
@@ -37,6 +37,15 @@ senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerTy
return connectors_;
return connectors_;
}
}
template <class Self_, class ConnectorType_, class KeyType_, class ContainerType_>
prefix_ ContainerType_ const &
senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,KeyType_,ContainerType_>::
connectors()
const
{
return connectors_;
}
template <class Self_, class ConnectorType_, class ContainerType_>
template <class Self_, class ConnectorType_, class ContainerType_>
prefix_ ContainerType_ &
prefix_ ContainerType_ &
senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::connectors()
senf::ppi::module::MultiConnectorMixin<Self_,ConnectorType_,void,ContainerType_>::connectors()
...
@@ -91,7 +100,7 @@ senf::ppi::connect(Source & source, Target & target , A1 const & a1)
...
@@ -91,7 +100,7 @@ senf::ppi::connect(Source & source, Target & target , A1 const & a1)
connect(source, target.newConnector(a1));
connect(source, target.newConnector(a1));
}
}
#e
ndif
#e
lse
// Include 'Implementation' from MultiConnectorMixin.mpp
// Include 'Implementation' from MultiConnectorMixin.mpp
#define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
#define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
...
@@ -101,6 +110,8 @@ senf::ppi::connect(Source & source, Target & target , A1 const & a1)
...
@@ -101,6 +110,8 @@ senf::ppi::connect(Source & source, Target & target , A1 const & a1)
3 ))
3 ))
#include BOOST_PP_ITERATE()
#include BOOST_PP_ITERATE()
#endif
///////////////////////////////cti.e///////////////////////////////////////
///////////////////////////////cti.e///////////////////////////////////////
#undef prefix_
#undef prefix_
...
...
This diff is collapsed.
Click to expand it.
PPI/MultiConnectorMixin.hh
+
29
−
12
View file @
69956a6a
...
@@ -54,20 +54,26 @@ namespace ppi {
...
@@ -54,20 +54,26 @@ namespace ppi {
// output, otherwise the second overload.
// output, otherwise the second overload.
/** \brief Connect MultiConnector source to arbitrary target
/** \brief Connect MultiConnector source to arbitrary target
Additional implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments.
Additional implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments.
\related module::MultiConnectorMixin
\related module::MultiConnectorMixin
*/
*/
template
<
class
Source
,
class
Target
,
class
A1
>
template
<
class
MultiConnectorSource
,
class
Target
,
class
A1
>
Source
::
ConnectorType
&
connect
(
Source
&
source
,
Target
&
target
,
A1
const
&
a1
);
MultiConnectorSource
::
ConnectorType
&
connect
(
MultiConnectorSource
&
source
,
Target
&
target
,
A1
const
&
a1
);
/** \brief Connect arbitrary source to MultiConnector target
/** \brief Connect arbitrary source to MultiConnector target
Additional implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments.
Additional implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments.
\related module::MultiConnectorMixin
\related module::MultiConnectorMixin
*/
*/
template
<
class
Source
,
class
Target
>
template
<
class
Source
,
class
MultiConnectorTarget
,
class
A1
>
Target
::
ConnectorType
&
connect
(
Source
&
source
,
Target
&
target
,
A1
const
&
a1
);
MultiConnectorTarget
::
ConnectorType
&
connect
(
Source
&
source
,
MultiConnectorTarget
&
target
,
A1
const
&
a1
);
#e
ndif
#e
lse
// Include 'senf::ppi::namespace member declarations' from MultiConnectorMixin.mpp
// Include 'senf::ppi::namespace member declarations' from MultiConnectorMixin.mpp
# define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
# define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
...
@@ -77,6 +83,8 @@ namespace ppi {
...
@@ -77,6 +83,8 @@ namespace ppi {
2 ))
2 ))
# include BOOST_PP_ITERATE()
# include BOOST_PP_ITERATE()
#endif
namespace
module
{
namespace
module
{
/** \brief Multi connector management
/** \brief Multi connector management
...
@@ -153,12 +161,12 @@ namespace module {
...
@@ -153,12 +161,12 @@ namespace module {
\par "Example:" senf::ppi::module::AnnotationRouter
\par "Example:" senf::ppi::module::AnnotationRouter
\section senf_ppi_multiconnector_connect Connect and additional
\c
connectorSetup() arguments
\section senf_ppi_multiconnector_connect Connect and additional connectorSetup() arguments
When connecting to a module using the MultiConnectorMixin, every new connect call will
When connecting to a module using the MultiConnectorMixin, every new connect call will
allocate a new connector
allocate a new connector
\code
\code
M
u
Module muModule;
M
y
Module muModule;
senf::ppi::connect(someModule, myModule);
senf::ppi::connect(someModule, myModule);
\endcode
\endcode
...
@@ -176,6 +184,7 @@ namespace module {
...
@@ -176,6 +184,7 @@ namespace module {
{
{
container().insert(container().begin()+index, container().pop_back().release());
container().insert(container().begin()+index, container().pop_back().release());
}
}
\endcode
\par "Advanced note:" These additional arguments are always passed by const-reference. If
\par "Advanced note:" These additional arguments are always passed by const-reference. If
you need to pass a non-const reference, declare the \c connectorSetup() argument as
you need to pass a non-const reference, declare the \c connectorSetup() argument as
...
@@ -191,14 +200,15 @@ namespace module {
...
@@ -191,14 +200,15 @@ namespace module {
:
private
detail
::
MultiConnectorSelectBase
<
ConnectorType_
>::
type
:
private
detail
::
MultiConnectorSelectBase
<
ConnectorType_
>::
type
{
{
public:
public:
typedef
ConnectorType_
ConnectorType
;
typedef
ConnectorType_
ConnectorType
;
///< Type of MultiConnector connector
protected:
protected:
typedef
ContainerType_
ContainerType
;
typedef
ContainerType_
ContainerType
;
///< Type of connector container
ContainerType_
&
connectors
();
ContainerType_
&
connectors
();
///< Get connector container
ContainerType_
const
&
connectors
()
const
;
///< Get connectors container (const)
private:
private:
#ifdef
DOXYGEN
#ifdef
0
// For exposition only
// For exposition only
// Other implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments accordingly
// Other implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments accordingly
...
@@ -218,6 +228,7 @@ namespace module {
...
@@ -218,6 +228,7 @@ namespace module {
Target
&
target
,
Target
&
target
,
A1
const
&
a1
);
A1
const
&
a1
);
#endif
#endif
#ifndef DOXYGEN
// Include 'MultiConnectorMixin member declaration' from MultiConnectorMixin.mpp
// Include 'MultiConnectorMixin member declaration' from MultiConnectorMixin.mpp
# define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
# define BOOST_PP_ITERATION_PARAMS_1 (4, ( \
...
@@ -226,10 +237,14 @@ namespace module {
...
@@ -226,10 +237,14 @@ namespace module {
SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \
SENF_ABSOLUTE_INCLUDE_PATH(PPI/MultiConnectorMixin.mpp), \
1 ))
1 ))
# include BOOST_PP_ITERATE()
# include BOOST_PP_ITERATE()
#endif
ContainerType_
connectors_
;
ContainerType_
connectors_
;
};
};
#ifndef DOXYGEN
template
<
class
Self_
,
template
<
class
Self_
,
class
ConnectorType_
,
class
ConnectorType_
,
class
ContainerType_
>
class
ContainerType_
>
...
@@ -245,7 +260,7 @@ namespace module {
...
@@ -245,7 +260,7 @@ namespace module {
private:
private:
#if
def DOXYGEN
#if
0
// For exposition only
// For exposition only
// Other implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments accordingly
// Other implementations with 0..SENF_MULTI_CONNECTOR_MAX_ARGS arguments accordingly
...
@@ -276,6 +291,8 @@ namespace module {
...
@@ -276,6 +291,8 @@ namespace module {
ContainerType_
connectors_
;
ContainerType_
connectors_
;
};
};
#endif
}}}
}}}
...
...
This diff is collapsed.
Click to expand it.
PPI/MultiConnectorMixin.ih
+
4
−
0
View file @
69956a6a
...
@@ -41,12 +41,16 @@ namespace detail {
...
@@ -41,12 +41,16 @@ namespace detail {
typedef boost::ptr_map<KeyType, ConnectorType> type;
typedef boost::ptr_map<KeyType, ConnectorType> type;
};
};
#ifndef DOXYGEN
template <class ConnectorType>
template <class ConnectorType>
struct MultiConnectorDefaultContainer<void,ConnectorType>
struct MultiConnectorDefaultContainer<void,ConnectorType>
{
{
typedef boost::ptr_vector<ConnectorType> type;
typedef boost::ptr_vector<ConnectorType> type;
};
};
#endif
template <class ConnectorType>
template <class ConnectorType>
struct MultiConnectorSelectBase
struct MultiConnectorSelectBase
: public boost::mpl::if_<
: public boost::mpl::if_<
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment