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
2d92106e
Commit
2d92106e
authored
Jul 30, 2012
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into unstable
parents
c73eb232
c25eec9f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
3 deletions
+34
-3
CMakeLists.txt
CMakeLists.txt
+1
-1
ChangeLog
ChangeLog
+6
-0
src/uniform_type_info.cpp
src/uniform_type_info.cpp
+24
-0
unit_testing/test__spawn.cpp
unit_testing/test__spawn.cpp
+2
-2
unit_testing/test__uniform_type.cpp
unit_testing/test__uniform_type.cpp
+1
-0
No files found.
CMakeLists.txt
View file @
2d92106e
...
...
@@ -3,7 +3,7 @@ project(cppa CXX)
set
(
LIBCPPA_VERSION_MAJOR 0
)
set
(
LIBCPPA_VERSION_MINOR 3
)
set
(
LIBCPPA_VERSION_PATCH
1
)
set
(
LIBCPPA_VERSION_PATCH
2
)
# prohibit in-source builds
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_BINARY_DIR
}
"
)
...
...
ChangeLog
View file @
2d92106e
Version 0.3.2
2012-07-30
- Bugfix: added 'bool' to the list of announced types
Version 0.3.1
2012-07-27
...
...
src/uniform_type_info.cpp
View file @
2d92106e
...
...
@@ -619,6 +619,28 @@ class int_tinfo : public detail::default_uniform_type_info_impl<T> {
};
class
bool_tinfo
:
public
util
::
abstract_uniform_type_info
<
bool
>
{
public:
virtual
void
serialize
(
const
void
*
instance
,
serializer
*
sink
)
const
{
auto
val
=
*
reinterpret_cast
<
const
bool
*>
(
instance
);
sink
->
begin_object
(
name
());
sink
->
write_value
(
static_cast
<
std
::
uint8_t
>
(
val
?
1
:
0
));
sink
->
end_object
();
}
virtual
void
deserialize
(
void
*
instance
,
deserializer
*
source
)
const
{
auto
tname
=
source
->
seek_object
();
if
(
tname
!=
name
())
throw
42
;
source
->
begin_object
(
tname
);
auto
ptval
=
source
->
read_value
(
pt_uint8
);
source
->
end_object
();
*
reinterpret_cast
<
bool
*>
(
instance
)
=
(
get
<
pt_uint8
>
(
ptval
)
!=
0
);
}
};
class
uniform_type_info_map_helper
{
public:
...
...
@@ -682,6 +704,8 @@ uniform_type_info_map::uniform_type_info_map() {
helper
.
insert_builtin
<
std
::
string
>
();
helper
.
insert_builtin
<
std
::
u16string
>
();
helper
.
insert_builtin
<
std
::
u32string
>
();
// bool needs some special handling, because it hasn't a guaranteed size
insert
({
raw_name
<
bool
>
()},
new
bool_tinfo
);
// insert cppa types
insert
({
raw_name
<
util
::
duration
>
()},
new
duration_tinfo
);
insert
({
raw_name
<
any_tuple
>
()},
new
any_tuple_tinfo
);
...
...
unit_testing/test__spawn.cpp
View file @
2d92106e
...
...
@@ -299,8 +299,8 @@ int main() {
CPPA_TEST
(
test__spawn
);
CPPA_IF_VERBOSE
(
cout
<<
"test send() ... "
<<
std
::
flush
);
send
(
self
,
1
,
2
,
3
);
receive
(
on
(
1
,
2
,
3
)
>>
[]()
{
});
send
(
self
,
1
,
2
,
3
,
true
);
receive
(
on
(
1
,
2
,
3
,
true
)
>>
[]()
{
});
CPPA_IF_VERBOSE
(
cout
<<
"... with empty message... "
<<
std
::
flush
);
self
<<
any_tuple
{};
receive
(
on
()
>>
[]()
{
});
...
...
unit_testing/test__uniform_type.cpp
View file @
2d92106e
...
...
@@ -68,6 +68,7 @@ int main() {
// these types (and only those) are present if
// the uniform_type_info implementation is correct
std
::
set
<
std
::
string
>
expected
=
{
"bool"
,
"@_::foo"
,
// <anonymous namespace>::foo
"@i8"
,
"@i16"
,
"@i32"
,
"@i64"
,
// signed integer names
"@u8"
,
"@u16"
,
"@u32"
,
"@u64"
,
// unsigned integer names
...
...
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