KiCad PCB EDA Suite
KIID_PATH Class Reference

#include <common.h>

Inheritance diagram for KIID_PATH:

Public Member Functions

 KIID_PATH ()
 
 KIID_PATH (const wxString &aString)
 
wxString AsString () const
 
bool operator== (KIID_PATH const &rhs) const
 
bool operator< (KIID_PATH const &rhs) const
 

Detailed Description

Definition at line 122 of file common.h.

Constructor & Destructor Documentation

◆ KIID_PATH() [1/2]

KIID_PATH::KIID_PATH ( )
inline

Definition at line 125 of file common.h.

126  {}

◆ KIID_PATH() [2/2]

KIID_PATH::KIID_PATH ( const wxString &  aString)
inline

Definition at line 128 of file common.h.

129  {
130  for( const wxString& pathStep : wxSplit( aString, '/' ) )
131  {
132  if( !pathStep.empty() )
133  emplace_back( KIID( pathStep ) );
134  }
135  }
Definition: common.h:68

Member Function Documentation

◆ AsString()

wxString KIID_PATH::AsString ( ) const
inline

Definition at line 137 of file common.h.

138  {
139  wxString path;
140 
141  for( const KIID& pathStep : *this )
142  path += '/' + pathStep.AsString();
143 
144  return path;
145  }
wxString AsString() const
Definition: common.cpp:165
Definition: common.h:68

References KIID::AsString().

Referenced by SCH_COMPONENT::AddHierarchicalReference(), SCH_EDIT_FRAME::AnnotateComponents(), SCH_SEXPR_PLUGIN::Format(), PCB_IO::format(), SCH_COMPONENT::GetRef(), SCH_EDIT_FRAME::mapExistingAnnotation(), SCH_COMPONENT::ReplaceInstanceSheetPath(), SELECTION_TOOL::selectAllItemsOnSheet(), and BOARD_NETLIST_UPDATER::updateComponentParameters().

◆ operator<()

bool KIID_PATH::operator< ( KIID_PATH const &  rhs) const
inline

Definition at line 161 of file common.h.

162  {
163  if( size() != rhs.size() )
164  return size() < rhs.size();
165 
166  for( size_t i = 0; i < size(); ++i )
167  {
168  if( at( i ) < rhs.at( i ) )
169  return true;
170 
171  if( at( i ) != rhs.at( i ) )
172  return false;
173  }
174 
175  return false;
176  }

◆ operator==()

bool KIID_PATH::operator== ( KIID_PATH const &  rhs) const
inline

Definition at line 147 of file common.h.

148  {
149  if( size() != rhs.size() )
150  return false;
151 
152  for( size_t i = 0; i < size(); ++i )
153  {
154  if( at( i ) != rhs.at( i ) )
155  return false;
156  }
157 
158  return true;
159  }

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