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
1aeaaf81
Commit
1aeaaf81
authored
Aug 27, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move stateful actor to namespace `caf`
parent
9ecec36b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
21 additions
and
32 deletions
+21
-32
libcaf_core/caf/all.hpp
libcaf_core/caf/all.hpp
+1
-0
libcaf_core/caf/infer_handle.hpp
libcaf_core/caf/infer_handle.hpp
+5
-6
libcaf_core/caf/stateful_actor.hpp
libcaf_core/caf/stateful_actor.hpp
+3
-5
libcaf_core/caf/typed_actor.hpp
libcaf_core/caf/typed_actor.hpp
+5
-6
libcaf_core/src/actor_registry.cpp
libcaf_core/src/actor_registry.cpp
+1
-1
libcaf_core/src/announce_actor_type.cpp
libcaf_core/src/announce_actor_type.cpp
+1
-2
libcaf_core/test/local_migration.cpp
libcaf_core/test/local_migration.cpp
+0
-1
libcaf_core/test/stateful_actor.cpp
libcaf_core/test/stateful_actor.cpp
+0
-3
libcaf_io/caf/io/basp_broker.hpp
libcaf_io/caf/io/basp_broker.hpp
+2
-3
libcaf_io/test/http_broker.cpp
libcaf_io/test/http_broker.cpp
+3
-5
No files found.
libcaf_core/caf/all.hpp
View file @
1aeaaf81
...
...
@@ -67,6 +67,7 @@
#include "caf/blocking_actor.hpp"
#include "caf/execution_unit.hpp"
#include "caf/memory_managed.hpp"
#include "caf/stateful_actor.hpp"
#include "caf/typed_behavior.hpp"
#include "caf/actor_namespace.hpp"
#include "caf/behavior_policy.hpp"
...
...
libcaf_core/caf/infer_handle.hpp
View file @
1aeaaf81
...
...
@@ -22,9 +22,9 @@
#include "caf/actor.hpp"
#include "caf/actor_addr.hpp"
#include "caf/stateful_actor.hpp"
#include "caf/typed_behavior.hpp"
#include "caf/experimental/stateful_actor.hpp"
namespace
caf
{
...
...
@@ -104,13 +104,12 @@ struct infer_handle_from_fun_impl<Result, typed_event_based_actor<Sigs...>*,
// statically typed stateful actor with self pointer
template
<
class
Result
,
class
State
,
class
...
Sigs
>
struct
infer_handle_from_fun_impl
<
Result
,
experimental
::
stateful_actor
<
stateful_actor
<
State
,
typed_event_based_actor
<
Sigs
...
>
>*
,
true
>
{
using
type
=
typed_actor
<
Sigs
...
>
;
using
impl
=
experimental
::
stateful_actor
<
State
,
typed_event_based_actor
<
Sigs
...
>>
;
using
impl
=
stateful_actor
<
State
,
typed_event_based_actor
<
Sigs
...
>>
;
using
behavior_type
=
typed_behavior
<
Sigs
...
>
;
static
constexpr
spawn_mode
mode
=
spawn_mode
::
function_with_selfptr
;
};
...
...
@@ -129,14 +128,14 @@ struct infer_handle_from_fun_impl<Result,
// statically typed stateful broker with self pointer
template
<
class
Result
,
class
State
,
class
...
Sigs
>
struct
infer_handle_from_fun_impl
<
Result
,
experimental
::
stateful_actor
<
stateful_actor
<
State
,
io
::
experimental
::
typed_broker
<
Sigs
...
>
>*
,
true
>
{
using
type
=
typed_actor
<
Sigs
...
>
;
using
impl
=
experimental
::
stateful_actor
<
stateful_actor
<
State
,
io
::
experimental
::
typed_broker
<
Sigs
...
>
>
;
...
...
libcaf_core/caf/
experimental/
stateful_actor.hpp
→
libcaf_core/caf/stateful_actor.hpp
View file @
1aeaaf81
...
...
@@ -17,8 +17,8 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_
EXPERIMENTAL_
STATEFUL_ACTOR_HPP
#define CAF_
EXPERIMENTAL_
STATEFUL_ACTOR_HPP
#ifndef CAF_STATEFUL_ACTOR_HPP
#define CAF_STATEFUL_ACTOR_HPP
#include <new>
#include <type_traits>
...
...
@@ -27,7 +27,6 @@
#include "caf/detail/type_traits.hpp"
namespace
caf
{
namespace
experimental
{
template
<
class
Archive
,
class
U
>
typename
std
::
enable_if
<
detail
::
is_serializable
<
U
>::
value
>::
type
...
...
@@ -125,7 +124,6 @@ private:
union
{
State
state_
;
};
};
}
// namespace experimental
}
// namespace caf
#endif // CAF_
EXPERIMENTAL_
STATEFUL_ACTOR_HPP
#endif // CAF_STATEFUL_ACTOR_HPP
libcaf_core/caf/typed_actor.hpp
View file @
1aeaaf81
...
...
@@ -26,11 +26,10 @@
#include "caf/actor_cast.hpp"
#include "caf/replies_to.hpp"
#include "caf/abstract_actor.hpp"
#include "caf/stateful_actor.hpp"
#include "caf/typed_behavior.hpp"
#include "caf/typed_response_promise.hpp"
#include "caf/experimental/stateful_actor.hpp"
namespace
caf
{
class
actor_addr
;
...
...
@@ -98,21 +97,21 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
/// Identifies the base class for this kind of actor with actor.
template
<
class
State
>
using
stateful_base
=
experimental
::
stateful_actor
<
State
,
base
>
;
using
stateful_base
=
stateful_actor
<
State
,
base
>
;
/// Identifies the base class for this kind of actor with actor.
template
<
class
State
>
using
stateful_pointer
=
experimental
::
stateful_actor
<
State
,
base
>*
;
using
stateful_pointer
=
stateful_actor
<
State
,
base
>*
;
/// Identifies the broker_base class for this kind of actor with actor.
template
<
class
State
>
using
stateful_broker_base
=
experimental
::
stateful_actor
<
State
,
broker_base
>
;
stateful_actor
<
State
,
broker_base
>
;
/// Identifies the broker_base class for this kind of actor with actor.
template
<
class
State
>
using
stateful_broker_pointer
=
experimental
::
stateful_actor
<
State
,
broker_base
>*
;
stateful_actor
<
State
,
broker_base
>*
;
typed_actor
()
=
default
;
typed_actor
(
typed_actor
&&
)
=
default
;
...
...
libcaf_core/src/actor_registry.cpp
View file @
1aeaaf81
...
...
@@ -32,9 +32,9 @@
#include "caf/attachable.hpp"
#include "caf/exit_reason.hpp"
#include "caf/scoped_actor.hpp"
#include "caf/stateful_actor.hpp"
#include "caf/event_based_actor.hpp"
#include "caf/experimental/stateful_actor.hpp"
#include "caf/experimental/announce_actor_type.hpp"
#include "caf/scheduler/detached_threads.hpp"
...
...
libcaf_core/src/announce_actor_type.cpp
View file @
1aeaaf81
...
...
@@ -23,10 +23,9 @@
#include "caf/send.hpp"
#include "caf/spawn.hpp"
#include "caf/to_string.hpp"
#include "caf/stateful_actor.hpp"
#include "caf/event_based_actor.hpp"
#include "caf/experimental/stateful_actor.hpp"
#include "caf/detail/logging.hpp"
#include "caf/detail/singletons.hpp"
#include "caf/detail/actor_registry.hpp"
...
...
libcaf_core/test/local_migration.cpp
View file @
1aeaaf81
...
...
@@ -27,7 +27,6 @@
#include "caf/detail/actor_registry.hpp"
using
namespace
caf
;
using
namespace
caf
::
experimental
;
using
std
::
endl
;
...
...
libcaf_core/test/stateful_actor.cpp
View file @
1aeaaf81
...
...
@@ -24,11 +24,8 @@
#include "caf/all.hpp"
#include "caf/experimental/stateful_actor.hpp"
using
namespace
std
;
using
namespace
caf
;
using
namespace
caf
::
experimental
;
namespace
{
...
...
libcaf_io/caf/io/basp_broker.hpp
View file @
1aeaaf81
...
...
@@ -28,13 +28,12 @@
#include <unordered_map>
#include <unordered_set>
#include "caf/stateful_actor.hpp"
#include "caf/actor_namespace.hpp"
#include "caf/binary_serializer.hpp"
#include "caf/binary_deserializer.hpp"
#include "caf/forwarding_actor_proxy.hpp"
#include "caf/experimental/stateful_actor.hpp"
#include "caf/io/basp.hpp"
#include "caf/io/broker.hpp"
...
...
@@ -122,7 +121,7 @@ struct basp_broker_state : actor_namespace::backend, basp::instance::callee {
};
/// A broker implementation for the Binary Actor System Protocol (BASP).
class
basp_broker
:
public
caf
::
experimental
::
stateful_actor
<
basp_broker_state
,
class
basp_broker
:
public
caf
::
stateful_actor
<
basp_broker_state
,
broker
>
{
public:
basp_broker
(
middleman
&
mm
);
...
...
libcaf_io/test/http_broker.cpp
View file @
1aeaaf81
...
...
@@ -27,8 +27,6 @@
#include "caf/all.hpp"
#include "caf/io/all.hpp"
#include "caf/experimental/stateful_actor.hpp"
using
std
::
cout
;
using
std
::
cerr
;
using
std
::
endl
;
...
...
@@ -88,7 +86,7 @@ struct http_state {
abstract_broker
*
self_
;
};
using
http_broker
=
caf
::
experimental
::
stateful_actor
<
http_state
,
broker
>
;
using
http_broker
=
caf
::
stateful_actor
<
http_state
,
broker
>
;
behavior
http_worker
(
http_broker
*
self
,
connection_handle
hdl
)
{
// tell network backend to receive any number of bytes between 1 and 1024
...
...
@@ -201,7 +199,7 @@ public:
~
fixture
()
{
anon_send_exit
(
aut_
,
exit_reason
::
kill
);
// run the exit message and other pending messages explicitly,
// since we do not invoke any "IO" from this point on that would
// since we do not invoke any "I
/
O" from this point on that would
// trigger the exit message implicitly
mpx_
->
flush_runnables
();
await_all_actors_done
();
...
...
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