Library of Assembled Shared Sources
lass::prim::XY Class Reference

cyclic iterator over xy indices More...

#include <xy.h>

Public Member Functions

constexpr XY ()
 intializes iterator to x axis.
 
constexpr XY (char axis)
 initializes iterator to an axis by character: 'x' or 'y'.
 
constexpr XY (int value)
 initializes iterator to an axis by number.
 
 XY (const std::string &axis)
 initializes iterator to an axis by character: "x" or "y".
 
constexpr char axis () const
 return axis by character: 'x' or 'y'.
 
constexpr operator int () const
 convert axis to integer.
 
constexpr operator size_t () const
 convert axis to integer.
 

Detailed Description

cyclic iterator over xy indices

Author
Bram de Greve [BdG]

Definition at line 61 of file xy.h.

Constructor & Destructor Documentation

◆ XY()

lass::prim::XY::XY ( int value)
inlineexplicitconstexpr

initializes iterator to an axis by number.

..., -1 == y, 0 == x, 1 == y, 2 == x, ...

Definition at line 97 of file xy.h.

Member Function Documentation

◆ operator int()

lass::prim::XY::operator int ( ) const
inlineconstexpr

convert axis to integer.

0 == x, 1 == y

Definition at line 122 of file xy.h.

◆ operator size_t()

lass::prim::XY::operator size_t ( ) const
inlineconstexpr

convert axis to integer.

0 == x, 1 == y

Definition at line 123 of file xy.h.


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