OmniSciDB  c1a53651b2
 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 1070 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

1070  {
1071  if (!filename.empty()) {
1073  }
1074 }
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:888

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

References parse_ast::line.

Referenced by CommandLineOptions::parse_command_line().

1046  {
1047  // Strip the web section out of the config file so boost can validate program options
1048  std::stringstream ss;
1049  std::string line;
1050  while (std::getline(in, line)) {
1051  ss << line << "\n";
1052  if (line == "[web]") {
1053  break;
1054  }
1055  }
1056  return ss;
1057 }
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 1059 of file CommandLineOptions.cpp.

Referenced by CommandLineOptions::parse_command_line().

1059  {
1060  if (!filename.empty()) {
1061  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
1062  if (!boost::filesystem::exists(filename)) {
1063  std::cerr << desc << " " << filename << " does not exist." << std::endl;
1064  return false;
1065  }
1066  }
1067  return true;
1068 }

+ Here is the caller graph for this function: