libimgdoc2
Loading...
Searching...
No Matches
ClassFactory.h
1// SPDX-FileCopyrightText: 2023 Carl Zeiss Microscopy GmbH
2//
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <memory>
8#include "ICreateOptions.h"
9#include "IOpenExistingOptions.h"
10#include "IEnvironment.h"
11#include "VersionInfo.h"
12
13namespace imgdoc2
14{
15 class ICreateOptions;
16 class IDoc;
17
20 {
21 public:
26
30
33 static std::unique_ptr<imgdoc2::ICreateOptions> CreateCreateOptionsUp();
34
37 static std::shared_ptr<imgdoc2::ICreateOptions> CreateCreateOptionsSp();
38
42
45 static std::unique_ptr<imgdoc2::IOpenExistingOptions> CreateOpenExistingOptionsUp();
46
49 static std::shared_ptr<imgdoc2::IOpenExistingOptions> CreateOpenExistingOptionsSp();
50
53 static std::shared_ptr<IHostingEnvironment> CreateStandardHostingEnvironment();
54
57 static std::shared_ptr<IHostingEnvironment> CreateNullHostingEnvironment();
58
65 static std::shared_ptr<IHostingEnvironment> CreateHostingEnvironmentForFunctionPointers(
66 std::intptr_t userparam,
67 void (*pfnLog)(std::intptr_t userparam, int level, const char* szMessage),
68 bool (*pfnIsLevelActive)(std::intptr_t userparam, int level),
69 void (*pfnReportFatalErrorAndExit)(std::intptr_t userparam, const char* szMessage));
70
75 static std::shared_ptr<imgdoc2::IDoc> CreateNew(imgdoc2::ICreateOptions* create_options, std::shared_ptr<IHostingEnvironment> environment = nullptr);
76
81 static std::shared_ptr<imgdoc2::IDoc> OpenExisting(imgdoc2::IOpenExistingOptions* open_existing_options, std::shared_ptr<IHostingEnvironment> environment = nullptr);
82 };
83}
Class factory creating objects implemented in the imgdoc2-library.
Definition: ClassFactory.h:20
static std::shared_ptr< imgdoc2::IDoc > OpenExisting(imgdoc2::IOpenExistingOptions *open_existing_options, std::shared_ptr< IHostingEnvironment > environment=nullptr)
static std::unique_ptr< imgdoc2::IOpenExistingOptions > CreateOpenExistingOptionsUp()
static std::shared_ptr< imgdoc2::ICreateOptions > CreateCreateOptionsSp()
static std::shared_ptr< IHostingEnvironment > CreateStandardHostingEnvironment()
static imgdoc2::ICreateOptions * CreateCreateOptionsPtr()
static std::unique_ptr< imgdoc2::ICreateOptions > CreateCreateOptionsUp()
static std::shared_ptr< imgdoc2::IDoc > CreateNew(imgdoc2::ICreateOptions *create_options, std::shared_ptr< IHostingEnvironment > environment=nullptr)
static std::shared_ptr< IHostingEnvironment > CreateNullHostingEnvironment()
static std::shared_ptr< IHostingEnvironment > CreateHostingEnvironmentForFunctionPointers(std::intptr_t userparam, void(*pfnLog)(std::intptr_t userparam, int level, const char *szMessage), bool(*pfnIsLevelActive)(std::intptr_t userparam, int level), void(*pfnReportFatalErrorAndExit)(std::intptr_t userparam, const char *szMessage))
static imgdoc2::IOpenExistingOptions * CreateOpenExistingOptions()
static std::shared_ptr< imgdoc2::IOpenExistingOptions > CreateOpenExistingOptionsSp()
static VersionInfo GetVersionInfo()
Options for creating an imgdoc2-document.
Definition: ICreateOptions.h:16
This interface gathers all parameters for the operation of "opening an existing file".
Definition: IOpenExistingOptions.h:13
This structure gathers build-time information about the version of the library.
Definition: VersionInfo.h:14