Public Member Functions | Private Attributes | List of all members
testing::details::FirstAbsoluteOrLookupWithDotPolicy Class Reference

#include <unit_test_base.h>

Inheritance diagram for testing::details::FirstAbsoluteOrLookupWithDotPolicy:
cet::filepath_maker cet::filepath_maker

Public Member Functions

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

Private Attributes

bool first
 whether we are waiting for the first query More...
 
cet::search_path after_paths
 path for the other queries More...
 

Detailed Description

Definition at line 999 of file unit_test_base.h.

Constructor & Destructor Documentation

testing::details::FirstAbsoluteOrLookupWithDotPolicy::FirstAbsoluteOrLookupWithDotPolicy ( std::string const &  paths)
inline

Definition at line 1001 of file unit_test_base.h.

1001  :
1002  first(true), after_paths(paths)
1003  {}
bool first
whether we are waiting for the first query
cet::search_path after_paths
path for the other queries
testing::details::FirstAbsoluteOrLookupWithDotPolicy::FirstAbsoluteOrLookupWithDotPolicy ( std::string const &  paths)
inline

Definition at line 1018 of file unit_test_base.h.

1018  :
1019  first(true), after_paths(paths)
1020  {}
bool first
whether we are waiting for the first query
cet::search_path after_paths
path for the other queries

Member Function Documentation

std::string testing::details::FirstAbsoluteOrLookupWithDotPolicy::operator() ( std::string const &  filename)
inlinevirtual

Reimplemented from cet::filepath_maker.

Definition at line 1017 of file unit_test_base.h.

1018  {
1019  if (first) {
1020  first = false;
1022  return cet::search_path("./:" + after_paths.to_string())
1023  .find_file(filename);
1024  } else {
1025  return after_paths.find_file(filename);
1026  }
1027  } // FirstAbsoluteOrLookupWithDotPolicy::operator()
std::string to_string() const
Definition: search_path.cc:161
bool first
whether we are waiting for the first query
string filename
Definition: train.py:213
bool is_absolute_filepath(std::string const &qualified_filename)
Definition: filesystem.cc:23
cet::search_path after_paths
path for the other queries
std::string find_file(std::string const &filename) const
Definition: search_path.cc:96
virtual std::string testing::details::FirstAbsoluteOrLookupWithDotPolicy::operator() ( std::string const &  filename)
virtual

Reimplemented from cet::filepath_maker.

void testing::details::FirstAbsoluteOrLookupWithDotPolicy::reset ( )
inline

Definition at line 1007 of file unit_test_base.h.

1007 { first = true; }
bool first
whether we are waiting for the first query
void testing::details::FirstAbsoluteOrLookupWithDotPolicy::reset ( )
inline

Definition at line 1024 of file unit_test_base.h.

1024 { first = true; }
bool first
whether we are waiting for the first query

Member Data Documentation

cet::search_path testing::details::FirstAbsoluteOrLookupWithDotPolicy::after_paths
private

path for the other queries

Definition at line 1011 of file unit_test_base.h.

bool testing::details::FirstAbsoluteOrLookupWithDotPolicy::first
private

whether we are waiting for the first query

Definition at line 1010 of file unit_test_base.h.


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