Type-safe enumeration of axis directions. More...

#include <nav.hpp>

Public Member Functions

 Dir (const Dir &rhs)
 
bool operator== (const Dir &rhs) const
 
Dir opposite () const
 Opposite direction to this one. More...
 

Public Attributes

const int val
 Integer representation suitable for indexing in array. More...
 

Static Public Attributes

static const Dir DEC
 Towards the end of the axis with lesser numbers. More...
 
static const Dir INC
 Towards the end of the axis with greater numbers. More...
 
static const int COUNT = 2
 Number of possible directions. More...
 

Protected Member Functions

 Dir (int i)
 Private constructor to avoid initialization outside domain. More...
 

Friends

template<typename Dim >
struct Side
 
std::ostream & operator<< (std::ostream &os, const Dir &d)
 

Detailed Description

Type-safe enumeration of axis directions.

Constructor & Destructor Documentation

Dir::Dir ( const Dir rhs)
inline

Referenced by opposite().

Dir::Dir ( int  i)
inlineprotected

Private constructor to avoid initialization outside domain.

Member Function Documentation

bool Dir::operator== ( const Dir rhs) const
inline

References val.

Dir Dir::opposite ( ) const
inline

Opposite direction to this one.

References Dir().

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Dir d 
)
friend
template<typename Dim >
friend struct Side
friend

Member Data Documentation

const int Dir::COUNT = 2
static

Number of possible directions.

Referenced by Side< Dim >::facetag().

const Dir Dir::DEC
static

Towards the end of the axis with lesser numbers.

const Dir Dir::INC
static

Towards the end of the axis with greater numbers.

const int Dir::val

Integer representation suitable for indexing in array.

Referenced by Cart2D::face_ndx(), Side< Dim >::facetag(), Cart2D::node_ndx(), and operator==().


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