ACF $AcfVersion:0$
CSpectrumInfo.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
8
9
10namespace icmm
11{
12
13
17class CSpectrumInfo: virtual public ISpectrumInfo, virtual public iser::ISerializable
18{
19public:
21 CSpectrumInfo(const istd::CIntRange& range, int step);
23
24 bool SetRange(const istd::CIntRange& range);
25 bool SetStep(int step);
26
27 bool operator==(const CSpectrumInfo& other) const;
28
29 // reimplemented (icmm::ISpectrumInfo)
30 virtual istd::CIntRange GetSpectralRange() const override;
31 virtual int GetStep() const override;
32 virtual int GetSamplesCount() const override;
33
34 // reimplemented (iser::ISerializable)
35 virtual bool Serialize(iser::IArchive& archive) override;
36
37 // reimplemented (istd::IChangeable)
38 virtual int GetSupportedOperations() const override;
39 virtual bool CopyFrom(const IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
40 virtual bool IsEqual(const IChangeable& object) const override;
42 virtual bool ResetData(CompatibilityMode mode = CM_WITHOUT_REFS) override;
43
44private:
45 istd::CIntRange m_range;
46 int m_step = 0;
47};
48
49
50} // namespace icmm
51
52
Data model implementation of ISpectrumInfo interface.
virtual int GetSamplesCount() const override
Return number of samples.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
virtual bool CopyFrom(const IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
bool SetStep(int step)
virtual istd::CIntRange GetSpectralRange() const override
Get the spectral range of the measured values given in nm.
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
virtual bool IsEqual(const IChangeable &object) const override
virtual bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS) override
Reset data to its default state.
bool operator==(const CSpectrumInfo &other) const
CSpectrumInfo(const istd::CIntRange &range, int step)
CSpectrumInfo(const ISpectrumInfo &other)
virtual int GetStep() const override
Get distance/step between the samples in the spectrum definition (in nm).
bool SetRange(const istd::CIntRange &range)
Common interface for describing the properties or meta-informations of a measured/sampled spectrum.
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common class for all classes which objects can be archived or restored from archive.
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains color management classes.