OTB  9.0.0
Orfeo Toolbox
otbStandardFilterWatcher.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2022 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbStandardFilterWatcher_h
23 #define otbStandardFilterWatcher_h
24 
25 #include "otbFilterWatcherBase.h"
26 
27 namespace otb
28 {
29 
52 class OTBCommon_EXPORT StandardFilterWatcher : public FilterWatcherBase
53 {
54 public:
57  StandardFilterWatcher(itk::ProcessObject* process, const char* comment = "");
58 
59  StandardFilterWatcher(itk::ProcessObject* process, const std::string& comment = "");
60 
62  StandardFilterWatcher() : m_StarsCount(0){};
63 
66 
68  void operator=(const StandardFilterWatcher&);
69 
71  void SetStars(int count)
72  {
73  m_StarsCount = count;
74  }
75  const int& GetStars() const
76  {
77  return m_StarsCount;
78  }
80 
81 protected:
83  void ShowProgress() override;
84 
86  void StartFilter() override;
87 
89  void EndFilter() override;
90 
91 private:
94 
96 
98 
99  std::string m_Buffer;
100 };
101 
102 } // end namespace otb
103 
104 #endif
otb::StandardFilterWatcher::StandardFilterWatcher
StandardFilterWatcher()
Definition: otbStandardFilterWatcher.h:62
otb::StandardFilterWatcher::m_CurrentNbStars
int m_CurrentNbStars
Definition: otbStandardFilterWatcher.h:95
otb::StandardFilterWatcher::m_CoutIsConsole
bool m_CoutIsConsole
Definition: otbStandardFilterWatcher.h:97
otb::StandardFilterWatcher
This class shows the percentage progress execution of the pipeline filtering process.
Definition: otbStandardFilterWatcher.h:52
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otbFilterWatcherBase.h
otb::StandardFilterWatcher::GetStars
const int & GetStars() const
Definition: otbStandardFilterWatcher.h:75
otb::StandardFilterWatcher::m_Buffer
std::string m_Buffer
Definition: otbStandardFilterWatcher.h:99
otb::FilterWatcherBase
This class is an abstract class Provides an interface to progress task mechanic.
Definition: otbFilterWatcherBase.h:48
otb::StandardFilterWatcher::m_StarsCount
int m_StarsCount
Definition: otbStandardFilterWatcher.h:93
otb::StandardFilterWatcher::SetStars
void SetStars(int count)
Definition: otbStandardFilterWatcher.h:71