Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cyril Moineau
aidge_core
Commits
da2a7e8f
Commit
da2a7e8f
authored
1 year ago
by
Olivier BICHLER
Browse files
Options
Downloads
Patches
Plain Diff
Temporary workaround for private members access
parent
d6f3b1c6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/aidge/graph/Node.hpp
+4
-2
4 additions, 2 deletions
include/aidge/graph/Node.hpp
with
4 additions
and
2 deletions
include/aidge/graph/Node.hpp
+
4
−
2
View file @
da2a7e8f
...
@@ -33,7 +33,8 @@ class GraphView;
...
@@ -33,7 +33,8 @@ class GraphView;
* @brief Object carrying the topological information of the computational graph.
* @brief Object carrying the topological information of the computational graph.
*/
*/
class
Node
:
public
std
::
enable_shared_from_this
<
Node
>
{
class
Node
:
public
std
::
enable_shared_from_this
<
Node
>
{
private:
//private:
public:
// TODO: workaround to make GraphView:clone() work, friend doesn't work because of forward declaration
struct
weakCompare
{
struct
weakCompare
{
bool
operator
()(
const
std
::
weak_ptr
<
Aidge
::
GraphView
>&
a
,
const
std
::
weak_ptr
<
Aidge
::
GraphView
>&
b
)
const
{
bool
operator
()(
const
std
::
weak_ptr
<
Aidge
::
GraphView
>&
a
,
const
std
::
weak_ptr
<
Aidge
::
GraphView
>&
b
)
const
{
// Compare the content of the weak_ptrs
// Compare the content of the weak_ptrs
...
@@ -399,7 +400,8 @@ public:
...
@@ -399,7 +400,8 @@ public:
return
node
->
clone
();
return
node
->
clone
();
}
}
friend
std
::
shared_ptr
<
GraphView
>
GraphView
::
clone
(
NodePtr
(
*
cloneNode
)(
NodePtr
))
const
;
// TODO: does not work, friend requires full definition, but there is a circular dependency between Node and GraphView
//friend std::shared_ptr<GraphView> GraphView::clone(NodePtr(*cloneNode)(NodePtr)) const;
private
:
private
:
///////////////////////////////////////////////////////
///////////////////////////////////////////////////////
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment