/*
 * INSTRUCTOR-GIVEN TEMPLATE
 * COSC 140: Lab 8 - A Doubly-Linked List Implementation for Strings
 *
 * Description:
 *     Implements a doubly linked list to store std::strings. It uses a
 *     sentinel node and pointers to ensure bi-directional traversal. It is
 *     also circular, as the sentinel has access to the last and first
 *     elements.
 *
 * Author:
 *     Your Name
 */

#include "dlist.hpp"

// ----------------------------------------------------------------------------
// Constructors & Destructors                                              {{{1
// ----------------------------------------------------------------------------

/*
 * Dlist()                                                                 {{{2
 *
 * Default Constructor
 */

Dlist::Dlist() {
	
}

/*
 * Dlist(const Dlist &d)                                                   {{{2
 *
 * Copy Constructor. This is a "deep copy". In other words, elements are copied
 * over from "d" by making Dnodes and coping over the elements, one-by-one.
 * They are not copied by copying pointers.
 */

Dlist::Dlist(const Dlist &d) {
	
}

/*
 * operator=                                                               {{{2
 *
 * List copy operator (e.g. Assuming Dlist a, b... do "a = b"). Like the copy
 * constructor, this is also a "deep copy", not a "shallow copy".
 */

Dlist& Dlist::operator= (const Dlist &d) {
	return *this;
}

/*
 * ~Dlist                                                                  {{{2
 *
 * Destructor
 */

Dlist::~Dlist() {
	
}

// ----------------------------------------------------------------------------
// Getters                                                                 {{{1
// ----------------------------------------------------------------------------


/*
 * Empty                                                                   {{{2
 *
 * Returns TRUE if the list is empty. FALSE otherwise.
 */

bool Dlist::Empty() const {
	return false;
}

/*
 * Size                                                                    {{{2
 *
 * Returns the number of nodes in the list (excluding the sentinel).
 */

size_t Dlist::Size() const {
	return 0;
}

// ----------------------------------------------------------------------------
// Non-Front/Back Insertion Functions                                      {{{1
// ----------------------------------------------------------------------------

/*
 * Insert_Before                                                           {{{1
 *
 * Inserts a new node with string "s" before node "n" in the list.
 *
 * e.g. Assume list L as [S] -> [a] -> [b] -> [c].
 *      Assume n points to "b".
 *      Insert_Before("d", n)...
 *                       [S] -> [a] -> [d] -> [b] -> [c].
 */

void Dlist::Insert_Before(const std::string &s, Dnode *n) {
	
}

/*
 * Insert_After                                                            {{{1
 *
 * Inserts a new node with string "s" after node "n" in the list.
 *
 * e.g. Assume list L as [S] -> [a] -> [b] -> [c].
 *      Assume n points to "b".
 *      Insert_After("d", n)...
 *                       [S] -> [a] -> [b] -> [d] -> [c].
 */

void Dlist::Insert_After(const std::string &s, Dnode *n) {
	
}

// ----------------------------------------------------------------------------
// Deletion Handlers                                                       {{{1
// ----------------------------------------------------------------------------

/*
 * Erase                                                                   {{{2
 *
 * Deletes node "n" from the list.
 */

void Dlist::Erase(Dnode *n) {
	
}

/*
 * Clear                                                                   {{{2
 *
 * Clears the list of all elements except the sentinel node.
 */

void Dlist::Clear() {

}

// ----------------------------------------------------------------------------
// Push Functions                                                          {{{1
// ----------------------------------------------------------------------------

/* Put new strings on the front or back of the list */

/*
 * Push_Front                                                              {{{2
 *
 * Puts a new string on the front of the list.
 *
 * e.g. Assume list L as [S] -> [a] -> [b] -> [c].
 *      Push_Front(d)... [S] -> [d] -> [a] -> [b] -> [c].
 */

void Dlist::Push_Front(const std::string &s) {
	
}

/*
 * Push_Back                                                               {{{2
 *
 * Puts a new string at the end of the list.
 *
 * e.g. Assume list L as [S] -> [a] -> [b] -> [c].
 *      Push_Back(d)...  [S] -> [a] -> [b] -> [c] -> [d].
 */

void Dlist::Push_Back(const std::string &s) {
	
}

// ----------------------------------------------------------------------------
// Pop Functions                                                           {{{1
// ----------------------------------------------------------------------------

/* Remove and return the first or last element of the list */

/*
 * Pop_Front                                                               {{{2
 *
 * Removes the first node from the list and returns its value.
 *
 * e.g. Assume list L as [S] -> [a] -> [b] -> [c].
 *      Pop_Front()...   [S] -> [b] -> [c].
 */

std::string Dlist::Pop_Front() {
	return "";
}

/*
 * Pop_Back                                                                {{{2
 *
 * Removes the last node from the list and returns its value.
 *
 * e.g. Assume list L as [S] -> [a] -> [b] -> [c].
 *      Pop_Back()...    [S] -> [a] -> [b].
 */

std::string Dlist::Pop_Back() {
	return "";
}

// ----------------------------------------------------------------------------
// Node Accessor Functions                                                 {{{1
// ----------------------------------------------------------------------------

/*
 * Begin                                                                   {{{2
 *
 * Returns a pointer to the first node on the list.
 */

Dnode *Dlist::Begin() const {
	return NULL;
}

/*
 * End                                                                     {{{2
 *
 * Returns a pointer to the node past the last node on the list.
 */

Dnode *Dlist::End() const {
	return NULL;
}

/*
 * Rbegin                                                                  {{{2
 *
 * Returns a pointer to the last node on the list.
 */

Dnode *Dlist::Rbegin() const {
	return NULL;
}

/*
 * Rend                                                                    {{{2
 *
 * Returns a pointer to the node before the first node on the list.
 */

Dnode *Dlist::Rend() const {
	return NULL;
}
