| # Gaudi Framework, version v21r8 |

Home |  | Generated: 17 Mar 2010

# PathResolver.h

Go to the documentation of this file.

    00001 #ifndef GAUDIKERNEL_PATHRESOLVER_H
    00002 #define GAUDIKERNEL_PATHRESOLVER_H
    00003
    00004 #include <string>
    00005 #include "GaudiKernel/Kernel.h"
    00006
    00007 namespace System {
    00008
    00009 class GAUDI_API PathResolver
    00010 {
    00011 public:
    00012   typedef enum
    00013     {
    00014       Ok,
    00015       EnvironmentVariableUndefined,
    00016       UnknownDirectory
    00017     } SearchPathStatus;
    00018
    00019   typedef enum
    00020     {
    00021       LocalSearch,
    00022       RecursiveSearch
    00023     } SearchType;
    00024
    00034   static std::string find_file (const std::string& logical_file_name,
    00035                                 const std::string& search_path,
    00036                                 SearchType search_type = LocalSearch);
    00037
    00047   static std::string find_file_from_list (const std::string& logical_file_name,
    00048                                           const std::string& search_list,
    00049                                           SearchType search_type = LocalSearch);
    00050
    00060   static std::string find_directory (const std::string& logical_file_name,
    00061                                      const std::string& search_path,
    00062                                      SearchType search_type = LocalSearch);
    00063
    00073   static std::string find_directory_from_list (const std::string& logical_file_name,
    00074                                                const std::string& search_list,
    00075                                                SearchType search_type = LocalSearch);
    00076
    00084   static SearchPathStatus check_search_path (const std::string& search_path);
    00085 };
    00086
    00087 GAUDI_API PathResolver::SearchPathStatus PathResolverCheckSearchPath (const std::string& search_path);
    00088 GAUDI_API std::string PathResolverFindDirectory (const std::string& logical_file_name,
    00089                          const std::string& search_path);
    00090 GAUDI_API std::string PathResolverFindDirectoryFromList (const std::string& logical_file_name,
    00091                                  const std::string& search_list);
    00092 GAUDI_API std::string PathResolverFindFile (const std::string& logical_file_name,
    00093                     const std::string& search_path);
    00094 GAUDI_API std::string PathResolverFindFileFromList (const std::string& logical_file_name,
    00095                             const std::string& search_list);
    00096 GAUDI_API std::string PathResolverFindXMLFile (const std::string& logical_file_name);
    00097 GAUDI_API std::string PathResolverFindDataFile (const std::string& logical_file_name);
    00098
    00099 }
    00100
    00101 #endif