RTK  2.5.0
Reconstruction Toolkit
rtkWatcherForResourceProbe.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * https://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef rtkWatcherForResourceProbe_h
19 #define rtkWatcherForResourceProbe_h
20 
21 #include "RTKExport.h"
22 #include <itkCommand.h>
23 #include <itkProcessObject.h>
24 
25 namespace rtk
26 {
36 using namespace itk;
37 
38 class RTK_EXPORT WatcherForResourceProbe
39 {
40 public:
44 
47 
50  operator=(const WatcherForResourceProbe &);
51 
53  virtual ~WatcherForResourceProbe();
54 
57  const char *
59  {
60  return (m_Process ? m_Process->GetNameOfClass() : "None");
61  }
62 
66  const ProcessObject *
67  GetProcess() const
68  {
69  return m_Process;
70  }
71 
72 protected:
74  virtual void
75  StartFilter();
76 
78  virtual void
79  EndFilter();
80 
82  virtual void
83  DeleteFilter();
84 
85 
86 private:
88 
93 
94  unsigned long m_StartTag;
95  unsigned long m_EndTag;
96  unsigned long m_DeleteTag;
97 };
98 
99 
100 } // end namespace rtk
101 
102 #endif
Very light watcher to monitor Start and End events on all filters.
const ProcessObject * GetProcess() const