extra_images Class Reference

A class containing mappings from an image basename, such as 'floppy.ko', to locations in the paths passed in to populate(). More...

#include <locate_images.h>

List of all members.

Public Member Functions

 extra_images ()
void populate (std::vector< std::string > const &paths, std::string const &archive_path, std::string const &root_path)
 add all filenames found in the given paths prefixed by the archive path or the root path, recursively
std::vector< std::string
> const 
find (matcher const &match) const
 return a vector of all directories that match the functor
std::vector< std::string
> const 
find (std::string const &name) const
 return a vector of all directories that match the given name
std::string const find_image_path (std::string const &image_name, image_error &error, bool fixup) const
std::string get_archive_path () const
 return the archive path used to populate the images name map
std::string strip_path_prefix (std::string const &image) const
 Given an image name returned by find_image_path() return a filename with the archive_path or root_path stripped.
int get_uid () const
 return the uid for this extra_images, first valid uid is 1

Classes

struct  matcher
 base class for matcher functors object More...


Detailed Description

A class containing mappings from an image basename, such as 'floppy.ko', to locations in the paths passed in to populate().

The name may exist multiple times; all locations are recorded in this container.


Constructor & Destructor Documentation

extra_images::extra_images  ) 
 


Member Function Documentation

std::vector<std::string> const extra_images::find std::string const &  name  )  const
 

return a vector of all directories that match the given name

vector< string > const extra_images::find matcher const &  match  )  const
 

return a vector of all directories that match the functor

std::string const extra_images::find_image_path std::string const &  image_name,
image_error error,
bool  fixup
const
 

Parameters:
image_name binary image name
error errors are flagged in this passed enum ref
fixup if true return the fixed image name else always return image_name and update error
Locate a (number of) matching absolute paths to the given image name. If we fail to find the file we fill in error and return the original string.

std::string extra_images::get_archive_path  )  const [inline]
 

return the archive path used to populate the images name map

int extra_images::get_uid  )  const [inline]
 

return the uid for this extra_images, first valid uid is 1

void extra_images::populate std::vector< std::string > const &  paths,
std::string const &  archive_path,
std::string const &  root_path
 

add all filenames found in the given paths prefixed by the archive path or the root path, recursively

std::string extra_images::strip_path_prefix std::string const &  image  )  const
 

Given an image name returned by find_image_path() return a filename with the archive_path or root_path stripped.


The documentation for this class was generated from the following files:
Generated on Thu Jul 17 19:54:23 2008 for oprofile by  doxygen 1.4.6