From 6032ae108064650324b2c45352e1baa5b36961cc Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 29 Mar 2021 13:47:55 -0700 Subject: Project tab --- core/src/Model/Project.cpp | 15 +++++++++++++++ core/src/Model/Project.hpp | 17 +++++++++++++++++ core/src/Model/fwd.hpp | 3 +++ 3 files changed, 35 insertions(+) create mode 100644 core/src/Model/Project.cpp create mode 100644 core/src/Model/Project.hpp (limited to 'core/src/Model') diff --git a/core/src/Model/Project.cpp b/core/src/Model/Project.cpp new file mode 100644 index 0000000..f301bb8 --- /dev/null +++ b/core/src/Model/Project.cpp @@ -0,0 +1,15 @@ +#include "Project.hpp" + +#include + +const std::filesystem::path& Project::GetPath() const { + return mRootPath; +} + +const std::string& Project::GetName() const { + return mName; +} + +void Project::SetName(std::string name) { + mName = std::move(name); +} diff --git a/core/src/Model/Project.hpp b/core/src/Model/Project.hpp new file mode 100644 index 0000000..34ae1d7 --- /dev/null +++ b/core/src/Model/Project.hpp @@ -0,0 +1,17 @@ +#pragma once + +#include +#include + +class Project { +public: + std::filesystem::path mRootPath; + std::string mName; + +public: + // Path to a *directory* that contains the project file. + const std::filesystem::path& GetPath() const; + + const std::string& GetName() const; + void SetName(std::string name); +}; diff --git a/core/src/Model/fwd.hpp b/core/src/Model/fwd.hpp index 6f70f09..f5a5818 100644 --- a/core/src/Model/fwd.hpp +++ b/core/src/Model/fwd.hpp @@ -1 +1,4 @@ #pragma once + +// Project.hpp +class Project; -- cgit v1.2.3-70-g09d2