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
e4558866
Commit
e4558866
authored
Jun 17, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move typed brokers to experimental namespace
Relates #309.
parent
ac7dc7c8
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
5 deletions
+16
-5
libcaf_core/caf/typed_actor.hpp
libcaf_core/caf/typed_actor.hpp
+4
-2
libcaf_io/caf/io/all.hpp
libcaf_io/caf/io/all.hpp
+0
-1
libcaf_io/caf/io/experimental/typed_broker.hpp
libcaf_io/caf/io/experimental/typed_broker.hpp
+2
-0
libcaf_io/caf/io/spawn_io.hpp
libcaf_io/caf/io/spawn_io.hpp
+6
-1
libcaf_io/test/typed_broker.cpp
libcaf_io/test/typed_broker.cpp
+4
-1
No files found.
libcaf_core/caf/typed_actor.hpp
View file @
e4558866
...
...
@@ -40,10 +40,12 @@ template <class... Sigs>
class
typed_event_based_actor
;
namespace
io
{
namespace
experimental
{
template
<
class
...
Sigs
>
class
typed_broker
;
}
// namespace experimental
}
// namespace io
/// Identifies a strongly typed actor.
...
...
@@ -83,10 +85,10 @@ public:
using
base
=
typed_event_based_actor
<
Sigs
...
>
;
/// Identifies pointers to brokers implementing this interface.
using
broker_pointer
=
io
::
typed_broker
<
Sigs
...
>*
;
using
broker_pointer
=
io
::
experimental
::
typed_broker
<
Sigs
...
>*
;
/// Identifies the base class of brokers implementing this interface.
using
broker_base
=
io
::
typed_broker
<
Sigs
...
>
;
using
broker_base
=
io
::
experimental
::
typed_broker
<
Sigs
...
>
;
typed_actor
()
=
default
;
typed_actor
(
typed_actor
&&
)
=
default
;
...
...
libcaf_io/caf/io/all.hpp
View file @
e4558866
...
...
@@ -21,7 +21,6 @@
#define CAF_IO_ALL_HPP
#include "caf/io/broker.hpp"
#include "caf/io/typed_broker.hpp"
#include "caf/io/publish.hpp"
#include "caf/io/spawn_io.hpp"
#include "caf/io/middleman.hpp"
...
...
libcaf_io/caf/io/typed_broker.hpp
→
libcaf_io/caf/io/
experimental/
typed_broker.hpp
View file @
e4558866
...
...
@@ -44,6 +44,7 @@
namespace
caf
{
namespace
io
{
namespace
experimental
{
template
<
class
...
Sigs
>
class
typed_broker
;
...
...
@@ -207,6 +208,7 @@ protected:
}
};
}
// namespace experimental
}
// namespace io
}
// namespace caf
...
...
libcaf_io/caf/io/spawn_io.hpp
View file @
e4558866
...
...
@@ -27,9 +27,9 @@
#include "caf/mailbox_element.hpp"
#include "caf/io/middleman.hpp"
#include "caf/io/typed_broker.hpp"
#include "caf/io/abstract_broker.hpp"
#include "caf/io/connection_handle.hpp"
#include "caf/io/experimental/typed_broker.hpp"
#include "caf/io/network/native_socket.hpp"
...
...
@@ -94,6 +94,8 @@ actor spawn_io_server(F fun, uint16_t port, Ts&&... xs) {
std
::
forward
<
Ts
>
(
xs
)...);
}
namespace
experimental
{
/// Spawns a new functor-based typed-broker.
template
<
spawn_options
Os
=
no_spawn_options
,
class
F
,
class
...
Ts
>
typename
infer_typed_actor_handle
<
...
...
@@ -150,6 +152,9 @@ spawn_io_server_typed(F fun, uint16_t port, Ts&&... xs) {
std
::
forward
<
Ts
>
(
xs
)...);
}
}
// namespace experimental
}
// namespace io
}
// namespace caf
...
...
libcaf_io/test/typed_broker.cpp
View file @
e4558866
...
...
@@ -26,6 +26,8 @@
#include "caf/all.hpp"
#include "caf/io/all.hpp"
#include "caf/io/experimental/typed_broker.hpp"
#include "caf/string_algorithms.hpp"
#include "caf/detail/run_program.hpp"
...
...
@@ -33,6 +35,7 @@
using
namespace
std
;
using
namespace
caf
;
using
namespace
caf
::
io
;
using
namespace
caf
::
io
::
experimental
;
namespace
{
...
...
@@ -176,7 +179,7 @@ acceptor::behavior_type acceptor_fun(acceptor::broker_pointer self,
void
run_server
(
bool
spawn_client
,
const
char
*
bin_path
)
{
scoped_actor
self
;
auto
serv
=
io
::
spawn_io_typed
(
acceptor_fun
,
spawn
(
pong
));
auto
serv
=
spawn_io_typed
(
acceptor_fun
,
spawn
(
pong
));
self
->
sync_send
(
serv
,
publish_atom
::
value
).
await
(
[
&
](
uint16_t
port
)
{
CAF_MESSAGE
(
"server is running on port "
<<
port
);
...
...
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