Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from jvdcf/parser-csv
Browse files Browse the repository at this point in the history
Adding first parser
  • Loading branch information
guilherme-ds-matos authored Oct 23, 2023
2 parents 59ae003 + 561a9ac commit ebd63e0
Show file tree
Hide file tree
Showing 11 changed files with 502 additions and 234 deletions.
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,14 @@
# CLion IDE
cmake-build-debug/
.idea/
docs/output/
docs/output/

# Custom CMake to Makefile workflow
AED2324_PRJ1_G23
cmake_install.cmake
CMakeCache.txt
CMakeDoxyfile.in
CMakeDoxygenDefaults.cmake
Doxyfile
Makefile
CMakeFiles/
36 changes: 36 additions & 0 deletions 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.26)
project(AED2324_PRJ1_G23)

set(CMAKE_CXX_STANDARD 20)

# Doxygen Build
find_package(Doxygen)
if(DOXYGEN_FOUND)
set(BUILD_DOC_DIR "${CMAKE_SOURCE_DIR}/docs/output")
if(NOT EXISTS "${BUILD_DOC_DIR}")
file(MAKE_DIRECTORY "${BUILD_DOC_DIR}")
endif()

set(DOXYGEN_IN "${CMAKE_CURRENT_SOURCE_DIR}/docs/Doxyfile")
set(DOXYGEN_OUT "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile")
configure_file("${DOXYGEN_IN}" "${DOXYGEN_OUT}" @ONLY)

message("Doxygen build started")
add_custom_target(Doxygen ALL
COMMAND "${DOXYGEN_EXECUTABLE}" "${DOXYGEN_OUT}"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Generating API documentation with Doxygen"
VERBATIM)
else(DOXYGEN_FOUND)
message("Doxygen needs to be installed to generate the documentation.")
endif(DOXYGEN_FOUND)

# Project build
add_executable(AED2324_PRJ1_G23 main.cpp
src/appClasses.cpp src/appClasses.hpp
src/appClassesPerUC.cpp src/appClassesPerUC.hpp
src/appStudentsClasses.cpp src/appStudentsClasses.hpp
src/classes.cpp src/classes.hpp
src/classesPerUC.cpp src/classesPerUC.hpp
src/studentsClasses.cpp src/studentsClasses.hpp
src/Utils.cpp src/Utils.hpp)
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.26)
project(AED2324_PRJ1_G23)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)

# Doxygen Build
find_package(Doxygen)
Expand Down Expand Up @@ -32,4 +32,5 @@ add_executable(AED2324_PRJ1_G23 main.cpp
src/appStudentsClasses.cpp src/appStudentsClasses.hpp
src/classes.cpp src/classes.hpp
src/classesPerUC.cpp src/classesPerUC.hpp
src/studentsClasses.cpp src/studentsClasses.hpp)
src/studentsClasses.cpp src/studentsClasses.hpp
src/Utils.cpp src/Utils.hpp)
21 changes: 19 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
#include "src/appClasses.hpp"
#include "src/appClassesPerUC.hpp"
#include "src/appStudentsClasses.hpp"
#include "src/classes.hpp"
#include "src/classesPerUC.hpp"
#include "src/studentsClasses.hpp"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>

int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
std::ifstream file = std::ifstream("schedule/classes_per_uc.csv");
std::string contents;
std::ostringstream sstr;
sstr << file.rdbuf();
contents = sstr.str();
AppCPU cpu = AppCPU(contents);
cpu.display();

//std::cout << "Hello, World!" << std::endl;
return 0;
}
Loading

0 comments on commit ebd63e0

Please sign in to comment.