OTB  6.7.0
Orfeo Toolbox
otbWrapperAddProcessToWatchEvent.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbWrapperAddProcessToWatchEvent_h
22 #define otbWrapperAddProcessToWatchEvent_h
23 
24 #include "itkEventObject.h"
25 #include "itkProcessObject.h"
26 #include "OTBApplicationEngineExport.h"
27 #include <string>
28 
29 namespace otb
30 {
31 namespace Wrapper
32 {
33 
41 class OTBApplicationEngine_EXPORT AddProcessToWatchEvent: public itk::EventObject
42 {
43 public:
44 
47 
49  AddProcessToWatchEvent(const Self& s) :itk::EventObject(s){};
51 
53  virtual void SetProcess(itk::ProcessObject * process)
54  {
55  m_Process = process;
56  }
57  virtual itk::ProcessObject * GetProcess() const
58  {
59  return m_Process;
60  }
62 
64  virtual void SetProcessDescription(const std::string desc)
65  {
66  m_ProcessDescription = desc;
67  }
68 
69  virtual std::string GetProcessDescription() const
70  {
71  return m_ProcessDescription;
72  }
73 
75  itk::EventObject* MakeObject() const override
76  {
77  return new Self;
78  }
79 
80  const char* GetEventName() const override
81  {
82  return "AddProcess";
83  }
84  bool CheckEvent(const itk::EventObject* e) const override
85  {
86  return dynamic_cast<const Self*>(e);
87  }
88 
89 private:
91  std::string m_ProcessDescription;
92 };
93 
94 }
95 }
96 
97 #endif
itk::EventObject * MakeObject() const override
This class implements an event storing a pointer to itk::ProcessObject and a string describing the pr...
virtual void SetProcessDescription(const std::string desc)
bool CheckEvent(const itk::EventObject *e) const override
virtual itk::ProcessObject * GetProcess() const
virtual void SetProcess(itk::ProcessObject *process)