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 335 of file layers_id_colors_and_visibility.h.

Constructor & Destructor Documentation

LSEQ::LSEQ ( )
inline

Definition at line 341 of file layers_id_colors_and_visibility.h.

341  :
342  m_index( 0 )
343  {}
template<class InputIterator >
LSEQ::LSEQ ( InputIterator  aStart,
InputIterator  aEnd 
)
inline

Definition at line 346 of file layers_id_colors_and_visibility.h.

346  :
347  BASE_SEQ( aStart, aEnd ), m_index( 0 )
348  {}
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 356 of file layers_id_colors_and_visibility.h.

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

Definition at line 358 of file layers_id_colors_and_visibility.h.

359  {
360  return at( m_index ); // throws std::out_of_range
361  }
void LSEQ::operator++ ( )
inline

Definition at line 352 of file layers_id_colors_and_visibility.h.

References m_index.

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

Definition at line 354 of file layers_id_colors_and_visibility.h.

References m_index.

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

Definition at line 350 of file layers_id_colors_and_visibility.h.

350 { m_index = 0; }

Member Data Documentation

unsigned LSEQ::m_index
private

Definition at line 337 of file layers_id_colors_and_visibility.h.

Referenced by operator++().


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