library of assembled shared sources

http://lass.cocamware.com

lass::prim::XY Class Reference

cyclic iterator over xy indices More...

#include <xy.h>

Collaboration diagram for lass::prim::XY:

Collaboration graph
[legend]

Public Types

enum  { dimension = 2 }

Public Member Functions

 XY ()
 intializes iterator to x axis.
 XY (char iAxis)
 initializes iterator to an axis by character: 'x' or 'y'.
 XY (int iValue)
 initializes iterator to an axis by number.
 XY (const std::string &iAxis)
 initializes iterator to an axis by character: "x" or "y".
const char axis () const
 return axis by character: "x" or "y".
 operator int () const
 convert axis to integer.
XYoperator++ ()
XYoperator-- ()
XY operator++ (int)
XY operator-- (int)
XYoperator+= (int iOffset)
XYoperator-= (int iOffset)

Private Types

typedef num::Modulo< 2, int > TValue

Private Member Functions

void reset (char iAxis)

Private Attributes

TValue value_

Friends

LASS_DLL bool LASS_CALL operator== (const XY &iA, const XY &iB)

Related Functions

(Note that these are not member functions.)

bool operator== (const XY &iA, char iB)
bool operator== (char iA, const XY &iB)
bool operator== (const XY &iA, const std::string &iB)
bool operator== (const std::string &iA, const XY &iB)
bool operator!= (const XY &iA, const XY &iB)
bool operator!= (const XY &iA, char iB)
bool operator!= (char iA, const XY &iB)
bool operator!= (const XY &iA, const std::string &iB)
bool operator!= (const std::string &iA, const XY &iB)
XY operator+ (const XY &iA, int iOffset)
XY operator- (const XY &iA, int iOffset)
template<typename Char , typename Traits >
std::basic_ostream< Char,
Traits > & 
operator<< (std::basic_ostream< Char, Traits > &ioS, const XY &iXY)
template<typename Char , typename Traits >
std::basic_ostream< Char,
Traits > & 
operator<< (std::basic_ostream< Char, Traits > &ioS, const XYZ &iXYZ)
template<typename Char , typename Traits >
std::basic_ostream< Char,
Traits > & 
operator<< (std::basic_ostream< Char, Traits > &ioS, const XYZW &iXYZW)

Detailed Description

cyclic iterator over xy indices

Author:
Bram de Greve [BdG]

Definition at line 61 of file xy.h.


Member Typedef Documentation

typedef num::Modulo<2, int> lass::prim::XY::TValue [private]

Definition at line 87 of file xy.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
dimension 

Definition at line 66 of file xy.h.


Constructor & Destructor Documentation

lass::prim::XY::XY (  ) 

intializes iterator to x axis.

Definition at line 55 of file xy.cpp.

lass::prim::XY::XY ( char  iAxis  ) 

initializes iterator to an axis by character: 'x' or 'y'.

Definition at line 65 of file xy.cpp.

References reset().

lass::prim::XY::XY ( int  iValue  )  [explicit]

initializes iterator to an axis by number.

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

Definition at line 75 of file xy.cpp.

lass::prim::XY::XY ( const std::string &  iAxis  )  [explicit]

initializes iterator to an axis by character: "x" or "y".

Definition at line 84 of file xy.cpp.

References LASS_THROW, and reset().


Member Function Documentation

const char lass::prim::XY::axis (  )  const

return axis by character: "x" or "y".

Definition at line 97 of file xy.cpp.

References dimension, LASS_ASSERT, and value_.

Referenced by operator==().

lass::prim::XY::operator int (  )  const [inline]

convert axis to integer.

0 == x, 1 == y

Definition at line 74 of file xy.h.

XY & lass::prim::XY::operator++ (  ) 

Definition at line 106 of file xy.cpp.

References dimension, LASS_ASSERT, and value_.

XY & lass::prim::XY::operator-- (  ) 

Definition at line 115 of file xy.cpp.

References dimension, LASS_ASSERT, and value_.

XY lass::prim::XY::operator++ ( int   ) 

Definition at line 124 of file xy.cpp.

XY lass::prim::XY::operator-- ( int   ) 

Definition at line 133 of file xy.cpp.

XY & lass::prim::XY::operator+= ( int  iOffset  ) 

Definition at line 142 of file xy.cpp.

References value_.

XY & lass::prim::XY::operator-= ( int  iOffset  ) 

Definition at line 150 of file xy.cpp.

References value_.

void lass::prim::XY::reset ( char  iAxis  )  [inline, private]

Definition at line 165 of file xy.cpp.

References LASS_THROW, and value_.

Referenced by XY().


Friends And Related Function Documentation

bool operator== ( const XY iA,
const XY iB 
) [friend]

Definition at line 192 of file xy.cpp.

bool operator== ( const XY iA,
char  iB 
) [related]

Definition at line 201 of file xy.cpp.

References axis().

bool operator== ( char  iA,
const XY iB 
) [related]

Definition at line 210 of file xy.cpp.

References axis().

bool operator== ( const XY iA,
const std::string &  iB 
) [related]

Definition at line 219 of file xy.cpp.

References axis().

bool operator== ( const std::string &  iA,
const XY iB 
) [related]

Definition at line 228 of file xy.cpp.

References axis().

bool operator!= ( const XY iA,
const XY iB 
) [related]

Definition at line 238 of file xy.cpp.

bool operator!= ( const XY iA,
char  iB 
) [related]

Definition at line 248 of file xy.cpp.

bool operator!= ( char  iA,
const XY iB 
) [related]

Definition at line 258 of file xy.cpp.

bool operator!= ( const XY iA,
const std::string &  iB 
) [related]

Definition at line 268 of file xy.cpp.

bool operator!= ( const std::string &  iA,
const XY iB 
) [related]

Definition at line 278 of file xy.cpp.

XY operator+ ( const XY iA,
int  iOffset 
) [related]

Definition at line 287 of file xy.cpp.

XY operator- ( const XY iA,
int  iOffset 
) [related]

Definition at line 298 of file xy.cpp.

template<typename Char , typename Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  ioS,
const XY iXY 
) [related]

Definition at line 114 of file xy.h.

template<typename Char , typename Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  ioS,
const XYZ iXYZ 
) [related]

Definition at line 114 of file xyz.h.

template<typename Char , typename Traits >
std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > &  ioS,
const XYZW iXYZW 
) [related]

Definition at line 114 of file xyzw.h.


Field Documentation

Definition at line 93 of file xy.h.

Referenced by axis(), operator++(), operator+=(), operator--(), operator-=(), and reset().


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

Generated on Mon Nov 10 14:22:14 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo