Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
ef999854
Commit
ef999854
authored
Mar 14, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop redundant template argument of stream sources
parent
25765733
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
27 additions
and
32 deletions
+27
-32
libcaf_core/caf/fwd.hpp
libcaf_core/caf/fwd.hpp
+2
-2
libcaf_core/caf/make_source_result.hpp
libcaf_core/caf/make_source_result.hpp
+1
-1
libcaf_core/caf/make_stage_result.hpp
libcaf_core/caf/make_stage_result.hpp
+1
-1
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+1
-2
libcaf_core/caf/stream_source.hpp
libcaf_core/caf/stream_source.hpp
+12
-15
libcaf_core/caf/stream_source_driver.hpp
libcaf_core/caf/stream_source_driver.hpp
+1
-1
libcaf_core/caf/stream_stage.hpp
libcaf_core/caf/stream_stage.hpp
+5
-6
libcaf_core/caf/stream_stage_driver.hpp
libcaf_core/caf/stream_stage_driver.hpp
+1
-1
libcaf_core/test/continuous_streaming.cpp
libcaf_core/test/continuous_streaming.cpp
+1
-1
libcaf_core/test/native_streaming_classes.cpp
libcaf_core/test/native_streaming_classes.cpp
+1
-1
libcaf_core/test/selective_streaming.cpp
libcaf_core/test/selective_streaming.cpp
+1
-1
No files found.
libcaf_core/caf/fwd.hpp
View file @
ef999854
...
@@ -35,6 +35,7 @@ template <class> class optional;
...
@@ -35,6 +35,7 @@ template <class> class optional;
template
<
class
>
class
param
;
template
<
class
>
class
param
;
template
<
class
>
class
stream
;
template
<
class
>
class
stream
;
template
<
class
>
class
stream_sink
;
template
<
class
>
class
stream_sink
;
template
<
class
>
class
stream_source
;
template
<
class
>
class
trivial_match_case
;
template
<
class
>
class
trivial_match_case
;
template
<
class
>
class
weak_intrusive_ptr
;
template
<
class
>
class
weak_intrusive_ptr
;
...
@@ -42,14 +43,13 @@ template <class> struct timeout_definition;
...
@@ -42,14 +43,13 @@ template <class> struct timeout_definition;
// -- 2 param templates --------------------------------------------------------
// -- 2 param templates --------------------------------------------------------
template
<
class
,
class
>
class
stream_s
ourc
e
;
template
<
class
,
class
>
class
stream_s
tag
e
;
// -- 3 param templates --------------------------------------------------------
// -- 3 param templates --------------------------------------------------------
template
<
class
,
class
,
int
>
class
actor_cast_access
;
template
<
class
,
class
,
int
>
class
actor_cast_access
;
template
<
class
,
class
,
class
>
class
broadcast_downstream_manager
;
template
<
class
,
class
,
class
>
class
broadcast_downstream_manager
;
template
<
class
,
class
,
class
>
class
stream_stage
;
// -- variadic templates -------------------------------------------------------
// -- variadic templates -------------------------------------------------------
...
...
libcaf_core/caf/make_source_result.hpp
View file @
ef999854
...
@@ -35,7 +35,7 @@ struct make_source_result {
...
@@ -35,7 +35,7 @@ struct make_source_result {
using
output_type
=
typename
DownstreamManager
::
output_type
;
using
output_type
=
typename
DownstreamManager
::
output_type
;
/// Fully typed stream manager as returned by `make_source`.
/// Fully typed stream manager as returned by `make_source`.
using
source_type
=
stream_source
<
output_type
,
DownstreamManager
>
;
using
source_type
=
stream_source
<
DownstreamManager
>
;
/// Pointer to a fully typed stream manager.
/// Pointer to a fully typed stream manager.
using
source_ptr_type
=
intrusive_ptr
<
source_type
>
;
using
source_ptr_type
=
intrusive_ptr
<
source_type
>
;
...
...
libcaf_core/caf/make_stage_result.hpp
View file @
ef999854
...
@@ -37,7 +37,7 @@ public:
...
@@ -37,7 +37,7 @@ public:
using
output_type
=
typename
DownstreamManager
::
output_type
;
using
output_type
=
typename
DownstreamManager
::
output_type
;
/// Fully typed stream manager as returned by `make_stage`.
/// Fully typed stream manager as returned by `make_stage`.
using
stage_type
=
stream_stage
<
In
,
output_type
,
DownstreamManager
>
;
using
stage_type
=
stream_stage
<
In
,
DownstreamManager
>
;
/// Pointer to a fully typed stream manager.
/// Pointer to a fully typed stream manager.
using
stage_ptr_type
=
intrusive_ptr
<
stage_type
>
;
using
stage_ptr_type
=
intrusive_ptr
<
stage_type
>
;
...
...
libcaf_core/caf/scheduled_actor.hpp
View file @
ef999854
...
@@ -593,8 +593,7 @@ public:
...
@@ -593,8 +593,7 @@ public:
template
<
class
Init
,
class
Fun
,
class
Cleanup
,
template
<
class
Init
,
class
Fun
,
class
Cleanup
,
class
DownstreamManager
=
default_downstream_manager_t
<
Fun
>,
class
DownstreamManager
=
default_downstream_manager_t
<
Fun
>,
class
Trait
=
stream_stage_trait_t
<
Fun
>>
class
Trait
=
stream_stage_trait_t
<
Fun
>>
stream_stage_ptr
<
typename
Trait
::
input
,
typename
Trait
::
output
,
stream_stage_ptr
<
typename
Trait
::
input
,
DownstreamManager
>
DownstreamManager
>
make_continuous_stage
(
Init
init
,
Fun
fun
,
Cleanup
cleanup
,
make_continuous_stage
(
Init
init
,
Fun
fun
,
Cleanup
cleanup
,
policy
::
arg
<
DownstreamManager
>
token
=
{})
{
policy
::
arg
<
DownstreamManager
>
token
=
{})
{
CAF_IGNORE_UNUSED
(
token
);
CAF_IGNORE_UNUSED
(
token
);
...
...
libcaf_core/caf/stream_source.hpp
View file @
ef999854
...
@@ -30,12 +30,12 @@
...
@@ -30,12 +30,12 @@
namespace
caf
{
namespace
caf
{
template
<
class
Out
,
class
DownstreamManager
>
template
<
class
DownstreamManager
>
class
stream_source
:
public
virtual
stream_manager
{
class
stream_source
:
public
virtual
stream_manager
{
public:
public:
// -- member types -----------------------------------------------------------
// -- member types -----------------------------------------------------------
using
output_type
=
Out
;
using
output_type
=
typename
DownstreamManager
::
output_type
;
// -- constructors, destructors, and assignment operators --------------------
// -- constructors, destructors, and assignment operators --------------------
...
@@ -48,36 +48,37 @@ public:
...
@@ -48,36 +48,37 @@ public:
}
}
/// Creates a new output path to the current sender.
/// Creates a new output path to the current sender.
output_stream
<
Out
,
std
::
tuple
<>
,
intrusive_ptr
<
stream_source
>>
output_stream
<
output_type
,
std
::
tuple
<>
,
intrusive_ptr
<
stream_source
>>
add_outbound_path
()
{
add_outbound_path
()
{
CAF_LOG_TRACE
(
""
);
CAF_LOG_TRACE
(
""
);
return
this
->
add_unchecked_outbound_path
<
Out
>
().
rebind
(
this
);
return
this
->
add_unchecked_outbound_path
<
output_type
>
().
rebind
(
this
);
}
}
/// Creates a new output path to the current sender with custom handshake.
/// Creates a new output path to the current sender with custom handshake.
template
<
class
...
Ts
>
template
<
class
...
Ts
>
output_stream
<
Out
,
std
::
tuple
<
detail
::
strip_and_convert_t
<
Ts
>
...
>
,
output_stream
<
output_type
,
std
::
tuple
<
detail
::
strip_and_convert_t
<
Ts
>
...
>
,
intrusive_ptr
<
stream_source
>>
intrusive_ptr
<
stream_source
>>
add_outbound_path
(
std
::
tuple
<
Ts
...
>
xs
)
{
add_outbound_path
(
std
::
tuple
<
Ts
...
>
xs
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
xs
));
CAF_LOG_TRACE
(
CAF_ARG
(
xs
));
return
this
->
add_unchecked_outbound_path
<
Out
>
(
std
::
move
(
xs
)).
rebind
(
this
);
return
this
->
add_unchecked_outbound_path
<
output_type
>
(
std
::
move
(
xs
))
.
rebind
(
this
);
}
}
/// Creates a new output path to the current sender.
/// Creates a new output path to the current sender.
template
<
class
Handle
>
template
<
class
Handle
>
output_stream
<
Out
,
std
::
tuple
<>
,
intrusive_ptr
<
stream_source
>>
output_stream
<
output_type
,
std
::
tuple
<>
,
intrusive_ptr
<
stream_source
>>
add_outbound_path
(
const
Handle
&
next
)
{
add_outbound_path
(
const
Handle
&
next
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
next
));
CAF_LOG_TRACE
(
CAF_ARG
(
next
));
return
this
->
add_unchecked_outbound_path
<
Out
>
(
next
).
rebind
(
this
);
return
this
->
add_unchecked_outbound_path
<
output_type
>
(
next
).
rebind
(
this
);
}
}
/// Creates a new output path to the current sender with custom handshake.
/// Creates a new output path to the current sender with custom handshake.
template
<
class
Handle
,
class
...
Ts
>
template
<
class
Handle
,
class
...
Ts
>
output_stream
<
Out
,
std
::
tuple
<
detail
::
strip_and_convert_t
<
Ts
>
...
>
,
output_stream
<
output_type
,
std
::
tuple
<
detail
::
strip_and_convert_t
<
Ts
>
...
>
,
intrusive_ptr
<
stream_source
>>
intrusive_ptr
<
stream_source
>>
add_outbound_path
(
const
Handle
&
next
,
std
::
tuple
<
Ts
...
>
xs
)
{
add_outbound_path
(
const
Handle
&
next
,
std
::
tuple
<
Ts
...
>
xs
)
{
CAF_LOG_TRACE
(
CAF_ARG
(
next
)
<<
CAF_ARG
(
xs
));
CAF_LOG_TRACE
(
CAF_ARG
(
next
)
<<
CAF_ARG
(
xs
));
return
this
->
add_unchecked_outbound_path
<
Out
>
(
next
,
std
::
move
(
xs
))
return
this
->
add_unchecked_outbound_path
<
output_type
>
(
next
,
std
::
move
(
xs
))
.
rebind
(
this
);
.
rebind
(
this
);
}
}
...
@@ -85,12 +86,8 @@ protected:
...
@@ -85,12 +86,8 @@ protected:
DownstreamManager
out_
;
DownstreamManager
out_
;
};
};
template
<
class
Out
,
class
DownstreamManager
>
using
stream_source_ptr
=
intrusive_ptr
<
stream_source
<
Out
,
DownstreamManager
>>
;
template
<
class
DownstreamManager
>
template
<
class
DownstreamManager
>
using
stream_source_ptr_t
=
using
stream_source_ptr
=
intrusive_ptr
<
stream_source
<
DownstreamManager
>>
;
stream_source_ptr
<
typename
DownstreamManager
::
output_type
,
DownstreamManager
>
;
}
// namespace caf
}
// namespace caf
...
...
libcaf_core/caf/stream_source_driver.hpp
View file @
ef999854
...
@@ -43,7 +43,7 @@ public:
...
@@ -43,7 +43,7 @@ public:
using
stream_type
=
stream
<
output_type
>
;
using
stream_type
=
stream
<
output_type
>
;
/// Implemented `stream_source` interface.
/// Implemented `stream_source` interface.
using
source_type
=
stream_source
<
output_type
,
downstream_manager_type
>
;
using
source_type
=
stream_source
<
downstream_manager_type
>
;
/// Smart pointer to the interface type.
/// Smart pointer to the interface type.
using
source_ptr_type
=
intrusive_ptr
<
source_type
>
;
using
source_ptr_type
=
intrusive_ptr
<
source_type
>
;
...
...
libcaf_core/caf/stream_stage.hpp
View file @
ef999854
...
@@ -28,13 +28,13 @@
...
@@ -28,13 +28,13 @@
namespace
caf
{
namespace
caf
{
template
<
class
In
,
class
Out
,
class
DownstreamManager
>
template
<
class
In
,
class
DownstreamManager
>
class
stream_stage
:
public
stream_source
<
Out
,
DownstreamManager
>
,
class
stream_stage
:
public
stream_source
<
DownstreamManager
>
,
public
stream_sink
<
In
>
{
public
stream_sink
<
In
>
{
public:
public:
// -- member types -----------------------------------------------------------
// -- member types -----------------------------------------------------------
using
left_super
=
stream_source
<
Out
,
DownstreamManager
>
;
using
left_super
=
stream_source
<
DownstreamManager
>
;
using
right_super
=
stream_sink
<
In
>
;
using
right_super
=
stream_sink
<
In
>
;
...
@@ -52,9 +52,8 @@ public:
...
@@ -52,9 +52,8 @@ public:
}
}
};
};
template
<
class
In
,
class
Out
,
class
DownstreamManager
>
template
<
class
In
,
class
DownstreamManager
>
using
stream_stage_ptr
=
using
stream_stage_ptr
=
intrusive_ptr
<
stream_stage
<
In
,
DownstreamManager
>>
;
intrusive_ptr
<
stream_stage
<
In
,
Out
,
DownstreamManager
>>
;
}
// namespace caf
}
// namespace caf
...
...
libcaf_core/caf/stream_stage_driver.hpp
View file @
ef999854
...
@@ -47,7 +47,7 @@ public:
...
@@ -47,7 +47,7 @@ public:
using
stream_type
=
stream
<
output_type
>
;
using
stream_type
=
stream
<
output_type
>
;
/// Implemented `stream_stage` interface.
/// Implemented `stream_stage` interface.
using
stage_type
=
stream_stage
<
input_type
,
output_type
,
DownstreamManager
>
;
using
stage_type
=
stream_stage
<
input_type
,
DownstreamManager
>
;
/// Smart pointer to the interface type.
/// Smart pointer to the interface type.
using
stage_ptr_type
=
intrusive_ptr
<
stage_type
>
;
using
stage_ptr_type
=
intrusive_ptr
<
stage_type
>
;
...
...
libcaf_core/test/continuous_streaming.cpp
View file @
ef999854
...
@@ -104,7 +104,7 @@ TESTEE(sum_up) {
...
@@ -104,7 +104,7 @@ TESTEE(sum_up) {
}
}
TESTEE_STATE
(
stream_multiplexer
)
{
TESTEE_STATE
(
stream_multiplexer
)
{
stream_stage_ptr
<
int
,
int
,
broadcast_downstream_manager
<
int
>>
stage
;
stream_stage_ptr
<
int
,
broadcast_downstream_manager
<
int
>>
stage
;
};
};
TESTEE
(
stream_multiplexer
)
{
TESTEE
(
stream_multiplexer
)
{
...
...
libcaf_core/test/native_streaming_classes.cpp
View file @
ef999854
...
@@ -385,7 +385,7 @@ public:
...
@@ -385,7 +385,7 @@ public:
mboxqueue
mbox
;
mboxqueue
mbox
;
const
char
*
name_
;
const
char
*
name_
;
vector
<
int
>
data
;
// Keeps track of all received data from all batches.
vector
<
int
>
data
;
// Keeps track of all received data from all batches.
stream_stage_ptr
<
int
,
int
,
broadcast_downstream_manager
<
int
>>
forwarder
;
stream_stage_ptr
<
int
,
broadcast_downstream_manager
<
int
>>
forwarder
;
tick_type
ticks_per_force_batches_interval
;
tick_type
ticks_per_force_batches_interval
;
tick_type
ticks_per_credit_interval
;
tick_type
ticks_per_credit_interval
;
...
...
libcaf_core/test/selective_streaming.cpp
View file @
ef999854
...
@@ -113,7 +113,7 @@ TESTEE(log_producer) {
...
@@ -113,7 +113,7 @@ TESTEE(log_producer) {
}
}
TESTEE_STATE
(
log_dispatcher
)
{
TESTEE_STATE
(
log_dispatcher
)
{
stream_stage_ptr
<
value_type
,
value_type
,
downstream_manager
>
stage
;
stream_stage_ptr
<
value_type
,
downstream_manager
>
stage
;
};
};
TESTEE
(
log_dispatcher
)
{
TESTEE
(
log_dispatcher
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment