Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
aeva
graph
Commits
c5dbdfad
Commit
c5dbdfad
authored
Mar 24, 2022
by
David Thompson
Browse files
WIP: More broken attempts to make deserializing arcs work.
parent
fc7d5387
Changes
1
Hide whitespace changes
Inline
Side-by-side
smtk/markup/json/jsonResource.cxx
View file @
c5dbdfad
...
...
@@ -98,7 +98,7 @@ inline typename std::enable_if<I != std::tuple_size<Tuple>::value, void>::type d
}
auto& arcEntry(resource->arcs().template get<ArcType>());
*/
std
::
vector
<
s
mtk
::
WeakR
eference
W
rapper
<
typename
ArcType
::
ToType
>>
toNodes
;
std
::
vector
<
s
td
::
r
eference
_w
rapper
<
typename
ArcType
::
ToType
>>
toNodes
;
for
(
const
auto
jarc
:
*
it
)
{
toNodes
.
clear
();
...
...
@@ -113,8 +113,8 @@ inline typename std::enable_if<I != std::tuple_size<Tuple>::value, void>::type d
auto
toNode
=
std
::
dynamic_pointer_cast
<
typename
ArcType
::
ToType
>
(
resource
->
find
(
toId
));
if
(
toNode
)
{
std
::
weak_ptr
<
typename
ArcType
::
ToType
>
weakRef
(
toNode
);
toNodes
.
push_back
(
weakRef
);
//
std::weak_ptr<typename ArcType::ToType> weakRef(toNode);
toNodes
.
push_back
(
std
::
ref
(
*
toNode
)
);
}
}
fromNode
->
template
set
<
ArcType
>(
toNodes
.
begin
(),
toNodes
.
end
());
...
...
Write
Preview
Supports
Markdown
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