diff --git a/alib2data/src/graph/common/Node.cpp b/alib2data/src/graph/common/Node.cpp index a2251e7b082d3be06f7f3302c07c1e4ff25e2f27..c95656d79ec8f044de3725ce2710e4599e9d374b 100644 --- a/alib2data/src/graph/common/Node.cpp +++ b/alib2data/src/graph/common/Node.cpp @@ -5,6 +5,11 @@ namespace graph { +Node::Node() + : name(label::labelFrom(std::string())) +{ +} + Node::Node(const label::Label &name) : name(name) { diff --git a/alib2data/src/graph/common/Node.h b/alib2data/src/graph/common/Node.h index ec5c004f2633503a13c146c64c3a3ce499d81c83..93fe69b1d8c089c5159c05cf4445e681f053fc5d 100644 --- a/alib2data/src/graph/common/Node.h +++ b/alib2data/src/graph/common/Node.h @@ -10,6 +10,7 @@ namespace graph { class Node : public std::acceptor<Node, GraphElement, GraphElement> { public: + explicit Node(); explicit Node(const label::Label &name); explicit Node(label::Label &&name); explicit Node(int number); diff --git a/alib2data/src/graph/directed/DirectedEdge.cpp b/alib2data/src/graph/directed/DirectedEdge.cpp index dedcefb852e6f875530bff0f4dbb05404d019d89..a05cbce7b739a837637dacfc3ced9509e370c252 100644 --- a/alib2data/src/graph/directed/DirectedEdge.cpp +++ b/alib2data/src/graph/directed/DirectedEdge.cpp @@ -4,6 +4,11 @@ namespace graph { +DirectedEdge::DirectedEdge() + : name(label::labelFrom('d')) +{ +} + DirectedEdge::DirectedEdge(const Node &from, const Node &to) : from(from) , to(to) diff --git a/alib2data/src/graph/directed/DirectedEdge.h b/alib2data/src/graph/directed/DirectedEdge.h index 53a901f662b93e42f39b73619e8dfe01df02609d..65d773d72b539a40225e35838b327178c6f03032 100644 --- a/alib2data/src/graph/directed/DirectedEdge.h +++ b/alib2data/src/graph/directed/DirectedEdge.h @@ -10,6 +10,7 @@ namespace graph { class DirectedEdge : public std::acceptor<DirectedEdge, GraphElement, GraphElement> { public: + explicit DirectedEdge(); explicit DirectedEdge(const Node &from, const Node &to); explicit DirectedEdge(Node &&from, Node &&to); explicit DirectedEdge(const Node &from, const Node &to, const label::Label &name); diff --git a/alib2data/src/graph/undirected/UndirectedEdge.cpp b/alib2data/src/graph/undirected/UndirectedEdge.cpp index c259152f0bbf9be30d52c63513f3e9e9bad18db4..fed6072e48bc3b899dbe19fbc84ccc3958c351c9 100644 --- a/alib2data/src/graph/undirected/UndirectedEdge.cpp +++ b/alib2data/src/graph/undirected/UndirectedEdge.cpp @@ -4,6 +4,11 @@ namespace graph { +UndirectedEdge::UndirectedEdge() + : name(label::labelFrom('u')) +{ +} + UndirectedEdge::UndirectedEdge(const Node &first, const Node &second) : first(first) , second(second) diff --git a/alib2data/src/graph/undirected/UndirectedEdge.h b/alib2data/src/graph/undirected/UndirectedEdge.h index 894cac368388093a7178bb33e1854d6d31269921..2991d8357127fc838bbc79879d6182af3e600b90 100644 --- a/alib2data/src/graph/undirected/UndirectedEdge.h +++ b/alib2data/src/graph/undirected/UndirectedEdge.h @@ -10,6 +10,7 @@ namespace graph { class UndirectedEdge : public std::acceptor<UndirectedEdge, GraphElement, GraphElement> { public: + explicit UndirectedEdge(); explicit UndirectedEdge(const Node &first, const Node &second); explicit UndirectedEdge(Node &&first, Node &&second); explicit UndirectedEdge(const Node &first, const Node &second, const label::Label &name);