namedUnitSet Class Reference

... More...

Inheritance diagram for namedUnitSet:
Collaboration diagram for namedUnitSet:

Public Member Functions

 ClassName ("namedUnitSet")
 Run time type information. More...
 
 namedUnitSet (const string &)
 Construct from name. More...
 
 namedUnitSet (const namedUnitSet &)=default
 Copy constructor. More...
 
 namedUnitSet (namedUnitSet &&)=default
 Move constructor. More...
 
void read (const word &keyword, const dictionary &)
 Update. More...
 
bool readIfPresent (const word &keyword, const dictionary &)
 Update if found in the dictionary. More...
 
- Public Member Functions inherited from unitSet
 ClassName ("unitSet")
 Run time type information. More...
 
 unitSet (const dimensionSet &, const scalar fraction, const scalar angle, const scalar multiplier)
 Construct from components. More...
 
 unitSet (const dimensionSet &)
 Construct from a dimension set. No dimensionless units. Unity. More...
 
 unitSet (const unitSet &)=default
 Copy constructor. More...
 
 unitSet (unitSet &&)=default
 Move constructor. More...
 
 unitSet (Istream &is)
 Construct from stream. More...
 
const dimensionSetdimensions () const
 Access the dimensions. More...
 
bool dimensionless () const
 Return true if it is dimensionless. More...
 
template<class T >
T toStandard (const T &) const
 Convert a value to standard units. More...
 
template<class T >
void makeStandard (T &) const
 Convert a value to standard units. More...
 
template<class T >
T toUser (const T &) const
 Convert a value to user units. More...
 
template<class T >
void makeUser (T &) const
 Convert a value to user units. More...
 
bool any () const
 Return whether this is the "any" unit. I.e., the case where. More...
 
bool none () const
 Return whether this is the "none" unit. I.e., the case where unit. More...
 
bool standard () const
 Return whether this unit is standard. I.e., is its multiplier one? More...
 
void reset (const unitSet &)
 Reset the unit conversion. More...
 
void read (const word &keyword, const dictionary &)
 Update. More...
 
void read (Istream &is)
 Update. More...
 
void read (const word &keyword, const dictionary &, Istream &is)
 Update. More...
 
bool readIfPresent (const word &keyword, const dictionary &)
 Update if found in the dictionary. More...
 
bool readIfPresent (Istream &is)
 Update if found on the stream. More...
 
bool readIfPresent (const word &keyword, const dictionary &, Istream &is)
 Update if found on the dictionary stream. More...
 
InfoProxy< unitSetinfo () const
 Return info proxy. More...
 
scalar operator[] (const dimensionSet::dimensionType type) const
 Access the dimension exponents. More...
 
scalar operator[] (const dimlessUnitType type) const
 Access the dimensionless unit exponents. More...
 
void operator= (const unitSet &)=delete
 Disallow default bitwise assignment. More...
 
void operator= (const unitSet &&)=delete
 Disallow default bitwise move assignment. More...
 

Friends

Istreamoperator>> (Istream &, namedUnitSet &)
 Read from stream. More...
 
Ostreamoperator<< (Ostream &, const namedUnitSet &)
 Write to stream. More...
 

Additional Inherited Members

- Public Types inherited from unitSet
enum  { nDimlessUnits = 2 }
 Define an enumeration for the number of dimensionless units. More...
 
enum  dimlessUnitType { FRACTION , ANGLE }
 Define an enumeration for the names of the dimensionless unit. More...
 
- Static Public Member Functions inherited from unitSet
static unitSet newUnitless ()
 Return a new "unitless" unit set. More...
 
static unitSet newAny ()
 Return a new "any" unit set. More...
 
static unitSet newNone ()
 Return a new "none" unit set. More...
 
- Static Public Attributes inherited from unitSet
static const NamedEnum< dimlessUnitType, 2 > & dimlessUnitTypeNames_ = dimlessUnitTypeNamesPtr_()
 Names of the dimensionless units. More...
 
static const scalar smallExponent = rootSmall
 A small exponent with which to perform inexact comparisons. More...
 

Detailed Description

...

Source files

Definition at line 58 of file namedUnitSet.H.

Constructor & Destructor Documentation

◆ namedUnitSet() [1/3]

namedUnitSet ( const string name)

Construct from name.

Definition at line 39 of file namedUnitSet.C.

◆ namedUnitSet() [2/3]

namedUnitSet ( const namedUnitSet )
default

Copy constructor.

◆ namedUnitSet() [3/3]

namedUnitSet ( namedUnitSet &&  )
default

Move constructor.

Member Function Documentation

◆ ClassName()

ClassName ( "namedUnitSet"  )

Run time type information.

◆ read()

void read ( const word keyword,
const dictionary dict 
)

Update.

Definition at line 57 of file namedUnitSetIO.C.

References dict, and unitSet::read().

Here is the call graph for this function:

◆ readIfPresent()

bool readIfPresent ( const word keyword,
const dictionary dict 
)

Update if found in the dictionary.

Definition at line 69 of file namedUnitSetIO.C.

References dict, and unitSet::readIfPresent().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
namedUnitSet  
)
friend

Read from stream.

◆ operator<<

Ostream& operator<< ( Ostream ,
const namedUnitSet  
)
friend

Write to stream.


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