diff --git a/DataStructures/src/Generic/directednode.cpp b/DataStructures/src/Generic/directednode.cpp deleted file mode 100644 index 602a545..0000000 --- a/DataStructures/src/Generic/directednode.cpp +++ /dev/null @@ -1,13 +0,0 @@ -#include "directednode.h" - -namespace Generic { - template - DirectedNode::DirectedNode(T value, std::shared_ptr left, std::shared_ptr right) { - this->value = value; - this->left = left; - this->right = right; - } - - template - DirectedNode::~DirectedNode() {} -} \ No newline at end of file diff --git a/DataStructures/src/Generic/directednode.h b/DataStructures/src/Generic/directednode.h index 227ddc7..f90f95e 100644 --- a/DataStructures/src/Generic/directednode.h +++ b/DataStructures/src/Generic/directednode.h @@ -14,4 +14,14 @@ namespace Generic { private: }; + + template + DirectedNode::DirectedNode(T value, std::shared_ptr left, std::shared_ptr right) { + this->value = value; + this->left = left; + this->right = right; + } + + template + DirectedNode::~DirectedNode() {} } diff --git a/DataStructures/src/Generic/undirectednode.cpp b/DataStructures/src/Generic/undirectednode.cpp deleted file mode 100644 index 3964d9f..0000000 --- a/DataStructures/src/Generic/undirectednode.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include "undirectednode.h" - -namespace Generic { - template - UndirectedNode::UndirectedNode(T value, std::shared_ptr left, std::shared_ptr right){ - this->value = value; - this->next = next; - } - - template - UndirectedNode::~UndirectedNode() {} -} \ No newline at end of file diff --git a/DataStructures/src/Generic/undirectednode.h b/DataStructures/src/Generic/undirectednode.h index 4f46abc..4f99b26 100644 --- a/DataStructures/src/Generic/undirectednode.h +++ b/DataStructures/src/Generic/undirectednode.h @@ -13,4 +13,13 @@ namespace Generic { private: }; + + template + UndirectedNode::UndirectedNode(T value, std::shared_ptr left, std::shared_ptr right) { + this->value = value; + this->next = next; + } + + template + UndirectedNode::~UndirectedNode() {} } diff --git a/DataStructures/src/LinkedList/linkedlist.cpp b/DataStructures/src/LinkedList/linkedlist.cpp deleted file mode 100644 index d89d2b7..0000000 --- a/DataStructures/src/LinkedList/linkedlist.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include "linkedlist.h" -#include "linkedlistnode.h" - -namespace Datastructures { - -} \ No newline at end of file diff --git a/DataStructures/src/LinkedList/linkedlist.h b/DataStructures/src/LinkedList/linkedlist.h index 50a4530..346c4d5 100644 --- a/DataStructures/src/LinkedList/linkedlist.h +++ b/DataStructures/src/LinkedList/linkedlist.h @@ -1,4 +1,6 @@ #pragma once +#include "linkedlistnode.h" + namespace Datastructures { template class LinkedList diff --git a/DataStructures/src/LinkedList/linkedlistnode.cpp b/DataStructures/src/LinkedList/linkedlistnode.cpp deleted file mode 100644 index e8e6d2e..0000000 --- a/DataStructures/src/LinkedList/linkedlistnode.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "linkedlistnode.h" - -namespace Datastructures { - namespace Nodes { - template - LinkedListNode::LinkedListNode(T value, std::shared_ptr> next) { - this->value = value; - this->next = next; - } - - //Creates a new node, returning a smart pointer to a stack allocated object - template - std::shared_ptr> LinkedListNode::create(T value, std::shared_ptr> next) { - return std::make_shared>(value, next); - } - } -} \ No newline at end of file diff --git a/DataStructures/src/LinkedList/linkedlistnode.h b/DataStructures/src/LinkedList/linkedlistnode.h index 1e9b3a0..ad3a98f 100644 --- a/DataStructures/src/LinkedList/linkedlistnode.h +++ b/DataStructures/src/LinkedList/linkedlistnode.h @@ -15,5 +15,17 @@ namespace Datastructures { private: }; + + template + LinkedListNode::LinkedListNode(T value, std::shared_ptr> next) { + this->value = value; + this->next = next; + } + + //Creates a new node, returning a smart pointer to a stack allocated object + template + std::shared_ptr> LinkedListNode::create(T value, std::shared_ptr> next) { + return std::make_shared>(value, next); + } } } \ No newline at end of file