mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
HackStudio: Rename TextDocument => ProjectFile
TextDocument was not the right name, and got even more confusing with the addition of GTextDocument in LibGUI.
This commit is contained in:
parent
45e0c841ad
commit
b81f6f2c43
5 changed files with 15 additions and 15 deletions
33
DevTools/HackStudio/ProjectFile.h
Normal file
33
DevTools/HackStudio/ProjectFile.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibGUI/GTextDocument.h>
|
||||
|
||||
class ProjectFile : public RefCounted<ProjectFile> {
|
||||
public:
|
||||
static NonnullRefPtr<ProjectFile> construct_with_name(const String& name)
|
||||
{
|
||||
return adopt(*new ProjectFile(name));
|
||||
}
|
||||
|
||||
const String& name() const { return m_name; }
|
||||
|
||||
const ByteBuffer& contents() const;
|
||||
|
||||
Vector<int> find(const StringView&) const;
|
||||
|
||||
const GTextDocument& document() const;
|
||||
|
||||
private:
|
||||
explicit ProjectFile(const String& name)
|
||||
: m_name(name)
|
||||
{
|
||||
}
|
||||
|
||||
String m_name;
|
||||
mutable ByteBuffer m_contents;
|
||||
mutable RefPtr<GTextDocument> m_document;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue