PKDatasetFinder.h
Go to the documentation of this file.
1 #pragma once
2 
4 
7 
9 {
10  /**
11  * @brief The PKDatasetFinderInfo class
12  * Specialization of the DatasetFinderInfo with strings as dataset and id types
13  */
14  class PKDatasetFinderInfo : public core::DatasetFinderInfoBase<std::string, std::string>
15  {
17 
18  public:
19  using Base::Base;
20  };
21 
22  /**
23  * @brief The PKDatasetFinder class
24  */
26  public core::DatasetFinderBase<std::string, std::string, PKDatasetFinderInfo>
27  {
29 
30  public:
31  static const constexpr auto DEFAULT_PACKAGE = "PriorKnowledgeData";
32 
33  using Base::Base;
34 
35  PKDatasetFinder(const std::filesystem::path& relDir) : Base(DEFAULT_PACKAGE, relDir)
36  {
37  }
38 
39  virtual ~PKDatasetFinder()
40  {
41  }
42 
43  virtual void init();
45  const std::string& prefix);
46 
47  bool checkAll(const std::string& dataset) const override;
48  bool checkAll() const override;
49 
50  bool check(const std::string& id) const override;
51  bool check(const std::string& dataset, const std::string& id) const override;
52 
53  std::optional<PKDatasetFinderInfo> find(const std::string& dataset,
54  const std::string& id) const override;
55  std::optional<PKDatasetFinderInfo> find(const std::string& id) const override;
56 
57  std::vector<PKDatasetFinderInfo> findAll() const override;
58 
59  std::vector<PKDatasetFinderInfo> findAll(const std::string& dataset) const override;
60 
61  private:
62  std::vector<std::string> DATASET_FOLDERS_BLACKLIST = {};
63  std::vector<std::string> ID_BLACKLIST = {"script"};
64  };
65 
66 } // namespace armarx::priorknowledge::core
armarx::priorknowledge::core::DatasetFinderBase
Definition: FinderBase.h:119
armarx::priorknowledge::core::PKDatasetFinder::checkAll
bool checkAll() const override
Definition: PKDatasetFinder.cpp:60
armarx::priorknowledge::core::PKDatasetFinderInfo
The PKDatasetFinderInfo class Specialization of the DatasetFinderInfo with strings as dataset and id ...
Definition: PKDatasetFinder.h:14
armarx::priorknowledge::core::PKDatasetFinder::registerPropertyDefinitions
virtual void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr &defs, const std::string &prefix)
Definition: PKDatasetFinder.cpp:11
armarx::priorknowledge::core::DatasetFinderBase< std::string, std::string, PKDatasetFinderInfo >::Base
FinderBase< std::string, PKDatasetFinderInfo > Base
Definition: FinderBase.h:123
FinderInfoBase.h
armarx::priorknowledge::core::DatasetFinderInfoBase< std::string, std::string >::Base
FinderInfoBase< std::string > Base
Definition: FinderInfoBase.h:122
armarx::priorknowledge::core::DatasetFinderBase< std::string, std::string, PKDatasetFinderInfo >::check
virtual bool check(const std::string &id) const =0
armarx::priorknowledge::core::PKDatasetFinder::~PKDatasetFinder
virtual ~PKDatasetFinder()
Definition: PKDatasetFinder.h:39
armarx::priorknowledge::core::PKDatasetFinder::init
virtual void init()
Definition: PKDatasetFinder.cpp:23
armarx::priorknowledge::core::PKDatasetFinder::DEFAULT_PACKAGE
static const constexpr auto DEFAULT_PACKAGE
Definition: PKDatasetFinder.h:31
FinderBase.h
armarx::priorknowledge::core::PKDatasetFinder::PKDatasetFinder
PKDatasetFinder(const std::filesystem::path &relDir)
Definition: PKDatasetFinder.h:35
PropertyDefinitionContainer.h
armarx::priorknowledge::core::PKDatasetFinder::findAll
std::vector< PKDatasetFinderInfo > findAll() const override
Definition: PKDatasetFinder.cpp:191
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::priorknowledge::core::DatasetFinderInfoBase
The DatasetFinderInfoBase class Indicates an into to 'something' of type IDType inside a dataset of t...
Definition: FinderInfoBase.h:118
armarx::priorknowledge::core
Definition: FinderBase.h:16
armarx::priorknowledge::core::PKDatasetFinder
The PKDatasetFinder class.
Definition: PKDatasetFinder.h:25
armarx::priorknowledge::core::DatasetFinderBase< std::string, std::string, PKDatasetFinderInfo >::find
virtual std::optional< PKDatasetFinderInfo > find(const std::string &id) const =0