CProcessedBitmapSupplierComp.h
Go to the documentation of this file.
1 #ifndef iipr_CProcessedBitmapSupplierComp_included
2 #define iipr_CProcessedBitmapSupplierComp_included
3 
4 
5 // ACF includes
7 
8 // ACF-Solutions includes
9 #include "iproc/IProcessor.h"
10 #include "iproc/ISupplier.h"
12 #include "iimg/IBitmapProvider.h"
13 
14 
15 namespace iipr
16 {
17 
18 
23  public iproc::TSupplierCompWrap<istd::TDelPtr<iimg::IBitmap> >,
24  virtual public iimg::IBitmapProvider
25 {
26 public:
28 
29  I_BEGIN_COMPONENT(CProcessedBitmapSupplierComp);
30  I_REGISTER_INTERFACE(iimg::IBitmapProvider);
31  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
32  I_ASSIGN(m_bitmapCompFact, "BitmapFactory", "Use to create bitmap object", true, "BitmapFactory");
33  I_ASSIGN(m_bitmapProviderCompPtr, "BitmapProvider", "Provide input image", true, "BitmapProvider");
34  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
35  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
36  I_ASSIGN(m_imageProcessorCompPtr, "BitmapProcessor", "Bitmap conversion processor (takes bitmap as input and output)", true, "BitmapProcessor");
37  I_END_COMPONENT;
38 
39 protected:
40  bool EnsureBitmapCreated(ProductType& result) const;
41 
42  // reimplemented (iimg::IBitmapProvider)
43  virtual const iimg::IBitmap* GetBitmap() const;
44 
45  // reimplemented (iproc::TSupplierCompWrap)
46  virtual int ProduceObject(ProductType& result) const;
47 
48  // reimplemented (icomp::CComponentBase)
49  virtual void OnComponentCreated();
50 
51 private:
52  I_FACT(iimg::IBitmap, m_bitmapCompFact);
53 
54  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
55  I_REF(iproc::ISupplier, m_bitmapSupplierCompPtr);
56  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
57  I_REF(iproc::IProcessor, m_imageProcessorCompPtr);
58  I_REF(i2d::ITransformation2d, m_defaultCalibrationCompPtr);
59 };
60 
61 
62 } // namespace iipr
63 
64 
65 #endif // !iipr_CProcessedBitmapSupplierComp_included
66 
67 
iproc::TSupplierCompWrap< istd::TDelPtr< iimg::IBitmap > > BaseClass
I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false)
virtual const iimg::IBitmap * GetBitmap() const
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
Image supplier providing processed image from some other input image supplier.
virtual int ProduceObject(ProductType &result) const
Produce single object.
bool EnsureBitmapCreated(ProductType &result) const
Interface for all synchrone and assynchrone processors with "push data" model.
Definition: IProcessor.h:24
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy