2021-05-17 22:19:50 +02:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021, Federico Guerinoni <guerinoni.federico@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
#include <AK/ByteString.h>
|
2021-05-17 22:19:50 +02:00
|
|
|
#include <AK/Function.h>
|
|
|
|
#include <AK/HashMap.h>
|
|
|
|
#include <AK/Noncopyable.h>
|
2021-06-01 23:54:55 +02:00
|
|
|
#include <LibCpp/Parser.h>
|
2021-05-17 22:19:50 +02:00
|
|
|
|
|
|
|
namespace HackStudio {
|
|
|
|
|
|
|
|
class ToDoEntries {
|
|
|
|
AK_MAKE_NONCOPYABLE(ToDoEntries);
|
|
|
|
|
|
|
|
public:
|
|
|
|
static ToDoEntries& the();
|
|
|
|
|
2023-12-16 17:49:34 +03:30
|
|
|
void set_entries(ByteString const& filename, Vector<CodeComprehension::TodoEntry> const&& entries);
|
2021-05-17 22:19:50 +02:00
|
|
|
|
2022-05-14 17:09:24 +03:00
|
|
|
Vector<CodeComprehension::TodoEntry> get_entries();
|
2021-05-17 22:19:50 +02:00
|
|
|
|
2021-08-01 21:19:26 +01:00
|
|
|
void clear_entries();
|
|
|
|
|
2021-05-17 22:19:50 +02:00
|
|
|
Function<void()> on_update = nullptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
ToDoEntries() = default;
|
2023-12-16 17:49:34 +03:30
|
|
|
HashMap<ByteString, Vector<CodeComprehension::TodoEntry>> m_document_to_entries;
|
2021-05-17 22:19:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|