IOLink  IOL_v1.6.1_release
DataFrameViewProvider.h
1 #pragma once
2 
3 #include <memory>
4 
5 #include <iolink/view/DataFrameView.h>
6 #include <iolink/view/View.h>
7 
8 namespace iolink
9 {
10 
12 {
13 public:
14  inline static bool isDataFrame(std::shared_ptr<View> view) { return (toDataFrame(view) != nullptr); }
15 
16  inline static std::shared_ptr<DataFrameView> toDataFrame(std::shared_ptr<View> view)
17  {
18  return std::dynamic_pointer_cast<DataFrameView>(view);
19  }
20 };
21 
22 } // end namespace iolink