OGS
ProcessLib::Assembly::CumulativeStats< Data > Class Template Reference

Detailed Description

template<typename Data>
class ProcessLib::Assembly::CumulativeStats< Data >

Definition at line 69 of file MatrixAssemblyStats.h.

#include <MatrixAssemblyStats.h>

Inheritance diagram for ProcessLib::Assembly::CumulativeStats< Data >:
[legend]
Collaboration diagram for ProcessLib::Assembly::CumulativeStats< Data >:
[legend]

Public Member Functions

std::shared_ptr< CumulativeStats< Data > > clone ()
 CumulativeStats (CumulativeStats< Data > const &other)=delete
 CumulativeStats (CumulativeStats< Data > &other)
 CumulativeStats (CumulativeStats< Data > &&other)
 ~CumulativeStats ()
void print () const

Static Public Member Functions

static std::shared_ptr< CumulativeStats< Data > > create ()

Public Attributes

Data data

Private Types

using Base = std::enable_shared_from_this<CumulativeStats<Data>>

Private Member Functions

 CumulativeStats ()

Private Attributes

std::shared_ptr< CumulativeStats< Data > > parent_
std::shared_ptr< std::mutex > parent_mutex_

Member Typedef Documentation

◆ Base

template<typename Data>
using ProcessLib::Assembly::CumulativeStats< Data >::Base = std::enable_shared_from_this<CumulativeStats<Data>>
private

Definition at line 72 of file MatrixAssemblyStats.h.

Constructor & Destructor Documentation

◆ CumulativeStats() [1/4]

template<typename Data>
ProcessLib::Assembly::CumulativeStats< Data >::CumulativeStats ( CumulativeStats< Data > const & other)
delete

◆ CumulativeStats() [2/4]

template<typename Data>
ProcessLib::Assembly::CumulativeStats< Data >::CumulativeStats ( CumulativeStats< Data > & other)
inline

Definition at line 92 of file MatrixAssemblyStats.h.

93 : Base{other},
94 data{},
95 parent_{other.parent_ ? other.parent_ : other.shared_from_this()},
97 {
98 }
std::shared_ptr< std::mutex > parent_mutex_
std::enable_shared_from_this< CumulativeStats< Data > > Base
std::shared_ptr< CumulativeStats< Data > > parent_

References CumulativeStats(), data, parent_, and parent_mutex_.

◆ CumulativeStats() [3/4]

template<typename Data>
ProcessLib::Assembly::CumulativeStats< Data >::CumulativeStats ( CumulativeStats< Data > && other)
inline

◆ ~CumulativeStats()

template<typename Data>
ProcessLib::Assembly::CumulativeStats< Data >::~CumulativeStats ( )
inline

Definition at line 107 of file MatrixAssemblyStats.h.

108 {
109 if (!parent_)
110 {
111 return;
112 }
113
115
116 DBUG("Adding cumulative stats to parent.");
117
118 parent_->data += data;
119 }
void DBUG(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:30

References data, DBUG(), parent_, and parent_mutex_.

◆ CumulativeStats() [4/4]

template<typename Data>
ProcessLib::Assembly::CumulativeStats< Data >::CumulativeStats ( )
inlineprivate

Definition at line 124 of file MatrixAssemblyStats.h.

References parent_mutex_.

Referenced by create().

Member Function Documentation

◆ clone()

template<typename Data>
std::shared_ptr< CumulativeStats< Data > > ProcessLib::Assembly::CumulativeStats< Data >::clone ( )
inline

Definition at line 85 of file MatrixAssemblyStats.h.

86 {
88 }

◆ create()

template<typename Data>
std::shared_ptr< CumulativeStats< Data > > ProcessLib::Assembly::CumulativeStats< Data >::create ( )
inlinestatic

◆ print()

template<typename Data>
void ProcessLib::Assembly::CumulativeStats< Data >::print ( ) const
inline

Definition at line 121 of file MatrixAssemblyStats.h.

121{ data.print(); }

References data.

Member Data Documentation

◆ data

template<typename Data>
Data ProcessLib::Assembly::CumulativeStats< Data >::data

Definition at line 75 of file MatrixAssemblyStats.h.

Referenced by CumulativeStats(), CumulativeStats(), ~CumulativeStats(), and print().

◆ parent_

template<typename Data>
std::shared_ptr<CumulativeStats<Data> > ProcessLib::Assembly::CumulativeStats< Data >::parent_
private

Definition at line 126 of file MatrixAssemblyStats.h.

Referenced by CumulativeStats(), CumulativeStats(), and ~CumulativeStats().

◆ parent_mutex_

template<typename Data>
std::shared_ptr<std::mutex> ProcessLib::Assembly::CumulativeStats< Data >::parent_mutex_
private

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