ARTS 2.5.11 (git: 6827797f)
Quantum::Number::StringValue Struct Reference

Holds string values but can only hold sizeof(Index) long values. More...

#include <quantum_numbers.h>

Public Member Functions

constexpr std::string_view val () const noexcept
 Returns the value in such a way that no \0 remains in the view.
 
constexpr StringValue ()=default
 Default initializer to a zero-first solution.
 
constexpr StringValue (std::string_view s)
 Set to expected value from a view of something at most N-char long.
 
constexpr std::strong_ordering operator<=> (const StringValue &sv) const
 

Public Attributes

std::array< char, Nx {'\0'}
 

Static Public Attributes

static constexpr std::size_t N = 16
 

Detailed Description

Holds string values but can only hold sizeof(Index) long values.

Definition at line 29 of file quantum_numbers.h.

Constructor & Destructor Documentation

◆ StringValue() [1/2]

constexpr Quantum::Number::StringValue::StringValue ( )
constexprdefault

Default initializer to a zero-first solution.

◆ StringValue() [2/2]

constexpr Quantum::Number::StringValue::StringValue ( std::string_view  s)
inlineexplicitconstexpr

Set to expected value from a view of something at most N-char long.

This means that we will need to either redesign quantum numbers or make an exception for the type, e.g., is \tilde{X} perhaps OK as ~X? We have no opinion at this moment

Definition at line 45 of file quantum_numbers.h.

References ARTS_USER_ERROR_IF, N, and x.

Member Function Documentation

◆ operator<=>()

constexpr std::strong_ordering Quantum::Number::StringValue::operator<=> ( const StringValue sv) const
inlineconstexpr

Definition at line 65 of file quantum_numbers.h.

References N, and x.

◆ val()

constexpr std::string_view Quantum::Number::StringValue::val ( ) const
inlineconstexprnoexcept

Returns the value in such a way that no \0 remains in the view.

Definition at line 34 of file quantum_numbers.h.

References N, and x.

Referenced by Quantum::Number::Value::str_low(), and Quantum::Number::Value::str_upp().

Member Data Documentation

◆ N

constexpr std::size_t Quantum::Number::StringValue::N = 16
staticconstexpr

◆ x

std::array<char, N> Quantum::Number::StringValue::x {'\0'}

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