MyScript Interactive Ink SDK  4.0.0
Public Member Functions | Static Public Member Functions | List of all members
myscript::iink::Engine Class Referenceabstract

#include <Engine.h>

Public Member Functions

virtual ~Engine ()=default
 
virtual String getVersion ()=0
 
virtual std::shared_ptr< Configuration > getConfiguration () noexcept=0
 
virtual std::shared_ptr< Renderer > createRenderer (float dpiX, float dpiY, std::shared_ptr< IRenderTarget > target)=0
 
virtual std::shared_ptr< ToolController > createToolController () noexcept=0
 
virtual std::shared_ptr< Editor > createEditor (std::shared_ptr< Renderer > renderer, std::shared_ptr< ToolController > toolController=nullptr)=0
 
virtual std::shared_ptr< OffscreenEditor > createOffscreenEditor (float scaleX, float scaleY)=0
 
virtual std::shared_ptr< ItemIdHelper > createItemIdHelper (std::shared_ptr< OffscreenEditor > offscreenEditor)=0
 
virtual std::shared_ptr< Recognizer > createRecognizer (float scaleX, float scaleY, const String &type)=0
 
std::shared_ptr< ContentPackage > createPackage (const String &fileName)
 
virtual std::shared_ptr< ContentPackage > openPackage (const String &fileName, PackageOpenOption openOption=(PackageOpenOption) 0)=0
 
virtual void deletePackage (const String &fileName)=0
 
virtual std::vector< String > getSupportedPartTypes () noexcept=0
 
virtual std::shared_ptr< ParameterSet > createParameterSet ()=0
 
virtual std::shared_ptr< RecognitionAssetsBuilder > createRecognitionAssetsBuilder ()=0
 
virtual std::vector< String > getSupportedRecognizerTypes ()=0
 

Static Public Member Functions

static std::shared_ptr< Engine > create (const char *certificateBytes, size_t certificateLength)
 

Detailed Description

Represents the iink runtime environment.

Constructor & Destructor Documentation

◆ ~Engine()

virtual myscript::iink::Engine::~Engine ( )
virtualdefault

Member Function Documentation

◆ create()

static std::shared_ptr<Engine> myscript::iink::Engine::create ( const char *  certificateBytes,
size_t  certificateLength 
)
static

Creates a new engine.

Parameters
certificateBytesthe certificate bytes that identifies you as a valid MyScript technology integrator.
certificateLengthlength of the certificate.
Returns
the newly created engine.
Exceptions
std::invalid_argumentwhen the given application certificate is invalid.
std::runtime_errorwhen an internal error occurred.

◆ getVersion()

virtual String myscript::iink::Engine::getVersion ( )
pure virtual

Returns the version of iink SDK.

Returns
the iink SDK version.
Since
2.3

◆ getConfiguration()

virtual std::shared_ptr<Configuration> myscript::iink::Engine::getConfiguration ( )
pure virtualnoexcept

Returns the configuration associated with this engine.

Returns
the engine configuration.

◆ createRenderer()

virtual std::shared_ptr<Renderer> myscript::iink::Engine::createRenderer ( float  dpiX,
float  dpiY,
std::shared_ptr< IRenderTarget >  target 
)
pure virtual

Creates a new renderer.

Parameters
dpiXthe physical horizontal resolution of the display in dots per inch.
dpiYthe physical vertical resolution of the display in dots per inch.
targetthe render target.
Returns
the newly created renderer.
Exceptions
std::invalid_argumentwhen dpiX is not a number, is zero or is negative.
std::invalid_argumentwhen dpiY is not a number, is zero or is negative.

◆ createToolController()

virtual std::shared_ptr<ToolController> myscript::iink::Engine::createToolController ( )
pure virtualnoexcept

Creates a new tool controller.

Returns
the newly created tool controller.
Since
2.0

◆ createEditor()

virtual std::shared_ptr<Editor> myscript::iink::Engine::createEditor ( std::shared_ptr< Renderer >  renderer,
std::shared_ptr< ToolController >  toolController = nullptr 
)
pure virtual

Creates a new editor.

Parameters
rendererthe renderer to be used to display editor's content.
toolControllerthe tool controller to be used to manage tools, or nullptr for default one.
Returns
the newly created editor.
Exceptions
std::invalid_argumentwhen renderer is nullptr.

◆ createOffscreenEditor()

