library of assembled shared sources

http://lass.cocamware.com

lass::prim::XYZ Class Reference

cyclic iterator over xyz indices More...

#include <xyz.h>

Collaboration diagram for lass::prim::XYZ:

Collaboration graph
[legend]

Public Types

enum  { dimension = 3 }

Public Member Functions

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

Private Types

typedef num::Modulo< 3, int > TValue

Private Member Functions

void reset (char iAxis)

Private Attributes

TValue value_

Friends

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

Related Functions

(Note that these are not member functions.)

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

Detailed Description

cyclic iterator over xyz indices

Author:
Bram de Greve [BdG]

Definition at line 61 of file xyz.h.


Member Typedef Documentation

typedef num::Modulo<3, int> lass::prim::XYZ::TValue [private]

Definition at line 87 of file xyz.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
dimension 

Definition at line 66 of file xyz.h.


Constructor & Destructor Documentation

lass::prim::XYZ::XYZ (  ) 

intializes iterator to x axis.

Definition at line 55 of file xyz.cpp.

lass::prim::XYZ::XYZ ( char  iAxis  ) 

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

Definition at line 64 of file xyz.cpp.

References reset().

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

initializes iterator to an axis by number.

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

Definition at line 74 of file xyz.cpp.

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

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

Definition at line 83 of file xyz.cpp.

References LASS_THROW, and reset().


Member Function Documentation

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

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

Definition at line 96 of file xyz.cpp.

References LASS_ASSERT, and value_.

Referenced by operator==().

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

convert axis to integer.

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

Definition at line 74 of file xyz.h.

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

Definition at line 105 of file xyz.cpp.

References dimension, LASS_ASSERT, and value_.

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

Definition at line 114 of file xyz.cpp.

References dimension, LASS_ASSERT, and value_.

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

Definition at line 123 of file xyz.cpp.

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

Definition at line 132 of file xyz.cpp.

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

Definition at line 141 of file xyz.cpp.

References value_.

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

Definition at line 149 of file xyz.cpp.

References value_.

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

Definition at line 164 of file xyz.cpp.

References LASS_THROW, and value_.

Referenced by XYZ().


Friends And Related Function Documentation

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

Definition at line 198 of file xyz.cpp.

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

Definition at line 207 of file xyz.cpp.

References axis().

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

Definition at line 216 of file xyz.cpp.

References axis().

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

Definition at line 225 of file xyz.cpp.

References axis().

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

Definition at line 234 of file xyz.cpp.

References axis().

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

Definition at line 244 of file xyz.cpp.

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

Definition at line 254 of file xyz.cpp.

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

Definition at line 264 of file xyz.cpp.

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

Definition at line 274 of file xyz.cpp.

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

Definition at line 284 of file xyz.cpp.

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

Definition at line 293 of file xyz.cpp.

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

Definition at line 304 of file xyz.cpp.


Field Documentation

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