ACF $AcfVersion:0$
CTristimulusSpecification.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#include <icmm/CIlluminant.h>
9
10
11namespace icmm
12{
13
14
16{
17public:
21 std::shared_ptr<IIlluminant> illuminantPtr = nullptr,
22 std::shared_ptr<ISpectralColorSpecification> baseSpec = nullptr);
23
25
26 static QByteArray GetTypeId();
27
28 // reimplemented (ITristimulusSpecification)
29 virtual std::shared_ptr<IIlluminant> GetIlluminant() const override;
30 virtual ObserverType GetObserverType() const override;
31 virtual AstmTableType GetMethod() const override;
32 virtual std::shared_ptr<ISpectralColorSpecification> GetBaseSpecification() const override;
33
34 // reimplemented (istd::IObject)
35 virtual QByteArray GetFactoryId() const;
36
37 // reimplemented (istd::IChangeable)
38 virtual int GetSupportedOperations() const override;
39 virtual bool CopyFrom(const istd::IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
40 virtual bool IsEqual(const istd::IChangeable& other) const override;
42
43 // reimplemented (iser::ISerializable)
44 virtual bool Serialize(iser::IArchive& archive) override;
45
46 bool operator==(const CTristimulusSpecification& other) const;
47
48 // Return instance of commonly used specification
50
51private:
52 ObserverType m_observerType;
53 AstmTableType m_method;
54 std::shared_ptr<IIlluminant> m_illuminantPtr;
55 std::shared_ptr<ISpectralColorSpecification> m_baseSpecPtr;
56};
57
58
59} // namespace icmm
60
61
virtual bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
CTristimulusSpecification(ObserverType observerType=ObserverType::TwoDegree, AstmTableType method=AstmTableType::Unknown, std::shared_ptr< IIlluminant > illuminantPtr=nullptr, std::shared_ptr< ISpectralColorSpecification > baseSpec=nullptr)
virtual bool IsEqual(const istd::IChangeable &other) const override
Compare this object with another object.
static QByteArray GetTypeId()
static const icmm::CTristimulusSpecification & GetD50TwoDegree()
virtual int GetSupportedOperations() const override
Get set of flags for supported operations.
bool operator==(const CTristimulusSpecification &other) const
CTristimulusSpecification(const ITristimulusSpecification &other)
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual ObserverType GetObserverType() const override
Gets the standard observer type used for color calculations.
virtual std::shared_ptr< ISpectralColorSpecification > GetBaseSpecification() const override
Gets the base spectral specification, if one exists.
virtual AstmTableType GetMethod() const override
Gets the ASTM table type used for spectral calculations.
virtual istd::IChangeableUniquePtr CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
virtual std::shared_ptr< IIlluminant > GetIlluminant() const override
Gets the illuminant (light source) used by this specification.
virtual QByteArray GetFactoryId() const
Interface for tristimulus-based color specifications.
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common interface for data model objects, which can be changed.
Definition IChangeable.h:28
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains color management classes.
AstmTableType
Definition icmm.h:30
ObserverType
Definition icmm.h:78