Skip to content

Commit

Permalink
overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
JossWhittle committed Aug 25, 2016
1 parent 699868e commit 0be63f3
Show file tree
Hide file tree
Showing 2 changed files with 1,131 additions and 291 deletions.
10 changes: 10 additions & 0 deletions MEL/Graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,21 @@ struct DiGraphNode {

template<typename MSG>
inline void DeepCopy(MSG &msg) {
std::cout << "Object Deep Copy" << std::endl;

msg & edges;
for (auto &e : edges) msg.packSharedPtr(e);
};
};

template<typename T, typename MSG>
inline void MyDeepCopy(DiGraphNode<T> &obj, MSG &msg) {
std::cout << "My Deep Copy" << std::endl;

msg & obj.edges;
for (auto &e : obj.edges) msg.packSharedPtr<DiGraphNode<T>, MyDeepCopy>(e);
};

inline DiGraphNode<int>* MakeBTreeGraph(const int numNodes) {
/// BTree Graph
std::vector<DiGraphNode<int>*> nodes(numNodes);
Expand Down
Loading

0 comments on commit 0be63f3

Please sign in to comment.