OTB  9.0.0
Orfeo Toolbox
otbWrapperApplicationRegistry.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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:
46  typedef itk::Object Superclass;
47  typedef itk::SmartPointer<Self> Pointer;
48  typedef itk::SmartPointer<const Self> ConstPointer;
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 } // end namespace Wrapper
93 } // end namespace otb
94 
95 #endif // otbWrapperApplication_h_
otb::Wrapper::Application::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbWrapperApplication.h:82
otbWrapperApplication.h
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::Wrapper::ApplicationRegistry::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbWrapperApplicationRegistry.h:48
otb::Wrapper::ApplicationRegistry::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbWrapperApplicationRegistry.h:47
otb::Wrapper::ApplicationRegistry
Definition: otbWrapperApplicationRegistry.h:41
otb::Wrapper::ApplicationRegistry::Superclass
itk::Object Superclass
Definition: otbWrapperApplicationRegistry.h:46
otb::Wrapper::ApplicationRegistry::ApplicationPointer
otb::Wrapper::Application::Pointer ApplicationPointer
Definition: otbWrapperApplicationRegistry.h:53
otb::Wrapper::ApplicationRegistry::Self
ApplicationRegistry Self
Definition: otbWrapperApplicationRegistry.h:45