diff --git a/LICENSE b/LICENSE
index 97ab189..9ec03dc 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,8 +1,10 @@
Notes Toolkit (NotesTK) is a set of tools for building applications focused on taking and organising notes.
Copyright (C) 2023 James Grogan (grogan.ox@gmail.com)
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
- You should have received a copy of the GNU General Public License along with this program. If not, see .
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+See https://opensource.org/licenses/MIT
diff --git a/README.md b/README.md
index 1574540..bdf29ab 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,61 @@
-# Stuff From Scratch
+# NotesTK
-This is a hobby-repo I use for learning about different software technologies by trying to build stuff from scratch.
+Notes Toolkit (NotesTK) is a set of tools for building applications focused on taking and organising notes, like study or research materials.
-It covers a bunch of areas:
+## Project Goals
-* Build tooling
-* Audio and Video
-* 3D modelling
-* Desktop window management and UIs
+* Cross-platform
+* Low third-party dependencies
+* Permissive licensing
+* Simplicity over performance
-Nothing here should be used in a real project :)
+## Project Status
+🚨🚨🚨 The codebase is at a very early/prototype stage and under heavy active development🚨🚨🚨
+In addition to feature development I've been using it to get up-to-speed on various media formats and desktop and rendering APIs. It is strongly recommended to only use it as a reading reference.
+
+Expect:
+
+* No Docs or tagged releases
+* Large commits and significant breaking changes
+* Unreliable/untested APIs
+* Naive/low-performance implementations
+
+The only currently recommended use case is if you are implementing some element of the library functionality and want to see how someone else has tackled it, maybe you will see something useful.
+
+# Building
+
+Many project features (e.g. Wayland integration) only build if suitable third-party dependencies are found on the system, otherwise they will be automatically disabled. You can find dependency requirements in the `README.md` file in each module's `src`directory.
+
+A minimal set of dependencies for each platform are included below.
+
+## Linux
+
+Install dependencies:
+
+```bash
+sudo apt-get install build-essential pkg-config cmake
+```
+
+Build:
+
+```bash
+mkdir build
+cd build
+cmake $PATH_TO_SOURCE
+make
+apps/$NAME_OF_APP
+```
+
+## Windows
+
+Tested with Visual Studio 17 with 'Desktop Development with C++' tooling, including ATL and Windows SDK 10 (10.0.19041.0). Additionally, install `cmake`.
+
+```bash
+mkdir build
+cd build
+cmake $PATH_TO_SOURCE
+```
+
+You can open the resulting `NotesTK.sln`in Visual Studio and build.
diff --git a/apps/notes_tk/NotesTk.cpp b/apps/notes_tk/NotesTk.cpp
index 7b2ef2e..d230835 100644
--- a/apps/notes_tk/NotesTk.cpp
+++ b/apps/notes_tk/NotesTk.cpp
@@ -16,7 +16,7 @@
#include "DesktopManager.h"
#include "MainApplication.h"
-NotesTk::NotesTk(Ptr args, Ptr mainApp)
+NotesTk::NotesTk(std::unique_ptr args, std::unique_ptr mainApp)
: GuiApplication(std::move(args), std::move(mainApp))
{
diff --git a/apps/notes_tk/NotesTk.h b/apps/notes_tk/NotesTk.h
index 1206165..29e0567 100644
--- a/apps/notes_tk/NotesTk.h
+++ b/apps/notes_tk/NotesTk.h
@@ -5,7 +5,7 @@
class NotesTk : public GuiApplication
{
public:
- NotesTk(Ptr args = nullptr, Ptr mainApp = nullptr);
+ NotesTk(std::unique_ptr args = nullptr, std::unique_ptr mainApp = nullptr);
protected:
void initializeViews() override;
diff --git a/apps/notes_tk/audio_editor/AudioEditorView.cpp b/apps/notes_tk/audio_editor/AudioEditorView.cpp
index 942cb40..d234cf7 100644
--- a/apps/notes_tk/audio_editor/AudioEditorView.cpp
+++ b/apps/notes_tk/audio_editor/AudioEditorView.cpp
@@ -12,7 +12,7 @@ AudioEditorView::AudioEditorView()
addWidget(std::move(label));
}
-Ptr AudioEditorView::Create()
+std::unique_ptr AudioEditorView::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/audio_editor/AudioEditorView.h b/apps/notes_tk/audio_editor/AudioEditorView.h
index f00d723..d5de4ad 100644
--- a/apps/notes_tk/audio_editor/AudioEditorView.h
+++ b/apps/notes_tk/audio_editor/AudioEditorView.h
@@ -8,7 +8,7 @@ public:
AudioEditorView();
- static Ptr Create();
+ static std::unique_ptr Create();
};
-using AudioEditorViewUPtr = Ptr;
+using AudioEditorViewUPtr = std::unique_ptr;
diff --git a/apps/notes_tk/canvas/CanvasController.cpp b/apps/notes_tk/canvas/CanvasController.cpp
index 248415b..83829d3 100644
--- a/apps/notes_tk/canvas/CanvasController.cpp
+++ b/apps/notes_tk/canvas/CanvasController.cpp
@@ -1,6 +1,6 @@
#include "CanvasController.h"
-Ptr CanvasController::Create()
+std::unique_ptr CanvasController::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/canvas/CanvasController.h b/apps/notes_tk/canvas/CanvasController.h
index 88ece5c..9d56ec5 100644
--- a/apps/notes_tk/canvas/CanvasController.h
+++ b/apps/notes_tk/canvas/CanvasController.h
@@ -1,9 +1,9 @@
#pragma once
-#include "Pointer.h"
+#include
class CanvasController
{
public:
- static Ptr Create();
+ static std::unique_ptr Create();
};
diff --git a/apps/notes_tk/canvas/CanvasDrawingArea.h b/apps/notes_tk/canvas/CanvasDrawingArea.h
index 1fa065f..c42034e 100644
--- a/apps/notes_tk/canvas/CanvasDrawingArea.h
+++ b/apps/notes_tk/canvas/CanvasDrawingArea.h
@@ -24,6 +24,6 @@ private:
CanvasDrawCommand mActiveDrawingCommand{CanvasDrawCommand::LINE};
- Vector > mSceneNodes;
+ std::vector > mSceneNodes;
bool mContentDirty{false};
};
diff --git a/apps/notes_tk/canvas/CanvasView.cpp b/apps/notes_tk/canvas/CanvasView.cpp
index 5ead04f..3dd447c 100644
--- a/apps/notes_tk/canvas/CanvasView.cpp
+++ b/apps/notes_tk/canvas/CanvasView.cpp
@@ -27,7 +27,7 @@ CanvasView::~CanvasView()
}
-Ptr CanvasView::Create()
+std::unique_ptr CanvasView::Create()
{
return std::make_unique();
}
@@ -70,7 +70,7 @@ void CanvasView::onDrawCommandChanged(CanvasDrawCommand command)
mDrawingArea->setActiveDrawingCommand(command);
}
-Ptr CanvasView::initializeCacheButtons()
+std::unique_ptr CanvasView::initializeCacheButtons()
{
auto saveButton = Button::Create();
saveButton->setLabel("Save");
diff --git a/apps/notes_tk/canvas/CanvasView.h b/apps/notes_tk/canvas/CanvasView.h
index e4053b6..f845f2d 100644
--- a/apps/notes_tk/canvas/CanvasView.h
+++ b/apps/notes_tk/canvas/CanvasView.h
@@ -13,17 +13,17 @@ public:
~CanvasView();
- static Ptr Create();
+ static std::unique_ptr Create();
private:
void onDrawCommandChanged(CanvasDrawCommand command);
void initialize();
- Ptr initializeCacheButtons();
+ std::unique_ptr initializeCacheButtons();
- Ptr mController;
+ std::unique_ptr mController;
CanvasDrawingArea* mDrawingArea{nullptr};
};
-using CanvasViewPtr = Ptr;
+using CanvasViewPtr = std::unique_ptr;
diff --git a/apps/notes_tk/image_editor/ImageEditorView.cpp b/apps/notes_tk/image_editor/ImageEditorView.cpp
index a7c5a91..85c04ff 100644
--- a/apps/notes_tk/image_editor/ImageEditorView.cpp
+++ b/apps/notes_tk/image_editor/ImageEditorView.cpp
@@ -28,7 +28,7 @@ ImageEditorView::~ImageEditorView()
}
-Ptr ImageEditorView::Create()
+std::unique_ptr ImageEditorView::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/image_editor/ImageEditorView.h b/apps/notes_tk/image_editor/ImageEditorView.h
index 3e3ffc0..070aae4 100644
--- a/apps/notes_tk/image_editor/ImageEditorView.h
+++ b/apps/notes_tk/image_editor/ImageEditorView.h
@@ -10,7 +10,7 @@ public:
virtual ~ImageEditorView();
- static Ptr Create();
+ static std::unique_ptr Create();
};
-using ImageEditorViewUPtr = Ptr;
+using ImageEditorViewUPtr = std::unique_ptr;
diff --git a/apps/notes_tk/image_editor/ImageViewWidget.h b/apps/notes_tk/image_editor/ImageViewWidget.h
index 84cf9ba..cb45b45 100644
--- a/apps/notes_tk/image_editor/ImageViewWidget.h
+++ b/apps/notes_tk/image_editor/ImageViewWidget.h
@@ -16,5 +16,5 @@ private:
unsigned mNumX{5};
unsigned mNumY{5};
- Ptr mGridNode;
+ std::unique_ptr mGridNode;
};
diff --git a/apps/notes_tk/main-win.cpp b/apps/notes_tk/main-win.cpp
index c14df2e..30019cc 100644
--- a/apps/notes_tk/main-win.cpp
+++ b/apps/notes_tk/main-win.cpp
@@ -13,8 +13,8 @@
#include "windows.h"
#include
-#include "Vector.h"
-#include "String.h"
+#include
+#include
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
{
diff --git a/apps/notes_tk/main.cpp b/apps/notes_tk/main.cpp
index fbd0fbb..f864fb8 100644
--- a/apps/notes_tk/main.cpp
+++ b/apps/notes_tk/main.cpp
@@ -1,4 +1,4 @@
-#include "Pointer.h"
+#include
#include "NotesTk.h"
#include "MainApplication.h"
@@ -12,7 +12,7 @@ int main(int argc, char *argv[])
// Start the gui app
auto app = NotesTk(std::move(args));
- app.setUiInterfaceBackend(UiInterfaceFactory::Backend::WAYLAND_RASTER);
+ //app.setUiInterfaceBackend(UiInterfaceFactory::Backend::X11_RASTER);
app.run();
return 0;
diff --git a/apps/notes_tk/mesh_viewer/MeshViewerView.cpp b/apps/notes_tk/mesh_viewer/MeshViewerView.cpp
index 07de438..e5644a9 100644
--- a/apps/notes_tk/mesh_viewer/MeshViewerView.cpp
+++ b/apps/notes_tk/mesh_viewer/MeshViewerView.cpp
@@ -10,7 +10,7 @@
#include
-Ptr MeshViewerView::Create()
+std::unique_ptr MeshViewerView::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/mesh_viewer/MeshViewerView.h b/apps/notes_tk/mesh_viewer/MeshViewerView.h
index 7c48f6a..5fbfce7 100644
--- a/apps/notes_tk/mesh_viewer/MeshViewerView.h
+++ b/apps/notes_tk/mesh_viewer/MeshViewerView.h
@@ -10,10 +10,10 @@ class MeshViewerView : public Widget
public:
MeshViewerView();
~MeshViewerView();
- static Ptr Create();
+ static std::unique_ptr Create();
void doPaint(const PaintEvent* event) override;
private:
- Ptr mMesh;
- Ptr mMeshNode;
+ std::unique_ptr mMesh;
+ std::unique_ptr mMeshNode;
};
diff --git a/apps/notes_tk/text_editor/PlainTextDocument.cpp b/apps/notes_tk/text_editor/PlainTextDocument.cpp
index c2628b8..18e5782 100644
--- a/apps/notes_tk/text_editor/PlainTextDocument.cpp
+++ b/apps/notes_tk/text_editor/PlainTextDocument.cpp
@@ -6,17 +6,17 @@ PlainTextDocument::PlainTextDocument()
}
-Ptr PlainTextDocument::Create()
+std::unique_ptr PlainTextDocument::Create()
{
return std::make_unique();
}
-String PlainTextDocument::GetContent() const
+std::string PlainTextDocument::GetContent() const
{
return mContent;
}
-void PlainTextDocument::SetContent(const String& content)
+void PlainTextDocument::SetContent(const std::string& content)
{
mContent = content;
}
diff --git a/apps/notes_tk/text_editor/PlainTextDocument.h b/apps/notes_tk/text_editor/PlainTextDocument.h
index f3354a5..ae32420 100644
--- a/apps/notes_tk/text_editor/PlainTextDocument.h
+++ b/apps/notes_tk/text_editor/PlainTextDocument.h
@@ -1,24 +1,24 @@
#pragma once
-#include "String.h"
-#include "Pointer.h"
+#include
+#include
class PlainTextDocument
{
- String mContent;
+ std::string mContent;
public:
PlainTextDocument();
- static Ptr Create();
+ static std::unique_ptr Create();
- String GetContent() const;
+ std::string GetContent() const;
- void SetContent(const String& content);
+ void SetContent(const std::string& content);
void Clear();
};
-using PlainTextDocumentUPtr = Ptr;
+using PlainTextDocumentUPtr = std::unique_ptr;
diff --git a/apps/notes_tk/text_editor/TextEditorController.cpp b/apps/notes_tk/text_editor/TextEditorController.cpp
index c2fe661..36adacb 100644
--- a/apps/notes_tk/text_editor/TextEditorController.cpp
+++ b/apps/notes_tk/text_editor/TextEditorController.cpp
@@ -9,17 +9,17 @@ TextEditorController::TextEditorController()
}
-Ptr TextEditorController::Create()
+std::unique_ptr TextEditorController::Create()
{
return std::make_unique();
}
-void TextEditorController::SetContent(const String& content)
+void TextEditorController::SetContent(const std::string& content)
{
mModel->GetDocument()->SetContent(content);
}
-String TextEditorController::GetContent() const
+std::string TextEditorController::GetContent() const
{
return mModel->GetDocument()->GetContent();
}
diff --git a/apps/notes_tk/text_editor/TextEditorController.h b/apps/notes_tk/text_editor/TextEditorController.h
index 8601a7e..37d717d 100644
--- a/apps/notes_tk/text_editor/TextEditorController.h
+++ b/apps/notes_tk/text_editor/TextEditorController.h
@@ -1,5 +1,5 @@
#pragma once
-#include "Pointer.h"
+#include
#include
#include "TextEditorModel.h"
@@ -9,7 +9,7 @@ public:
TextEditorController();
- static Ptr Create();
+ static std::unique_ptr Create();
void OnSave();
@@ -17,9 +17,9 @@ public:
void OnLoad();
- String GetContent() const;
+ std::string GetContent() const;
- void SetContent(const String& content);
+ void SetContent(const std::string& content);
void SetSavePath(const std::filesystem::path& path);
@@ -31,4 +31,4 @@ private:
std::filesystem::path mLoadPath;
};
-using TextEditorControllerUPtr = Ptr;
+using TextEditorControllerUPtr = std::unique_ptr;
diff --git a/apps/notes_tk/text_editor/TextEditorModel.cpp b/apps/notes_tk/text_editor/TextEditorModel.cpp
index 12cc345..9e299ec 100644
--- a/apps/notes_tk/text_editor/TextEditorModel.cpp
+++ b/apps/notes_tk/text_editor/TextEditorModel.cpp
@@ -6,7 +6,7 @@ TextEditorModel::TextEditorModel()
}
-Ptr TextEditorModel::Create()
+std::unique_ptr TextEditorModel::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/text_editor/TextEditorModel.h b/apps/notes_tk/text_editor/TextEditorModel.h
index 55e4d8e..39289e5 100644
--- a/apps/notes_tk/text_editor/TextEditorModel.h
+++ b/apps/notes_tk/text_editor/TextEditorModel.h
@@ -1,7 +1,7 @@
#pragma once
#include "PlainTextDocument.h"
-#include "Pointer.h"
+#include
class TextEditorModel
{
@@ -11,9 +11,9 @@ public:
TextEditorModel();
- static Ptr Create();
+ static std::unique_ptr Create();
PlainTextDocument* GetDocument() const;
};
-using TextEditorModelUPtr = Ptr;
+using TextEditorModelUPtr = std::unique_ptr;
diff --git a/apps/notes_tk/text_editor/TextEditorView.cpp b/apps/notes_tk/text_editor/TextEditorView.cpp
index 339dd52..ab072d3 100644
--- a/apps/notes_tk/text_editor/TextEditorView.cpp
+++ b/apps/notes_tk/text_editor/TextEditorView.cpp
@@ -81,7 +81,7 @@ void TextEditorView::initialize()
addWidget(std::move(hSpacer));
}
-Ptr TextEditorView::Create()
+std::unique_ptr TextEditorView::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/text_editor/TextEditorView.h b/apps/notes_tk/text_editor/TextEditorView.h
index 957766f..40546da 100644
--- a/apps/notes_tk/text_editor/TextEditorView.h
+++ b/apps/notes_tk/text_editor/TextEditorView.h
@@ -13,7 +13,7 @@ class TextEditorView : public Widget
public:
TextEditorView();
- static Ptr Create();
+ static std::unique_ptr Create();
TextEditorController* getController();
@@ -23,4 +23,4 @@ private:
TextBox* mTextBox;
TextEditorControllerUPtr mController;
};
-using TextEditorViewUPtr = Ptr;
+using TextEditorViewUPtr = std::unique_ptr;
diff --git a/apps/notes_tk/web_client/WebClientView.cpp b/apps/notes_tk/web_client/WebClientView.cpp
index 099d3cb..92c9b6f 100644
--- a/apps/notes_tk/web_client/WebClientView.cpp
+++ b/apps/notes_tk/web_client/WebClientView.cpp
@@ -14,7 +14,7 @@ WebClientView::WebClientView()
addWidget(std::move(label));
}
-Ptr WebClientView::Create()
+std::unique_ptr WebClientView::Create()
{
return std::make_unique();
}
diff --git a/apps/notes_tk/web_client/WebClientView.h b/apps/notes_tk/web_client/WebClientView.h
index 309156d..32cd128 100644
--- a/apps/notes_tk/web_client/WebClientView.h
+++ b/apps/notes_tk/web_client/WebClientView.h
@@ -8,7 +8,7 @@ public:
WebClientView();
- static Ptr Create();
+ static std::unique_ptr Create();
};
-using WebClientViewUPtr = Ptr;
+using WebClientViewUPtr = std::unique_ptr;
diff --git a/apps/website-generator/ContentFile.cpp b/apps/website-generator/ContentFile.cpp
index 6f2c9e2..2d00b80 100644
--- a/apps/website-generator/ContentFile.cpp
+++ b/apps/website-generator/ContentFile.cpp
@@ -23,7 +23,7 @@ Path ContentFile::getFilename() const
return mFilename;
}
-String ContentFile::getOutputLocation() const
+std::string ContentFile::getOutputLocation() const
{
const auto metadata_item = getMetadataItem("save_as");
return metadata_item.empty() ? PathUtils::getBaseFilename(mFilename) : metadata_item;
@@ -55,7 +55,7 @@ void ContentFile::doLinkTagSubstitution(const Path& basePath)
}
}
-String ContentFile::getMetadataItem(const String& key) const
+std::string ContentFile::getMetadataItem(const std::string& key) const
{
const auto check = mMetadata.find(key);
if (check == mMetadata.end())
diff --git a/apps/website-generator/ContentFile.h b/apps/website-generator/ContentFile.h
index b240bd0..993a0a8 100644
--- a/apps/website-generator/ContentFile.h
+++ b/apps/website-generator/ContentFile.h
@@ -3,17 +3,17 @@
#include "MarkdownContentParser.h"
#include "File.h"
-#include "String.h"
+#include
#include
-#include Map.h
+#include
class MarkdownDocument;
class ContentFile
{
public:
- using FileMetadata = Map;
- using FileContentBody = Vector;
+ using FileMetadata = std::unordered_map;
+ using FileContentBody = std::vector;
ContentFile(const Path& filename);
@@ -23,9 +23,9 @@ public:
virtual void load();
- String getMetadataItem(const String& key) const;
+ std::string getMetadataItem(const std::string& key) const;
- virtual String getOutputLocation() const;
+ virtual std::string getOutputLocation() const;
MarkdownDocument* getContentBody() const
{
@@ -36,15 +36,15 @@ public:
void write(const Path& path);
- void setProcessedOutput(const String& output)
+ void setProcessedOutput(const std::string& output)
{
mProcessedOutput = output;
}
protected:
Path mFilename;
FileMetadata mMetadata;
- Ptr mContentBody;
- String mProcessedOutput;
+ std::unique_ptr mContentBody;
+ std::string mProcessedOutput;
};
class ContentArticle : public ContentFile
diff --git a/apps/website-generator/MarkdownContentParser.cpp b/apps/website-generator/MarkdownContentParser.cpp
index db148f4..382134b 100644
--- a/apps/website-generator/MarkdownContentParser.cpp
+++ b/apps/website-generator/MarkdownContentParser.cpp
@@ -7,7 +7,7 @@
#include "File.h"
-std::pair> MarkdownContentParser::run(const Path& path)
+std::pair> MarkdownContentParser::run(const Path& path)
{
FileMetadata metadata;
FileMetadata output_metadata;
@@ -15,7 +15,7 @@ std::pair> MarkdownCo
const auto lines = File(path).readLines();
bool metadata_finished = false;
- String content_body;
+ std::string content_body;
for (const auto& line : lines)
{
if (!metadata_finished)
@@ -54,11 +54,11 @@ std::pair> MarkdownCo
return {output_metadata, std::move(document)};
}
-Optional MarkdownContentParser::checkForMetadataItem(const String& line) const
+std::optional MarkdownContentParser::checkForMetadataItem(const std::string& line) const
{
unsigned char_count = 0;
- String prefix;
- String suffix;
+ std::string prefix;
+ std::string suffix;
bool building_prefix = true;
for (const auto c : line)
{
diff --git a/apps/website-generator/MarkdownContentParser.h b/apps/website-generator/MarkdownContentParser.h
index b8eeae6..5ab4f0c 100644
--- a/apps/website-generator/MarkdownContentParser.h
+++ b/apps/website-generator/MarkdownContentParser.h
@@ -1,10 +1,10 @@
#pragma once
-#include "String.h"
+#include
#include
-#include Map.h
+#include
#include
-#include "Vector.h"
+#include
using Path = std::filesystem::path;
@@ -13,10 +13,10 @@ class MarkdownDocument;
class MarkdownContentParser
{
public:
- using FileMetadataItem = std::pair;
- using FileMetadata = Map;
+ using FileMetadataItem = std::pair;
+ using FileMetadata = std::unordered_map;
- std::pair> run(const Path& path);
+ std::pair> run(const Path& path);
private:
- Optional checkForMetadataItem(const String& line) const;
+ std::optional checkForMetadataItem(const std::string& line) const;
};
diff --git a/apps/website-generator/SiteGeneratorConfig.cpp b/apps/website-generator/SiteGeneratorConfig.cpp
index 599441a..dd3375a 100644
--- a/apps/website-generator/SiteGeneratorConfig.cpp
+++ b/apps/website-generator/SiteGeneratorConfig.cpp
@@ -5,7 +5,7 @@ Path SiteGeneratorConfig::getThemePath() const
return mThemesPath;
}
-String SiteGeneratorConfig::getActiveTheme() const
+std::string SiteGeneratorConfig::getActiveTheme() const
{
return mActiveTheme;
}
@@ -15,7 +15,7 @@ void SiteGeneratorConfig::setThemePath(const Path& path)
mThemesPath = path;
}
-void SiteGeneratorConfig::setActiveTheme(const String& theme)
+void SiteGeneratorConfig::setActiveTheme(const std::string& theme)
{
mActiveTheme = theme;
}
diff --git a/apps/website-generator/SiteGeneratorConfig.h b/apps/website-generator/SiteGeneratorConfig.h
index 68e69ff..0970113 100644
--- a/apps/website-generator/SiteGeneratorConfig.h
+++ b/apps/website-generator/SiteGeneratorConfig.h
@@ -1,6 +1,6 @@
#pragma once
-#include "String.h"
+#include
#include
using Path = std::filesystem::path;
@@ -10,13 +10,13 @@ class SiteGeneratorConfig
public:
Path getThemePath() const;
- String getActiveTheme() const;
+ std::string getActiveTheme() const;
void setThemePath(const Path& path);
- void setActiveTheme(const String& theme);
+ void setActiveTheme(const std::string& theme);
private:
Path mThemesPath;
- String mActiveTheme;
+ std::string mActiveTheme;
};
diff --git a/apps/website-generator/WebsiteGenerator.cpp b/apps/website-generator/WebsiteGenerator.cpp
index c1967a4..0953933 100644
--- a/apps/website-generator/WebsiteGenerator.cpp
+++ b/apps/website-generator/WebsiteGenerator.cpp
@@ -30,7 +30,7 @@ WebsiteGenerator::~WebsiteGenerator()
}
-void WebsiteGenerator::findProject(const String& searchPath)
+void WebsiteGenerator::findProject(const std::string& searchPath)
{
const auto config_path = std::filesystem::path(searchPath) / "config.toml";
if (std::filesystem::exists(config_path))
diff --git a/apps/website-generator/WebsiteGenerator.h b/apps/website-generator/WebsiteGenerator.h
index eb46075..1ca0527 100644
--- a/apps/website-generator/WebsiteGenerator.h
+++ b/apps/website-generator/WebsiteGenerator.h
@@ -1,10 +1,10 @@
#pragma once
-#include "String.h"
+#include
#include
#include
-#include Map.h
-#include "Vector.h"
+#include
+#include
using Path = std::filesystem::path;
@@ -22,7 +22,7 @@ public:
void doSubstitutions();
- void findProject(const String& searchPath);
+ void findProject(const std::string& searchPath);
void parseContentFiles();
@@ -47,9 +47,9 @@ private:
std::filesystem::path mProjectPath;
- Ptr mConfig;
- Ptr mTemplateEngine;
+ std::unique_ptr mConfig;
+ std::unique_ptr mTemplateEngine;
- Vector > mPages;
- Vector > mArticles;
+ std::vector > mPages;
+ std::vector > mArticles;
};
diff --git a/bootstrap.sh b/bootstrap.sh
deleted file mode 100755
index dff6eba..0000000
--- a/bootstrap.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env bash
-
-SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
-SOURCE_DIR=$SCRIPT_DIR/src
-CORE_SRC_DIR=$SOURCE_DIR/base/core
-
-g++ $SOURCE_DIR/main.cpp \
- $CORE_SRC_DIR/base_types/Error.cpp \
- $CORE_SRC_DIR/base_types/Index.cpp \
- $CORE_SRC_DIR/base_types/Char.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildEnvironment.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildConfig.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildBinary.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildTarget.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildLibrary.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildExecutable.cpp \
- $SOURCE_DIR/base/compiler/buildsystem/BuildSession.cpp \
- $CORE_SRC_DIR/data_structures/String.cpp \
- $CORE_SRC_DIR/filesystem/FileSystemPath.cpp \
- $CORE_SRC_DIR/filesystem/File.cpp \
- $CORE_SRC_DIR/filesystem/FileFormats.cpp \
- $CORE_SRC_DIR/filesystem/posix/FilePosixImpl.cpp \
- $CORE_SRC_DIR/filesystem/Directory.cpp \
- $CORE_SRC_DIR/logging/ConsoleLogger.cpp \
- $CORE_SRC_DIR/logging/Logger.cpp \
- $CORE_SRC_DIR/serialization/yaml/YamlDocuments.cpp \
- $CORE_SRC_DIR/serialization/yaml/YamlDocument.cpp \
- $CORE_SRC_DIR/serialization/yaml/YamlParser.cpp \
- $CORE_SRC_DIR/streams/FileStream.cpp \
- $CORE_SRC_DIR/streams/Stream.cpp \
- $CORE_SRC_DIR/system/process/Process.cpp \
- $CORE_SRC_DIR/time/Time.cpp \
- -o builder -g -fno-exceptions -fno-rtti \
- -I$CORE_SRC_DIR/base_types \
- -I$SOURCE_DIR/base/compiler/buildsystem \
- -I$CORE_SRC_DIR/data_structures \
- -I$CORE_SRC_DIR/encoding \
- -I$CORE_SRC_DIR/filesystem \
- -I$CORE_SRC_DIR/filesystem/posix \
- -I$CORE_SRC_DIR/logging \
- -I$CORE_SRC_DIR/memory \
- -I$CORE_SRC_DIR/serialization/yaml \
- -I$CORE_SRC_DIR/streams \
- -I$CORE_SRC_DIR/system/process \
- -I$CORE_SRC_DIR/time
-
diff --git a/plugins/circuits/src/CircuitElement.h b/plugins/circuits/src/CircuitElement.h
index 59e7b92..03fe480 100644
--- a/plugins/circuits/src/CircuitElement.h
+++ b/plugins/circuits/src/CircuitElement.h
@@ -1,7 +1,7 @@
#pragma once
-#include "String.h"
-#include "Pointer.h"
+#include
+#include
class CircuitElement
diff --git a/plugins/circuits/src/ElectronicCircuit.h b/plugins/circuits/src/ElectronicCircuit.h
index 978986d..b24fe34 100644
--- a/plugins/circuits/src/ElectronicCircuit.h
+++ b/plugins/circuits/src/ElectronicCircuit.h
@@ -1,13 +1,13 @@
#pragma once
-#include "Pointer.h"
-#include "Vector.h"
+#include
+#include
#include "CircuitElement.h"
#include "LogicGate.h"
#include "Terminal.h"
-using LogicGatePtr = Ptr;
+using LogicGatePtr = std::unique_ptr;
class ElectronicCircuit
{
@@ -20,33 +20,33 @@ public:
void addLogicGate(LogicGatePtr gate);
- const Vector& getInputTerminals() const
+ const std::vector& getInputTerminals() const
{
return mInputTerminals;
}
- const Vector& getOutputTerminals() const
+ const std::vector& getOutputTerminals() const
{
return mOutputTerminals;
}
- const Vector& getLogicGates() const
+ const std::vector& getLogicGates() const
{
return mLogicGates;
}
- const Vector& getWires() const
+ const std::vector& getWires() const
{
return mWires;
}
private:
- Vector mInputTerminals;
- Vector mOutputTerminals;
+ std::vector mInputTerminals;
+ std::vector mOutputTerminals;
- Vector mWires;
+ std::vector mWires;
- Vector mLogicGates;
+ std::vector mLogicGates;
- Vector > mElements;
+ std::vector > mElements;
};
diff --git a/plugins/circuits/src/Terminal.cpp b/plugins/circuits/src/Terminal.cpp
index 803100b..c54a9a3 100644
--- a/plugins/circuits/src/Terminal.cpp
+++ b/plugins/circuits/src/Terminal.cpp
@@ -1,6 +1,6 @@
#include "Terminal.h"
-Terminal::Terminal(TerminalType type, const String& label)
+Terminal::Terminal(TerminalType type, const std::string& label)
: mLabel(label),
mType(type)
diff --git a/plugins/circuits/src/Terminal.h b/plugins/circuits/src/Terminal.h
index 9d27877..85b67d4 100644
--- a/plugins/circuits/src/Terminal.h
+++ b/plugins/circuits/src/Terminal.h
@@ -2,7 +2,7 @@
#include "CircuitElement.h"
-#include "String.h"
+#include
class Wire;
@@ -15,7 +15,7 @@ public:
OUTPUT
};
- Terminal(TerminalType type, const String& label = {});
+ Terminal(TerminalType type, const std::string& label = {});
Wire* getConnection() const;
@@ -27,8 +27,8 @@ public:
void setConnection(Wire* connection);
private:
- String mLabel;
+ std::string mLabel;
TerminalType mType;
Wire* mConnection{ nullptr };
};
-using TerminalPtr = Ptr;
+using TerminalPtr = std::unique_ptr;
diff --git a/plugins/circuits/src/TruthTable.h b/plugins/circuits/src/TruthTable.h
index 954abac..e4d411c 100644
--- a/plugins/circuits/src/TruthTable.h
+++ b/plugins/circuits/src/TruthTable.h
@@ -1,14 +1,14 @@
#pragma once
#include