6#include "SkeletonSimulator.hpp"
8#include "sparta/parsers/ConfigEmitterYAML.hpp"
11#include "sparta/sparta.hpp"
17 " [--num-producers <count>] # Default is 1\n"
19 " [-h] <data file1> <data file2> ...\n"
22constexpr char VERSION_VARNAME[] =
"version";
23constexpr char DATA_FILE_VARNAME[] =
"data-file";
24constexpr char DATA_FILE_OPTIONS[] =
"data-file";
26int main(
int argc,
char **argv)
28 std::vector<std::string> datafiles;
42 auto & app_opts = cls.getApplicationOptions();
43 app_opts.add_options()
45 "produce version message",
46 "produce version message")
47 (
"verbose,v",
"Be noisy.",
"Be very, very noisy")
49 sparta::app::named_value<std::vector<std::string>>(
"DATAFILES", &datafiles),
50 "Specifies the data files to look at")
54 po::positional_options_description& pos_opts = cls.getPositionalOptions();
55 pos_opts.add(DATA_FILE_VARNAME, -1);
59 if(!cls.parse(argc, argv, err_code)){
63 for(
auto & i : datafiles) {
64 std::cout <<
"Got this data file: " << i << std::endl;
67 bool be_noisy =
false;
68 auto& vm = cls.getVariablesMap();
69 if(vm.count(
"verbose")){
78 cls.populateSimulation(&sim);
79 cls.runSimulator(&sim);
80 cls.postProcess(&sim);
Class for creating a simulator based on command-line arguments.
Wrapper for boost program_options option_description that allows multiple levels of detail.
SkeletonSimulator which builds the model and configures it.
A class that lets you schedule events now and in the future.
Command line simulator front-end class with argument parsing Works in conjunction with sparta::app::S...
Optional default values for the simulator which can be customized and provided by anyone instantiatin...
std::string auto_summary_default