KiCad PCB EDA Suite
LSEQ Class Reference

Class LSEQ is a sequence (and therefore also a set) of 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 ()
 
LAYER_ID operator* () const
 

Private Attributes

unsigned m_index
 

Detailed Description

Class LSEQ is a sequence (and therefore also a set) of 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 146 of file layers_id_colors_and_visibility.h.

Constructor & Destructor Documentation

LSEQ::LSEQ ( )
inline

Definition at line 152 of file layers_id_colors_and_visibility.h.

152  :
153  m_index( 0 )
154  {}
template<class InputIterator >
LSEQ::LSEQ ( InputIterator  aStart,
InputIterator  aEnd 
)
inline

Definition at line 157 of file layers_id_colors_and_visibility.h.

157  :
158  BASE_SEQ( aStart, aEnd ), m_index( 0 )
159  {}
std::vector< LAYER_ID > BASE_SEQ
A sequence of layers, a sequence provides a certain order.

Member Function Documentation

LSEQ::operator bool ( )
inline

Definition at line 167 of file layers_id_colors_and_visibility.h.

167 { return m_index < size(); }
LAYER_ID LSEQ::operator* ( ) const
inline

Definition at line 169 of file layers_id_colors_and_visibility.h.

170  {
171  return at( m_index ); // throws std::out_of_range
172  }
void LSEQ::operator++ ( )
inline

Definition at line 163 of file layers_id_colors_and_visibility.h.

References m_index.

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

Definition at line 165 of file layers_id_colors_and_visibility.h.

References m_index.

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

Definition at line 161 of file layers_id_colors_and_visibility.h.

161 { m_index = 0; }

Member Data Documentation

unsigned LSEQ::m_index
private

Definition at line 148 of file layers_id_colors_and_visibility.h.

Referenced by operator++().


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