library of assembled shared sources

http://lass.cocamware.com

lass::prim::XYZW Class Reference

cyclic iterator over xyzw indices More...

#include <xyzw.h>

Collaboration diagram for lass::prim::XYZW:

Collaboration graph
[legend]

Public Types

enum  { dimension = 4 }

Public Member Functions

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

Private Types

typedef num::Modulo< 4, int > TValue

Private Member Functions

void reset (char iAxis)

Private Attributes

TValue value_

Friends

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

Related Functions

(Note that these are not member functions.)

bool operator== (const XYZW &iA, char iB)
bool operator== (char iA, const XYZW &iB)
bool operator== (const XYZW &iA, const std::string &iB)
bool operator== (const std::string &iA, const XYZW &iB)
bool operator!= (const XYZW &iA, const XYZW &iB)
bool operator!= (const XYZW &iA, char iB)
bool operator!= (char iA, const XYZW &iB)
bool operator!= (const XYZW &iA, const std::string &iB)
bool operator!= (const std::string &iA, const XYZW &iB)
XYZW operator+ (const XYZW &iA, int iOffset)
XYZW operator- (const XYZW &iA, int iOffset)

Detailed Description

cyclic iterator over xyzw indices

Author:
Bram de Greve [BdG]

Definition at line 61 of file xyzw.h.


Member Typedef Documentation

typedef num::Modulo<4, int> lass::prim::XYZW::TValue [private]

Definition at line 87 of file xyzw.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
dimension 

Definition at line 66 of file xyzw.h.


Constructor & Destructor Documentation

lass::prim::XYZW::XYZW (  ) 

intializes iterator to x axis.

Definition at line 55 of file xyzw.cpp.

lass::prim::XYZW::XYZW ( char  iAxis  ) 

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

Definition at line 64 of file xyzw.cpp.

References reset().

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

initializes iterator to an axis by number.

..., -1 == w, 0 == x, 1 == y, 2 == z, 3 == w, 4 == x...

Definition at line 74 of file xyzw.cpp.

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

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

Definition at line 83 of file xyzw.cpp.

References LASS_THROW, and reset().


Member Function Documentation

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

return axis by character: 'x', 'y', 'z' or 'w'.

Definition at line 96 of file xyzw.cpp.

References LASS_ASSERT, and value_.

Referenced by operator==().

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

convert axis to integer.

0 == x, 1 == y, 2 == z, 3 == w

Definition at line 74 of file xyzw.h.

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

Definition at line 105 of file xyzw.cpp.

References dimension, LASS_ASSERT, and value_.

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

Definition at line 114 of file xyzw.cpp.

References dimension, LASS_ASSERT, and value_.

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

Definition at line 123 of file xyzw.cpp.

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

Definition at line 132 of file xyzw.cpp.

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

Definition at line 141 of file xyzw.cpp.

References value_.

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

Definition at line 149 of file xyzw.cpp.

References value_.

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

Definition at line 164 of file xyzw.cpp.

References LASS_THROW, and value_.

Referenced by XYZW().


Friends And Related Function Documentation

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

Definition at line 204 of file xyzw.cpp.

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

Definition at line 213 of file xyzw.cpp.

References axis().

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

Definition at line 222 of file xyzw.cpp.

References axis().

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

Definition at line 231 of file xyzw.cpp.

References axis().

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

Definition at line 240 of file xyzw.cpp.

References axis().

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

Definition at line 250 of file xyzw.cpp.

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

Definition at line 260 of file xyzw.cpp.

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

Definition at line 270 of file xyzw.cpp.

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

Definition at line 280 of file xyzw.cpp.

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

Definition at line 290 of file xyzw.cpp.

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

Definition at line 299 of file xyzw.cpp.

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

Definition at line 310 of file xyzw.cpp.


Field Documentation

Definition at line 93 of file xyzw.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