OmniSciDB  72c90bc290
 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 1216 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

1216  {
1217  if (!filename.empty()) {
1219  }
1220 }
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:925

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

References parse_ast::line.

Referenced by CommandLineOptions::parse_command_line().

1192  {
1193  // Strip the web section out of the config file so boost can validate program options
1194  std::stringstream ss;
1195  std::string line;
1196  while (std::getline(in, line)) {
1197  ss << line << "\n";
1198  if (line == "[web]" || line == "[iq]") {
1199  break;
1200  }
1201  }
1202  return ss;
1203 }
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 1205 of file CommandLineOptions.cpp.

Referenced by CommandLineOptions::parse_command_line().

1205  {
1206  if (!filename.empty()) {
1207  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
1208  if (!boost::filesystem::exists(filename)) {
1209  std::cerr << desc << " " << filename << " does not exist." << std::endl;
1210  return false;
1211  }
1212  }
1213  return true;
1214 }

+ Here is the caller graph for this function: