CColorBitmapSeparatorSupplierComp.h
Go to the documentation of this file.
1 #ifndef iipr_CColorBitmapSeparatorSupplierComp_included
2 #define iipr_CColorBitmapSeparatorSupplierComp_included
3 
4 
5 // ACF includes
7 #include "istd/TPointerVector.h"
8 
9 // ACF-Solutions includes
10 #include "iproc/IProcessor.h"
11 #include "iproc/ISupplier.h"
13 #include "iimg/IBitmapProvider.h"
15 
16 
17 namespace iipr
18 {
19 
24  public iproc::TSupplierCompWrap< istd::TPointerVector<iimg::IBitmap> >,
25  virtual public iimg::IMultiBitmapProvider,
26  virtual protected iprm::IOptionsList
27 {
28 public:
30 
31  I_BEGIN_COMPONENT(CColorBitmapSeparatorSupplierComp);
32  I_REGISTER_INTERFACE(iimg::IMultiBitmapProvider);
33  I_ASSIGN(m_bitmapCompFact, "BitmapFactory", "Use to create bitmap object", true, "BitmapFactory");
34  I_ASSIGN(m_bitmapProviderCompPtr, "BitmapSupplier", "Provide input image", true, "BitmapSupplier");
35  I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false);
36  I_ASSIGN_TO(m_bitmapProviderModelCompPtr, m_bitmapProviderCompPtr, false);
37  I_ASSIGN(m_useAlphaChannelAttrPtr, "UseAlphaChannel", "If enabled and image format of bitmap is RGBA, create bitmap for alpha chanel", true, false);
38  I_END_COMPONENT;
39 
40  // reimplemented (iimg::IMultiBitmapProvider)
41  virtual const iprm::IOptionsList* GetBitmapListInfo() const;
42  virtual int GetBitmapsCount() const;
43  virtual const iimg::IBitmap* GetBitmap(int bitmapIndex) const;
44 
45 protected:
46  bool EnsureBitmapCreated(ProductType& result) const;
47 
48  // reimplemented (iprm::IOptionsList)
49  virtual int GetOptionsFlags() const;
50  virtual int GetOptionsCount() const;
51  virtual QString GetOptionName(int index) const;
52  virtual QString GetOptionDescription(int index) const;
53  virtual QByteArray GetOptionId(int index) const;
54  virtual bool IsOptionEnabled(int index) const;
55 
56  // reimplemented (iproc::TSupplierCompWrap)
57  virtual int ProduceObject(ProductType& result) const;
58 
59  // reimplemented (icomp::CComponentBase)
60  virtual void OnComponentCreated();
61 
62 private:
63  I_FACT(iimg::IBitmap, m_bitmapCompFact);
64 
65  I_REF(iimg::IBitmapProvider, m_bitmapProviderCompPtr);
66  I_REF(iproc::ISupplier, m_bitmapSupplierCompPtr);
67  I_REF(imod::IModel, m_bitmapProviderModelCompPtr);
68 
69  I_ATTR(bool, m_useAlphaChannelAttrPtr);
70 };
71 
72 
73 } // namespace iipr
74 
75 
76 #endif // !iipr_CColorBitmapSeparatorSupplierComp_included
77 
78 
virtual bool IsOptionEnabled(int index) const
virtual const iimg::IBitmap * GetBitmap(int bitmapIndex) const
virtual QString GetOptionName(int index) const
virtual int ProduceObject(ProductType &result) const
Produce single object.
virtual QByteArray GetOptionId(int index) const
bool EnsureBitmapCreated(ProductType &result) const
Base interface for suppliers providing synchrone processing of single object with "pull data" model...
Definition: ISupplier.h:22
virtual const iprm::IOptionsList * GetBitmapListInfo() const
virtual QString GetOptionDescription(int index) const
iproc::TSupplierCompWrap< istd::TPointerVector< iimg::IBitmap > > BaseClass
I_ASSIGN_TO(m_bitmapSupplierCompPtr, m_bitmapProviderCompPtr, false)
Supplier of bitmap's vector built on bitmap.
Standard implementation of interface iproc::ISupplier with preparation for component implementation...

© 2007-2011 Witold Gantzke and Kirill Lepskiy