Go to the documentation of this file.
16 #ifndef SURGSIM_FRAMEWORK_APPLICATIONDATA_H
17 #define SURGSIM_FRAMEWORK_APPLICATIONDATA_H
22 #if !defined(SURGSIM_PARSED_BY_DOXYGEN) // do not generate documentation for Boost stuff!
30 #endif // defined(SURGSIM_PARSED_BY_DOXYGEN)
59 std::vector<std::string>
getPaths()
const;
68 std::string
findFile(
const std::string& fileName)
const;
76 bool tryFindFile(
const std::string& fileName, std::string* target)
const;
88 bool addPath(
const std::string& pathName);
95 bool setPaths(
const std::vector<std::string>& paths);
97 std::vector<boost::filesystem::path>
m_paths;
103 #endif // SURGSIM_FRAMEWORK_APPLICATIONDATA_H
std::vector< std::string > getPaths() const
Gets the search paths.
Definition: ApplicationData.cpp:147
~ApplicationData()
Definition: ApplicationData.cpp:56
Definition: CompoundShapeToGraphics.cpp:29
bool tryFindFile(const std::string &fileName, std::string *target) const
Searches for the first occurrence of fileName amongst the given paths, see findFile() for details.
Definition: ApplicationData.cpp:91
std::vector< boost::filesystem::path > m_paths
Definition: ApplicationData.h:97
bool addPath(const std::string &pathName)
Adds a single path to the list of search paths.
Definition: ApplicationData.cpp:115
std::string findFile(const std::string &fileName) const
Searches for the first occurrence of fileName amongst the given paths, the search is shallow,...
Definition: ApplicationData.cpp:60
bool isValidFilename(const std::string &fileName) const
Checks if the filename is acceptable.
Definition: ApplicationData.cpp:157
bool setPaths(const std::vector< std::string > &paths)
Sets the list of search paths to be used for finding the location of files.
Definition: ApplicationData.cpp:104
ApplicationData(const std::vector< std::string > &paths)
Constructor, class is immutable, pass a list of paths to be used for searching duplicate paths will b...
Definition: ApplicationData.cpp:31
Enable searching for files in a given list of paths, give access to the current directory and wrap bo...
Definition: ApplicationData.h:39