libimgdoc2
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
imgdoc2::ClassFactory Class Reference

Class factory creating objects implemented in the imgdoc2-library. More...

#include <ClassFactory.h>

Static Public Member Functions

static VersionInfo GetVersionInfo ()
 
static imgdoc2::ICreateOptionsCreateCreateOptionsPtr ()
 
static std::unique_ptr< imgdoc2::ICreateOptionsCreateCreateOptionsUp ()
 
static std::shared_ptr< imgdoc2::ICreateOptionsCreateCreateOptionsSp ()
 
static imgdoc2::IOpenExistingOptionsCreateOpenExistingOptions ()
 
static std::unique_ptr< imgdoc2::IOpenExistingOptionsCreateOpenExistingOptionsUp ()
 
static std::shared_ptr< imgdoc2::IOpenExistingOptionsCreateOpenExistingOptionsSp ()
 
static std::shared_ptr< IHostingEnvironmentCreateStandardHostingEnvironment ()
 
static std::shared_ptr< IHostingEnvironmentCreateNullHostingEnvironment ()
 
static std::shared_ptr< IHostingEnvironmentCreateHostingEnvironmentForFunctionPointers (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 std::shared_ptr< imgdoc2::IDocCreateNew (imgdoc2::ICreateOptions *create_options, std::shared_ptr< IHostingEnvironment > environment=nullptr)
 
static std::shared_ptr< imgdoc2::IDocOpenExisting (imgdoc2::IOpenExistingOptions *open_existing_options, std::shared_ptr< IHostingEnvironment > environment=nullptr)
 

Detailed Description

Class factory creating objects implemented in the imgdoc2-library.

Member Function Documentation

◆ CreateCreateOptionsPtr()

static imgdoc2::ICreateOptions * imgdoc2::ClassFactory::CreateCreateOptionsPtr ( )
static

Creates an options-object for creating a new imgdoc2-document.

Returns
Pointer to a newly create options-object.

◆ CreateCreateOptionsSp()

static std::shared_ptr< imgdoc2::ICreateOptions > imgdoc2::ClassFactory::CreateCreateOptionsSp ( )
static

Creates an options-object for creating a new imgdoc2-document.

Returns
Shared-pointer of a newly created options-object.

◆ CreateCreateOptionsUp()

static std::unique_ptr< imgdoc2::ICreateOptions > imgdoc2::ClassFactory::CreateCreateOptionsUp ( )
static

Creates an options-object for creating a new imgdoc2-document.

Returns
Unique-pointer of a newly create options-object.

◆ CreateHostingEnvironmentForFunctionPointers()

static std::shared_ptr< IHostingEnvironment > imgdoc2::ClassFactory::CreateHostingEnvironmentForFunctionPointers ( std::intptr_t  userparam,
void(*)(std::intptr_t userparam, int level, const char *szMessage)  pfnLog,
bool(*)(std::intptr_t userparam, int level)  pfnIsLevelActive,
void(*)(std::intptr_t userparam, const char *szMessage)  pfnReportFatalErrorAndExit 
)
static

Creates hosting environment which routes the methods to the provided plan C-function pointers.

Parameters
userparamThe user-parameter (which is passed to the functions).
[in]pfnLogIf non-null, function for the Log method.
[in]pfnIsLevelActiveIf non-null, function for the IsLogLevelActive method.
[in]pfnReportFatalErrorAndExitIf non-null, function for the ReportFatalErrorAndExit method.
Returns
The newly created hosting environment object (using the provided function pointers).

◆ CreateNew()

static std::shared_ptr< imgdoc2::IDoc > imgdoc2::ClassFactory::CreateNew ( imgdoc2::ICreateOptions create_options,
std::shared_ptr< IHostingEnvironment environment = nullptr 
)
static

Creates a new imgdoc2-document. A new database is constructed.

Parameters
[in]create_optionsThe options controlling the operation.
environment(Optional) The hosting environment object.
Returns
The newly created imgdoc2-document.

◆ CreateNullHostingEnvironment()

static std::shared_ptr< IHostingEnvironment > imgdoc2::ClassFactory::CreateNullHostingEnvironment ( )
static

Creates a "null" hosting environment - which does nothing for logging.

Returns
The newly created null hosting environment object.

◆ CreateOpenExistingOptions()

static imgdoc2::IOpenExistingOptions * imgdoc2::ClassFactory::CreateOpenExistingOptions ( )
static

Creates an instance of the options-object for opening an existing file.

Returns
Null if it fails, else the newly created "open existing options" object.

◆ CreateOpenExistingOptionsSp()

static std::shared_ptr< imgdoc2::IOpenExistingOptions > imgdoc2::ClassFactory::CreateOpenExistingOptionsSp ( )
static

Creates an instance of the options-object for opening an existing file.

Returns
Shared-pointer of a newly create options-object.

◆ CreateOpenExistingOptionsUp()

static std::unique_ptr< imgdoc2::IOpenExistingOptions > imgdoc2::ClassFactory::CreateOpenExistingOptionsUp ( )
static

Creates an instance of the options-object for opening an existing file.

Returns
Unique-pointer of a newly create options-object.

◆ CreateStandardHostingEnvironment()

static std::shared_ptr< IHostingEnvironment > imgdoc2::ClassFactory::CreateStandardHostingEnvironment ( )
static

Creates a "standard" hosting environment.

Returns
The newly created "standard" hosting environment object.

◆ GetVersionInfo()

static VersionInfo imgdoc2::ClassFactory::GetVersionInfo ( )
static

Gets build-time information about the libimgdoc2 library.

Returns
The version information.

◆ OpenExisting()

static std::shared_ptr< imgdoc2::IDoc > imgdoc2::ClassFactory::OpenExisting ( imgdoc2::IOpenExistingOptions open_existing_options,
std::shared_ptr< IHostingEnvironment environment = nullptr 
)
static

Creates a new imgdoc2-document for an existing file.

Parameters
[in]open_existing_optionsThe options controlling the operation.
environment(Optional) The hosting environment object.
Returns
The newly created imgdoc2-document.

The documentation for this class was generated from the following file: