ARTS 2.5.11 (git: 725533f0)
Quantum::Number::Value Struct Reference

A complete quantum number value with type information. More...

#include <quantum_numbers.h>

Public Member Functions

constexpr std::strong_ordering operator<=> (const Value &v) const
 
constexpr Value (Type t=Type::FINAL)
 
 Value (const Value &)=default
 
 Value (Value &&) noexcept=default
 
Valueoperator= (const Value &)=default
 
Valueoperator= (Value &&) noexcept=default
 
constexpr Value (Type t, Rational upp_, Rational low_)
 
constexpr Value (std::string_view s)
 Default constructor from some string of values.
 
constexpr Rational upp () const noexcept
 Returns the upper quantum number rational if it exists or an undefined.
 
constexpr Rational low () const noexcept
 Returns the lower quantum number rational if it exists or an undefined.
 
String str_upp () const noexcept
 Returns the upper quantum number string copy.
 
String str_low () const noexcept
 Returns the lower quantum number string copy.
 
void swap_values (Value &x)
 Legacy way to swap the values between two Values.
 
constexpr void set (std::string_view s, bool upp)
 Set level value.
 
constexpr LevelMatch level_match (Value other) const noexcept
 Returns a description of whether both levels match.
 
bofstreamwrite (bofstream &bof) const
 
bifstreamread (bifstream &bif)
 
constexpr bool good () const
 

Public Attributes

Type type
 
TwoLevelValueHolder qn
 

Friends

std::ostream & operator<< (std::ostream &os, Value x)
 Standard output.
 
std::istream & operator>> (std::istream &is, Value &x)
 Standard input.
 

Detailed Description

A complete quantum number value with type information.

Definition at line 716 of file quantum_numbers.h.

Constructor & Destructor Documentation

◆ Value() [1/5]

constexpr Quantum::Number::Value::Value ( Type  t = Type::FINAL)
inlineconstexpr

Definition at line 726 of file quantum_numbers.h.

◆ Value() [2/5]

Quantum::Number::Value::Value ( const Value )
default

◆ Value() [3/5]

Quantum::Number::Value::Value ( Value &&  )
defaultnoexcept

◆ Value() [4/5]

◆ Value() [5/5]

constexpr Quantum::Number::Value::Value ( std::string_view  s)
inlineconstexpr

Default constructor from some string of values.

Definition at line 752 of file quantum_numbers.h.

References ARTS_USER_ERROR_IF, Quantum::Number::count_items(), Quantum::Number::items(), and Quantum::Number::value_holder().

Member Function Documentation

◆ good()

constexpr bool Quantum::Number::Value::good ( ) const
inlineconstexpr

Definition at line 846 of file quantum_numbers.h.

◆ level_match()

constexpr LevelMatch Quantum::Number::Value::level_match ( Value  other) const
inlineconstexprnoexcept

Returns a description of whether both levels match.

Note that the LevelMatch type should automatically transform to bool so there's no need for extra work if this is your target question

Parameters
otherAnother value
Returns
constexpr LevelMatch

Definition at line 820 of file quantum_numbers.h.

References Quantum::Number::common_value_type(), Quantum::Number::TwoLevelValueHolder::low, Quantum::Number::ValueHolder::s, Quantum::Number::TwoLevelValueHolder::upp, Quantum::Number::LevelMatch::upp, and Quantum::Number::StringValue::x.

◆ low()

constexpr Rational Quantum::Number::Value::low ( ) const
inlineconstexprnoexcept

◆ operator<=>()

constexpr std::strong_ordering Quantum::Number::Value::operator<=> ( const Value v) const
inlineconstexpr

◆ operator=() [1/2]

Value & Quantum::Number::Value::operator= ( const Value )
default

◆ operator=() [2/2]

Value & Quantum::Number::Value::operator= ( Value &&  )
defaultnoexcept

◆ read()

bifstream & Quantum::Number::Value::read ( bifstream bif)

◆ set()

constexpr void Quantum::Number::Value::set ( std::string_view  s,
bool  upp 
)
inlineconstexpr

◆ str_low()

String Quantum::Number::Value::str_low ( ) const
noexcept

◆ str_upp()

String Quantum::Number::Value::str_upp ( ) const
noexcept

◆ swap_values()

void Quantum::Number::Value::swap_values ( Value x)

Legacy way to swap the values between two Values.

Definition at line 1019 of file quantum_numbers.cc.

References qn, and var_string().

◆ upp()

constexpr Rational Quantum::Number::Value::upp ( ) const
inlineconstexprnoexcept

◆ write()

bofstream & Quantum::Number::Value::write ( bofstream bof) const

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
Value  x 
)
friend

Standard output.

Definition at line 35 of file quantum_numbers.cc.

◆ operator>>

std::istream & operator>> ( std::istream &  is,
Value x 
)
friend

Standard input.

Definition at line 39 of file quantum_numbers.cc.

Member Data Documentation

◆ qn

TwoLevelValueHolder Quantum::Number::Value::qn

Definition at line 718 of file quantum_numbers.h.

Referenced by str_low(), str_upp(), and swap_values().

◆ type

Type Quantum::Number::Value::type

Definition at line 717 of file quantum_numbers.h.

Referenced by str_low(), and str_upp().


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