File: scriptdata.cpp

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (31 lines) | stat: -rw-r--r-- 850 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "scriptdata.h"

#include "../algorithms/bandpassfile.h"

#include "../quality/statisticscollection.h"

ScriptData::ScriptData()
    : _progressListener(nullptr),
      _bandpassFile(),
      _bandpassMutex(),
      _canVisualize(false),
      _visualizationData(),
      _statistics() {}

ScriptData::~ScriptData() {}

void ScriptData::Combine(ScriptData&& other) {
  if (!_bandpassFile) _bandpassFile = std::move(other._bandpassFile);
  if (_canVisualize) {
    _visualizationData.insert(_visualizationData.end(),
                              other._visualizationData.begin(),
                              other._visualizationData.end());
    other._visualizationData.clear();
  }
  if (other._statistics) {
    if (_statistics)
      _statistics->Add(*other._statistics);
    else
      _statistics = std::move(other._statistics);
  }
}