A platform for high-performance distributed tool and library development written in C++. It can be deployed in two different cluster modes: standalone or distributed. API for v0.5.0, released on June 13, 2018.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Set.h
Go to the documentation of this file.
1 
2 #ifndef SET_H
3 #define SET_H
4 
5 #include <vector>
6 #include <functional>
7 #include <iostream>
8 #include <memory>
9 #include "Query.h"
10 
11 // PRELOAD %Set <Nothing>%
12 
13 namespace pdb {
14 
15 // this corresponds to a database set
16 template <typename Out>
17 class Set : public Query<Out> {
18 
19 public:
21 
22  Set() {}
23  ~Set() {}
24 
25  Set(bool isError) {
26  this->setError();
27  }
28 
29  Set(std::string dbName, std::string setName) {
30  this->setDBName(dbName);
31  this->setSetName(setName);
32  }
33 
34  void match(function<void(QueryBase&)> forSelection,
35  function<void(QueryBase&)> forSet,
36  function<void(QueryBase&)> forQueryOutput) override {
37  forSet(*this);
38  };
39 
40  // gets the number of inputs
41  virtual int getNumInputs() override {
42  return 0;
43  }
44 
45  // gets the name of the i^th input type...
46  virtual std::string getIthInputType(int i) override {
47  return "I have no inputs!!";
48  }
49 
50  virtual std::string getQueryType() override {
51  return "set";
52  }
53 };
54 }
55 
56 #endif
#define ENABLE_DEEP_COPY
Definition: DeepCopy.h:52
void match(function< void(QueryBase &)> forSelection, function< void(QueryBase &)> forSet, function< void(QueryBase &)> forQueryOutput) override
Definition: Set.h:34
virtual std::string getQueryType() override
Definition: Set.h:50
void setSetName(std::string toMe)
Definition: QueryBase.h:89
Set(bool isError)
Definition: Set.h:25
Set(std::string dbName, std::string setName)
Definition: Set.h:29
virtual int getNumInputs() override
Definition: Set.h:41
void setDBName(std::string toMe)
Definition: QueryBase.h:80
void setError()
Definition: QueryBase.h:85
virtual std::string getIthInputType(int i) override
Definition: Set.h:46
~Set()
Definition: Set.h:23
ENABLE_DEEP_COPY Set()
Definition: Set.h:22
Definition: Set.h:17