ICF 3.1.1.10
Technical documentation of ICF Libraries
CSnapMultiPageBitmapSupplierComp.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QPair>
11
12// ICF includes
15#include <iproc/IProcessor.h>
18
19
20namespace icam
21{
22
23
28 public iinsp::TSupplierCompWrap<std::unique_ptr<iimg::IMultiBitmapProvider>>,
29 virtual public iimg::IMultiBitmapProvider,
31{
32public:
34
35 I_BEGIN_COMPONENT(CSnapMultiPageBitmapSupplierComp);
36 I_REGISTER_INTERFACE(iimg::IMultiBitmapProvider);
37 I_REGISTER_INTERFACE(idoc::IMultiPageDocumentProvider);
38 I_ASSIGN(m_bitmapCompFact, "BitmapFactory", "Use to create bitmap object", true, "BitmapFactory");
39 I_ASSIGN(m_bitmapAcquisitionCompPtr, "BitmapAcquisition", "Bitmap acquisition object for image snap", true, "BitmapAcquisition");
40 I_END_COMPONENT;
41
42 // reimplemented (iimg::IMultiBitmapProvider)
43 int GetBitmapsCount() const override;
44 const iimg::IBitmap* GetBitmap(int bitmapIndex) const override;
45 const iprm::IOptionsList* GetBitmapListInfo() const override;
46
47 // reimplemented (idoc::IMultiPageDocumentProvider)
48 const idoc::IMultiPageDocument* GetDocument() const override;
49
50protected:
51 // reimplemented (iinsp::TSupplierCompWrap)
52 bool InitializeWork() override;
53 int ProduceObject(ProductType& result) const override;
54
55private:
56 I_FACT(iimg::IMultiBitmapProvider, m_bitmapCompFact);
57 I_REF(iproc::IProcessor, m_bitmapAcquisitionCompPtr);
58};
59
60
61} // namespace icam
62
63
Implementation of bitmap supplier based on image acquisition.
const iprm::IOptionsList * GetBitmapListInfo() const override
Get optional information about bitmaps in form of section constraints.
int GetBitmapsCount() const override
Get number of produced bitmaps.
const iimg::IBitmap * GetBitmap(int bitmapIndex) const override
Get access to produced bitmap object.
bool InitializeWork() override
Called if the new work should be initialized.
const idoc::IMultiPageDocument * GetDocument() const override
Get multi-page document instance.
int ProduceObject(ProductType &result) const override
iinsp::TSupplierCompWrap< std::unique_ptr< iimg::IMultiBitmapProvider > > BaseClass
Simple interface for a structured document.
Common interface for a provider of a multi-page document.
Definition of single plane bitmap.
Definition IBitmap.h:24
Supplier allowing to access of multiple produced bitmaps.
Standard implementation of interface iinsp::ISupplier with preparation for component implementation.
Constraints of selection from set of possibilities.
Interface for all synchrone and asynchrone processors with "push data" model.
Definition IProcessor.h:26
Contains interfaces, implementations and components of image acquisition and processing.

© Witold Gantzke and Kirill Lepskiy