All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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:

Public Member Functions

 FirstAbsoluteOrLookupWithDotPolicy (std::string const &paths)
 
virtual std::string operator() (std::string const &filename)
 
void reset ()
 

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 1016 of file unit_test_base.h.

Constructor & Destructor Documentation

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

Definition at line 1034 of file unit_test_base.h.

1035  {
1036  if (first) {
1037  first = false;
1038  if (cet::is_absolute_filepath(filename)) return filename;
1039  return cet::search_path("./:" + after_paths.to_string())
1040  .find_file(filename);
1041  } else {
1042  return after_paths.find_file(filename);
1043  }
1044  } // FirstAbsoluteOrLookupWithDotPolicy::operator()
bool first
whether we are waiting for the first query
BEGIN_PROLOG could also be dds filename
cet::search_path after_paths
path for the other queries
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 1028 of file unit_test_base.h.

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

whether we are waiting for the first query

Definition at line 1027 of file unit_test_base.h.


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