OTB  10.0.0
Orfeo Toolbox
otbWrapperAddProcessToWatchEvent.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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
This class implements an event storing a pointer to itk::ProcessObject and a string describing the pr...
virtual void SetProcess(itk::ProcessObject *process)
virtual void SetProcessDescription(const std::string desc)
itk::EventObject * MakeObject() const override
bool CheckEvent(const itk::EventObject *e) const override
virtual itk::ProcessObject * GetProcess() const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.