Ocean
FileManager.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_IO_FILE_MANAGER_H
9 #define META_OCEAN_IO_FILE_MANAGER_H
10 
11 #include "ocean/io/IO.h"
12 
13 #include <map>
14 
15 namespace Ocean
16 {
17 
18 namespace IO
19 {
20 
21 /**
22  * This class is the base class for all plugin manager able to load and manager files.
23  * @ingroup io
24  */
25 class OCEAN_IO_EXPORT FileManager
26 {
27  public:
28 
29  /**
30  * Definition of a map mapping supported file extensions to file type descriptions.
31  */
32  typedef std::map<std::string, std::string> FileExtensions;
33 
34  public:
35 
36  /**
37  * Returns all currently supported file extensions.
38  * @return All supported file extensions
39  */
41 
42  /**
43  * Returns whether a specified file extension is supported.
44  * @param extension Extension to check
45  * @return True, if so
46  */
47  virtual bool isSupported(const std::string& extension);
48 
49  protected:
50 
51  /**
52  * Creates a new file manager object.
53  */
55 
56  /**
57  * Destructs a file manager object.
58  */
59  virtual ~FileManager();
60 };
61 
62 }
63 
64 }
65 
66 #endif // META_OCEAN_IO_FILE_MANAGER_H
This class is the base class for all plugin manager able to load and manager files.
Definition: FileManager.h:26
virtual FileExtensions supportedExtensions()=0
Returns all currently supported file extensions.
virtual ~FileManager()
Destructs a file manager object.
virtual bool isSupported(const std::string &extension)
Returns whether a specified file extension is supported.
std::map< std::string, std::string > FileExtensions
Definition of a map mapping supported file extensions to file type descriptions.
Definition: FileManager.h:32
FileManager()
Creates a new file manager object.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15