2019-10-23 20:54:41 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
|
|
|
#include <AK/NonnullRefPtr.h>
|
|
|
|
|
#include <AK/RefCounted.h>
|
|
|
|
|
#include <AK/String.h>
|
2019-10-27 19:39:15 +01:00
|
|
|
#include <LibGUI/GTextDocument.h>
|
2019-10-23 20:54:41 +02:00
|
|
|
|
2019-11-01 18:40:32 +01:00
|
|
|
class ProjectFile : public RefCounted<ProjectFile> {
|
2019-10-23 20:54:41 +02:00
|
|
|
public:
|
2019-11-01 18:40:32 +01:00
|
|
|
static NonnullRefPtr<ProjectFile> construct_with_name(const String& name)
|
2019-10-23 20:54:41 +02:00
|
|
|
{
|
2019-11-01 18:40:32 +01:00
|
|
|
return adopt(*new ProjectFile(name));
|
2019-10-23 20:54:41 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const String& name() const { return m_name; }
|
|
|
|
|
|
2019-10-27 19:39:15 +01:00
|
|
|
const GTextDocument& document() const;
|
|
|
|
|
|
2019-10-23 20:54:41 +02:00
|
|
|
private:
|
2019-11-01 18:40:32 +01:00
|
|
|
explicit ProjectFile(const String& name)
|
2019-10-23 20:54:41 +02:00
|
|
|
: m_name(name)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String m_name;
|
2019-10-27 19:39:15 +01:00
|
|
|
mutable RefPtr<GTextDocument> m_document;
|
2019-10-23 20:54:41 +02:00
|
|
|
};
|