CSelectableBitmapSupplierComp.h
Go to the documentation of this file.
1 #ifndef icam_CSelectableBitmapSupplierComp_included
2 #define icam_CSelectableBitmapSupplierComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QPair>
7 
8 // ACF includes
9 #include "istd/TDelPtr.h"
10 #include "i2d/ICalibration2d.h"
13 #include "iimg/IBitmap.h"
14 #include "iprm/ISelectionParam.h"
15 
16 // ACF-Solutions includes
17 #include "iproc/ISupplier.h"
19 #include "iimg/IBitmapProvider.h"
21 
22 
23 namespace icam
24 {
25 
26 
31  public iproc::TSupplierCompWrap< QPair<istd::TDelPtr<const i2d::ICalibration2d>, istd::TDelPtr<iimg::IBitmap> > >,
32  virtual public iimg::IBitmapProvider,
33  virtual public i2d::ICalibrationProvider
34 {
35 public:
37 
38  I_BEGIN_COMPONENT(CSelectableBitmapSupplierComp);
39  I_REGISTER_INTERFACE(iimg::IBitmapProvider);
40  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
41  I_ASSIGN(m_bitmapCompFact, "BitmapFactory", "Use to create bitmap object", true, "BitmapFactory");
42  I_ASSIGN(m_multiBitmapProviderCompPtr, "MultiBitmapProvider", "Provider of the bitmap list", true, "MultiBitmapProvider");
43  I_ASSIGN_TO(m_multiBitmapCalibCompPtr, m_multiBitmapProviderCompPtr, false);
44  I_ASSIGN_TO(m_multiBitmapMultiCalibCompPtr, m_multiBitmapProviderCompPtr, false);
45  I_ASSIGN_TO(m_multiBitmapSupplierCompPtr, m_multiBitmapProviderCompPtr, false);
46  I_ASSIGN_TO(m_multiBitmapProviderModelCompPtr, m_multiBitmapProviderCompPtr, false);
47  I_ASSIGN(m_bitmapSelectionCompPtr, "BitmapSelection", "Index of the bitmap in the list", true, "BitmapSelection");
48  I_ASSIGN_TO(m_bitmapSelectionModelCompPtr, m_bitmapSelectionCompPtr, true);
49  I_END_COMPONENT;
50 
51  // reimplemented (iimg::IBitmapProvider)
52  virtual const iimg::IBitmap* GetBitmap() const;
53 
54  // reimplemented (i2d::ICalibrationProvider)
55  virtual const i2d::ICalibration2d* GetCalibration() const;
56 
57 protected:
58  // reimplemented (iproc::TSupplierCompWrap)
59  virtual int ProduceObject(ProductType& result) const;
60 
61  // reimplemented (icomp::CComponentBase)
62  virtual void OnComponentCreated();
63  virtual void OnComponentDestroyed();
64 
65 private:
66  I_FACT(iimg::IBitmap, m_bitmapCompFact);
67 
68  I_REF(iimg::IMultiBitmapProvider, m_multiBitmapProviderCompPtr);
69  I_REF(i2d::ICalibrationProvider, m_multiBitmapCalibCompPtr);
70  I_REF(i2d::IMultiCalibrationProvider, m_multiBitmapMultiCalibCompPtr);
71  I_REF(iproc::ISupplier, m_multiBitmapSupplierCompPtr);
72  I_REF(imod::IModel, m_multiBitmapProviderModelCompPtr);
73 
74  I_REF(iprm::ISelectionParam, m_bitmapSelectionCompPtr);
75  I_REF(imod::IModel, m_bitmapSelectionModelCompPtr);
76 };
77 
78 
79 } // namespace icam
80 
81 
82 #endif // !icam_CSelectableBitmapSupplierComp_included
83 
84 
iproc::TSupplierCompWrap< QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > > BaseClass
I_ASSIGN_TO(m_multiBitmapCalibCompPtr, m_multiBitmapProviderCompPtr, false)
QPair< istd::TDelPtr< const i2d::ICalibration2d >, istd::TDelPtr< iimg::IBitmap > > ProductType
virtual int ProduceObject(ProductType &result) const
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
virtual const i2d::ICalibration2d * GetCalibration() const
virtual const iimg::IBitmap * GetBitmap() const
Implementation of bitmap supplier based on image acquisition.
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy