Alexandria  2.16
Please provide a description of the project.
CachedProvider.h
Go to the documentation of this file.
1 
24 #ifndef _XYDATASET_CACHEDPROVIDER_H
25 #define _XYDATASET_CACHEDPROVIDER_H
26 
27 #include <map>
28 #include <string>
29 
30 #include "ElementsKernel/Export.h"
31 #include "XYDatasetProvider.h"
32 #include "QualifiedName.h"
33 
34 namespace Euclid {
35 namespace XYDataset {
36 
45 
46 public:
47 
51  virtual ~CachedProvider() = default;
52 
54 
76  std::vector<QualifiedName> listContents(const std::string& group) override;
77 
87  std::unique_ptr<XYDataset> getDataset(const QualifiedName& qualified_name) override;
88 
89 
90  std::string getParameter(const QualifiedName& qualified_name, const std::string& key_word) override;
91 
92 private:
96 
97 }; // End of CachedProvider class
98 
99 } // namespace XYDataset
100 } // namespace Euclid
101 
102 #endif
The CachedProvider wraps another XYDatasetProvider and keeps in memory the results, so following calls are cheaper.
std::map< QualifiedName, std::unique_ptr< XYDataset > > m_dataset
STL class.
STL class.
#define ELEMENTS_API
std::shared_ptr< XYDatasetProvider > m_provider
STL class.
STL class.
std::map< std::string, std::vector< QualifiedName > > m_list_cache
This interface class provides the dataset following a qualified name object.
Represents a name qualified with a set of groups.
Definition: QualifiedName.h:66