OTB  9.0.0
Orfeo Toolbox
otbWrapperAddProcessToWatchEvent.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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:
45  typedef itk::EventObject Superclass;
46 
48  {
49  }
50  AddProcessToWatchEvent(const Self& s) : itk::EventObject(s){};
52  {
53  }
54 
56  virtual void SetProcess(itk::ProcessObject* process)
57  {
58  m_Process = process;
59  }
60  virtual itk::ProcessObject* GetProcess() const
61  {
62  return m_Process;
63  }
65 
67  virtual void SetProcessDescription(const std::string desc)
68  {
69  m_ProcessDescription = desc;
70  }
71 
72  virtual std::string GetProcessDescription() const
73  {
74  return m_ProcessDescription;
75  }
76 
78  itk::EventObject* MakeObject() const override
79  {
80  return new Self;
81  }
82 
83  const char* GetEventName() const override
84  {
85  return "AddProcess";
86  }
87  bool CheckEvent(const itk::EventObject* e) const override
88  {
89  return dynamic_cast<const Self*>(e);
90  }
91 
92 private:
93  itk::ProcessObject::Pointer m_Process;
94  std::string m_ProcessDescription;
95 };
96 }
97 }
98 
99 #endif
otb::Wrapper::AddProcessToWatchEvent::m_Process
itk::ProcessObject::Pointer m_Process
Definition: otbWrapperAddProcessToWatchEvent.h:93
otb::Wrapper::AddProcessToWatchEvent::MakeObject
itk::EventObject * MakeObject() const override
Definition: otbWrapperAddProcessToWatchEvent.h:78
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Wrapper::AddProcessToWatchEvent::Self
AddProcessToWatchEvent Self
Definition: otbWrapperAddProcessToWatchEvent.h:44
otb::Wrapper::AddProcessToWatchEvent::GetEventName
const char * GetEventName() const override
Definition: otbWrapperAddProcessToWatchEvent.h:83
otb::Wrapper::AddProcessToWatchEvent::SetProcessDescription
virtual void SetProcessDescription(const std::string desc)
Definition: otbWrapperAddProcessToWatchEvent.h:67
otb::Wrapper::AddProcessToWatchEvent::GetProcess
virtual itk::ProcessObject * GetProcess() const
Definition: otbWrapperAddProcessToWatchEvent.h:60
otb::Wrapper::AddProcessToWatchEvent::~AddProcessToWatchEvent
~AddProcessToWatchEvent() override
Definition: otbWrapperAddProcessToWatchEvent.h:51
otb::Wrapper::AddProcessToWatchEvent::AddProcessToWatchEvent
AddProcessToWatchEvent(const Self &s)
Definition: otbWrapperAddProcessToWatchEvent.h:50
otb::Wrapper::AddProcessToWatchEvent::SetProcess
virtual void SetProcess(itk::ProcessObject *process)
Definition: otbWrapperAddProcessToWatchEvent.h:56
otb::Wrapper::AddProcessToWatchEvent::m_ProcessDescription
std::string m_ProcessDescription
Definition: otbWrapperAddProcessToWatchEvent.h:94
otb::Wrapper::AddProcessToWatchEvent
This class implements an event storing a pointer to itk::ProcessObject and a string describing the pr...
Definition: otbWrapperAddProcessToWatchEvent.h:41
otb::Wrapper::AddProcessToWatchEvent::GetProcessDescription
virtual std::string GetProcessDescription() const
Definition: otbWrapperAddProcessToWatchEvent.h:72
otb::Wrapper::AddProcessToWatchEvent::AddProcessToWatchEvent
AddProcessToWatchEvent()
Definition: otbWrapperAddProcessToWatchEvent.h:47
itk
Definition: otbNoDataHelper.h:31
otb::Wrapper::AddProcessToWatchEvent::Superclass
itk::EventObject Superclass
Definition: otbWrapperAddProcessToWatchEvent.h:45
otb::Wrapper::AddProcessToWatchEvent::CheckEvent
bool CheckEvent(const itk::EventObject *e) const override
Definition: otbWrapperAddProcessToWatchEvent.h:87