OmniSciDB  fe05a0c208
 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 766 of file CommandLineOptions.cpp.

References ddl_utils::FilePathBlacklist::addToBlacklist().

Referenced by CommandLineOptions::validate().

766  {
767  if (!filename.empty()) {
769  }
770 }
std::string filename(char const *path)
Definition: Logger.cpp:62
static void addToBlacklist(const std::string &path)
Definition: DdlUtils.cpp:735

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

References generate_TableFunctionsFactory_init::line.

Referenced by CommandLineOptions::parse_command_line().

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

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

Referenced by CommandLineOptions::parse_command_line().

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

+ Here is the caller graph for this function: