Add CMakeLists for all datastructs

+ Reorder, refactor comments
This commit is contained in:
2020-07-11 20:55:15 -04:00
parent be91573abc
commit a692a0f631
22 changed files with 168 additions and 50 deletions

View File

@@ -0,0 +1,18 @@
###############################################################################
## Author: Shaun Reed ##
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
## About: An example of a circular singly linked list implementation ##
## ##
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
##############################################################################
## CMakeLists.txt
#
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
# Define the project name
project(CircleSingle)
# Define source files
set(SRC driver.cpp circlesinglelist.cpp)
# Build an executable
add_executable(CircleSingleDriver ${SRC})

View File

@@ -40,7 +40,7 @@ CircleSingleList::CircleSingleList(const CircleSingleList& rhs)
/** operator=
* @brief Deep copy of the rhs CircleSingleList object
* Pass rhs by value to create local copy, swap its data with our tail
* Swapped local copy now with previous tail data deleted at end of scope using destr
* Swapped local copy deleted at end of scope using destructor
*
* @param rhs CircleSingleList object
* @return CircleSingleList& A deep copy of the rhs CircleSingleList
@@ -53,7 +53,7 @@ CircleSingleList CircleSingleList::operator=(CircleSingleList rhs)
}
/** destructor
* @brief Destroy the CircleSingleList::CircleSingleList object
* @brief Destroy the CircleSingleList object
*/
CircleSingleList::~CircleSingleList()
{
@@ -80,7 +80,7 @@ bool CircleSingleList::insert(int val)
/** insert at
* @brief Inserts a value in the place of a given key
* Key Node found is moved to the newNode->next positon
* Key Node found is moved to the newNode->next position
*
* @param key The value to search for to determine insert location
* @param val The value to be inserted into the list