KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_CONNECTIVITY::BUS_PARSE_CACHE Class Reference

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 ENTRYParse (const wxString &aText)
 Return the cached entry, and parse again if the entry is missing or dirty.
 
std::shared_ptr< const BUS_SCHEMA::NODEFindTree (const wxString &aText) const
 Current tree without cache writes.
 

Private Attributes

BUS_ALIASES m_aliases
 
std::set< wxString > m_dirty
 
CACHE_TABLE< wxString, RESULTm_cache
 

Detailed Description

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 129 of file conn_bus.h.

Member Typedef Documentation

◆ ENTRY

Definition at line 146 of file conn_bus.h.

Constructor & Destructor Documentation

◆ BUS_PARSE_CACHE()

SCH_CONNECTIVITY::BUS_PARSE_CACHE::BUS_PARSE_CACHE ( CACHE_VERSIONS & aVersions)
inlineexplicit

Definition at line 148 of file conn_bus.h.

References m_cache.

Member Function Documentation

◆ FindTree()

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 273 of file conn_bus.cpp.

References m_cache, m_dirty, and SCH_CONNECTIVITY::CACHE_TABLE< KEY, VALUE, LESS >::ENTRY::value.

◆ Parse()

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 234 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().

◆ Retain()

void SCH_CONNECTIVITY::BUS_PARSE_CACHE::Retain ( const std::set< wxString > & aLive)

Erase the entries whose text is not in aLive.

Definition at line 258 of file conn_bus.cpp.

References m_cache, and m_dirty.

◆ SetAliases()

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.

Returns
true if the normalized table differs from the previous one.

Definition at line 192 of file conn_bus.cpp.

References m_aliases, m_cache, m_dirty, name, and text.

Member Data Documentation

◆ m_aliases

BUS_ALIASES SCH_CONNECTIVITY::BUS_PARSE_CACHE::m_aliases
private

Definition at line 172 of file conn_bus.h.

Referenced by Parse(), and SetAliases().

◆ m_cache

CACHE_TABLE<wxString, RESULT> SCH_CONNECTIVITY::BUS_PARSE_CACHE::m_cache
private

Definition at line 174 of file conn_bus.h.

Referenced by BUS_PARSE_CACHE(), FindTree(), Parse(), Retain(), and SetAliases().

◆ m_dirty

std::set<wxString> SCH_CONNECTIVITY::BUS_PARSE_CACHE::m_dirty
private

Definition at line 173 of file conn_bus.h.

Referenced by FindTree(), Parse(), Retain(), and SetAliases().


The documentation for this class was generated from the following files: