orientedType Class Reference

Class to determine the 'oriented' status of surface fields. More...

Collaboration diagram for orientedType:
[legend]

Public Types

enum  orientedOption : unsigned char { UNKNOWN = 0 , ORIENTED = 1 , UNORIENTED = 2 }
 Enumeration defining oriented flags. More...
 

Public Member Functions

 orientedType () noexcept
 Default construct as UNKNOWN. More...
 
 orientedType (const orientedType &ot) noexcept
 Copy construct. More...
 
 orientedType (const bool isOriented) noexcept
 Construct from bool. More...
 
 orientedType (Istream &is)
 Construct from Istream. More...
 
orientedOptionoriented () noexcept
 Return non-const reference to the oriented flag. More...
 
orientedOption oriented () const noexcept
 Return the oriented flag. More...
 
void setOriented (const bool on=true) noexcept
 Set the oriented flag: on/off. More...
 
void read (const dictionary &dict)
 Read the "oriented" state from dictionary. More...
 
bool writeEntry (Ostream &os) const
 Write the "oriented" flag entry (if ORIENTED) More...
 
 operator bool () const noexcept
 True if type is ORIENTED. More...
 
void operator= (const orientedType &ot)
 
void operator+= (const orientedType &ot)
 
void operator-= (const orientedType &ot)
 
void operator*= (const orientedType &ot)
 
void operator/= (const orientedType &ot)
 
void operator*= (const scalar s)
 
void operator/= (const scalar s)
 
bool operator() () const noexcept
 True if type is ORIENTED. Same as bool operator. More...
 

Static Public Member Functions

static bool checkType (const orientedType &ot1, const orientedType &ot2)
 Return true if can operate on this pair of oriented types. More...
 

Static Public Attributes

static const Enum< orientedOptionorientedOptionNames
 Named enumerations for oriented flags. More...
 

Friends

Istreamoperator>> (Istream &is, orientedType &ot)
 
Ostreamoperator<< (Ostream &os, const orientedType &ot)
 

Detailed Description

Class to determine the 'oriented' status of surface fields.

Source files

Definition at line 56 of file orientedType.H.

Member Enumeration Documentation

◆ orientedOption

enum orientedOption : unsigned char

Enumeration defining oriented flags.

Enumerator
UNKNOWN 
ORIENTED 
UNORIENTED 

Definition at line 63 of file orientedType.H.

Constructor & Destructor Documentation

◆ orientedType() [1/4]

orientedType ( )
noexcept

Default construct as UNKNOWN.

Definition at line 66 of file orientedType.C.

◆ orientedType() [2/4]

orientedType ( const orientedType ot)
noexcept

Copy construct.

Definition at line 72 of file orientedType.C.

◆ orientedType() [3/4]

orientedType ( const bool  isOriented)
explicitnoexcept

Construct from bool.

Definition at line 78 of file orientedType.C.

◆ orientedType() [4/4]

orientedType ( Istream is)
explicit

Construct from Istream.

Definition at line 84 of file orientedType.C.

References IOstream::check(), and FUNCTION_NAME.

Here is the call graph for this function:

Member Function Documentation

◆ checkType()

bool checkType ( const orientedType ot1,
const orientedType ot2 
)
static

Return true if can operate on this pair of oriented types.

Definition at line 49 of file orientedType.C.

References orientedType::oriented(), and orientedType::UNKNOWN.

Here is the call graph for this function:

◆ oriented() [1/2]

Foam::orientedType::orientedOption & oriented ( )
noexcept

Return non-const reference to the oriented flag.

Definition at line 94 of file orientedType.C.

Referenced by Foam::atan2(), orientedType::checkType(), Foam::hypot(), Foam::max(), Foam::min(), orientedType::operator+=(), orientedType::operator-=(), Foam::operator<<(), and orientedType::operator=().

Here is the caller graph for this function:

◆ oriented() [2/2]

Foam::orientedType::orientedOption oriented ( ) const
noexcept

Return the oriented flag.

Definition at line 100 of file orientedType.C.

◆ setOriented()

void setOriented ( const bool  on = true)
noexcept

Set the oriented flag: on/off.

Definition at line 106 of file orientedType.C.

◆ read()

void read ( const dictionary dict)

Read the "oriented" state from dictionary.

Definition at line 112 of file orientedType.C.

References dict.

◆ writeEntry()

bool writeEntry ( Ostream os) const

Write the "oriented" flag entry (if ORIENTED)

Returns
True if entry was written

Definition at line 124 of file orientedType.C.

References os(), Foam::output(), and Ostream::writeEntry().

Here is the call graph for this function:

◆ operator bool()

operator bool ( ) const
inlineexplicitnoexcept

True if type is ORIENTED.

Definition at line 128 of file orientedType.H.

References orientedType::ORIENTED.

◆ operator=()

void operator= ( const orientedType ot)

Definition at line 139 of file orientedType.C.

References orientedType::oriented().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const orientedType ot)

Definition at line 146 of file orientedType.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and orientedType::oriented().

Here is the call graph for this function:

◆ operator-=()

void operator-= ( const orientedType ot)

Definition at line 165 of file orientedType.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and orientedType::oriented().

Here is the call graph for this function:

◆ operator*=() [1/2]

void operator*= ( const orientedType ot)

Definition at line 184 of file orientedType.C.

◆ operator/=() [1/2]

void operator/= ( const orientedType ot)

Definition at line 198 of file orientedType.C.

◆ operator*=() [2/2]

void operator*= ( const scalar  s)

Definition at line 212 of file orientedType.C.

◆ operator/=() [2/2]

void operator/= ( const scalar  s)

Definition at line 218 of file orientedType.C.

◆ operator()()

bool operator() ( ) const
noexcept

True if type is ORIENTED. Same as bool operator.

Definition at line 224 of file orientedType.C.

Friends And Related Function Documentation

◆ operator>>

Istream & operator>> ( Istream is,
orientedType ot 
)
friend

◆ operator<<

Ostream & operator<< ( Ostream os,
const orientedType ot 
)
friend

Member Data Documentation

◆ orientedOptionNames

const Foam::Enum< Foam::orientedType::orientedOption > orientedOptionNames
static

Named enumerations for oriented flags.

Definition at line 71 of file orientedType.H.

Referenced by Foam::atan2(), Foam::hypot(), Foam::max(), Foam::min(), Foam::operator+(), Foam::operator-(), Foam::operator<<(), and Foam::operator>>().


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