Abstract base class for Metadata concept.
More...
#include <BasicMetadata.h>
|
| 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 |
| |
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.
◆ ~BasicMetadata()
| virtual mspass::utility::BasicMetadata::~BasicMetadata |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor for safe deletion through BasicMetadata pointers.
◆ get_bool()
| virtual bool mspass::utility::BasicMetadata::get_bool |
( |
const std::string |
key | ) |
const |
|
pure virtual |
Return a boolean metadata attribute.
- Parameters
-
| key | metadata key to fetch. |
- Exceptions
-
| MetadataGetError | or 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
-
| key | metadata key to fetch. |
- Exceptions
-
| MetadataGetError | or 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
-
| key | metadata key to fetch. |
- Exceptions
-
| MetadataGetError | or 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
-
| key | metadata key to fetch. |
- Exceptions
-
| MetadataGetError | or 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
-
| key | metadata key to create or replace. |
| val | value 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
-
| key | metadata key to create or replace. |
| val | value 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
-
| key | metadata key to create or replace. |
| val | value 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
-
| key | metadata key to create or replace. |
| val | value to store. |
Implemented in mspass::utility::Metadata.
The documentation for this class was generated from the following file: