Merge branch 'release_v1.0.0'

This commit is contained in:
Lorenz Meier
2015-05-20 09:00:57 +02:00
28 changed files with 312 additions and 689 deletions
+13 -1
View File
@@ -45,6 +45,7 @@ class __EXPORT ListNode
public:
ListNode() : _sibling(nullptr) {
}
virtual ~ListNode() {};
void setSibling(T sibling) { _sibling = sibling; }
T getSibling() { return _sibling; }
T get() {
@@ -52,6 +53,11 @@ public:
}
protected:
T _sibling;
private:
// forbid copy
ListNode(const ListNode& other);
// forbid assignment
ListNode & operator = (const ListNode &);
};
template<class T>
@@ -60,12 +66,18 @@ class __EXPORT List
public:
List() : _head() {
}
virtual ~List() {};
void add(T newNode) {
newNode->setSibling(getHead());
setHead(newNode);
}
T getHead() { return _head; }
private:
protected:
void setHead(T &head) { _head = head; }
T _head;
private:
// forbid copy
List(const List& other);
// forbid assignment
List& operator = (const List &);
};