ChimeraTK-DeviceAccess  03.18.00
MetadataCatalogue.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 #pragma once
4 
5 #include <map>
6 #include <string>
7 
8 namespace ChimeraTK {
9 
18  public:
20  [[nodiscard]] const std::string& getMetadata(const std::string& key) const;
21 
23  [[nodiscard]] size_t getNumberOfMetadata() const;
24 
29  void addMetadata(const std::string& key, const std::string& value);
30 
32  using iterator = std::map<std::string, std::string>::iterator;
33  using const_iterator = std::map<std::string, std::string>::const_iterator;
34  [[nodiscard]] iterator begin();
35  [[nodiscard]] const_iterator cbegin() const;
36  [[nodiscard]] iterator end();
37  [[nodiscard]] const_iterator cend() const;
38 
39  protected:
41  std::map<std::string, std::string> metadata;
42  };
43 
44 } // namespace ChimeraTK
ChimeraTK::MetadataCatalogue::getNumberOfMetadata
size_t getNumberOfMetadata() const
Get number of metadata entries in the catalogue.
Definition: MetadataCatalogue.cc:25
ChimeraTK::MetadataCatalogue::getMetadata
const std::string & getMetadata(const std::string &key) const
Get metadata information for the given key.
Definition: MetadataCatalogue.cc:14
ChimeraTK::MetadataCatalogue
Container for backend metadata.
Definition: MetadataCatalogue.h:17
ChimeraTK::MetadataCatalogue::addMetadata
void addMetadata(const std::string &key, const std::string &value)
Add metadata information to the catalogue.
Definition: MetadataCatalogue.cc:31
ChimeraTK::MetadataCatalogue::const_iterator
std::map< std::string, std::string >::const_iterator const_iterator
Definition: MetadataCatalogue.h:33
ChimeraTK::MetadataCatalogue::cend
const_iterator cend() const
Definition: MetadataCatalogue.cc:55
ChimeraTK::MetadataCatalogue::metadata
std::map< std::string, std::string > metadata
Map of meta data.
Definition: MetadataCatalogue.h:41
ChimeraTK::MetadataCatalogue::iterator
std::map< std::string, std::string >::iterator iterator
Iterators for meta data.
Definition: MetadataCatalogue.h:32
ChimeraTK::MetadataCatalogue::begin
iterator begin()
Definition: MetadataCatalogue.cc:37
ChimeraTK::MetadataCatalogue::cbegin
const_iterator cbegin() const
Definition: MetadataCatalogue.cc:43
ChimeraTK
Definition: DummyBackend.h:16
ChimeraTK::MetadataCatalogue::end
iterator end()
Definition: MetadataCatalogue.cc:49