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() [1/2]

Dir::Dir ( const Dir rhs)
inline

Referenced by opposite().

◆ Dir() [2/2]

Dir::Dir ( int  i)
inlineprotected

Private constructor to avoid initialization outside domain.

Member Function Documentation

◆ operator==()

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

References val.

◆ opposite()

Dir Dir::opposite ( ) const
inline

Opposite direction to this one.

References Dir(), and val.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Dir d 
)
friend

◆ Side

template<typename Dim >
friend struct Side
friend

Member Data Documentation

◆ COUNT

const int Dir::COUNT = 2
static

Number of possible directions.

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

◆ DEC

const Dir Dir::DEC
static

Towards the end of the axis with lesser numbers.

◆ INC

const Dir Dir::INC
static

Towards the end of the axis with greater numbers.

◆ val

const int Dir::val

Integer representation suitable for indexing in array.

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


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