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
a9b26be1
Commit
a9b26be1
authored
Aug 24, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow asigning new input to binary deserializers
parent
5ebeb85c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
libcaf_core/caf/binary_deserializer.hpp
libcaf_core/caf/binary_deserializer.hpp
+3
-0
libcaf_core/src/binary_deserializer.cpp
libcaf_core/src/binary_deserializer.cpp
+5
-0
No files found.
libcaf_core/caf/binary_deserializer.hpp
View file @
a9b26be1
...
@@ -91,6 +91,9 @@ public:
...
@@ -91,6 +91,9 @@ public:
/// @pre `num_bytes <= remaining()`
/// @pre `num_bytes <= remaining()`
void
skip
(
size_t
num_bytes
);
void
skip
(
size_t
num_bytes
);
/// Assings a new input.
void
reset
(
span
<
const
byte
>
bytes
);
protected:
protected:
error
apply_impl
(
int8_t
&
)
override
;
error
apply_impl
(
int8_t
&
)
override
;
...
...
libcaf_core/src/binary_deserializer.cpp
View file @
a9b26be1
...
@@ -128,6 +128,11 @@ void binary_deserializer::skip(size_t num_bytes) {
...
@@ -128,6 +128,11 @@ void binary_deserializer::skip(size_t num_bytes) {
current_
+=
num_bytes
;
current_
+=
num_bytes
;
}
}
void
binary_deserializer
::
reset
(
span
<
const
byte
>
bytes
)
{
current_
=
bytes
.
data
();
end_
=
current_
+
bytes
.
size
();
}
error
binary_deserializer
::
apply_impl
(
int8_t
&
x
)
{
error
binary_deserializer
::
apply_impl
(
int8_t
&
x
)
{
return
apply_raw
(
sizeof
(
int8_t
),
&
x
);
return
apply_raw
(
sizeof
(
int8_t
),
&
x
);
}
}
...
...
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