BusBoy  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Algorithm.h
Go to the documentation of this file.
1 
17 #ifndef __BUSBOY_ALGORITHM_H__
18 #define __BUSBOY_ALGORITHM_H__
19 
20 #include <string>
21 #include "AlgorithmData.h"
22 #include "context/context_api.h"
23 #include "keys/keys_api.h"
24 
25 namespace BUSBOY {
26 
27 class AlgorithmImpl;
28 
35 class Algorithm {
36 
37  public:
38 
44  virtual void executeAlgorithm(AlgorithmData& data, AlgorithmContext& context) =0;
45 
49  void addInputDataset(const std::string& name);
50 
54  void addInputDataset(const std::string& name, bool optional);
55 
56  void addInputDataset(const std::string& name, bool optional, bool excludeFromKeyspace);
57 
58  void addOutputDataset(const std::string& name);
59 
60  std::set<std::string> getInputDatasets() const;
61 
62  std::set<std::string> getRequiredInputDatasets() const;
63 
64  std::set<std::string> getOptionalInputDatasets() const;
65 
66  std::set<std::string> getExcludedInputDatasets() const;
67 
68  std::set<std::string> getOutputDatasets() const;
69 
70  bool isInputDatasetOptional(const std::string& name) const;
71 
72  bool isInputDatasetExcludedFromKeyspace(const std::string& name) const;
73 
77  void addExpectedDimension(const DataKeyDimension& dim);
78 
79  std::set<DataKeyDimension> getExpectedDimensions() const;
80 
81 
82  ~Algorithm();
83 
84  protected:
85 
86  Algorithm();
87 
88  private:
89 
90  AlgorithmImpl* m_impl;
91 
92 
93 };
94 
95 }
96 
97 #endif

Copyright 2014 Google Inc. All rights reserved.