ICF 3.0.5.47
Technical documentation of ICF Libraries
CDelegatedBitmapSupplierComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef iipr_CDelegatedBitmapSupplierComp_included
7#define iipr_CDelegatedBitmapSupplierComp_included
8
9
10// Qt includes
11#include <QtCore/QPair>
12
13// ICF includes
14#include <imod/IModel.h>
16#include <i2d/ICalibration2d.h>
20
21
22namespace iipr
23{
24
25
31 virtual public istd::IChangeable,
32 virtual public iimg::IBitmapProvider,
33 virtual public i2d::ICalibration2dProvider,
34 virtual public iinsp::ISupplier
35{
36public:
38
39 I_BEGIN_COMPONENT(CDelegatedBitmapSupplierComp);
40 I_REGISTER_INTERFACE(iinsp::ISupplier);
41 I_REGISTER_INTERFACE(iimg::IBitmapProvider);
42 I_REGISTER_INTERFACE(i2d::ICalibration2dProvider);
43 I_ASSIGN(m_bitmapCompPtr, "BitmapObject", "Bitmap object used if no slave supplier is provided", false, "BitmapObject");
44 I_ASSIGN_TO(m_bitmapModelCompPtr, m_bitmapCompPtr, false);
45 I_ASSIGN(m_calibrationCompPtr, "CalibrationObject", "Calibration object used as image to log transformation, if no slave supplier is provided", false, "CalibrationObject");
46 I_ASSIGN_TO(m_calibrationModelCompPtr, m_calibrationCompPtr, false);
47 I_ASSIGN(m_bitmapProviderCompPtr, "SlaveSupplier", "Slave supplier where all calls will be delegated", false, "SlaveSupplier");
48 I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
49 I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
50 I_ASSIGN_TO(m_calibrationProviderCompPtr, m_bitmapProviderCompPtr, false);
51 I_END_COMPONENT;
52
54
55 // reimplemented (iimg::IBitmapProvider)
56 const iimg::IBitmap* GetBitmap() const override;
57
58 // reimplemented (i2d::ICalibration2dProvider)
59 const i2d::ICalibration2d* GetCalibration() const override;
60
61 // reimplemented (iinsp::ISupplier)
62 int GetWorkStatus() const override;
64 void InvalidateSupplier() override;
65 void EnsureWorkInitialized() override;
66 void EnsureWorkFinished() override;
67 void ClearWorkResults() override;
68 const ilog::IMessageContainer* GetWorkMessages(int containerType) const override;
70
71protected:
72 // reimplemented (icomp::CComponentBase)
73 void OnComponentCreated() override;
74 void OnComponentDestroyed() override;
75
76private:
77 I_REF(iimg::IBitmap, m_bitmapCompPtr);
78 I_REF(imod::IModel, m_bitmapModelCompPtr);
79
80 I_REF(i2d::ICalibration2d, m_calibrationCompPtr);
81 I_REF(imod::IModel, m_calibrationModelCompPtr);
82
83 I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
84 I_REF(iinsp::ISupplier, m_bitmapSupplierCompPtr);
85 I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
86 I_REF(i2d::ICalibration2dProvider, m_calibrationProviderCompPtr);
87
88 imod::CModelUpdateBridge m_updateBridge;
89};
90
91
92} // namespace iipr
93
94
95#endif // !iipr_CDelegatedBitmapSupplierComp_included
96
97
Common interface for an object, which delivers a 2D-calibration.
Definition of single plane bitmap.
Definition IBitmap.h:24
Bitmap supplier allowing to access of produced bitmap.
Base interface for suppliers providing calculating of objects on demand ("pull data" model).
Definition ISupplier.h:28
Image supplier delegating the calls to another one or accessing some bitmap object directly.
void EnsureWorkFinished() override
Ensure that all objects are produced.
const iimg::IBitmap * GetBitmap() const override
Get access to produced bitmap object.
void InvalidateSupplier() override
Called to signalize that this supplier is invalid.
int GetWorkStatus() const override
Get status of last work.
void ClearWorkResults() override
Remove all stored work results.
imod::IModel * GetWorkStatusModel() const override
Get access to the status model of the supplier.
void EnsureWorkInitialized() override
Force the supplier to initialize its work.
iprm::IParamsSet * GetModelParametersSet() const override
Get parameter set using by this supplier.
const i2d::ICalibration2d * GetCalibration() const override
Get access to transformation object, which transforms a local logical coordinate system to global one...
const ilog::IMessageContainer * GetWorkMessages(int containerType) const override
Get messages outputted by this work.
Common interface for a message container.
Wrapper provider of log-functionality for component based implementations.
Reflects the changes of observed objects as changes of some other object (over istd::IChangeable),...
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:29
Set of general parameters.
Definition IParamsSet.h:29
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
Contains the image processing classes.

© Witold Gantzke and Kirill Lepskiy