From 853a536fc279e931277e2021aa9274edcd6328c4 Mon Sep 17 00:00:00 2001 From: gregfoss Date: Sat, 19 Oct 2019 17:01:43 -0400 Subject: [PATCH 1/8] Adding simple style guides --- breadcrumbs/doc/style/style.cpp | 20 ++++++++++++++++++++ breadcrumbs/doc/style/style.hpp | 30 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 breadcrumbs/doc/style/style.cpp create mode 100644 breadcrumbs/doc/style/style.hpp diff --git a/breadcrumbs/doc/style/style.cpp b/breadcrumbs/doc/style/style.cpp new file mode 100644 index 0000000..26df8b9 --- /dev/null +++ b/breadcrumbs/doc/style/style.cpp @@ -0,0 +1,20 @@ +/* + +This file correspondes to style.hpp and is an example of +the .cpp files that would correspond to the .hpp file. + +*/ + + +#include "style.hpp" + + +char TestClass::attrTwoTimesTwo() +{ + return c_attrTwo << 1 +} + +int TestClass::getAttrSum() +{ + return c_attrTwo + i_attrOne +} diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp new file mode 100644 index 0000000..3005889 --- /dev/null +++ b/breadcrumbs/doc/style/style.hpp @@ -0,0 +1,30 @@ +/* + +This file contains the style of each programming construct +to use in this project. + +It should be followed to the letter! All spaces are +necessary! Make sure to take not of camel case and other +variable naming schemes! + +*/ + +// Header File: +class TestClass +{ +public: + // Constructors + TestClass(int AttrOne, char AttrTwo); + // Mutator methods + int getAttrSum(); + char attrTwoTimesTwo(); + void setAttrOne(int newAttrOne) { i_attrOne = newAttrOne } + void setAttrTwo(char newAttrTwo) { c_attrTwo = newAttrTwo } + // Accessor methods + int getAttrOne() { return i_attrOne } + char getAttrTwo() { return c_attrTwo } +private: + // Private variables + int i_attrOne = 0; + char c_attrTwo; +}; \ No newline at end of file From c4bf594cb1697f7f1411618d88e6004eb4f890be Mon Sep 17 00:00:00 2001 From: Nathan A Shaw Date: Sun, 20 Oct 2019 01:25:53 -0400 Subject: [PATCH 2/8] Update style.hpp --- breadcrumbs/doc/style/style.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index 3005889..a4b4c78 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -4,7 +4,7 @@ This file contains the style of each programming construct to use in this project. It should be followed to the letter! All spaces are -necessary! Make sure to take not of camel case and other +necessary! Make sure to take note of camel case and other variable naming schemes! */ @@ -27,4 +27,4 @@ private: // Private variables int i_attrOne = 0; char c_attrTwo; -}; \ No newline at end of file +}; From 01f38bbd765d1d78d7166c3f753f045f1f2ddb5c Mon Sep 17 00:00:00 2001 From: Matt Scalzo Date: Mon, 4 Nov 2019 16:27:49 -0500 Subject: [PATCH 3/8] Header file duplication avoidance --- breadcrumbs/doc/style/style.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index a4b4c78..8a1fd66 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -9,6 +9,9 @@ variable naming schemes! */ +#ifndef STYLE_H +#defind STYLE_H + // Header File: class TestClass { @@ -28,3 +31,5 @@ private: int i_attrOne = 0; char c_attrTwo; }; + +#endif \ No newline at end of file From ca51b713af8b9a8e611e84d43d2699ff9cb29684 Mon Sep 17 00:00:00 2001 From: Matt Scalzo Date: Mon, 4 Nov 2019 16:32:27 -0500 Subject: [PATCH 4/8] Fixed typos --- breadcrumbs/doc/style/style.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index 8a1fd66..65d05f6 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -10,7 +10,7 @@ variable naming schemes! */ #ifndef STYLE_H -#defind STYLE_H +#define STYLE_H // Header File: class TestClass @@ -32,4 +32,4 @@ private: char c_attrTwo; }; -#endif \ No newline at end of file +#endif From 2bdd6a3fff8f51acf6488c5341650d3d23837e81 Mon Sep 17 00:00:00 2001 From: Matt Scalzo Date: Mon, 4 Nov 2019 16:48:07 -0500 Subject: [PATCH 5/8] Added Includes --- breadcrumbs/doc/style/style.hpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index 65d05f6..c08e4f5 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -1,16 +1,20 @@ /* -This file contains the style of each programming construct -to use in this project. +* This file contains the style of each programming construct +* to use in this project. -It should be followed to the letter! All spaces are -necessary! Make sure to take note of camel case and other -variable naming schemes! +* It should be followed to the letter! All spaces are +* necessary! Make sure to take note of camel case and other +* variable naming schemes! */ -#ifndef STYLE_H -#define STYLE_H +#ifndef STYLE_HPP +#define STYLE_HPP + +#include stdio.h + +#include style.hpp // Header File: class TestClass From 91a50636ad06d76124ebc864bccbebd9a87012d8 Mon Sep 17 00:00:00 2001 From: Matt Scalzo Date: Mon, 4 Nov 2019 16:51:42 -0500 Subject: [PATCH 6/8] Fixed includes --- breadcrumbs/doc/style/style.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index c08e4f5..a4d0573 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -12,9 +12,9 @@ #ifndef STYLE_HPP #define STYLE_HPP -#include stdio.h +#include -#include style.hpp +#include "style.hpp" // Header File: class TestClass From ed54fbb065d4305460a743bff701851f309786f4 Mon Sep 17 00:00:00 2001 From: Matt Scalzo Date: Mon, 4 Nov 2019 16:54:48 -0500 Subject: [PATCH 7/8] Fixed * alignment --- breadcrumbs/doc/style/style.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index a4d0573..cc12632 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -1,13 +1,13 @@ /* - -* This file contains the style of each programming construct -* to use in this project. - -* It should be followed to the letter! All spaces are -* necessary! Make sure to take note of camel case and other -* variable naming schemes! - -*/ + * + * This file contains the style of each programming construct + * to use in this project. + * + * It should be followed to the letter! All spaces are + * necessary! Make sure to take note of camel case and other + * variable naming schemes! + + */ #ifndef STYLE_HPP #define STYLE_HPP From 05e331ada07efc0166687e5bb4de55791ad7e791 Mon Sep 17 00:00:00 2001 From: Matt Scalzo Date: Mon, 4 Nov 2019 16:55:34 -0500 Subject: [PATCH 8/8] Fixed * again --- breadcrumbs/doc/style/style.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/breadcrumbs/doc/style/style.hpp b/breadcrumbs/doc/style/style.hpp index cc12632..dd26d76 100644 --- a/breadcrumbs/doc/style/style.hpp +++ b/breadcrumbs/doc/style/style.hpp @@ -6,7 +6,7 @@ * It should be followed to the letter! All spaces are * necessary! Make sure to take note of camel case and other * variable naming schemes! - + * */ #ifndef STYLE_HPP