KiCad PCB EDA Suite
KIID_PATH Class Reference

#include <kiid.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 105 of file kiid.h.

Constructor & Destructor Documentation

◆ KIID_PATH() [1/2]

KIID_PATH::KIID_PATH ( )
inline

Definition at line 108 of file kiid.h.

109  {
110  }

◆ KIID_PATH() [2/2]

KIID_PATH::KIID_PATH ( const wxString &  aString)

Definition at line 235 of file kiid.cpp.

236 {
237  for( const wxString& pathStep : wxSplit( aString, '/' ) )
238  {
239  if( !pathStep.empty() )
240  emplace_back( KIID( pathStep ) );
241  }
242 }
Definition: kiid.h:44

Member Function Documentation

◆ AsString()

◆ operator<()

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

Definition at line 131 of file kiid.h.

132  {
133  if( size() != rhs.size() )
134  return size() < rhs.size();
135 
136  for( size_t i = 0; i < size(); ++i )
137  {
138  if( at( i ) < rhs.at( i ) )
139  return true;
140 
141  if( at( i ) != rhs.at( i ) )
142  return false;
143  }
144 
145  return false;
146  }

◆ operator==()

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

Definition at line 117 of file kiid.h.

118  {
119  if( size() != rhs.size() )
120  return false;
121 
122  for( size_t i = 0; i < size(); ++i )
123  {
124  if( at( i ) != rhs.at( i ) )
125  return false;
126  }
127 
128  return true;
129  }

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