CASM  1.1.0
A Clusters Approach to Statistical Mechanics
stream_io.cc
Go to the documentation of this file.
2 #include "casm/casm_io/Log.hh"
3 
4 namespace CASM {
5 
6 void print_options(Log &log, ConfigEnumOptions const &options) {
7  log << std::boolalpha;
8  log.indent() << "primitive_only: " << options.primitive_only << std::endl;
9  log.indent() << "filter: " << static_cast<bool>(options.filter) << std::endl;
10  if (options.filter) {
11  log.indent() << "filter expression: " << options.filter_expression
12  << std::endl;
13  }
14  log.indent() << "verbosity: " << options.verbosity << std::endl;
15  log.indent() << "dry_run: " << options.dry_run << std::endl;
16  log.indent() << "output_configurations: " << options.output_configurations
17  << std::endl;
18  if (options.output_configurations) {
19  auto const &output_options = options.output_options;
21  log.indent() << "path: " << output_options.file_path << std::endl;
22  log.indent() << "json: " << output_options.json_output << std::endl;
23  log.indent() << "json_array: " << output_options.json_arrays << std::endl;
24  log.indent() << "compress: " << output_options.compress << std::endl;
25  log.indent() << "output_filtered_configurations: "
26  << options.output_filtered_configurations << std::endl;
28  }
29  log << std::noboolalpha;
30 }
31 
32 } // namespace CASM
Definition: Log.hh:48
Log & indent()
Definition: Log.hh:289
void increase_indent()
Definition: Log.hh:277
void decrease_indent()
Definition: Log.hh:279
Main CASM namespace.
Definition: APICommand.hh:8
Log & log()
Definition: Log.hh:424
void print_options(Log &log, ConfigEnumOptions const &options)
Definition: stream_io.cc:6
Options for the enumerate_configurations function.
bool dry_run
If dry_run==true, do not save results, just print to screen.
int verbosity
Printing verbosity level.
FormattedDataFileOptions output_options
Options for construcing FormattedDataFile object.
std::function< bool(Configuration const &)> filter
If filter(configuration)==true, keep configuration, else skip.
bool output_filtered_configurations
If true, include output for configurations that were filtered out.
std::string filter_expression
If not empty, expression used to construct filter.