Do bulk replace of stl types.
This commit is contained in:
parent
521486be62
commit
c25a56ee19
531 changed files with 2274 additions and 2181 deletions
|
@ -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>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue