OmniSciDB  a5dc49c757
 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 1281 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

1281  {
1282  if (!filename.empty()) {
1284  }
1285 }
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 1257 of file CommandLineOptions.cpp.

References parse_ast::line.

Referenced by CommandLineOptions::parse_command_line().

1257  {
1258  // Strip the web section out of the config file so boost can validate program options
1259  std::stringstream ss;
1260  std::string line;
1261  while (std::getline(in, line)) {
1262  ss << line << "\n";
1263  if (line == "[web]" || line == "[iq]") {
1264  break;
1265  }
1266  }
1267  return ss;
1268 }
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 1270 of file CommandLineOptions.cpp.

Referenced by CommandLineOptions::parse_command_line().

1270  {
1271  if (!filename.empty()) {
1272  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
1273  if (!boost::filesystem::exists(filename)) {
1274  std::cerr << desc << " " << filename << " does not exist." << std::endl;
1275  return false;
1276  }
1277  }
1278  return true;
1279 }

+ Here is the caller graph for this function: