The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::app::ReportConfiguration Class Reference

Configuration applicator class that is used for configuring a simulator's reports. Works in conjunction with sparta::app::ReportDescriptorCollection. More...

#include <ReportDescriptor.hpp>

Public Member Functions

 ReportConfiguration (SimulationConfiguration *sim_config, ReportDescriptorCollection *collection, RootTreeNode *root)
 
 ReportConfiguration (const ReportConfiguration &)=delete
 
ReportConfigurationoperator= (const ReportConfiguration &)=delete
 
void addReport (const ReportDescriptor &rd)
 Add one report descriptor to this collection.
 
void addReportsFromYaml (const std::string &yaml_file)
 
void removeReportByName (const std::string &rd_name)
 
void addMemoryReportsFromYaml (const std::string &yaml_file)
 
void showAllReportDescriptorInfo ()
 Pretty print information about all app::ReportDescriptor's.
 
void serializeAllDescriptorsToYaml ()
 
ReportDescriptorCollectiongetDescriptors ()
 Access the underlying report descriptors.
 
const ReportDescriptorCollectiongetDescriptors () const
 Access the underlying report descriptors.
 

Friends

class Simulation
 

Detailed Description

Configuration applicator class that is used for configuring a simulator's reports. Works in conjunction with sparta::app::ReportDescriptorCollection.

Note
Once the simulation framework is finalized, attempting to add or remove descriptors from the configuration will throw an exception. You may only ask the report configuration object to print its contents to stdout ("serialize to yaml" / "show all report info") and call the CONST 'getDescriptors()' method.

Definition at line 844 of file ReportDescriptor.hpp.

Member Function Documentation

◆ addMemoryReportsFromYaml()

void sparta::app::ReportConfiguration::addMemoryReportsFromYaml ( const std::string &  yaml_file)

Set up memory usage report from a yaml file configuration (this is the same as –log-memory-usage <yaml file> at the command line). This yaml file will be parsed relative to the simulation's root tree node.

◆ addReportsFromYaml()

void sparta::app::ReportConfiguration::addReportsFromYaml ( const std::string &  yaml_file)

Parse the given yaml file relative to the simulation's root tree node, and add the parsed descriptors to this report collection

◆ removeReportByName()

void sparta::app::ReportConfiguration::removeReportByName ( const std::string &  rd_name)

Remove (filter) a report by the ReportDescriptor's "dest_file" name

◆ serializeAllDescriptorsToYaml()

void sparta::app::ReportConfiguration::serializeAllDescriptorsToYaml ( )

Print out the YAML equivalent of all report descriptors in the simulation

Friends And Related Symbol Documentation

◆ Simulation

friend class Simulation
friend

Definition at line 905 of file ReportDescriptor.hpp.


The documentation for this class was generated from the following file: