Allolib  1.0
C++ Components For Interactive Multimedia
al::SearchPaths Class Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/io/al_File.hpp>

Public Types

typedef std::pair< std::string, bool > searchpath
 
typedef std::list< searchpath > searchpathlist
 
typedef std::list< searchpath >::iterator iterator
 

Public Member Functions

 SearchPaths (const std::string &file)
 
 SearchPaths (int argc, char *const argv[], bool recursive=true)
 
 SearchPaths (const SearchPaths &cpy)
 
FilePath find (const std::string &filename)
 find a file in the searchpaths
 
FileList filter (bool(*f)(FilePath const &))
 
FileList listAll ()
 
void addSearchPath (const std::string &path, bool recursive=true)
 add a path to search in; recursive searching is optional
 
void addRelativePath (std::string rel, bool recursive=true)
 
void addAppPaths (int argc, char *const argv[], bool recursive=true)
 
void addAppPaths (int argc, const char **argv, bool recursive=true)
 
void addAppPaths (std::string path, bool recursive=true)
 
void addAppPaths (bool recursive=true)
 
const std::string & appPath () const
 
void print (std::ostream &stream=std::cout) const
 
iterator begin ()
 
iterator end ()
 

Protected Attributes

std::list< searchpath > mSearchPaths
 
std::string mAppPath
 

Detailed Description

A handy way to manage several possible search paths

Definition at line 502 of file al_File.hpp.

Member Function Documentation

◆ addAppPaths()

void al::SearchPaths::addAppPaths ( int  argc,
char *const  argv[],
bool  recursive = true 
)

adds best estimate of application launch paths (cwd etc.) can pass in argv from the main() function if desired.


The documentation for this class was generated from the following file: