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
12e3f463
Commit
12e3f463
authored
Feb 06, 2022
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make inspectors easier to use without CAF headers
parent
2abed714
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
libcaf_core/caf/load_inspector.hpp
libcaf_core/caf/load_inspector.hpp
+15
-0
libcaf_core/caf/load_inspector_base.hpp
libcaf_core/caf/load_inspector_base.hpp
+5
-0
libcaf_core/caf/save_inspector.hpp
libcaf_core/caf/save_inspector.hpp
+15
-0
libcaf_core/caf/save_inspector_base.hpp
libcaf_core/caf/save_inspector_base.hpp
+5
-0
No files found.
libcaf_core/caf/load_inspector.hpp
View file @
12e3f463
...
@@ -49,6 +49,21 @@ public:
...
@@ -49,6 +49,21 @@ public:
return
std
::
move
(
err_
);
return
std
::
move
(
err_
);
}
}
template
<
class
...
Ts
>
void
field_invariant_check_failed
(
std
::
string
msg
)
{
emplace_error
(
sec
::
field_invariant_check_failed
,
std
::
move
(
msg
));
}
template
<
class
...
Ts
>
void
field_value_synchronization_failed
(
std
::
string
msg
)
{
emplace_error
(
sec
::
field_value_synchronization_failed
,
std
::
move
(
msg
));
}
template
<
class
...
Ts
>
void
invalid_field_type
(
std
::
string
msg
)
{
emplace_error
(
sec
::
invalid_field_type
,
std
::
move
(
msg
));
}
// -- DSL types for regular fields -------------------------------------------
// -- DSL types for regular fields -------------------------------------------
template
<
class
T
,
class
U
,
class
Predicate
>
template
<
class
T
,
class
U
,
class
Predicate
>
...
...
libcaf_core/caf/load_inspector_base.hpp
View file @
12e3f463
...
@@ -33,6 +33,11 @@ public:
...
@@ -33,6 +33,11 @@ public:
return
super
::
object_t
<
Subtype
>
{
invalid_type_id
,
type_name
,
dptr
()};
return
super
::
object_t
<
Subtype
>
{
invalid_type_id
,
type_name
,
dptr
()};
}
}
template
<
class
T
>
bool
begin_object_t
()
{
return
dref
().
begin_object
(
type_id_v
<
T
>
,
caf
::
type_name_v
<
T
>
);
}
template
<
class
T
>
template
<
class
T
>
bool
list
(
T
&
xs
)
{
bool
list
(
T
&
xs
)
{
xs
.
clear
();
xs
.
clear
();
...
...
libcaf_core/caf/save_inspector.hpp
View file @
12e3f463
...
@@ -49,6 +49,21 @@ public:
...
@@ -49,6 +49,21 @@ public:
return
std
::
move
(
err_
);
return
std
::
move
(
err_
);
}
}
template
<
class
...
Ts
>
void
field_invariant_check_failed
(
std
::
string
msg
)
{
emplace_error
(
sec
::
field_invariant_check_failed
,
std
::
move
(
msg
));
}
template
<
class
...
Ts
>
void
field_value_synchronization_failed
(
std
::
string
msg
)
{
emplace_error
(
sec
::
field_value_synchronization_failed
,
std
::
move
(
msg
));
}
template
<
class
...
Ts
>
void
invalid_field_type
(
std
::
string
msg
)
{
emplace_error
(
sec
::
invalid_field_type
,
std
::
move
(
msg
));
}
// -- DSL types for regular fields -------------------------------------------
// -- DSL types for regular fields -------------------------------------------
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
...
...
libcaf_core/caf/save_inspector_base.hpp
View file @
12e3f463
...
@@ -28,6 +28,11 @@ public:
...
@@ -28,6 +28,11 @@ public:
return
super
::
object_t
<
Subtype
>
{
invalid_type_id
,
type_name
,
dptr
()};
return
super
::
object_t
<
Subtype
>
{
invalid_type_id
,
type_name
,
dptr
()};
}
}
template
<
class
T
>
bool
begin_object_t
()
{
return
dref
().
begin_object
(
type_id_v
<
T
>
,
caf
::
type_name_v
<
T
>
);
}
template
<
class
T
>
template
<
class
T
>
bool
list
(
const
T
&
xs
)
{
bool
list
(
const
T
&
xs
)
{
using
value_type
=
typename
T
::
value_type
;
using
value_type
=
typename
T
::
value_type
;
...
...
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