OSVR-Core
SearchPath.h
Go to the documentation of this file.
1 
11 // Copyright 2015 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_SearchPath_h_GUID_D9D19BF6_FEB5_4B82_17A4_C8C397C88523
26 #define INCLUDED_SearchPath_h_GUID_D9D19BF6_FEB5_4B82_17A4_C8C397C88523
27 
28 // Internal Includes
29 #include <osvr/PluginHost/Export.h>
30 
31 // Library/third-party includes
32 // - none
33 
34 // Standard includes
35 #include <vector>
36 #include <string>
37 
38 namespace osvr {
39 namespace pluginhost {
40 
41  typedef std::vector<std::string> SearchPath;
42  typedef std::vector<std::string> FileList;
43 
45  OSVR_PLUGINHOST_EXPORT SearchPath getPluginSearchPath();
46 
48  OSVR_PLUGINHOST_EXPORT FileList
49  getAllFilesWithExt(SearchPath const &dirPath, const std::string &ext);
50 
52  OSVR_PLUGINHOST_EXPORT std::string
53  findPlugin(SearchPath const &searchPaths, const std::string &pluginName);
54 
55 } // namespace pluginhost
56 } // namespace osvr
57 
58 #endif // INCLUDED_SearchPath_h_GUID_D9D19BF6_FEB5_4B82_17A4_C8C397C88523
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
OSVR_PLUGINHOST_EXPORT FileList getAllFilesWithExt(SearchPath const &dirPath, const std::string &ext)
Get list of files inside the directory with given extension.
Definition: SearchPath.cpp:124
OSVR_PLUGINHOST_EXPORT SearchPath getPluginSearchPath()
Find a place where to look for plugins.
Definition: SearchPath.cpp:47
OSVR_PLUGINHOST_EXPORT std::string findPlugin(SearchPath const &searchPaths, const std::string &pluginName)
Given the name of a plugin, find the full path to the plugin library.
Definition: SearchPath.cpp:151