Do bulk replace of stl types.
This commit is contained in:
parent
521486be62
commit
c25a56ee19
531 changed files with 2274 additions and 2181 deletions
|
@ -16,7 +16,7 @@
|
|||
#include "DesktopManager.h"
|
||||
#include "MainApplication.h"
|
||||
|
||||
NotesTk::NotesTk(std::unique_ptr<CommandLineArgs> args, std::unique_ptr<MainApplication> mainApp)
|
||||
NotesTk::NotesTk(Ptr<CommandLineArgs> args, Ptr<MainApplication> mainApp)
|
||||
: GuiApplication(std::move(args), std::move(mainApp))
|
||||
{
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
class NotesTk : public GuiApplication
|
||||
{
|
||||
public:
|
||||
NotesTk(std::unique_ptr<CommandLineArgs> args = nullptr, std::unique_ptr<MainApplication> mainApp = nullptr);
|
||||
NotesTk(Ptr<CommandLineArgs> args = nullptr, Ptr<MainApplication> mainApp = nullptr);
|
||||
|
||||
protected:
|
||||
void initializeViews() override;
|
||||
|
|
|
@ -12,7 +12,7 @@ AudioEditorView::AudioEditorView()
|
|||
addWidget(std::move(label));
|
||||
}
|
||||
|
||||
std::unique_ptr<AudioEditorView> AudioEditorView::Create()
|
||||
Ptr<AudioEditorView> AudioEditorView::Create()
|
||||
{
|
||||
return std::make_unique<AudioEditorView>();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ public:
|
|||
|
||||
AudioEditorView();
|
||||
|
||||
static std::unique_ptr<AudioEditorView> Create();
|
||||
static Ptr<AudioEditorView> Create();
|
||||
};
|
||||
|
||||
using AudioEditorViewUPtr = std::unique_ptr<AudioEditorView>;
|
||||
using AudioEditorViewUPtr = Ptr<AudioEditorView>;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "CanvasController.h"
|
||||
|
||||
std::unique_ptr<CanvasController> CanvasController::Create()
|
||||
Ptr<CanvasController> CanvasController::Create()
|
||||
{
|
||||
return std::make_unique<CanvasController>();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include "Memory.h"
|
||||
|
||||
class CanvasController
|
||||
{
|
||||
public:
|
||||
static std::unique_ptr<CanvasController> Create();
|
||||
static Ptr<CanvasController> Create();
|
||||
};
|
||||
|
|
|
@ -24,6 +24,6 @@ private:
|
|||
|
||||
CanvasDrawCommand mActiveDrawingCommand{CanvasDrawCommand::LINE};
|
||||
|
||||
std::vector<std::unique_ptr<GeometryNode> > mSceneNodes;
|
||||
Vector<Ptr<GeometryNode> > mSceneNodes;
|
||||
bool mContentDirty{false};
|
||||
};
|
||||
|
|
|
@ -27,7 +27,7 @@ CanvasView::~CanvasView()
|
|||
|
||||
}
|
||||
|
||||
std::unique_ptr<CanvasView> CanvasView::Create()
|
||||
Ptr<CanvasView> CanvasView::Create()
|
||||
{
|
||||
return std::make_unique<CanvasView>();
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ void CanvasView::onDrawCommandChanged(CanvasDrawCommand command)
|
|||
mDrawingArea->setActiveDrawingCommand(command);
|
||||
}
|
||||
|
||||
std::unique_ptr<Widget> CanvasView::initializeCacheButtons()
|
||||
Ptr<Widget> CanvasView::initializeCacheButtons()
|
||||
{
|
||||
auto saveButton = Button::Create();
|
||||
saveButton->setLabel("Save");
|
||||
|
|
|
@ -13,17 +13,17 @@ public:
|
|||
|
||||
~CanvasView();
|
||||
|
||||
static std::unique_ptr<CanvasView> Create();
|
||||
static Ptr<CanvasView> Create();
|
||||
|
||||
private:
|
||||
void onDrawCommandChanged(CanvasDrawCommand command);
|
||||
|
||||
void initialize();
|
||||
|
||||
std::unique_ptr<Widget> initializeCacheButtons();
|
||||
Ptr<Widget> initializeCacheButtons();
|
||||
|
||||
std::unique_ptr<CanvasController> mController;
|
||||
Ptr<CanvasController> mController;
|
||||
|
||||
CanvasDrawingArea* mDrawingArea{nullptr};
|
||||
};
|
||||
using CanvasViewPtr = std::unique_ptr<CanvasView>;
|
||||
using CanvasViewPtr = Ptr<CanvasView>;
|
||||
|
|
|
@ -28,7 +28,7 @@ ImageEditorView::~ImageEditorView()
|
|||
|
||||
}
|
||||
|
||||
std::unique_ptr<ImageEditorView> ImageEditorView::Create()
|
||||
Ptr<ImageEditorView> ImageEditorView::Create()
|
||||
{
|
||||
return std::make_unique<ImageEditorView>();
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public:
|
|||
|
||||
virtual ~ImageEditorView();
|
||||
|
||||
static std::unique_ptr<ImageEditorView> Create();
|
||||
static Ptr<ImageEditorView> Create();
|
||||
};
|
||||
|
||||
using ImageEditorViewUPtr = std::unique_ptr<ImageEditorView>;
|
||||
using ImageEditorViewUPtr = Ptr<ImageEditorView>;
|
||||
|
|
|
@ -16,5 +16,5 @@ private:
|
|||
unsigned mNumX{5};
|
||||
unsigned mNumY{5};
|
||||
|
||||
std::unique_ptr<GridNode> mGridNode;
|
||||
Ptr<GridNode> mGridNode;
|
||||
};
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
#include "windows.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "Vector.h"
|
||||
#include "String.h"
|
||||
|
||||
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PWSTR pCmdLine, int nCmdShow)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include <memory>
|
||||
#include "Memory.h"
|
||||
|
||||
#include "NotesTk.h"
|
||||
#include "MainApplication.h"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
#include <iostream>
|
||||
|
||||
std::unique_ptr<MeshViewerView> MeshViewerView::Create()
|
||||
Ptr<MeshViewerView> MeshViewerView::Create()
|
||||
{
|
||||
return std::make_unique<MeshViewerView>();
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ class MeshViewerView : public Widget
|
|||
public:
|
||||
MeshViewerView();
|
||||
~MeshViewerView();
|
||||
static std::unique_ptr<MeshViewerView> Create();
|
||||
static Ptr<MeshViewerView> Create();
|
||||
void doPaint(const PaintEvent* event) override;
|
||||
private:
|
||||
|
||||
std::unique_ptr<AbstractMesh> mMesh;
|
||||
std::unique_ptr<MeshNode> mMeshNode;
|
||||
Ptr<AbstractMesh> mMesh;
|
||||
Ptr<MeshNode> mMeshNode;
|
||||
};
|
||||
|
|
|
@ -6,17 +6,17 @@ PlainTextDocument::PlainTextDocument()
|
|||
|
||||
}
|
||||
|
||||
std::unique_ptr<PlainTextDocument> PlainTextDocument::Create()
|
||||
Ptr<PlainTextDocument> PlainTextDocument::Create()
|
||||
{
|
||||
return std::make_unique<PlainTextDocument>();
|
||||
}
|
||||
|
||||
std::string PlainTextDocument::GetContent() const
|
||||
String PlainTextDocument::GetContent() const
|
||||
{
|
||||
return mContent;
|
||||
}
|
||||
|
||||
void PlainTextDocument::SetContent(const std::string& content)
|
||||
void PlainTextDocument::SetContent(const String& content)
|
||||
{
|
||||
mContent = content;
|
||||
}
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include "String.h"
|
||||
#include "Memory.h"
|
||||
|
||||
class PlainTextDocument
|
||||
{
|
||||
std::string mContent;
|
||||
String mContent;
|
||||
|
||||
public:
|
||||
|
||||
PlainTextDocument();
|
||||
|
||||
static std::unique_ptr<PlainTextDocument> Create();
|
||||
static Ptr<PlainTextDocument> Create();
|
||||
|
||||
std::string GetContent() const;
|
||||
String GetContent() const;
|
||||
|
||||
void SetContent(const std::string& content);
|
||||
void SetContent(const String& content);
|
||||
|
||||
void Clear();
|
||||
|
||||
};
|
||||
|
||||
using PlainTextDocumentUPtr = std::unique_ptr<PlainTextDocument>;
|
||||
using PlainTextDocumentUPtr = Ptr<PlainTextDocument>;
|
||||
|
|
|
@ -9,17 +9,17 @@ TextEditorController::TextEditorController()
|
|||
|
||||
}
|
||||
|
||||
std::unique_ptr<TextEditorController> TextEditorController::Create()
|
||||
Ptr<TextEditorController> TextEditorController::Create()
|
||||
{
|
||||
return std::make_unique<TextEditorController>();
|
||||
}
|
||||
|
||||
void TextEditorController::SetContent(const std::string& content)
|
||||
void TextEditorController::SetContent(const String& content)
|
||||
{
|
||||
mModel->GetDocument()->SetContent(content);
|
||||
}
|
||||
|
||||
std::string TextEditorController::GetContent() const
|
||||
String TextEditorController::GetContent() const
|
||||
{
|
||||
return mModel->GetDocument()->GetContent();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#pragma once
|
||||
#include <memory>
|
||||
#include "Memory.h"
|
||||
#include <filesystem>
|
||||
#include "TextEditorModel.h"
|
||||
|
||||
|
@ -9,7 +9,7 @@ public:
|
|||
|
||||
TextEditorController();
|
||||
|
||||
static std::unique_ptr<TextEditorController> Create();
|
||||
static Ptr<TextEditorController> Create();
|
||||
|
||||
void OnSave();
|
||||
|
||||
|
@ -17,9 +17,9 @@ public:
|
|||
|
||||
void OnLoad();
|
||||
|
||||
std::string GetContent() const;
|
||||
String GetContent() const;
|
||||
|
||||
void SetContent(const std::string& content);
|
||||
void SetContent(const String& content);
|
||||
|
||||
void SetSavePath(const std::filesystem::path& path);
|
||||
|
||||
|
@ -31,4 +31,4 @@ private:
|
|||
std::filesystem::path mLoadPath;
|
||||
};
|
||||
|
||||
using TextEditorControllerUPtr = std::unique_ptr<TextEditorController>;
|
||||
using TextEditorControllerUPtr = Ptr<TextEditorController>;
|
||||
|
|
|
@ -6,7 +6,7 @@ TextEditorModel::TextEditorModel()
|
|||
|
||||
}
|
||||
|
||||
std::unique_ptr<TextEditorModel> TextEditorModel::Create()
|
||||
Ptr<TextEditorModel> TextEditorModel::Create()
|
||||
{
|
||||
return std::make_unique<TextEditorModel>();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "PlainTextDocument.h"
|
||||
#include <memory>
|
||||
#include "Memory.h"
|
||||
|
||||
class TextEditorModel
|
||||
{
|
||||
|
@ -11,9 +11,9 @@ public:
|
|||
|
||||
TextEditorModel();
|
||||
|
||||
static std::unique_ptr<TextEditorModel> Create();
|
||||
static Ptr<TextEditorModel> Create();
|
||||
|
||||
PlainTextDocument* GetDocument() const;
|
||||
};
|
||||
|
||||
using TextEditorModelUPtr = std::unique_ptr<TextEditorModel>;
|
||||
using TextEditorModelUPtr = Ptr<TextEditorModel>;
|
||||
|
|
|
@ -81,7 +81,7 @@ void TextEditorView::initialize()
|
|||
addWidget(std::move(hSpacer));
|
||||
}
|
||||
|
||||
std::unique_ptr<TextEditorView> TextEditorView::Create()
|
||||
Ptr<TextEditorView> TextEditorView::Create()
|
||||
{
|
||||
return std::make_unique<TextEditorView>();
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ class TextEditorView : public Widget
|
|||
public:
|
||||
TextEditorView();
|
||||
|
||||
static std::unique_ptr<TextEditorView> Create();
|
||||
static Ptr<TextEditorView> Create();
|
||||
|
||||
TextEditorController* getController();
|
||||
|
||||
|
@ -23,4 +23,4 @@ private:
|
|||
TextBox* mTextBox;
|
||||
TextEditorControllerUPtr mController;
|
||||
};
|
||||
using TextEditorViewUPtr = std::unique_ptr<TextEditorView>;
|
||||
using TextEditorViewUPtr = Ptr<TextEditorView>;
|
||||
|
|
|
@ -14,7 +14,7 @@ WebClientView::WebClientView()
|
|||
addWidget(std::move(label));
|
||||
}
|
||||
|
||||
std::unique_ptr<WebClientView> WebClientView::Create()
|
||||
Ptr<WebClientView> WebClientView::Create()
|
||||
{
|
||||
return std::make_unique<WebClientView>();
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ public:
|
|||
|
||||
WebClientView();
|
||||
|
||||
static std::unique_ptr<WebClientView> Create();
|
||||
static Ptr<WebClientView> Create();
|
||||
};
|
||||
|
||||
using WebClientViewUPtr = std::unique_ptr<WebClientView>;
|
||||
using WebClientViewUPtr = Ptr<WebClientView>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue