Helios++
Helios software for LiDAR simulations
IExprTreeNodeStringFactory.h
1 #pragma once
2 
3 #include <IExprTreeNode.h>
4 
5 #include <memory>
6 #include <string>
7 
18 template <typename InputType, typename OutputType>
20 public:
21  // *** CONSTRUCTION / DESTRUCTION *** //
22  // ************************************ //
23  virtual ~IExprTreeNodeStringFactory() = default;
24 
25  // *** EXPRESSION TREE NODE STRING FACTORY INTERFACE *** //
26  // ******************************************************* //
33  std::string const &expr
34  ) = 0;
40  inline std::shared_ptr<IExprTreeNode<InputType, OutputType>> makeShared(
41  std::string const &expr
42  ) {
43  return std::shared_ptr<IExprTreeNode<InputType, OutputType>>(
44  make(expr)
45  );
46  }
47 };
Interface defining the functions that must be provided by any concrete implementation of a factory th...
Definition: IExprTreeNodeStringFactory.h:19
virtual IExprTreeNode< InputType, OutputType > * make(std::string const &expr)=0
Make an expression tree from given expression as string.
std::shared_ptr< IExprTreeNode< InputType, OutputType > > makeShared(std::string const &expr)
Like IExprTreeNodeStringFactory::make but returning a shared pointer instead of a raw pointer.
Definition: IExprTreeNodeStringFactory.h:40
Interface extending the Binary Tree node definition to become a Expression Tree node....
Definition: IExprTreeNode.h:19