summaryrefslogtreecommitdiff
path: root/core/src/Model
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-03-29 13:47:55 -0700
committerrtk0c <[email protected]>2021-03-29 13:47:55 -0700
commit6032ae108064650324b2c45352e1baa5b36961cc (patch)
tree79ebd1df933ca9c3d8de4a5a537fffeadf7a6c9b /core/src/Model
parent2d7e772909571676dd4266337d43086bd2927e93 (diff)
Project tab
Diffstat (limited to 'core/src/Model')
-rw-r--r--core/src/Model/Project.cpp15
-rw-r--r--core/src/Model/Project.hpp17
-rw-r--r--core/src/Model/fwd.hpp3
3 files changed, 35 insertions, 0 deletions
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 <utility>
+
+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 <filesystem>
+#include <string>
+
+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;