|
KiCad PCB EDA Suite
|
Parse results for each bus text, with invalidation by alias dependency. More...
#include <conn_bus.h>
Classes | |
| struct | RESULT |
Public Types | |
| using | ENTRY = CACHE_TABLE<wxString, RESULT>::ENTRY |
Public Member Functions | |
| BUS_PARSE_CACHE (CACHE_VERSIONS &aVersions) | |
| bool | SetAliases (const BUS_ALIASES &aAliases) |
| Replace the alias table. | |
| void | Retain (const std::set< wxString > &aLive) |
| Erase the entries whose text is not in aLive. | |
| const ENTRY & | Parse (const wxString &aText) |
| Return the cached entry, and parse again if the entry is missing or dirty. | |
| std::shared_ptr< const BUS_SCHEMA::NODE > | FindTree (const wxString &aText) const |
| Current tree without cache writes. | |
Private Attributes | |
| BUS_ALIASES | m_aliases |
| std::set< wxString > | m_dirty |
| CACHE_TABLE< wxString, RESULT > | m_cache |
Parse results for each bus text, with invalidation by alias dependency.
An entry whose schema did not change keeps its old schema pointer, so claims and records that hold it stay equal.
Definition at line 134 of file conn_bus.h.
| using SCH_CONNECTIVITY::BUS_PARSE_CACHE::ENTRY = CACHE_TABLE<wxString, RESULT>::ENTRY |
Definition at line 151 of file conn_bus.h.
|
inlineexplicit |
Definition at line 153 of file conn_bus.h.
References m_cache.
| std::shared_ptr< const SCH_CONNECTIVITY::BUS_SCHEMA::NODE > SCH_CONNECTIVITY::BUS_PARSE_CACHE::FindTree | ( | const wxString & | aText | ) | const |
Current tree without cache writes.
Missing, invalidated, scalar or failed parses return null.
Definition at line 293 of file conn_bus.cpp.
References m_cache, m_dirty, and SCH_CONNECTIVITY::CACHE_TABLE< KEY, VALUE, LESS >::ENTRY::value.
| const SCH_CONNECTIVITY::BUS_PARSE_CACHE::ENTRY & SCH_CONNECTIVITY::BUS_PARSE_CACHE::Parse | ( | const wxString & | aText | ) |
Return the cached entry, and parse again if the entry is missing or dirty.
Definition at line 254 of file conn_bus.cpp.
References m_aliases, m_cache, m_dirty, Parse(), result, and SCH_CONNECTIVITY::CACHE_TABLE< KEY, VALUE, LESS >::ENTRY::value.
Referenced by Parse(), and SCH_CONNECTIVITY::PrepareInstanceClaims().
| void SCH_CONNECTIVITY::BUS_PARSE_CACHE::Retain | ( | const std::set< wxString > & | aLive | ) |
Erase the entries whose text is not in aLive.
Definition at line 278 of file conn_bus.cpp.
| bool SCH_CONNECTIVITY::BUS_PARSE_CACHE::SetAliases | ( | const BUS_ALIASES & | aAliases | ) |
Replace the alias table.
Marks dirty each cached text that looked up a name whose definition changed.
Definition at line 212 of file conn_bus.cpp.
References m_aliases, m_cache, m_dirty, name, normalized(), and text.
|
private |
Definition at line 177 of file conn_bus.h.
Referenced by Parse(), and SetAliases().
|
private |
Definition at line 179 of file conn_bus.h.
Referenced by BUS_PARSE_CACHE(), FindTree(), Parse(), Retain(), and SetAliases().
|
private |
Definition at line 178 of file conn_bus.h.
Referenced by FindTree(), Parse(), Retain(), and SetAliases().