cafe::DefaultFileFinder Class Reference
[CAF Environment (Cafe)]

#include <DefaultFileFinder.hpp>

List of all members.


Detailed Description

Find a particular file in a possible list of locations.

The default locations are ./, ${SRT_PRIVATE_CONTEXT}/ and ${SRT_PUBLIC_CONTEXT}/ You can prepend or append other locations.

Definition at line 15 of file DefaultFileFinder.hpp.

Public Member Functions

 DefaultFileFinder ()
 If argument is null, then use the default setup with is ".", $SRT_LOCAL_CONTEXT, and $SRT_PUBLIC_CONTEXT.

void push_back (const std::string &location)
 Add a new pattern to the end of the list.

void push_front (const std::string &location)
 Add a new pattern to the end of the list.

std::string findFile (const std::string &base_name) const
 Use the stub given to see if the file can be found.


Private Attributes

std::list< std::string > _locations


Constructor & Destructor Documentation

cafe::DefaultFileFinder::DefaultFileFinder  ) 
 

If argument is null, then use the default setup with is ".", $SRT_LOCAL_CONTEXT, and $SRT_PUBLIC_CONTEXT.

Definition at line 14 of file DefaultFileFinder.cpp.

References push_back().


Member Function Documentation

std::string cafe::DefaultFileFinder::findFile const std::string &  base_name  )  const
 

Use the stub given to see if the file can be found.

If not, then return an empty string. Absolute pathnames are returned unchanged.

Definition at line 39 of file DefaultFileFinder.cpp.

References _locations.

void cafe::DefaultFileFinder::push_back const std::string &  location  ) 
 

Add a new pattern to the end of the list.

Definition at line 26 of file DefaultFileFinder.cpp.

References _locations.

Referenced by DefaultFileFinder().

void cafe::DefaultFileFinder::push_front const std::string &  location  ) 
 

Add a new pattern to the end of the list.

Definition at line 32 of file DefaultFileFinder.cpp.

References _locations.


Member Data Documentation

std::list<std::string> cafe::DefaultFileFinder::_locations [private]
 

Definition at line 31 of file DefaultFileFinder.hpp.

Referenced by findFile(), push_back(), and push_front().


The documentation for this class was generated from the following files:
Generated on Thu Apr 3 04:14:27 2008 for CAF by doxygen 1.3.4