bactria  0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
bactria::reports::Report< TIncidents > Class Template Reference

The report class. More...

#include <Report.hpp>

Public Member Functions

 Report ()=default
 Default constructor. More...
 
 Report (std::string name, TIncidents &&... incidents)
 Constructor. More...
 
 Report (Report const &other)
 Copy constructor. More...
 
auto operator= (Report const &rhs) -> Report &
 Copy-assignment operator. More...
 
 Report (Report &&other) noexcept
 Move constructor. More...
 
auto operator= (Report &&rhs) noexcept -> Report &
 Move-assignment operator. More...
 
 ~Report ()
 Destructor.
 
auto submit () const
 Save the report. More...
 

Detailed Description

template<typename... TIncidents>
class bactria::reports::Report< TIncidents >

The report class.

A report contains multiple entries (of type Incident). By submitting a report the user can save these entries (the exact location depends on the selected plugin).

Template Parameters
TIncidentsList of values (of type Incident) recorded by the report.

Constructor & Destructor Documentation

◆ Report() [1/4]

template<typename... TIncidents>
bactria::reports::Report< TIncidents >::Report ( )
default

Default constructor.

Constructs a Report with the (file)name BACTRIA_REPORT and an empty list of Incidents.

◆ Report() [2/4]

template<typename... TIncidents>
bactria::reports::Report< TIncidents >::Report ( std::string  name,
TIncidents &&...  incidents 
)
inline

Constructor.

Constructs a Report with the (file)name name and a list of Incidents containing incidents.

Parameters
nameThe Report name. This is usally a filename which must not contain an extension.
incidentsThe Incidents to record in the Report.

◆ Report() [3/4]

template<typename... TIncidents>
bactria::reports::Report< TIncidents >::Report ( Report< TIncidents > const &  other)
inline

Copy constructor.

Constructs a Report by copying the contents of other. After the construction, this and other will contain identical copies of the name and the Incident list.

Parameters
otherThe Report to copy from.

◆ Report() [4/4]

template<typename... TIncidents>
bactria::reports::Report< TIncidents >::Report ( Report< TIncidents > &&  other)
inlinenoexcept

Move constructor.

Constructs a Report by moving the contents of other into this. After the move, this will have taken over the contents of other, while other is in an undefined state.

Parameters
otherThe Report to move into this.

Member Function Documentation

◆ operator=() [1/2]

template<typename... TIncidents>
auto bactria::reports::Report< TIncidents >::operator= ( Report< TIncidents > &&  rhs) -> Report&
inlinenoexcept

Move-assignment operator.

Moves the contents of rhs into this. After the move, this will have taken over the contents of rhs, while rhs is in an undefined state.

Parameters
rhsThe Report to move into this.

◆ operator=() [2/2]

template<typename... TIncidents>
auto bactria::reports::Report< TIncidents >::operator= ( Report< TIncidents > const &  rhs) -> Report&
inline

Copy-assignment operator.

Copies the contents of rhs into this. After the copy, this and rhs will contain identical copies of the name and the Incident list.

Parameters
rhsThe Report to copy from.

◆ submit()

template<typename... TIncidents>
auto bactria::reports::Report< TIncidents >::submit ( ) const
inline

Save the report.

This method physically stores the report to a location defined by the plugin. This is usually a file where the prefix corresponds to the name supplied by the user during Report construction, while the suffix is a plugin-specific extension. Refer to the documentation of the plugin in question to gather information about the concrete storage of the Report.


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