Public Member Functions | Private Attributes | List of all members
cet::filepath_first_absolute_or_lookup_with_dot Class Reference

#include <filepath_maker.h>

Inheritance diagram for cet::filepath_first_absolute_or_lookup_with_dot:
cet::filepath_maker

Public Member Functions

 filepath_first_absolute_or_lookup_with_dot (std::string paths)
 
std::string operator() (std::string const &filename) override
 
void reset ()
 
- Public Member Functions inherited from cet::filepath_maker
virtual ~filepath_maker () noexcept=default
 

Private Attributes

bool first {true}
 
cet::search_path first_paths
 
cet::search_path after_paths
 

Detailed Description

Definition at line 94 of file filepath_maker.h.

Constructor & Destructor Documentation

filepath_first_absolute_or_lookup_with_dot::filepath_first_absolute_or_lookup_with_dot ( std::string  paths)

Definition at line 75 of file filepath_maker.cc.

76  : first_paths{std::string("./:") + paths}, after_paths{move(paths) + ':'}
77 {
78  if (after_paths.empty()) {
79  std::cerr << "search path empty (nonexistent environment variable"
80  << (paths.empty() ? "" : std::string(" ") + paths) << ")?\n"
81  << "Any included configurations will not be found by this lookup "
82  "policy.\n";
83  }
84 }
std::string string
Definition: nybbler.cc:12
def move(depos, offset)
Definition: depos.py:107
bool empty() const
Definition: search_path.cc:76

Member Function Documentation

std::string filepath_first_absolute_or_lookup_with_dot::operator() ( std::string const &  filename)
overridevirtual

Reimplemented from cet::filepath_maker.

Definition at line 87 of file filepath_maker.cc.

89 {
90  if (first) {
91  first = false;
93  filename :
95  }
97 }
string filename
Definition: train.py:213
bool is_absolute_filepath(std::string const &qualified_filename)
Definition: filesystem.cc:23
std::string find_file(std::string const &filename) const
Definition: search_path.cc:96
void filepath_first_absolute_or_lookup_with_dot::reset ( )

Definition at line 100 of file filepath_maker.cc.

Member Data Documentation

cet::search_path cet::filepath_first_absolute_or_lookup_with_dot::after_paths
private

Definition at line 106 of file filepath_maker.h.

bool cet::filepath_first_absolute_or_lookup_with_dot::first {true}
private

Definition at line 104 of file filepath_maker.h.

cet::search_path cet::filepath_first_absolute_or_lookup_with_dot::first_paths
private

Definition at line 105 of file filepath_maker.h.


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