OmniSciDB  085a039ca4
 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 1025 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

1025  {
1026  if (!filename.empty()) {
1028  }
1029 }
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:874

+ 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 1001 of file CommandLineOptions.cpp.

References parse_ast::line.

Referenced by CommandLineOptions::parse_command_line().

1001  {
1002  // Strip the web section out of the config file so boost can validate program options
1003  std::stringstream ss;
1004  std::string line;
1005  while (std::getline(in, line)) {
1006  ss << line << "\n";
1007  if (line == "[web]") {
1008  break;
1009  }
1010  }
1011  return ss;
1012 }
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 1014 of file CommandLineOptions.cpp.

Referenced by CommandLineOptions::parse_command_line().

1014  {
1015  if (!filename.empty()) {
1016  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
1017  if (!boost::filesystem::exists(filename)) {
1018  std::cerr << desc << " " << filename << " does not exist." << std::endl;
1019  return false;
1020  }
1021  }
1022  return true;
1023 }

+ Here is the caller graph for this function: