ICF 3.1.1.10
Technical documentation of ICF Libraries
TMultiPageBitmap.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#ifndef iimg_TMultiPageBitmap_included
7#define iimg_TMultiPageBitmap_included
8
9
10// ICF includes
12#include <iimg/CGeneralBitmap.h>
13
14
15namespace iimg
16{
17
18
24template <class BitmapImpl>
26{
27public:
29 typedef BitmapImpl BitmapType;
30
31 // reimplemented (istd::IChangeable)
32 std::unique_ptr<istd::IChangeable> CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
33
34protected:
35 // reimplemented (CMultiPageBitmapBase)
36 std::unique_ptr<iimg::IBitmap> CreateBitmap() const override;
37};
38
39
40// public methods
41
42// reimplemented (istd::IChangeable)
43
44template <class BitmapImpl>
45std::unique_ptr<istd::IChangeable> TMultiPageBitmap<BitmapImpl>::CloneMe(CompatibilityMode mode) const
46{
47 std::unique_ptr<istd::IChangeable> clonedPtr{new TMultiPageBitmap<BitmapImpl>()};
48 if (clonedPtr->CopyFrom(*this, mode)){
49 return clonedPtr;
50 }
51
52 return nullptr;
53}
54
55
56// protected methods
57
58// reimplemented (CMultiPageBitmapBase)
59
60template <class BitmapImpl>
61std::unique_ptr<IBitmap> TMultiPageBitmap<BitmapImpl>::CreateBitmap() const
62{
63 return std::unique_ptr<IBitmap>{new BitmapImpl};
64}
65
66
68
69
70} // namespace iimg
71
72
73#endif // !iimg_TMultiPageBitmap_included
74
75
Definition of a multi-page bitmap document.
Generic implementation of a multi-page bitmap.
std::unique_ptr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
CMultiPageBitmapBase BaseClass
std::unique_ptr< iimg::IBitmap > CreateBitmap() const override
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
Contains the system indenendent definitions of image and related themes.
Definition CBitmap.h:21
TMultiPageBitmap< CGeneralBitmap > CGeneralMultiPageBitmap

© Witold Gantzke and Kirill Lepskiy