MEPP2 Project
BasePlugin.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published
6 // by the Free Software Foundation; either version 3 of the License,
7 // or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
14 
17 
18 #ifdef FEVV_USE_CGAL
23 #endif
24 
25 #ifdef FEVV_USE_OPENMESH
27 #endif
28 
29 #ifdef FEVV_USE_AIF
31 #endif
32 
33 namespace FEVV {
34 class BaseWindow;
35 class BaseAdapterVisu;
36 
38 {
39 public:
40  BasePlugin() = default;
41  ~BasePlugin() = default;
42 
43 public:
44  virtual void init() = 0;
45  virtual void addParameters(BaseWindow *_window) = 0;
46 
47  /*template< typename HalfedgeGraph >
48  void apply( BaseAdapterVisu* _adapter, HalfedgeGraph* _mesh,
49  FEVV::PMapsContainer *pmaps_bag )
50  {
51  std::cerr << "This function has not been overridden ! BasePlugin::apply(
52  HalfedgeGraph )" << std::endl;
53  }*/
54 
55  virtual void apply(BaseAdapterVisu * /*_adapter*/,
56  void * /*_mesh_void*/,
57  FEVV::PMapsContainer * /*pmaps_bag*/)
58  {
59  std::cerr << "This function has not been overridden ! BasePlugin::apply( "
60  "void )"
61  << std::endl;
62  }
63 
64 #ifdef FEVV_USE_OPENMESH
65  virtual void apply(BaseAdapterVisu * /*_adapter*/,
66  MeshOpenMesh * /*_mesh*/,
67  FEVV::PMapsContainer * /*pmaps_bag*/)
68  {
69  std::cerr << "This function has not been overridden ! BasePlugin::apply( "
70  "MeshOpenMesh )"
71  << std::endl;
72  }
73 #endif
74 
75 #ifdef FEVV_USE_CGAL
76  virtual void apply(BaseAdapterVisu * /*_adapter*/,
77  MeshLCC * /*_mesh*/,
78  FEVV::PMapsContainer * /*pmaps_bag*/)
79  {
80  std::cerr
81  << "This function has not been overridden ! BasePlugin::apply( MeshLCC )"
82  << std::endl;
83  }
84 
85  virtual void apply(BaseAdapterVisu * /*_adapter*/,
86  MeshSurface * /*_mesh*/,
87  FEVV::PMapsContainer * /*pmaps_bag*/)
88  {
89  std::cerr << "This function has not been overridden ! BasePlugin::apply( "
90  "MeshSurface )"
91  << std::endl;
92  }
93 
94  virtual void apply(BaseAdapterVisu * /*_adapter*/,
95  MeshPolyhedron * /*_mesh*/,
96  FEVV::PMapsContainer * /*pmaps_bag*/)
97  {
98  std::cerr << "This function has not been overridden ! BasePlugin::apply( "
99  "MeshPolyhedron )"
100  << std::endl;
101  }
102 
103  virtual void apply(BaseAdapterVisu * /*_adapter*/,
104  CGALPointSet * /*_mesh*/,
105  FEVV::PMapsContainer * /*pmaps_bag*/)
106  {
107  std::cerr << "This function has not been overridden ! BasePlugin::apply( "
108  "CGALPointSet )"
109  << std::endl;
110  }
111 #endif
112 
113 #ifdef FEVV_USE_AIF
114  virtual void apply(BaseAdapterVisu * /*_adapter*/,
115  MeshAIF * /*_mesh*/,
116  FEVV::PMapsContainer * /*pmaps_bag*/)
117  {
118  std::cerr
119  << "This function has not been overridden ! BasePlugin::apply( MeshAIF )"
120  << std::endl;
121  }
122 #endif
123 
124 #ifdef FEVV_USE_PCL
125  virtual void apply(BaseAdapterVisu * /*_adapter*/,
126  PCLPointCloud * /*_mesh*/,
127  FEVV::PMapsContainer * /*pmaps_bag*/)
128  {
129  std::cerr << "This function has not been overridden ! BasePlugin::apply( "
130  "PCLPointCloud )"
131  << std::endl;
132  }
133 #endif
134 
135  virtual void reset() = 0;
136 
137 protected:
138  BaseWindow *window = nullptr;
139 };
140 
141 } // namespace FEVV
142 
FEVV::BasePlugin::apply
virtual void apply(BaseAdapterVisu *, void *, FEVV::PMapsContainer *)
Definition: BasePlugin.h:55
FEVV::CGALPointSet
CGAL::Point_set_3< CGALPointSetPoint > CGALPointSet
Definition: DataStructures_cgal_point_set.h:71
FEVV::MeshLCC
CGAL::Linear_cell_complex_for_combinatorial_map< 2, 3, CGALLCCTraits, CGALItem > MeshLCC
Definition: DataStructures_cgal_linear_cell_complex.h:43
FEVV::BasePlugin::init
virtual void init()=0
BaseWindow.h
FEVV::PCLPointCloud
pcl::PointCloud< PCLEnrichedPoint > PCLPointCloud
Definition: DataStructures_pcl_point_cloud.h:28
properties_linear_cell_complex.h
FEVV::MeshSurface
CGAL::Surface_mesh< CGALPoint > MeshSurface
Definition: DataStructures_cgal_surface_mesh.h:23
FEVV::BaseAdapterVisu
Definition: BaseAdapterVisu.h:27
properties_aif.h
FEVV::PMapsContainer
std::map< std::string, boost::any > PMapsContainer
Definition: properties.h:99
properties_polyhedron_3.h
FEVV
Interfaces for plugins These interfaces will be used for different plugins.
Definition: Assert.h:16
FEVV::BasePlugin::addParameters
virtual void addParameters(BaseWindow *_window)=0
properties_surface_mesh.h
BaseAdapterVisu.h
FEVV::BasePlugin::reset
virtual void reset()=0
FEVV::BasePlugin::~BasePlugin
~BasePlugin()=default
properties_openmesh.h
Wrappings.h
FEVV::BasePlugin::BasePlugin
BasePlugin()=default
FEVV::MeshOpenMesh
OpenMesh::PolyMesh_ArrayKernelT< MyTraits > MeshOpenMesh
Definition: DataStructures_openmesh.h:51
FEVV::BasePlugin
Definition: BasePlugin.h:38
FEVV::BasePlugin::window
BaseWindow * window
Definition: BasePlugin.h:138
FEVV::BaseWindow
Definition: BaseWindow.h:25
properties_cgal_point_set.h
FEVV::MeshPolyhedron
CGAL::Polyhedron_3< CGALKernel, CGAL::Polyhedron_items_with_id_3 > MeshPolyhedron
Definition: DataStructures_cgal_polyhedron_3.h:33
FEVV::MeshAIF
FEVV::DataStructures::AIF::AIFMesh MeshAIF
Definition: DataStructures_aif.h:19