virtual std::shared_ptr<OffscreenEditor> myscript::iink::Engine::createOffscreenEditor ( float  scaleX,
float  scaleY 
)
pure virtual

Creates a new offscreen editor.

Parameters
scaleXthe scale to convert input horizontal coordinates unit into mm.
scaleYthe scale to convert input vertical coordinates unit into mm.
Returns
the newly created offscreen editor.
Exceptions
std::invalid_argumentwhen scaleX is not a number, is zero or is negative.
std::invalid_argumentwhen scaleY is not a number, is zero or is negative.
Since
2.1

◆ createItemIdHelper()

virtual std::shared_ptr<ItemIdHelper> myscript::iink::Engine::createItemIdHelper ( std::shared_ptr< OffscreenEditor >  offscreenEditor)
pure virtual

Creates a new item id helper associated with an offscreen editor.

Parameters
offscreenEditorthe associated offscreen editor.
Returns
the newly created item id helper.
Exceptions
std::invalid_argumentwhen offscreenEditor is nullptr.
Since
2.1

◆ createRecognizer()

virtual std::shared_ptr<Recognizer> myscript::iink::Engine::createRecognizer ( float  scaleX,
float  scaleY,
const String &  type 
)
pure virtual

Creates a new recognizer.

Parameters
scaleXthe scale to convert input horizontal coordinates unit into mm.
scaleYthe scale to convert input vertical coordinates unit into mm.
typethe type of the new recognizer.
Returns
the newly created recognizer.
Exceptions
std::invalid_argumentwhen scaleX is not a number, is zero or is negative.
std::invalid_argumentwhen scaleY is not a number, is zero or is negative.
std::invalid_argumentwhen type is not a supported recognizer type.
std::runtimeerror when type is "Text" and the search path of the configuration manager is empty.
std::runtimeerror when type is "Text", guides are enabled and the language does not allow guides.
std::runtimeerror when type is "Text", guides are enabled and the line gap is zero or is negative.
Since
2.1

◆ createPackage()

std::shared_ptr<ContentPackage> myscript::iink::Engine::createPackage ( const String &  fileName)
inline

Creates a new package.

Parameters
fileNamethe package file.
Returns
the package.
Exceptions
std::runtime_errorwhen a package with associated fileName already exists.
std::runtime_errorwhen an I/O operation fails.
std::invalid_argumentwhen a package associated with the same fileName is already opened, it can be accessed via a call to openPackage().

◆ openPackage()

virtual std::shared_ptr<ContentPackage> myscript::iink::Engine::openPackage ( const String &  fileName,
PackageOpenOption  openOption = (PackageOpenOption) 0 
)
pure virtual

Opens the specified package.

Parameters
fileNamethe package file.
openOptionthe open option used to open the package file.
Returns
the package.
Exceptions
std::runtime_errorif openOption is EXISTING, when a package with associated fileName does not exist.
std::runtime_errorif openOption is CREATE_NEW, when a package with associated fileName already exists.
std::invalid_argumentif openOption is CREATE_NEW, when a package associated with the same fileName is already opened.
std::runtime_errorwhen an I/O operation fails.

◆ deletePackage()

virtual void myscript::iink::Engine::deletePackage ( const String &  fileName)
pure virtual

Deletes the specified package.

Parameters
fileNamethe package file.
Exceptions
std::runtime_errorwhen an I/O operation fails.
std::invalid_argumentwhen a package associated with the same fileName is already opened.
Since
1.2

◆ getSupportedPartTypes()

virtual std::vector<String> myscript::iink::Engine::getSupportedPartTypes ( )
pure virtualnoexcept

Lists the part types supported by this engine.

Returns
the list of supported part types.

◆ createParameterSet()

virtual std::shared_ptr<ParameterSet> myscript::iink::Engine::createParameterSet ( )
pure virtual

Create an empty parameter set

Returns
the parameter set.
Since
1.2

◆ createRecognitionAssetsBuilder()

virtual std::shared_ptr<RecognitionAssetsBuilder> myscript::iink::Engine::createRecognitionAssetsBuilder ( )
pure virtual

Creates a new RecognitionAssetsBuilder.

Returns
the newly created RecognitionAssetsBuilder.
Since
1.2.4

◆ getSupportedRecognizerTypes()

virtual std::vector<String> myscript::iink::Engine::getSupportedRecognizerTypes ( )
pure virtual

Lists the recognizer types supported by this engine.

Returns
the list of supported recognizer types.
Since
2.1

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