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

Session IDs are dense handles, never a canonical ordering. More...

#include <conn_keys.h>

Classes

class  INTERN_TABLE
 
struct  INTERNED_NAME
 
struct  NODE_HASH
 

Public Member Functions

 SESSION_KEYS ()=default
 
 SESSION_KEYS (const SESSION_KEYS &)=delete
 
SESSION_KEYSoperator= (const SESSION_KEYS &)=delete
 
INST_ID InternInstance (const KIID_PATH &aPath)
 
NAME_ID InternName (const wxString &aText)
 
NODE_ID InternNode (NODE_KEY aKey)
 
std::optional< NAME_IDFindName (const wxString &aText) const
 
std::optional< INST_IDFindInstance (const KIID_PATH &aPath) const
 
const KIID_PATHInstance (INST_ID aId) const
 
const wxString & Name (NAME_ID aId) const
 
const NODE_KEYNode (NODE_ID aId) const
 
size_t NodeCount () const
 
bool NameLess (NAME_ID aLeft, NAME_ID aRight) const
 
bool Less (const ITEM_KEY &aLeft, const ITEM_KEY &aRight) const
 
bool Less (const RECORD_KEY &aLeft, const RECORD_KEY &aRight) const
 
bool Less (const RECORD_NODE &aLeft, const RECORD_NODE &aRight) const
 
bool Less (const NAME_KEY &aLeft, const NAME_KEY &aRight) const
 
bool Less (const SLOT_KEY &aLeft, const SLOT_KEY &aRight) const
 
bool Less (const NODE_KEY &aLeft, const NODE_KEY &aRight) const
 

Private Attributes

INTERN_TABLE< KIID_PATHm_instances
 
INTERN_TABLE< INTERNED_NAMEm_names
 
INTERN_TABLE< NODE_KEY, std::unordered_map< NODE_KEY, uint32_t, NODE_HASH > > m_nodes
 

Detailed Description

Session IDs are dense handles, never a canonical ordering.

Keys contain no model pointers. Intern on the main thread before worker stages; values and their addresses remain stable.

A table throws std::overflow_error instead of giving out INVALID_ID, and it then stays unchanged. The tables never release a value, so ENGINE::Clear() keeps every handle valid.

Definition at line 145 of file conn_keys.h.

Constructor & Destructor Documentation

◆ SESSION_KEYS() [1/2]

SCH_CONNECTIVITY::SESSION_KEYS::SESSION_KEYS ( )
default

Referenced by operator=(), and SESSION_KEYS().

◆ SESSION_KEYS() [2/2]

SCH_CONNECTIVITY::SESSION_KEYS::SESSION_KEYS ( const SESSION_KEYS & )
delete

References SESSION_KEYS().

Member Function Documentation

◆ FindInstance()

std::optional< INST_ID > SCH_CONNECTIVITY::SESSION_KEYS::FindInstance ( const KIID_PATH & aPath) const
inline

◆ FindName()

std::optional< NAME_ID > SCH_CONNECTIVITY::SESSION_KEYS::FindName ( const wxString & aText) const
inline

Definition at line 155 of file conn_keys.h.

References m_names.

◆ Instance()

const KIID_PATH & SCH_CONNECTIVITY::SESSION_KEYS::Instance ( INST_ID aId) const
inline

Definition at line 162 of file conn_keys.h.

References m_instances.

Referenced by SCH_CONNECTIVITY::FACADE_STATE::Group(), InternNode(), Less(), Less(), and Less().

◆ InternInstance()

INST_ID SCH_CONNECTIVITY::SESSION_KEYS::InternInstance ( const KIID_PATH & aPath)
inline

Definition at line 152 of file conn_keys.h.

References m_instances.

Referenced by BOOST_AUTO_TEST_CASE(), and SCH_CONNECTIVITY::CaptureHierarchy().

◆ InternName()

NAME_ID SCH_CONNECTIVITY::SESSION_KEYS::InternName ( const wxString & aText)
inline

◆ InternNode()

NODE_ID SCH_CONNECTIVITY::SESSION_KEYS::InternNode ( NODE_KEY aKey)

◆ Less() [1/6]

bool SCH_CONNECTIVITY::SESSION_KEYS::Less ( const ITEM_KEY & aLeft,
const ITEM_KEY & aRight ) const

◆ Less() [2/6]

bool SCH_CONNECTIVITY::SESSION_KEYS::Less ( const NAME_KEY & aLeft,
const NAME_KEY & aRight ) const

◆ Less() [3/6]

bool SCH_CONNECTIVITY::SESSION_KEYS::Less ( const NODE_KEY & aLeft,
const NODE_KEY & aRight ) const

Definition at line 158 of file conn_keys.cpp.

References left, and Less().

◆ Less() [4/6]

bool SCH_CONNECTIVITY::SESSION_KEYS::Less ( const RECORD_KEY & aLeft,
const RECORD_KEY & aRight ) const

◆ Less() [5/6]

bool SCH_CONNECTIVITY::SESSION_KEYS::Less ( const RECORD_NODE & aLeft,
const RECORD_NODE & aRight ) const

◆ Less() [6/6]

bool SCH_CONNECTIVITY::SESSION_KEYS::Less ( const SLOT_KEY & aLeft,
const SLOT_KEY & aRight ) const

◆ Name()

◆ NameLess()

bool SCH_CONNECTIVITY::SESSION_KEYS::NameLess ( NAME_ID aLeft,
NAME_ID aRight ) const
inline

Definition at line 166 of file conn_keys.h.

References m_names.

Referenced by Less().

◆ Node()

const NODE_KEY & SCH_CONNECTIVITY::SESSION_KEYS::Node ( NODE_ID aId) const
inline

Definition at line 164 of file conn_keys.h.

References m_nodes.

Referenced by SCH_CONNECTIVITY::DeriveSignal(), and SCH_CONNECTIVITY::PrepareBundle().

◆ NodeCount()

size_t SCH_CONNECTIVITY::SESSION_KEYS::NodeCount ( ) const
inline

Definition at line 165 of file conn_keys.h.

References m_nodes.

Referenced by SCH_CONNECTIVITY::PARTITIONER::Build().

◆ operator=()

SESSION_KEYS & SCH_CONNECTIVITY::SESSION_KEYS::operator= ( const SESSION_KEYS & )
delete

References SESSION_KEYS().

Member Data Documentation

◆ m_instances

INTERN_TABLE<KIID_PATH> SCH_CONNECTIVITY::SESSION_KEYS::m_instances
private

Definition at line 238 of file conn_keys.h.

Referenced by FindInstance(), Instance(), and InternInstance().

◆ m_names

INTERN_TABLE<INTERNED_NAME> SCH_CONNECTIVITY::SESSION_KEYS::m_names
private

Definition at line 239 of file conn_keys.h.

Referenced by FindName(), InternName(), Name(), and NameLess().

◆ m_nodes

INTERN_TABLE<NODE_KEY, std::unordered_map<NODE_KEY, uint32_t, NODE_HASH> > SCH_CONNECTIVITY::SESSION_KEYS::m_nodes
private

Definition at line 241 of file conn_keys.h.

Referenced by InternNode(), Node(), and NodeCount().


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