KiCad PCB EDA Suite
UNIQUE_STRINGS Class Reference

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

#include <netlist_exporter.h>

Public Member Functions

void Clear ()
 Function Clear erases the record. More...
 
bool Lookup (const wxString &aString)
 Function Lookup returns true if aString already exists in the set, otherwise returns false and adds aString to the set for next time. More...
 

Private Types

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

Private Attributes

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

Detailed Description

Class UNIQUE_STRINGS tracks unique wxStrings and is useful in telling if a string has been seen before.

Definition at line 43 of file netlist_exporter.h.

Member Typedef Documentation

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

Definition at line 47 of file netlist_exporter.h.

Member Function Documentation

void UNIQUE_STRINGS::Clear ( )
inline

Function Clear erases the record.

Definition at line 54 of file netlist_exporter.h.

Referenced by NETLIST_EXPORTER_GENERIC::makeComponents(), NETLIST_EXPORTER_PSPICE::ProcessNetlist(), NETLIST_EXPORTER_ORCADPCB2::WriteNetlist(), and NETLIST_EXPORTER_CADSTAR::WriteNetlist().

54 { m_set.clear(); }
std::set< wxString > m_set
set of wxStrings already found
bool UNIQUE_STRINGS::Lookup ( const wxString &  aString)
inline

Function Lookup returns true if aString already exists in the set, otherwise returns false and adds aString to the set for next time.

Definition at line 61 of file netlist_exporter.h.

Referenced by NETLIST_EXPORTER::findNextComponent(), and NETLIST_EXPORTER::findNextComponentAndCreatePinList().

62  {
63  std::pair<us_iterator, bool> pair = m_set.insert( aString );
64 
65  return !pair.second;
66  }
std::set< wxString > m_set
set of wxStrings already found

Member Data Documentation

std::set<wxString> UNIQUE_STRINGS::m_set
private

set of wxStrings already found

Definition at line 45 of file netlist_exporter.h.


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