image_name_storage Struct Reference

class storing a set of shared image name More...

#include <name_storage.h>

Inheritance diagram for image_name_storage:
Inheritance graph
[legend]
Collaboration diagram for image_name_storage:
Collaboration graph
[legend]

Public Types

enum  image_name_type { int_basename, int_filename, int_real_basename, int_real_filename }
typedef unique_storage
< image_name_tag,
stored_filename >::id_value 
id_value
typedef std::vector
< stored_filename
stored_values

Public Member Functions

std::string const & get_name (image_name_id id, image_name_type type, extra_images const &extra) const
std::string const & basename (image_name_id) const
 return the basename name for the given ID
std::string const & name (id_value const &id) const
id_value const create (stored_filenameconst &value)
 ensure this value is available
stored_filenameconst & get (id_value const &id) const
 return the stored value for the given ID

Detailed Description

class storing a set of shared image name

Definition at line 88 of file name_storage.h.


Member Typedef Documentation

typedef unique_storage<image_name_tag , stored_filename>::id_value filename_storage< image_name_tag >::id_value [inherited]

Definition at line 76 of file name_storage.h.

typedef std::vector<stored_filename > unique_storage< image_name_tag , stored_filename >::stored_values [inherited]

Definition at line 43 of file unique_storage.h.


Member Enumeration Documentation

Enumerator:
int_basename 

image name based on the sample filename w/o path

int_filename 

image name based on the sample filename

int_real_basename 

real image name, can be different for module.

int_real_filename 

same as int_real_basename + the complete path, including an optionnal archive_path passed trough profile_spec

Definition at line 89 of file name_storage.h.


Member Function Documentation

string const & image_name_storage::basename ( image_name_id  id  )  const

return the basename name for the given ID

Definition at line 26 of file name_storage.cpp.

References stored_filename::base_filename, stored_filename::filename, and op_basename().

Referenced by get_name().

Here is the call graph for this function:

Here is the caller graph for this function:

id_value const unique_storage< image_name_tag , stored_filename >::create ( stored_filename const &  value  )  [inline, inherited]

ensure this value is available

Definition at line 80 of file unique_storage.h.

stored_filename const& unique_storage< image_name_tag , stored_filename >::get ( id_value const &  id  )  const [inline, inherited]

return the stored value for the given ID

Definition at line 92 of file unique_storage.h.

string const & image_name_storage::get_name ( image_name_id  id,
image_name_type  type,
extra_images const &  extra 
) const
Parameters:
id the image name id
type the image name type
extra extra locations where the image can be found

If type == int_real_name (resp. int_real_filename) and the image can't be located the return value is the same as if get_name() was called with int_name (resp. int_filename).

multiple call with the image_name_id and different extra parameter will throw a runtime error, multiple extra_images are possible with differential profile but the name. FIXME

Definition at line 35 of file name_storage.cpp.

References basename(), error(), stored_filename::extra_images_uid, stored_filename::filename, extra_images::find_image_path(), extra_images::get_uid(), int_basename, int_filename, int_real_basename, int_real_filename, filename_storage< image_name_tag >::name(), op_basename(), stored_filename::real_base_filename, and stored_filename::real_filename.

Referenced by get_image_name().

Here is the call graph for this function:

Here is the caller graph for this function:

std::string const& filename_storage< image_name_tag >::name ( id_value const &  id  )  const [inline, inherited]

Definition at line 78 of file name_storage.h.

References unique_storage< I, stored_filename >::get().

Referenced by get_name().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this struct was generated from the following files:

Generated on 8 Nov 2012 for Oprofile by  doxygen 1.6.1