OTB  7.1.0
Orfeo Toolbox
otbStandardWriterWatcher.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2019 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 otbStandardWriterWatcher_h
23 #define otbStandardWriterWatcher_h
24 
25 #include <iosfwd>
26 
27 #include "otbWriterWatcherBase.h"
28 
29 #include "OTBCommonExport.h"
30 
31 namespace otb
32 {
33 
56 class OTBCommon_EXPORT StandardWriterWatcher : public WriterWatcherBase
57 {
58 public:
61  StandardWriterWatcher(itk::ProcessObject* process, const char* comment = "");
62  StandardWriterWatcher(itk::ProcessObject* process, itk::ProcessObject* source, const char* comment = "");
64 
65  StandardWriterWatcher(itk::ProcessObject* process, const std::string& comment = "");
66  StandardWriterWatcher(itk::ProcessObject* process, itk::ProcessObject* source, const std::string& comment = "");
67 
69  StandardWriterWatcher() : m_StarsCount(0){};
70 
73 
75  void operator=(const StandardWriterWatcher&);
76 
78  void SetStars(int count)
79  {
80  m_StarsCount = count;
81  }
82  const unsigned int& GetStars() const
83  {
84  return m_StarsCount;
85  }
87 
88 protected:
90  void ShowWriterProgress() override;
91 
93  void StartWriter() override;
94 
96  void EndWriter() override;
97 
99  void ShowFilterProgress() override;
100 
102  void StartFilter() override
103  {
104  }
105 
107  void EndFilter() override
108  {
109  }
110 
112  virtual void ShowProgress();
113 
114 private:
116  unsigned int m_StarsCount;
117 
119 
120  std::string m_Buffer;
121 };
122 
123 } // end namespace otb
124 
125 #endif
This class is an abstract class Provides an interface to progress task mechanic.
This class shows the percentage progress execution of the pipeline filtering process.
const unsigned int & GetStars() const
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.