version  0.0.1
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
AttributeCrossReference.h
1#ifndef _ATTRIBUTE_CROSS_REFERENCE_
2#define _ATTRIBUTE_CROSS_REFERENCE_
3#include "mspass/utility/AttributeMap.h"
4#include "mspass/utility/Metadata.h"
5#include <map>
6#include <set>
7#include <string>
8namespace mspass {
9namespace utility {
20public:
41 AttributeCrossReference(const std::string lines_to_parse);
52 AttributeCrossReference(const std::list<std::string> &lines);
53
65 const std::map<std::string, std::string> internal2external,
66 const mspass::utility::MetadataList &mdlist);
70 std::string internal(const std::string key) const;
72 std::string external(const std::string key) const;
74 MDtype type(const std::string key) const;
78 int size() const;
85 void put(const std::string intern, const std::string ext);
90 std::set<std::string> internal_names() const;
95 std::set<std::string> external_names() const;
96
97private:
98 std::map<std::string, std::string> itoe;
99 std::map<std::string, std::string> etoi;
100 /* keyed by internal names. Get type of this attribute*/
101 std::map<std::string, MDtype> imdtypemap;
102};
103} // namespace utility
104} // namespace mspass
105#endif
Cross reference between external and internal names.
Definition AttributeCrossReference.h:19
void put(const std::string intern, const std::string ext)
Definition AttributeCrossReference.cc:134
std::set< std::string > external_names() const
Definition AttributeCrossReference.cc:150
std::string internal(const std::string key) const
Definition AttributeCrossReference.cc:104
std::set< std::string > internal_names() const
Definition AttributeCrossReference.cc:142
MDtype type(const std::string key) const
Definition AttributeCrossReference.cc:122
AttributeCrossReference & operator=(const AttributeCrossReference &parent)
Definition AttributeCrossReference.cc:96
int size() const
Definition AttributeCrossReference.cc:130
AttributeCrossReference(const std::string lines_to_parse)
AttributeCrossReference()
Definition AttributeCrossReference.h:25
std::string external(const std::string key) const
Definition AttributeCrossReference.cc:113
AttributeCrossReference(const std::list< std::string > &lines)
AttributeCrossReference(const std::map< std::string, std::string > internal2external, const mspass::utility::MetadataList &mdlist)