OmniSciDB  a667adc9c8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 761 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

761  {
762  if (!filename.empty()) {
764  }
765 }
std::string filename(char const *path)
Definition: Logger.cpp:62
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:708

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

References generate_TableFunctionsFactory_init::line.

Referenced by CommandLineOptions::parse_command_line().

737  {
738  // Strip the web section out of the config file so boost can validate program options
739  std::stringstream ss;
740  std::string line;
741  while (std::getline(in, line)) {
742  ss << line << "\n";
743  if (line == "[web]") {
744  break;
745  }
746  }
747  return ss;
748 }

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

Referenced by CommandLineOptions::parse_command_line().

750  {
751  if (!filename.empty()) {
752  boost::algorithm::trim_if(filename, boost::is_any_of("\"'"));
753  if (!boost::filesystem::exists(filename)) {
754  std::cerr << desc << " " << filename << " does not exist." << std::endl;
755  return false;
756  }
757  }
758  return true;
759 }
std::string filename(char const *path)
Definition: Logger.cpp:62

+ Here is the caller graph for this function: