OmniSciDB  471d68cefb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
anonymous_namespace{CommandLineOptions.cpp} Namespace Reference

Functions

std::stringstream sanitize_config_file (std::ifstream &in)
 
bool trim_and_check_file_exists (std::string &filename, const std::string desc)
 
void addOptionalFileToBlacklist (std::string &filename)
 

Function Documentation

void anonymous_namespace{CommandLineOptions.cpp}::addOptionalFileToBlacklist ( std::string &  filename)

Definition at line 868 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

868  {
869  if (!filename.empty()) {
871  }
872 }
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:871

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::stringstream anonymous_namespace{CommandLineOptions.cpp}::sanitize_config_file ( std::ifstream &  in)

Definition at line 844 of file CommandLineOptions.cpp.

References parse_ast::line.

Referenced by CommandLineOptions::parse_command_line().

844  {
845  // Strip the web section out of the config file so boost can validate program options
846  std::stringstream ss;
847  std::string line;
848  while (std::getline(in, line)) {
849  ss << line << "\n";
850  if (line == "[web]") {
851  break;
852  }
853  }
854  return ss;
855 }
tuple line
Definition: parse_ast.py:10

+ Here is the caller graph for this function:

bool anonymous_namespace{CommandLineOptions.cpp}::trim_and_check_file_exists ( std::string &  filename,
const std::string  desc 
)

Definition at line 857 of file CommandLineOptions.cpp.

Referenced by CommandLineOptions::parse_command_line().

857  {
858  if (!filename.empty()) {
859  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
860  if (!boost::filesystem::exists(filename)) {
861  std::cerr << desc << " " << filename << " does not exist." << std::endl;
862  return false;
863  }
864  }
865  return true;
866 }

+ Here is the caller graph for this function: