bethyw.cpp
/*
  This function sets up and returns a valid cxxopts object. You do not need to
  modify this function.

  @return
     A constructed cxxopts object

  @example
    auto cxxopts = BethYw::cxxoptsSetup();
    auto args = cxxopts.parse(argc, argv);
*/
This function sets up and returns a valid cxxopts object. You do not need to
modify this function.
This function sets up and returns a valid cxxopts object . You do not need to modify this function .
cxxopts::Options BethYw::cxxoptsSetup() {
  cxxopts::Options cxxopts(
        "bethyw",
        "Student ID: " + STUDENT_NUMBER + "\n\n"
        "This program is designed to parse official Welsh Government"
        " statistics data files.\n");
  cxxopts.add_options()(
      "dir",
      "Directory for input data passed in as files",
      cxxopts::value<std::string>()->default_value("datasets"))(
      "d,datasets",
      "The dataset(s) to import and analyse as a comma-separated list of codes "
      "(omit or set to 'all' to import and analyse all datasets)",
      cxxopts::value<std::vector<std::string>>())(
      "a,areas",
      "The areas(s) to import and analyse as a comma-separated list of "
      "authority codes (omit or set to 'all' to import and analyse all areas)",
      cxxopts::value<std::vector<std::string>>())(
      "m,measures",
      "Select a subset of measures from the dataset(s) "
      "(omit or set to 'all' to import and analyse all measures)",
      cxxopts::value<std::vector<std::string>>())(
      "y,years",
      "Focus on a particular year (YYYY) or "
      "inclusive range of years (YYYY-ZZZZ)",
      cxxopts::value<std::string>()->default_value("0"))(
      "j,json",
      "Print the output as JSON instead of tables.")(
      "h,help",
      "Print usage.");
  return cxxopts;
}
cxxopts :: Options BethYw :: cxxoptsSetup ( ) { cxxopts :: Options cxxopts ( " " , " " + STUDENT_NUMBER + " \n \n " " " " \n " ) ; cxxopts . add_options ( ) ( " " , " " , cxxopts :: value < std :: string > ( ) -> default_value ( " " ) ) ( " " , " " " " , cxxopts :: value < std :: vector < std :: string > > ( ) ) ( " " , " " " " , cxxopts :: value < std :: vector < std :: string > > ( ) ) ( " " , " " " " , cxxopts :: value < std :: vector < std :: string > > ( ) ) ( " " , " " " " , cxxopts :: value < std :: string > ( ) -> default_value ( " " ) ) ( " " , " " ) ( " " , " " ) ; return cxxopts ; }
This function sets up and returns a valid cxxopts object.
This function sets up and returns a valid cxxopts object .