OoOJoin  0.0.1
The next generation of out-of-order join operator
OperatorTable.h
Go to the documentation of this file.
1 
5 //
6 // Created by tony on 06/12/22.
7 //
8 
9 #ifndef INTELLISTREAM_INCLUDE_OPERATOR_OPERATORTABLE_H_
10 #define INTELLISTREAM_INCLUDE_OPERATOR_OPERATORTABLE_H_
11 #include <Operator/IAWJOperator.h>
14 #include <map>
15 namespace OoOJoin {
26  protected:
27  std::map<std::string, AbstractOperatorPtr> operatorMap;
28  public:
33  OperatorTable();
34  ~OperatorTable() {
35  }
41  void registerNewOperator(AbstractOperatorPtr onew, std::string tag) {
42  operatorMap[tag] = onew;
43  }
49  AbstractOperatorPtr findOperator(std::string name) {
50  if (operatorMap.count(name)) {
51  return operatorMap[name];
52  }
53  return nullptr;
54  }
55 };
61 typedef std::shared_ptr<class OperatorTable> OperatorTablePtr;
67 #define newOperatorTable std::make_shared<OoOJoin::OperatorTable>
68 } // OoOJoin
69 
70 #endif //INTELLISTREAM_INCLUDE_OPERATOR_OPERATORTABLE_H_
The entity of operatorTable, can used for searching all available operators.
Definition: OperatorTable.h:25
void registerNewOperator(AbstractOperatorPtr onew, std::string tag)
To register a new operator.
Definition: OperatorTable.h:41
OperatorTable()
The constructing function.
Definition: OperatorTable.cpp:8
AbstractOperatorPtr findOperator(std::string name)
find an operator in the table according to its name
Definition: OperatorTable.h:49
std::shared_ptr< class AbstractOperator > AbstractOperatorPtr
The class to describe a shared pointer to AbstractOperator.
Definition: AbstractOperator.h:135
std::shared_ptr< class OperatorTable > OperatorTablePtr
The class to describe a shared pointer to OperatorTable.
Definition: OperatorTable.h:61
Definition: OperatorTable.cpp:7