OTB  6.7.0
Orfeo Toolbox
otbWrapperCompositeApplication.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 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 otbWrapperCompositeApplication_h
22 #define otbWrapperCompositeApplication_h
23 
24 #include "otbWrapperApplication.h"
25 #include "itkStdStreamLogOutput.h"
26 #include <string>
27 
28 namespace otb
29 {
30 namespace Wrapper
31 {
32 
48 class OTBApplicationEngine_EXPORT CompositeApplication: public Application
49 {
50 public:
56 
59 
62 
63  typedef struct
64  {
66  std::string Desc;
68 
69  typedef std::map<std::string, InternalApplication> InternalAppContainer;
70 
71 protected:
74 
76  ~CompositeApplication() override;
77 
81  void LinkWatchers(itk::Object * itkNotUsed(caller), const itk::EventObject & event);
82 
89  bool AddApplication(std::string appType, std::string key, std::string desc);
90 
96  void ClearApplications();
97 
102  bool Connect(std::string fromKey, std::string toKey);
103 
112  bool ShareParameter(std::string localKey,
113  std::string internalKey,
114  std::string name = std::string(),
115  std::string desc = std::string());
116 
125  Application* DecodeKey(std::string &key);
126 
130  Application* GetInternalApplication(std::string id);
131 
135  std::string GetInternalAppDescription(std::string id);
136 
140  void ExecuteInternal(std::string key);
141 
145  void UpdateInternalParameters(std::string key);
146 
147 private:
148  CompositeApplication(const CompositeApplication &) = delete;
149  void operator =(const CompositeApplication&) = delete;
150 
152 
154 };
155 
156 }
157 }
158 #endif
This class is a base class for composite applications.
std::map< std::string, InternalApplication > InternalAppContainer
AddProcessCommandType::Pointer m_AddProcessCommand
This class represent an application TODO.
itk::SmartPointer< const Self > ConstPointer