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
6c50824f
Commit
6c50824f
authored
Dec 07, 2017
by
Dominik Charousset
Committed by
Dominik Charousset
Feb 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move stream impl classes to detail namespace
parent
3b70a5bd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
21 deletions
+27
-21
libcaf_core/caf/detail/stream_sink_impl.hpp
libcaf_core/caf/detail/stream_sink_impl.hpp
+7
-5
libcaf_core/caf/detail/stream_source_impl.hpp
libcaf_core/caf/detail/stream_source_impl.hpp
+5
-3
libcaf_core/caf/detail/stream_stage_impl.hpp
libcaf_core/caf/detail/stream_stage_impl.hpp
+6
-4
libcaf_core/test/streaming_classes.cpp
libcaf_core/test/streaming_classes.cpp
+9
-9
No files found.
libcaf_core/caf/stream_sink_impl.hpp
→
libcaf_core/caf/
detail/
stream_sink_impl.hpp
View file @
6c50824f
...
...
@@ -16,8 +16,8 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_STREAM_SINK_IMPL_HPP
#define CAF_STREAM_SINK_IMPL_HPP
#ifndef CAF_
DETAIL_
STREAM_SINK_IMPL_HPP
#define CAF_
DETAIL_
STREAM_SINK_IMPL_HPP
#include "caf/config.hpp"
#include "caf/logger.hpp"
...
...
@@ -31,6 +31,7 @@
#include "caf/policy/arg.hpp"
namespace
caf
{
namespace
detail
{
template
<
class
Fun
,
class
Finalize
>
class
stream_sink_impl
:
public
stream_manager
{
...
...
@@ -105,7 +106,7 @@ private:
};
template
<
class
Init
,
class
Fun
,
class
Finalize
>
stream_manager_ptr
make_
receiving_manager
(
local_actor
*
self
,
Init
init
,
Fun
f
,
stream_manager_ptr
make_
stream_sink
(
local_actor
*
self
,
Init
init
,
Fun
f
,
Finalize
fin
)
{
using
impl
=
stream_sink_impl
<
Fun
,
Finalize
>
;
auto
ptr
=
make_counted
<
impl
>
(
self
,
std
::
move
(
f
),
std
::
move
(
fin
));
...
...
@@ -113,6 +114,7 @@ stream_manager_ptr make_receiving_manager(local_actor* self, Init init, Fun f,
return
ptr
;
}
}
// namespace detail
}
// namespace caf
#endif // CAF_STREAM_SINK_IMPL_HPP
#endif // CAF_
DETAIL_
STREAM_SINK_IMPL_HPP
libcaf_core/caf/stream_source_impl.hpp
→
libcaf_core/caf/
detail/
stream_source_impl.hpp
View file @
6c50824f
...
...
@@ -16,8 +16,8 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_STREAM_SOURCE_IMPL_HPP
#define CAF_STREAM_SOURCE_IMPL_HPP
#ifndef CAF_
DETAIL_
STREAM_SOURCE_IMPL_HPP
#define CAF_
DETAIL_
STREAM_SOURCE_IMPL_HPP
#include "caf/downstream.hpp"
#include "caf/logger.hpp"
...
...
@@ -29,6 +29,7 @@
#include "caf/policy/arg.hpp"
namespace
caf
{
namespace
detail
{
template
<
class
Fun
,
class
Predicate
,
class
DownstreamPolicy
>
class
stream_source_impl
:
public
stream_manager
{
...
...
@@ -96,6 +97,7 @@ stream_manager_ptr make_stream_source(local_actor* self, Init init, Fun f,
return
ptr
;
}
}
// namespace detail
}
// namespace caf
#endif // CAF_STREAM_SOURCE_IMPL_HPP
#endif // CAF_
DETAIL_
STREAM_SOURCE_IMPL_HPP
libcaf_core/caf/stream_stage_impl.hpp
→
libcaf_core/caf/
detail/
stream_stage_impl.hpp
View file @
6c50824f
...
...
@@ -16,8 +16,8 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_STREAM_STAGE_IMPL_HPP
#define CAF_STREAM_STAGE_IMPL_HPP
#ifndef CAF_
DETAIL_
STREAM_STAGE_IMPL_HPP
#define CAF_
DETAIL_
STREAM_STAGE_IMPL_HPP
#include "caf/downstream.hpp"
#include "caf/logger.hpp"
...
...
@@ -30,6 +30,7 @@
#include "caf/policy/arg.hpp"
namespace
caf
{
namespace
detail
{
template
<
class
Fun
,
class
Cleanup
,
class
DownstreamPolicy
>
class
stream_stage_impl
:
public
stream_manager
{
...
...
@@ -89,7 +90,7 @@ public:
return
sec
::
unexpected_message
;
}
message
make_output_token
(
const
stream_id
&
x
)
const
override
{
message
make_output_token
(
const
stream_id
&
)
const
override
{
// TODO: return make_message(stream<output_type>{x});
return
make_message
();
}
...
...
@@ -115,6 +116,7 @@ stream_manager_ptr make_stream_stage(local_actor* self, Init init, Fun f,
return
ptr
;
}
}
// namespace detail
}
// namespace caf
#endif // CAF_STREAM_STAGE_IMPL_HPP
#endif // CAF_
DETAIL_
STREAM_STAGE_IMPL_HPP
libcaf_core/test/streaming_classes.cpp
View file @
6c50824f
...
...
@@ -45,10 +45,7 @@
#include "caf/send.hpp"
#include "caf/stream_manager.hpp"
#include "caf/stream_scatterer.hpp"
#include "caf/stream_sink_impl.hpp"
#include "caf/stream_slot.hpp"
#include "caf/stream_source_impl.hpp"
#include "caf/stream_stage_impl.hpp"
#include "caf/system_messages.hpp"
#include "caf/upstream_msg.hpp"
#include "caf/variant.hpp"
...
...
@@ -66,6 +63,9 @@
#include "caf/intrusive/wdrr_fixed_multiplexed_queue.hpp"
#include "caf/detail/overload.hpp"
#include "caf/detail/stream_sink_impl.hpp"
#include "caf/detail/stream_source_impl.hpp"
#include "caf/detail/stream_stage_impl.hpp"
using
std
::
vector
;
...
...
@@ -300,8 +300,8 @@ public:
auto
fin
=
[
=
](
const
int
&
x
)
{
return
x
==
num_messages
;
};
auto
ptr
=
make_stream_source
(
this
,
init
,
f
,
fin
,
policy
::
arg
<
broadcast_scatterer
<
int
>>::
value
);
policy
::
arg
<
broadcast_scatterer
<
int
>>
token
;
auto
ptr
=
detail
::
make_stream_source
(
this
,
init
,
f
,
fin
,
token
);
ptr
->
generate_messages
();
pending_managers_
.
emplace
(
slot
,
std
::
move
(
ptr
));
}
...
...
@@ -324,8 +324,8 @@ public:
auto
cleanup
=
[](
log_ptr
&
)
{
// nop
};
forwarder
=
make_stream_stage
(
this
,
init
,
f
,
cleanup
,
policy
::
arg
<
broadcast_scatterer
<
int
>>::
value
);
policy
::
arg
<
broadcast_scatterer
<
int
>>
token
;
forwarder
=
detail
::
make_stream_stage
(
this
,
init
,
f
,
cleanup
,
token
);
pending_managers_
.
emplace
(
slot
,
forwarder
);
}
...
...
@@ -349,7 +349,7 @@ public:
auto
fin
=
[](
log_ptr
&
)
{
// nop
};
mgr
=
make_receiving_manager
(
this
,
std
::
move
(
init
),
std
::
move
(
f
),
mgr
=
detail
::
make_stream_sink
(
this
,
std
::
move
(
init
),
std
::
move
(
f
),
std
::
move
(
fin
));
}
// mgr->out().add_path(id, hs.prev_stage);
...
...
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