![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton fuzzy-search palette for VS node types. More...
#include <NodeSearchPalette.h>
Public Member Functions | |
| void | Open () |
| void | Close () |
| bool | IsOpen () const |
| std::vector< NodeSearchResult > | FuzzySearch (const std::string &query, NodeSearchCategory filter=NodeSearchCategory::All) |
| Fuzzy-searches the node catalog. | |
| const std::vector< NodeSearchResult > & | GetAllNodes () const |
| Returns all node types in the catalog (unfiltered). | |
Static Public Member Functions | |
| static NodeSearchPalette & | Get () |
| Returns the single shared instance. | |
| static int | ComputeFuzzyScore (const std::string &query, const std::string &candidate) |
Computes a fuzzy match score between query and candidate. | |
Private Member Functions | |
| NodeSearchPalette () | |
| void | InitNodeCatalog () |
Private Attributes | |
| bool | m_IsOpen |
| std::vector< NodeSearchResult > | m_NodeCatalog |
Singleton fuzzy-search palette for VS node types.
Typical usage:
Definition at line 65 of file NodeSearchPalette.h.
|
private |
Definition at line 31 of file NodeSearchPalette.cpp.
References InitNodeCatalog().
Here is the call graph for this function:| void Olympe::NodeSearchPalette::Close | ( | ) |
Definition at line 46 of file NodeSearchPalette.cpp.
References m_IsOpen.
|
static |
Computes a fuzzy match score between query and candidate.
Returns 0 when there is no match. Positive scores reflect quality: exact match > substring match > scattered character match.
Definition at line 180 of file NodeSearchPalette.cpp.
References GetComponentTypeID_Static(), and Olympe::ToLower().
Referenced by FuzzySearch().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< NodeSearchResult > Olympe::NodeSearchPalette::FuzzySearch | ( | const std::string & | query, |
| NodeSearchCategory | filter = NodeSearchCategory::All |
||
| ) |
Fuzzy-searches the node catalog.
| query | The string typed by the user (may be empty). |
| filter | Category to restrict results to; defaults to All. |
Definition at line 121 of file NodeSearchPalette.cpp.
References Olympe::All, ComputeFuzzyScore(), GetComponentTypeID_Static(), m_NodeCatalog, and Olympe::NodeSearchResult::score.
Here is the call graph for this function:
|
static |
Returns the single shared instance.
Definition at line 21 of file NodeSearchPalette.cpp.
| const std::vector< NodeSearchResult > & Olympe::NodeSearchPalette::GetAllNodes | ( | ) | const |
Returns all node types in the catalog (unfiltered).
Definition at line 237 of file NodeSearchPalette.cpp.
References m_NodeCatalog.
|
private |
Definition at line 60 of file NodeSearchPalette.cpp.
References Olympe::Actions, Olympe::ControlFlow, Olympe::Data, GetComponentTypeID_Static(), m_NodeCatalog, SYSTEM_LOG, and Olympe::NodeSearchResult::typeName.
Referenced by NodeSearchPalette().
Here is the call graph for this function:
Here is the caller graph for this function:| bool Olympe::NodeSearchPalette::IsOpen | ( | ) | const |
Definition at line 51 of file NodeSearchPalette.cpp.
References m_IsOpen.
| void Olympe::NodeSearchPalette::Open | ( | ) |
Definition at line 41 of file NodeSearchPalette.cpp.
References m_IsOpen.
|
private |
Definition at line 121 of file NodeSearchPalette.h.
|
private |
Definition at line 122 of file NodeSearchPalette.h.
Referenced by FuzzySearch(), GetAllNodes(), and InitNodeCatalog().