Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkStandardFileLocations.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITK_STANDARD_FILE_LOCATIONS_H_INCLUDED_SWDG
18 #define MITK_STANDARD_FILE_LOCATIONS_H_INCLUDED_SWDG
19 
20 #include <string>
21 
22 #include <MitkCoreExports.h>
23 #include <itkObject.h>
24 #include <itkObjectFactory.h>
25 
26 namespace mitk
27 {
33  class MITKCORE_EXPORT StandardFileLocations : public itk::Object
34  {
35  public:
37  typedef itk::Command Superclass;
39 
47  void AddDirectoryForSearch(const char *dir, bool insertInFrontOfSearchList = true);
48 
54  void RemoveDirectoryForSearch(const char *dir);
55 
80  std::string FindFile(const char *filename, const char *pathInSourceDir = nullptr);
81 
93  std::string GetOptionDirectory();
94 
95  static StandardFileLocations *GetInstance();
96 
97  protected:
98  itkFactorylessNewMacro(Self) itkCloneMacro(Self)
99 
100  typedef std::vector<std::string> FileSearchVectorType;
101  FileSearchVectorType m_SearchDirectories;
102 
104  virtual ~StandardFileLocations();
105 
106  std::string SearchDirectoriesForFile(const char *filename);
107 
108  private:
109  // Private Copy Constructor
110  StandardFileLocations(const StandardFileLocations &);
111  };
112 
113 } // namespace
114 
115 #endif
itk::SmartPointer< Self > Pointer
#define MITKCORE_EXPORT
std::vector< std::string > FileSearchVectorType
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
static const std::string filename
Provides a method to look for configuration and option files etc.