ARTS 2.5.4 (git: 31ce4f0e)
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. More...
 
constexpr StringValue ()=default
 Default initializer to a zero-first solution. More...
 
constexpr StringValue (std::string_view s)
 Set to expected value from a view of something at most N-char long. More...
 

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 28 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 44 of file quantum_numbers.h.

References ARTS_USER_ERROR_IF, N, and x.

Member Function Documentation

◆ 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 33 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'}

Definition at line 30 of file quantum_numbers.h.

Referenced by Quantum::Number::Value::operator==(), StringValue(), and val().


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