Skip to content

Commit b105751

Browse files
committed
Add IImageFormatFactory interface
1 parent aa643aa commit b105751

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ target_sources(scratchcpp
4949
include/scratchcpp/itimer.h
5050
include/scratchcpp/keyevent.h
5151
include/scratchcpp/iimageformat.h
52+
include/scratchcpp/iimageformatfactory.h
5253
)
5354

5455
add_library(zip SHARED
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
3+
#pragma once
4+
5+
#include <memory>
6+
7+
#include "global.h"
8+
9+
namespace libscratchcpp
10+
{
11+
12+
class IImageFormat;
13+
14+
/*! \brief The IImageFormatFactory class is an interface which is used to instantiate image formats. */
15+
class LIBSCRATCHCPP_EXPORT IImageFormatFactory
16+
{
17+
public:
18+
virtual ~IImageFormatFactory() { }
19+
20+
/*! Creates an instance of the image format. */
21+
virtual std::shared_ptr<IImageFormat> createInstance() const = 0;
22+
};
23+
24+
} // namespace libscratchcpp

0 commit comments

Comments
 (0)