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 120 of file common.h.

Constructor & Destructor Documentation

◆ KIID_PATH() [1/2]

KIID_PATH::KIID_PATH ( )
inline

Definition at line 123 of file common.h.

124  {}

◆ KIID_PATH() [2/2]

KIID_PATH::KIID_PATH ( const wxString &  aString)
inline

Definition at line 126 of file common.h.

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

Member Function Documentation

◆ AsString()

wxString KIID_PATH::AsString ( ) const
inline

◆ operator<()

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

Definition at line 159 of file common.h.

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

◆ operator==()

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

Definition at line 145 of file common.h.

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

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