KiCad PCB EDA Suite
LSEQ Class Reference

Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs. More...

#include <layers_id_colors_and_visibility.h>

Inheritance diagram for LSEQ:

Public Member Functions

 LSEQ ()
 
template<class InputIterator >
 LSEQ (InputIterator aStart, InputIterator aEnd)
 
void Rewind ()
 
void operator++ ()
 
void operator++ (int)
 
 operator bool ()
 
PCB_LAYER_ID operator* () const
 

Private Attributes

unsigned m_index
 

Detailed Description

Class LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.

A sequence provides a certain order.

It can also be used as an iterator:

 for( LSEQ cu_stack = aSet.CuStack();  cu_stack;  ++cu_stack )
 {
     layer_id = *cu_stack;
     :
     things to do with layer_id;
 }

Definition at line 325 of file layers_id_colors_and_visibility.h.

Constructor & Destructor Documentation

LSEQ::LSEQ ( )
inline

Definition at line 331 of file layers_id_colors_and_visibility.h.

331  :
332  m_index( 0 )
333  {}
template<class InputIterator >
LSEQ::LSEQ ( InputIterator  aStart,
InputIterator  aEnd 
)
inline

Definition at line 336 of file layers_id_colors_and_visibility.h.

336  :
337  BASE_SEQ( aStart, aEnd ), m_index( 0 )
338  {}
std::vector< PCB_LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.

Member Function Documentation

LSEQ::operator bool ( )
inline

Definition at line 346 of file layers_id_colors_and_visibility.h.

346 { return m_index < size(); }
PCB_LAYER_ID LSEQ::operator* ( ) const
inline

Definition at line 348 of file layers_id_colors_and_visibility.h.

349  {
350  return at( m_index ); // throws std::out_of_range
351  }
void LSEQ::operator++ ( )
inline

Definition at line 342 of file layers_id_colors_and_visibility.h.

References m_index.

342 { ++m_index; } // returns nothing, used in simple statements only.
void LSEQ::operator++ ( int  )
inline

Definition at line 344 of file layers_id_colors_and_visibility.h.

References m_index.

344 { ++m_index; }
void LSEQ::Rewind ( )
inline

Definition at line 340 of file layers_id_colors_and_visibility.h.

340 { m_index = 0; }

Member Data Documentation

unsigned LSEQ::m_index
private

Definition at line 327 of file layers_id_colors_and_visibility.h.

Referenced by operator++().


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