yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
story_event_graph_query.h
Go to the documentation of this file.
1
#ifndef YAZE_CORE_STORY_EVENT_GRAPH_QUERY_H
2
#define YAZE_CORE_STORY_EVENT_GRAPH_QUERY_H
3
4
#include <string>
5
#include <string_view>
6
#include <vector>
7
8
#include "
core/story_event_graph.h
"
9
10
namespace
yaze::core
{
11
18
struct
StoryEventNodeFilter
{
19
std::string
query
;
20
21
bool
include_locked
=
true
;
22
bool
include_available
=
true
;
23
bool
include_completed
=
true
;
24
bool
include_blocked
=
true
;
25
};
26
27
// Returns true if `status` is included by the filter toggles.
28
bool
StoryNodeStatusAllowed
(
StoryNodeStatus
status,
29
const
StoryEventNodeFilter
& filter);
30
31
// Returns true if the free-text query matches the node (case-insensitive).
32
// Query is split by whitespace into tokens; all tokens must match somewhere.
33
bool
StoryEventNodeMatchesQuery
(
const
StoryEventNode
& node,
34
std::string_view query);
35
36
// Combined status + query match.
37
bool
StoryEventNodeMatchesFilter
(
const
StoryEventNode
& node,
38
const
StoryEventNodeFilter
& filter);
39
40
// Exposed for caching/debugging: builds a normalized (lowercased) searchable
41
// string containing the node's primary metadata (id/name/flags/locations/etc).
42
std::string
BuildStoryEventNodeSearchText
(
const
StoryEventNode
& node);
43
44
}
// namespace yaze::core
45
46
#endif
// YAZE_CORE_STORY_EVENT_GRAPH_QUERY_H
47
yaze::core
Definition
editor.h:18
yaze::core::StoryEventNodeMatchesFilter
bool StoryEventNodeMatchesFilter(const StoryEventNode &node, const StoryEventNodeFilter &filter)
Definition
story_event_graph_query.cc:113
yaze::core::StoryEventNodeMatchesQuery
bool StoryEventNodeMatchesQuery(const StoryEventNode &node, std::string_view query)
Definition
story_event_graph_query.cc:104
yaze::core::BuildStoryEventNodeSearchText
std::string BuildStoryEventNodeSearchText(const StoryEventNode &node)
Definition
story_event_graph_query.cc:71
yaze::core::StoryNodeStatusAllowed
bool StoryNodeStatusAllowed(StoryNodeStatus status, const StoryEventNodeFilter &filter)
Definition
story_event_graph_query.cc:55
yaze::core::StoryNodeStatus
StoryNodeStatus
Completion status of a story event node for rendering.
Definition
story_event_graph.h:67
story_event_graph.h
yaze::core::StoryEventNodeFilter
Filter options for StoryEventGraph node search in UI.
Definition
story_event_graph_query.h:18
yaze::core::StoryEventNodeFilter::query
std::string query
Definition
story_event_graph_query.h:19
yaze::core::StoryEventNodeFilter::include_available
bool include_available
Definition
story_event_graph_query.h:22
yaze::core::StoryEventNodeFilter::include_blocked
bool include_blocked
Definition
story_event_graph_query.h:24
yaze::core::StoryEventNodeFilter::include_completed
bool include_completed
Definition
story_event_graph_query.h:23
yaze::core::StoryEventNodeFilter::include_locked
bool include_locked
Definition
story_event_graph_query.h:21
yaze::core::StoryEventNode
A node in the Oracle story event graph.
Definition
story_event_graph.h:84
src
core
story_event_graph_query.h
Generated by
1.10.0