OTB  6.7.0
Orfeo Toolbox
otbWrapperApplicationRegistry.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2017 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 otbWrapperApplicationRegistry_h
22 #define otbWrapperApplicationRegistry_h
23 
24 #include <string>
25 #include "itkObject.h"
26 
27 #include "otbWrapperApplication.h"
28 
29 namespace otb
30 {
31 namespace Wrapper
32 {
33 
41 class OTBApplicationEngine_EXPORT ApplicationRegistry : public itk::Object
42 {
43 public:
49 
53  itkTypeMacro(ApplicationRegistry, Object);
54 
57 
59  static void SetApplicationPath(std::string path);
60 
62  static void AddApplicationPath(std::string path);
63 
65  static std::string GetApplicationPath();
66 
68  static std::vector<std::string> GetAvailableApplications(bool useFactory=true);
69 
71  static Application::Pointer CreateApplication(const std::string& applicationName, bool useFactory=true);
72 
75  static Application::Pointer CreateApplicationFaster(const std::string& applicationName);
76 
78  static void CleanRegistry();
79 
80 protected:
82  ~ApplicationRegistry() override;
83 
84 private:
85  ApplicationRegistry(const Self&) = delete;
86  void operator=(const Self&) = delete;
87 
89  static Application::Pointer LoadApplicationFromPath(std::string path,std::string name);
90 
91 };
92 
93 } // end namespace Wrapper
94 } //end namespace otb
95 
96 #endif // otbWrapperApplication_h_
itk::SmartPointer< const Self > ConstPointer
otb::Wrapper::Application::Pointer ApplicationPointer