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
56e41930
Commit
56e41930
authored
Jun 06, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `init` function from config, relates #468
parent
fb005263
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
23 additions
and
32 deletions
+23
-32
examples/broker/simple_broker.cpp
examples/broker/simple_broker.cpp
+1
-1
examples/broker/simple_http_broker.cpp
examples/broker/simple_http_broker.cpp
+1
-1
examples/custom_type/custom_types_1.cpp
examples/custom_type/custom_types_1.cpp
+1
-1
examples/custom_type/custom_types_2.cpp
examples/custom_type/custom_types_2.cpp
+1
-1
examples/custom_type/custom_types_3.cpp
examples/custom_type/custom_types_3.cpp
+1
-1
examples/message_passing/divider.cpp
examples/message_passing/divider.cpp
+1
-1
examples/remoting/distributed_calculator.cpp
examples/remoting/distributed_calculator.cpp
+1
-1
examples/remoting/group_chat.cpp
examples/remoting/group_chat.cpp
+1
-1
examples/remoting/group_server.cpp
examples/remoting/group_server.cpp
+1
-1
libcaf_core/caf/actor_system_config.hpp
libcaf_core/caf/actor_system_config.hpp
+0
-2
libcaf_core/src/actor_system_config.cpp
libcaf_core/src/actor_system_config.cpp
+0
-5
libcaf_io/test/remote_actor.cpp
libcaf_io/test/remote_actor.cpp
+7
-8
libcaf_io/test/remote_group.cpp
libcaf_io/test/remote_group.cpp
+7
-8
No files found.
examples/broker/simple_broker.cpp
View file @
56e41930
...
...
@@ -181,7 +181,7 @@ public:
std
::
string
host
=
"localhost"
;
bool
server_mode
=
false
;
void
init
()
override
{
config
()
{
opt_group
{
custom_options_
,
"global"
}
.
add
(
port
,
"port,p"
,
"set port"
)
.
add
(
host
,
"host,H"
,
"set host (ignored in server mode)"
)
...
...
examples/broker/simple_http_broker.cpp
View file @
56e41930
...
...
@@ -70,7 +70,7 @@ class config : public actor_system_config {
public:
uint16_t
port
=
0
;
void
init
()
override
{
config
()
{
opt_group
{
custom_options_
,
"global"
}
.
add
(
port
,
"port,p"
,
"set port"
);
}
...
...
examples/custom_type/custom_types_1.cpp
View file @
56e41930
...
...
@@ -86,7 +86,7 @@ void testee(event_based_actor* self, size_t remaining) {
class
config
:
public
actor_system_config
{
public:
void
init
()
override
{
config
()
{
add_message_type
<
foo
>
(
"foo"
);
add_message_type
<
foo2
>
(
"foo2"
);
add_message_type
<
foo_pair
>
(
"foo_pair"
);
...
...
examples/custom_type/custom_types_2.cpp
View file @
56e41930
...
...
@@ -65,7 +65,7 @@ behavior testee(event_based_actor* self) {
class
config
:
public
actor_system_config
{
public:
void
init
()
override
{
config
()
{
add_message_type
<
foo
>
(
"foo"
);
}
};
...
...
examples/custom_type/custom_types_3.cpp
View file @
56e41930
...
...
@@ -81,7 +81,7 @@ behavior testee(event_based_actor* self) {
class
config
:
public
actor_system_config
{
public:
void
init
()
override
{
config
()
{
add_message_type
<
foo
>
(
"foo"
);
}
};
...
...
examples/message_passing/divider.cpp
View file @
56e41930
...
...
@@ -49,7 +49,7 @@ divider::behavior_type divider_impl() {
class
config
:
public
actor_system_config
{
public:
void
init
()
override
{
config
()
{
auto
renderer
=
[](
uint8_t
x
,
atom_value
,
const
message
&
)
{
return
"math_error"
+
deep_to_string_as_tuple
(
static_cast
<
math_error
>
(
x
));
};
...
...
examples/remoting/distributed_calculator.cpp
View file @
56e41930
...
...
@@ -253,7 +253,7 @@ public:
std
::
string
host
=
"localhost"
;
bool
server_mode
=
false
;
void
init
()
override
{
config
()
{
opt_group
{
custom_options_
,
"global"
}
.
add
(
port
,
"port,p"
,
"set port"
)
.
add
(
host
,
"host,H"
,
"set host (ignored in server mode)"
)
...
...
examples/remoting/group_chat.cpp
View file @
56e41930
...
...
@@ -68,7 +68,7 @@ public:
std
::
string
name
;
std
::
string
group_id
;
void
init
()
override
{
config
()
{
opt_group
{
custom_options_
,
"global"
}
.
add
(
name
,
"name,n"
,
"set name"
)
.
add
(
group_id
,
"group,g"
,
"join group"
);
...
...
examples/remoting/group_server.cpp
View file @
56e41930
...
...
@@ -24,7 +24,7 @@ class config : public actor_system_config {
public:
uint16_t
port
=
0
;
void
init
()
override
{
config
()
{
opt_group
{
custom_options_
,
"global"
}
.
add
(
port
,
"port,p"
,
"set port"
);
}
...
...
libcaf_core/caf/actor_system_config.hpp
View file @
56e41930
...
...
@@ -212,8 +212,6 @@ public:
int
(
*
slave_mode_fun
)(
actor_system
&
,
const
actor_system_config
&
);
protected:
virtual
void
init
();
virtual
std
::
string
make_help_text
(
const
std
::
vector
<
message
::
cli_arg
>&
);
options_vector
custom_options_
;
...
...
libcaf_core/src/actor_system_config.cpp
View file @
56e41930
...
...
@@ -173,7 +173,6 @@ actor_system_config::make_help_text(const std::vector<message::cli_arg>& xs) {
actor_system_config
&
actor_system_config
::
parse
(
int
argc
,
char
**
argv
,
const
char
*
ini_file_cstr
)
{
init
();
auto
args
=
message_builder
(
argv
+
1
,
argv
+
argc
).
move_to_message
();
// extract config file name first, since INI files are overruled by CLI args
std
::
string
config_file_name
;
...
...
@@ -287,10 +286,6 @@ actor_system_config& actor_system_config::set(const char* cn, config_value cv) {
return
*
this
;
}
void
actor_system_config
::
init
()
{
// nop
}
std
::
string
actor_system_config
::
render_sec
(
uint8_t
x
,
atom_value
,
const
message
&
)
{
return
"system_error"
+
deep_to_string_as_tuple
(
static_cast
<
sec
>
(
x
));
...
...
libcaf_io/test/remote_actor.cpp
View file @
56e41930
...
...
@@ -34,24 +34,23 @@ namespace {
constexpr
char
local_host
[]
=
"127.0.0.1"
;
class
c
ustom_c
onfig
:
public
caf
::
actor_system_config
{
class
config
:
public
caf
::
actor_system_config
{
public:
void
init
()
override
{
config
()
{
load
<
caf
::
io
::
middleman
>
();
add_message_type
<
std
::
vector
<
int
>>
(
"std::vector<int>"
);
}
using
actor_system_config
::
parse
;
custom_config
&
parse
()
{
parse
(
caf
::
test
::
engine
::
argc
(),
caf
::
test
::
engine
::
argv
());
config
&
parse
()
{
actor_system_config
::
parse
(
caf
::
test
::
engine
::
argc
(),
caf
::
test
::
engine
::
argv
());
return
*
this
;
}
};
struct
fixture
{
caf
::
actor_system
server_side
{
c
ustom_c
onfig
{}.
parse
()};
caf
::
actor_system
client_side
{
c
ustom_c
onfig
{}.
parse
()};
caf
::
actor_system
server_side
{
config
{}.
parse
()};
caf
::
actor_system
client_side
{
config
{}.
parse
()};
caf
::
io
::
middleman
&
server_side_mm
=
server_side
.
middleman
();
caf
::
io
::
middleman
&
client_side_mm
=
client_side
.
middleman
();
};
...
...
libcaf_io/test/remote_group.cpp
View file @
56e41930
...
...
@@ -34,24 +34,23 @@ namespace {
constexpr
char
local_host
[]
=
"127.0.0.1"
;
class
c
ustom_c
onfig
:
public
caf
::
actor_system_config
{
class
config
:
public
caf
::
actor_system_config
{
public:
void
init
()
override
{
config
()
{
load
<
caf
::
io
::
middleman
>
();
add_message_type
<
std
::
vector
<
actor
>>
(
"std::vector<actor>"
);
}
using
actor_system_config
::
parse
;
custom_config
&
parse
()
{
parse
(
caf
::
test
::
engine
::
argc
(),
caf
::
test
::
engine
::
argv
());
config
&
parse
()
{
actor_system_config
::
parse
(
caf
::
test
::
engine
::
argc
(),
caf
::
test
::
engine
::
argv
());
return
*
this
;
}
};
struct
fixture
{
caf
::
actor_system
server_side
{
c
ustom_c
onfig
{}.
parse
()};
caf
::
actor_system
client_side
{
c
ustom_c
onfig
{}.
parse
()};
caf
::
actor_system
server_side
{
config
{}.
parse
()};
caf
::
actor_system
client_side
{
config
{}.
parse
()};
io
::
middleman
&
server_side_mm
=
server_side
.
middleman
();
io
::
middleman
&
client_side_mm
=
client_side
.
middleman
();
};
...
...
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