Skip to content

Commit 5db76be

Browse files
author
Brendon
committed
Add more files to check through CPPLINT
1 parent 1349689 commit 5db76be

File tree

7 files changed

+58
-44
lines changed

7 files changed

+58
-44
lines changed

IndividualMiniprojectC++/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,17 @@ if (CPPLINT)
8484
src/RouteController.cpp
8585
src/MyApp.cpp
8686
src/Globals.cpp
87+
include/Course.h
88+
include/Department.h
89+
include/MyFileDatabase.h
90+
include/RouteController.h
91+
include/MyApp.h
92+
include/Globals.h
8793
test/CourseUnitTests.cpp
94+
test/DepartmentTests.cpp
95+
test/MyFileDatabaseTests.cpp
96+
test/MyAppTests.cpp
97+
test/RouteControllerTests.cpp
8898
)
8999

90100
# Custom target to run cpplint

IndividualMiniprojectC++/include/Course.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
// Copyright 2024 Chun-Yao Hsieh @ Columbia University. All rights reserved.
12
#include <string>
2-
#ifndef COURSE_H
3-
#define COURSE_H
3+
#ifndef INDIVIDUALMINIPROJECTC___INCLUDE_COURSE_H_
4+
#define INDIVIDUALMINIPROJECTC___INCLUDE_COURSE_H_
45

