KiCad PCB EDA Suite
UNIQUE_STRINGS Class Reference

Track unique wxStrings and is useful in telling if a string has been seen before. More...

#include <netlist_exporter_base.h>

Public Types

typedef std::set< wxString >::iterator us_iterator

Public Member Functions

void Clear ()
 Erase the record. More...
bool Lookup (const wxString &aString)

Public Attributes

std::set< wxString > m_set
 set of wxStrings already found More...

Detailed Description

Track unique wxStrings and is useful in telling if a string has been seen before.

Definition at line 38 of file netlist_exporter_base.h.

Member Typedef Documentation

◆ us_iterator

typedef std::set<wxString>::iterator UNIQUE_STRINGS::us_iterator

Definition at line 59 of file netlist_exporter_base.h.

Member Function Documentation

◆ Clear()

void UNIQUE_STRINGS::Clear ( )

Erase the record.

Definition at line 44 of file netlist_exporter_base.h.

44{ m_set.clear(); }
std::set< wxString > m_set
set of wxStrings already found

References m_set.

Referenced by NETLIST_EXPORTER_XML::makeSymbols(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), NETLIST_EXPORTER_CADSTAR::WriteNetlist(), and NETLIST_EXPORTER_ORCADPCB2::WriteNetlist().

◆ Lookup()

bool UNIQUE_STRINGS::Lookup ( const wxString &  aString)
true if aString already exists in the set, otherwise return false and add aString to the set for next time.

Definition at line 50 of file netlist_exporter_base.h.

51 {
52 std::pair<us_iterator, bool> pair = m_set.insert( aString );
54 return !pair.second;
55 }

References m_set.

Referenced by NETLIST_EXPORTER_BASE::findNextSymbol().

Member Data Documentation

◆ m_set

std::set<wxString> UNIQUE_STRINGS::m_set

set of wxStrings already found

Definition at line 57 of file netlist_exporter_base.h.

Referenced by Clear(), and Lookup().

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