OTB  10.0.0
Orfeo Toolbox
otbWrapperApplicationRegistry.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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:
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_
static std::string GetApplicationPath()
itk::SmartPointer< const Self > ConstPointer
static Application::Pointer LoadApplicationFromPath(std::string path, std::string name)
ApplicationRegistry(const Self &)=delete
otb::Wrapper::Application::Pointer ApplicationPointer
static void SetApplicationPath(std::string path)
void operator=(const Self &)=delete
static void AddApplicationPath(std::string path)
static Application::Pointer CreateApplicationFaster(const std::string &applicationName)
static Application::Pointer CreateApplication(const std::string &applicationName, bool useFactory=true)
static std::vector< std::string > GetAvailableApplications(bool useFactory=true)
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.