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 iproc::ISupplier,
29  virtual public istd::IChangeable,
30  virtual public iimg::IBitmapProvider,
31  virtual public i2d::ICalibrationProvider,
33 {
34 public:
37 
38  I_BEGIN_COMPONENT(CDelegatedBitmapSupplierComp);
39  I_REGISTER_INTERFACE(iproc::ISupplier);
40  I_REGISTER_INTERFACE(iimg::IBitmapProvider);
41  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
42  I_ASSIGN(m_bitmapCompPtr, "BitmapObject", "Bitmap object used if no slave supplier is provided", false, "BitmapObject");
43  I_ASSIGN_TO(m_bitmapModelCompPtr, m_bitmapCompPtr, false);
44  I_ASSIGN(m_calibrationCompPtr, "CalibrationObject", "Calibration object used as image to log transformation, if no slave supplier is provided", false, "CalibrationObject");
45  I_ASSIGN_TO(m_calibrationModelCompPtr, m_calibrationCompPtr, false);
46  I_ASSIGN(m_bitmapProviderCompPtr, "SlaveSupplier", "Slave supplier where all calls will be delegated", false, "SlaveSupplier");
47  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
48  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
49  I_ASSIGN_TO(m_calibrationProviderCompPtr, m_bitmapProviderCompPtr, false);
50  I_END_COMPONENT;
51 
52 protected:
53  // reimplemented (iimg::IBitmapProvider)
54  virtual const iimg::IBitmap* GetBitmap() const;
55 
56  // reimplemented (i2d::ICalibrationProvider)
57  virtual const i2d::ICalibration2d* GetCalibration() const;
58 
59  // reimplemented (iproc::ISupplier)
60  virtual int GetWorkStatus() const;
61  virtual void InvalidateSupplier();
62  virtual void EnsureWorkInitialized();
63  virtual void EnsureWorkFinished();
64  virtual void ClearWorkResults();
65  virtual const ilog::IMessageContainer* GetWorkMessages(int messageType) const;
66  virtual iprm::IParamsSet* GetModelParametersSet() const;
67 
68  // reimplemented (icomp::CComponentBase)
69  virtual void OnComponentCreated();
70  virtual void OnComponentDestroyed();
71 
72 private:
73  I_REF(iimg::IBitmap, m_bitmapCompPtr);
74  I_REF(imod::IModel, m_bitmapModelCompPtr);
75 
76  I_REF(i2d::ICalibration2d, m_calibrationCompPtr);
77  I_REF(imod::IModel, m_calibrationModelCompPtr);
78 
79  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
80  I_REF(iproc::ISupplier, m_bitmapSupplierCompPtr);
81  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
82  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
83 };
84 
85 
86 } // namespace iipr
87 
88 
89 #endif // !iipr_CDelegatedBitmapSupplierComp_included
90 
91 
virtual iprm::IParamsSet * GetModelParametersSet() const
Get parameter set using by this supplier.
I_ASSIGN_TO(m_bitmapModelCompPtr, m_bitmapCompPtr, false)
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 messageType) const
Get messages outputted by this work.
virtual int GetWorkStatus() const
Get status of last work.
virtual const i2d::ICalibration2d * GetCalibration() const
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
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

© 2007-2011 Witold Gantzke and Kirill Lepskiy