Stroika Library 3.0d16
 
Loading...
Searching...
No Matches
CaptureSet.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2025. All rights reserved
3 */
4#include "Stroika/Frameworks/StroikaPreComp.h"
5
6#include "CaptureSet.h"
7
8using namespace Stroika::Foundation;
9
10using namespace Stroika::Frameworks;
11using namespace Stroika::Frameworks::SystemPerformance;
12
13/*
14 ********************************************************************************
15 *********************** SystemPerformance::CaptureSet **************************
16 ********************************************************************************
17 */
18CaptureSet::CaptureSet (const Duration& period, const Set<Instrument>& instruments)
19 : runPeriod{[this] ([[maybe_unused]] const auto* property) { return fPeriod_; },
20 [this] ([[maybe_unused]] auto* property, const auto& runPeriod) { fPeriod_ = runPeriod; }}
21 , instruments{[this] ([[maybe_unused]] const auto* property) { return fInstruments_; },
22 [this] ([[maybe_unused]] auto* property, const auto& instruments) { fInstruments_ = instruments; }}
23 , fInstruments_ (instruments)
24 , fPeriod_ (period)
25{
26}
27CaptureSet::CaptureSet (const CaptureSet& src)
28 : CaptureSet{src.fPeriod_, src.fInstruments_}
29{
30}
31
32CaptureSet& CaptureSet::operator= (const CaptureSet& rhs)
33{
34 fInstruments_ = rhs.fInstruments_;
35 fPeriod_ = rhs.fPeriod_;
36 return *this;
37}
Set<T> is a container of T, where once an item is added, additionally adds () do nothing.
Definition Set.h:105
Duration is a chrono::duration<double> (=.
Definition Duration.h:96