MsPASS C++ API  2.4.1.dev4+g92330b7a
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mspass::utility::BasicMetadata Class Referenceabstract

Abstract base class for Metadata concept. More...

#include <BasicMetadata.h>

Inheritance diagram for mspass::utility::BasicMetadata:
Inheritance graph
[legend]

Public Member Functions

virtual ~BasicMetadata ()
 
virtual int get_int (const std::string key) const =0
 
virtual double get_double (const std::string key) const =0
 
virtual bool get_bool (const std::string key) const =0
 
virtual std::string get_string (const std::string key) const =0
 
virtual void put (const std::string key, const double val)=0
 
virtual void put (const std::string key, const int val)=0
 
virtual void put (const std::string key, const bool val)=0
 
virtual void put (const std::string key, const std::string val)=0
 

Detailed Description

Abstract base class for Metadata concept.

A core idea in MsPASS is the idea of a generic header that allows storage and retrieval of arbitrary attributes. This base class forces support for the standard basic data types.

Constructor & Destructor Documentation

◆ ~BasicMetadata()

virtual mspass::utility::BasicMetadata::~BasicMetadata ( )
inlinevirtual

Virtual destructor for safe deletion through BasicMetadata pointers.

16{};

Member Function Documentation

◆ get_bool()

virtual bool mspass::utility::BasicMetadata::get_bool ( const std::string  key) const
pure virtual

Return a boolean metadata attribute.

Parameters
keymetadata key to fetch.
Exceptions
MetadataGetErroror another MsPASSError-derived exception when the key is undefined or cannot be represented as a bool.

Implemented in mspass::utility::Metadata.

◆ get_double()

virtual double mspass::utility::BasicMetadata::get_double ( const std::string  key) const
pure virtual

Return a floating-point metadata attribute.

Parameters
keymetadata key to fetch.
Exceptions
MetadataGetErroror another MsPASSError-derived exception when the key is undefined or cannot be represented as a double.

Implemented in mspass::utility::Metadata.

◆ get_int()

virtual int mspass::utility::BasicMetadata::get_int ( const std::string  key) const
pure virtual

Return an integer-valued metadata attribute.

Parameters
keymetadata key to fetch.
Exceptions
MetadataGetErroror another MsPASSError-derived exception when the key is undefined or cannot be represented as an int.

Implemented in mspass::utility::Metadata.

◆ get_string()

virtual std::string mspass::utility::BasicMetadata::get_string ( const std::string  key) const
pure virtual

Return a string metadata attribute.

Parameters
keymetadata key to fetch.
Exceptions
MetadataGetErroror another MsPASSError-derived exception when the key is undefined or cannot be represented as a string.

Implemented in mspass::utility::Metadata.

◆ put() [1/4]

virtual void mspass::utility::BasicMetadata::put ( const std::string  key,
const bool  val 
)
pure virtual

Store a boolean metadata attribute.

Parameters
keymetadata key to create or replace.
valvalue to store.

Implemented in mspass::utility::Metadata.

◆ put() [2/4]

virtual void mspass::utility::BasicMetadata::put ( const std::string  key,
const double  val 
)
pure virtual

Store a double-valued metadata attribute.

Parameters
keymetadata key to create or replace.
valvalue to store.

Implemented in mspass::utility::Metadata.

◆ put() [3/4]

virtual void mspass::utility::BasicMetadata::put ( const std::string  key,
const int  val 
)
pure virtual

Store an integer-valued metadata attribute.

Parameters
keymetadata key to create or replace.
valvalue to store.

Implemented in mspass::utility::Metadata.

◆ put() [4/4]

virtual void mspass::utility::BasicMetadata::put ( const std::string  key,
const std::string  val 
)
pure virtual

Store a string metadata attribute.

Parameters
keymetadata key to create or replace.
valvalue to store.

Implemented in mspass::utility::Metadata.


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