PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
pism::ConstAttribute Class Reference

#include <VariableMetadata.hh>

+ Inheritance diagram for pism::ConstAttribute:

Public Member Functions

 ConstAttribute (const ConstAttribute &)=delete
 
ConstAttributeoperator= (const ConstAttribute &)=delete
 
 operator std::string () const
 
 operator double () const
 
 operator std::vector< double > () const
 

Protected Member Functions

 ConstAttribute (const VariableMetadata *var, const std::string &name)
 
 ConstAttribute (ConstAttribute &&a) noexcept
 

Protected Attributes

std::string m_name
 
VariableMetadatam_var
 

Friends

class VariableMetadata
 

Detailed Description

Syntactic sugar used to make it easier to get attributes.

This class makes it possible to get both string and numeric attributes using code that looks like variable = metadata["attribute"]. It tries to convert to the type of variable and throws an error if there is a type mismatch.

Definition at line 84 of file VariableMetadata.hh.


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