MyScript Interactive Ink SDK  4.1.2
Public Member Functions | List of all members
myscript::iink::HandwritingGenerator Class Referenceabstract

#include <HandwritingGenerator.h>

Public Member Functions

virtual ~HandwritingGenerator ()=default
 
virtual void setListener (std::shared_ptr< IHandwritingGeneratorListener > listener)=0
 
virtual std::shared_ptr< Engine > getEngine ()=0
 
virtual std::shared_ptr< HandwritingProfileBuilder > createHandwritingProfileBuilder ()=0
 
virtual std::vector< String > getSupportedContentTypes () const =0
 
virtual void start (const String &type, std::shared_ptr< HandwritingProfile > profile, std::shared_ptr< ParameterSet > overrideConfiguration=nullptr)=0
 
virtual std::vector< MimeType > getSupportedMimeTypes (const String &type) const =0
 
virtual void add (const String &label, MimeType type)=0
 
virtual void end ()=0
 
virtual void cancel ()=0
 
virtual bool isIdle ()=0
 
virtual void waitForIdle ()=0
 
virtual std::shared_ptr< HandwritingResult > getResult () const =0
 

Detailed Description

Represents a handwriting generator that provides a way to generate handwritten content from source parameters (label, writing profile and formatting).

Since
4.1

Constructor & Destructor Documentation

◆ ~HandwritingGenerator()

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

Member Function Documentation

◆ setListener()

virtual void myscript::iink::HandwritingGenerator::setListener ( std::shared_ptr< IHandwritingGeneratorListener >  listener)
pure virtual

Sets the specified listener to this handwriting generator.

Parameters
listenerthe listener to be added, or nullptr to unset the previous one.

◆ getEngine()

virtual std::shared_ptr<Engine> myscript::iink::HandwritingGenerator::getEngine ( )
pure virtual

Returns the Engine to which this handwriting generator is attached.

Returns
the engine.

◆ createHandwritingProfileBuilder()

virtual std::shared_ptr<HandwritingProfileBuilder> myscript::iink::HandwritingGenerator::createHandwritingProfileBuilder ( )
pure virtual

Create a new handwriting profile builder.

Returns
the newly created handwriting profile builder.
Exceptions
std::runtime_errorwhen the handwriting profile builder cannot be created.

◆ getSupportedContentTypes()

virtual std::vector<String> myscript::iink::HandwritingGenerator::getSupportedContentTypes ( ) const
pure virtual

Returns the types of content that can be generated.

Returns
an array of the supported content types.

◆ start()

virtual void myscript::iink::HandwritingGenerator::start ( const String &  type,
std::shared_ptr< HandwritingProfile >  profile,
std::shared_ptr< ParameterSet >  overrideConfiguration = nullptr 
)
pure virtual

Starts a handwriting generation using the specified writing profile.

Parameters
typethe type of the generated handwritten content.
profilethe handwriting profile used to generate the handwritten content.
overrideConfigurationthe extra configuration used for this handwriting generation.
Exceptions
std::invalid_argumentwhen type is not a supported content type.
std::runtime_errorwhen this handwriting generator is not idle (see isIdle()).
std::runtime_errorwhen the handwriting generator resource is not found in the search path of the configuration manager ("configuration-manager.search-path").
std::invalid_argumentwhen overrideConfiguration is invalid.

◆ getSupportedMimeTypes()

virtual std::vector<MimeType> myscript::iink::HandwritingGenerator::getSupportedMimeTypes ( const String &  type) const
pure virtual

Returns the input formats supported by the handwriting generation for the given content type.

Parameters
typethe type of the generated handwritten content.
Returns
an array of the supported mime types.
Exceptions
std::invalid_argumentwhen type is not a supported content type.

◆ add()

virtual void myscript::iink::HandwritingGenerator::add ( const String &  label,
MimeType  type 
)
pure virtual

Adds text in the current handwriting generation.

Parameters
labelthe input label that the generated handwritten content must match.
typeThe mime type describing the format of the label.
Exceptions
std::invalid_argumentwhen type is not supported by this handwriting generator.
std::runtime_errorwhen a handwriting generation has not been started (see start()).

◆ end()

virtual void myscript::iink::HandwritingGenerator::end ( )
pure virtual

Tells the handwriting generation to not wait for more text to add.

Exceptions
std::runtime_errorwhen a handwriting generation has not been started (see start() and add()).

◆ cancel()

virtual void myscript::iink::HandwritingGenerator::cancel ( )
pure virtual

Cancels the ongoing handwriting generation if any.

◆ isIdle()

virtual bool myscript::iink::HandwritingGenerator::isIdle ( )
pure virtual

Checks whether a generation is ongoing.

Returns
true if no operation is ongoing, false otherwise.

◆ waitForIdle()

virtual void myscript::iink::HandwritingGenerator::waitForIdle ( )
pure virtual

Waits until ongoing generation is over.

◆ getResult()

virtual std::shared_ptr<HandwritingResult> myscript::iink::HandwritingGenerator::getResult ( ) const
pure virtual

Returns the cumulative result of the latest handwriting generation.

Returns
the latest generated handwriting result.
Exceptions
std::runtime_errorwhen this handwriting generator is not idle (see isIdle()).

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