56
class Course {
67
private:
@@ -34,4 +35,4 @@ class Course {
3435
void deserialize(std::istream& in);
3536
};
3637

37-
#endif
38+
#endif // INDIVIDUALMINIPROJECTC___INCLUDE_COURSE_H_

IndividualMiniprojectC++/include/Department.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
// Copyright 2024 Chun-Yao Hsieh @ Columbia University. All rights reserved.
12
#include <string>
23
#include <map>
4+
#include <memory>
5+
36
#include "Course.h"
4-
#ifndef DEPARTMENT_H
5-
#define DEPARTMENT_H
67

7-
#include <map>
8-
#include <string>
9-
#include <memory>
8+
#ifndef INDIVIDUALMINIPROJECTC___INCLUDE_DEPARTMENT_H_
9+
#define INDIVIDUALMINIPROJECTC___INCLUDE_DEPARTMENT_H_
10+
11+
1012

1113
class Department {
1214
public:
@@ -34,6 +36,4 @@ class Department {
3436
std::map<std::string, std::shared_ptr<Course>> courses;
3537
};
3638

37-
38-
39-
#endif
39+
#endif // INDIVIDUALMINIPROJECTC___INCLUDE_DEPARTMENT_H_
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
// Copyright 2024 Chun-Yao Hsieh @ Columbia University. All rights reserved.
12
#include "MyFileDatabase.h"
23

3-
#ifndef GLOBALS_H
4-
#define GLOBALS_H
4+
#ifndef INDIVIDUALMINIPROJECTC___INCLUDE_GLOBALS_H_
5+
#define INDIVIDUALMINIPROJECTC___INCLUDE_GLOBALS_H_
56

67
extern MyFileDatabase* globalDatabase;
78

8-
9-
#endif
9+
#endif // INDIVIDUALMINIPROJECTC___INCLUDE_GLOBALS_H_

IndividualMiniprojectC++/include/MyApp.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#ifndef MYAPP_H
2-
#define MYAPP_H
1+
// Copyright 2024 Chun-Yao Hsieh @ Columbia University. All rights reserved.
2+
#ifndef INDIVIDUALMINIPROJECTC___INCLUDE_MYAPP_H_
3+
#define INDIVIDUALMINIPROJECTC___INCLUDE_MYAPP_H_
34

45
#include <string>
56
#include <map>
@@ -22,4 +23,4 @@ class MyApp {
2223
static bool saveData;
2324
};
2425

25-
#endif
26+
#endif // INDIVIDUALMINIPROJECTC___INCLUDE_MYAPP_H_

IndividualMiniprojectC++/include/MyFileDatabase.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// Copyright 2024 Chun-Yao Hsieh @ Columbia University. All rights reserved.
12
#include "Department.h"
23
#include <map>
34
#include <string>
45

5-
#ifndef MYFILEDATABASE_H
6-
#define MYFILEDATABASE_H
6+
#ifndef INDIVIDUALMINIPROJECTC___INCLUDE_MYFILEDATABASE_H_
7+
#define INDIVIDUALMINIPROJECTC___INCLUDE_MYFILEDATABASE_H_
78

89
class MyFileDatabase {
910
public:
@@ -21,4 +22,4 @@ class MyFileDatabase {
2122
std::string filePath;
2223
};
2324

24-
#endif
25+
#endif // INDIVIDUALMINIPROJECTC___INCLUDE_MYFILEDATABASE_H_
Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
#ifndef ROUTECONTROLLER_H
2-
#define ROUTECONTROLLER_H
1+
// Copyright 2024 Chun-Yao Hsieh @ Columbia University. All rights reserved.
2+
#ifndef INDIVIDUALMINIPROJECTC___INCLUDE_ROUTECONTROLLER_H_
3+
#define INDIVIDUALMINIPROJECTC___INCLUDE_ROUTECONTROLLER_H_
34

4-
#include "crow.h"
5-
#include "Globals.h"
6-
#include "MyFileDatabase.h"
5+
#include "crow.h" // NOLINT
6+
#include "Globals.h" // NOLINT
7+
#include "MyFileDatabase.h" // NOLINT
78

89
class RouteController {
910
private:
1011
MyFileDatabase* myFileDatabase;
1112

1213
public:
13-
void initRoutes(crow::App<>& app);
14+
void initRoutes(crow::App<>& app); // NOLINT
1415
void setDatabase(MyFileDatabase* db);
1516

16-
void index(crow::response& res);
17-
void retrieveDepartment(const crow::request& req, crow::response& res);
18-
void retrieveCourse(const crow::request& req, crow::response& res);
19-
void isCourseFull(const crow::request& req, crow::response& res);
20-
void getMajorCountFromDept(const crow::request& req, crow::response& res);
21-
void identifyDeptChair(const crow::request& req, crow::response& res);
22-
void findCourseLocation(const crow::request& req, crow::response& res);
23-
void findCourseInstructor(const crow::request& req, crow::response& res);
24-
void findCourseTime(const crow::request& req, crow::response& res);
25-
void addMajorToDept(const crow::request& req, crow::response& res);
26-
void removeMajorFromDept(const crow::request& req, crow::response& res);
27-
void setEnrollmentCount(const crow::request& req, crow::response& res);
28-
void setCourseLocation(const crow::request& req, crow::response& res);
29-
void setCourseInstructor(const crow::request& req, crow::response& res);
30-
void setCourseTime(const crow::request& req, crow::response& res);
31-
void dropStudentFromCourse(const crow::request&, crow::response& res);
17+
void index(crow::response& res); // NOLINT
18+
void retrieveDepartment(const crow::request& req, crow::response& res); // NOLINT
19+
void retrieveCourse(const crow::request& req, crow::response& res); // NOLINT
20+
void isCourseFull(const crow::request& req, crow::response& res); // NOLINT
21+
void getMajorCountFromDept(const crow::request& req, crow::response& res); // NOLINT
22+
void identifyDeptChair(const crow::request& req, crow::response& res); // NOLINT
23+
void findCourseLocation(const crow::request& req, crow::response& res); // NOLINT
24+
void findCourseInstructor(const crow::request& req, crow::response& res); // NOLINT
25+
void findCourseTime(const crow::request& req, crow::response& res); // NOLINT
26+
void addMajorToDept(const crow::request& req, crow::response& res); // NOLINT
27+
void removeMajorFromDept(const crow::request& req, crow::response& res); // NOLINT
28+
void setEnrollmentCount(const crow::request& req, crow::response& res); // NOLINT
29+
void setCourseLocation(const crow::request& req, crow::response& res); // NOLINT
30+
void setCourseInstructor(const crow::request& req, crow::response& res); // NOLINT
31+
void setCourseTime(const crow::request& req, crow::response& res); // NOLINT
32+
void dropStudentFromCourse(const crow::request&, crow::response& res); // NOLINT
3233
};
3334

34-
#endif
35+
#endif // INDIVIDUALMINIPROJECTC___INCLUDE_ROUTECONTROLLER_H_

0 commit comments

Comments
 (0)