| 1 | /*========================================================================= |
|---|
| 2 | |
|---|
| 3 | Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. |
|---|
| 4 | See OTBCopyright.txt for details. |
|---|
| 5 | |
|---|
| 6 | Some parts of this code are derived from ITK. See ITKCopyright.txt |
|---|
| 7 | for details. |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | This software is distributed WITHOUT ANY WARRANTY; without even |
|---|
| 11 | the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|---|
| 12 | PURPOSE. See the above copyright notices for more information. |
|---|
| 13 | |
|---|
| 14 | See Ref: http://hg.orfeo-toolbox.org/OTB/ Copyright |
|---|
| 15 | |
|---|
| 16 | =========================================================================*/ |
|---|
| 17 | #ifndef __zooOtbWatcher_h |
|---|
| 18 | #define __zooOtbWatcher_h |
|---|
| 19 | |
|---|
| 20 | #include "otbFilterWatcherBase.h" |
|---|
| 21 | #include "service.h" |
|---|
| 22 | |
|---|
| 23 | /** |
|---|
| 24 | * Observer used to access the ongoing status of a running OTB Application |
|---|
| 25 | */ |
|---|
| 26 | class /*ITK_EXPORT*/ ZooWatcher : public otb::FilterWatcherBase |
|---|
| 27 | { |
|---|
| 28 | public: |
|---|
| 29 | |
|---|
| 30 | /** |
|---|
| 31 | * Constructor |
|---|
| 32 | * @param process the itk::ProcessObject to monitor |
|---|
| 33 | * @param comment comment string that is prepended to each event message |
|---|
| 34 | */ |
|---|
| 35 | ZooWatcher(itk::ProcessObject* process, |
|---|
| 36 | const char *comment = ""); |
|---|
| 37 | |
|---|
| 38 | /** |
|---|
| 39 | * Constructor |
|---|
| 40 | * @param process the itk::ProcessObject to monitor |
|---|
| 41 | * @param comment comment string that is prepended to each event message |
|---|
| 42 | */ |
|---|
| 43 | ZooWatcher(itk::ProcessObject* process, |
|---|
| 44 | const std::string& comment = ""); |
|---|
| 45 | |
|---|
| 46 | /** Default constructor */ |
|---|
| 47 | ZooWatcher(); |
|---|
| 48 | |
|---|
| 49 | /** |
|---|
| 50 | * Copy the original conf in the m_Conf property |
|---|
| 51 | * |
|---|
| 52 | * @param conf the maps pointer to copy |
|---|
| 53 | */ |
|---|
| 54 | void SetConf(maps **conf) |
|---|
| 55 | { |
|---|
| 56 | m_Conf=dupMaps(conf); |
|---|
| 57 | } |
|---|
| 58 | /** |
|---|
| 59 | * Get Configuration maps (m_Conf) |
|---|
| 60 | * @return the m_Conf property |
|---|
| 61 | */ |
|---|
| 62 | const maps& GetConf() const |
|---|
| 63 | { |
|---|
| 64 | return *m_Conf; |
|---|
| 65 | } |
|---|
| 66 | /** |
|---|
| 67 | * Free Configuration maps (m_Conf) |
|---|
| 68 | */ |
|---|
| 69 | void FreeConf(){ |
|---|
| 70 | freeMaps(&m_Conf); |
|---|
| 71 | free(m_Conf); |
|---|
| 72 | } |
|---|
| 73 | protected: |
|---|
| 74 | |
|---|
| 75 | /** Callback method to show the ProgressEvent */ |
|---|
| 76 | virtual void ShowProgress(); |
|---|
| 77 | |
|---|
| 78 | /** Callback method to show the StartEvent */ |
|---|
| 79 | virtual void StartFilter(); |
|---|
| 80 | |
|---|
| 81 | /** Callback method to show the EndEvent */ |
|---|
| 82 | virtual void EndFilter(); |
|---|
| 83 | |
|---|
| 84 | private: |
|---|
| 85 | |
|---|
| 86 | /** Main conf maps */ |
|---|
| 87 | maps* m_Conf; |
|---|
| 88 | |
|---|
| 89 | }; |
|---|
| 90 | |
|---|
| 91 | #endif |
|---|