CDelegatedBitmapSupplierComp.h
Go to the documentation of this file.
1 #ifndef iipr_CDelegatedBitmapSupplierComp_included
2 #define iipr_CDelegatedBitmapSupplierComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QPair>
7 
8 // ACF includes
9 #include <imod/IModel.h>
11 #include <i2d/ICalibration2d.h>
14 
15 // ACF-Solutions includes
16 #include <iimg/IBitmapProvider.h>
17 
18 
19 namespace iipr
20 {
21 
22 
28  virtual public istd::IChangeable,
29  virtual public iimg::IBitmapProvider,
30  virtual public i2d::ICalibrationProvider,
31  virtual public iinsp::ISupplier
32 {
33 public:
35 
36  I_BEGIN_COMPONENT(CDelegatedBitmapSupplierComp);
37  I_REGISTER_INTERFACE(iinsp::ISupplier);
38  I_REGISTER_INTERFACE(iimg::IBitmapProvider);
39  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
40  I_ASSIGN(m_bitmapCompPtr, "BitmapObject", "Bitmap object used if no slave supplier is provided", false, "BitmapObject");
41  I_ASSIGN_TO(m_bitmapModelCompPtr, m_bitmapCompPtr, false);
42  I_ASSIGN(m_calibrationCompPtr, "CalibrationObject", "Calibration object used as image to log transformation, if no slave supplier is provided", false, "CalibrationObject");
43  I_ASSIGN_TO(m_calibrationModelCompPtr, m_calibrationCompPtr, false);
44  I_ASSIGN(m_bitmapProviderCompPtr, "SlaveSupplier", "Slave supplier where all calls will be delegated", false, "SlaveSupplier");
45  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
46  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
47  I_ASSIGN_TO(m_calibrationProviderCompPtr, m_bitmapProviderCompPtr, false);
48  I_END_COMPONENT;
49 
51 
52  // reimplemented (iimg::IBitmapProvider)
53  virtual const iimg::IBitmap* GetBitmap() const;
54 
55  // reimplemented (i2d::ICalibrationProvider)
56  virtual const i2d::ICalibration2d* GetCalibration() const;
57 
58  // reimplemented (iinsp::ISupplier)
59  virtual int GetWorkStatus() const;
60  virtual imod::IModel* GetWorkStatusModel() const;
61  virtual void InvalidateSupplier();
62  virtual void EnsureWorkInitialized();
63  virtual void EnsureWorkFinished();
64  virtual void ClearWorkResults();
65  virtual const ilog::IMessageContainer* GetWorkMessages(int containerType) const;
66  virtual iprm::IParamsSet* GetModelParametersSet() const;
67 
68 protected:
69  // reimplemented (icomp::CComponentBase)
70  virtual void OnComponentCreated();
71  virtual void OnComponentDestroyed();
72 
73 private:
74  I_REF(iimg::IBitmap, m_bitmapCompPtr);
75  I_REF(imod::IModel, m_bitmapModelCompPtr);
76 
77  I_REF(i2d::ICalibration2d, m_calibrationCompPtr);
78  I_REF(imod::IModel, m_calibrationModelCompPtr);
79 
80  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
81  I_REF(iinsp::ISupplier, m_bitmapSupplierCompPtr);
82  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
83  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
84 
85  imod::CModelUpdateBridge m_updateBridge;
86 };
87 
88 
89 } // namespace iipr
90 
91 
92 #endif // !iipr_CDelegatedBitmapSupplierComp_included
93 
94 
virtual iprm::IParamsSet * GetModelParametersSet() const
Get parameter set using by this supplier.
virtual imod::IModel * GetWorkStatusModel() const
Get access to the status model of the supplier.
virtual void EnsureWorkInitialized()
Force the supplier to initialize its work.
Image supplier delegating the calls to another one or accessing some bitmap object directly...
virtual const ilog::IMessageContainer * GetWorkMessages(int containerType) const
Get messages outputted by this work.
virtual int GetWorkStatus() const
Get status of last work.
virtual const i2d::ICalibration2d * GetCalibration() const
virtual void InvalidateSupplier()
Called to signalize that this supplier is invalid.
virtual void EnsureWorkFinished()
Ensure that all objects are produced.
virtual void ClearWorkResults()
Remove all stored work results.
virtual const iimg::IBitmap * GetBitmap() const
Base interface for suppliers providing calculating of objects on demand ("pull data" model)...
Definition: ISupplier.h:22

© 2007-2017 Witold Gantzke and Kirill Lepskiy