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

#include <HandwritingProfileBuilder.h>

Public Member Functions

virtual ~HandwritingProfileBuilder ()=default
 
virtual int getPredefinedProfileCount ()=0
 
virtual std::shared_ptr< HandwritingProfile > getPredefinedProfileAt (int index)=0
 
virtual std::shared_ptr< HandwritingProfile > createFromSelection (const std::shared_ptr< ContentSelection > &selection)=0
 
virtual std::shared_ptr< HandwritingProfile > createFromFile (const String &fileName)=0
 
virtual std::shared_ptr< HandwritingProfile > load (const String &fileName)=0
 
virtual void store (std::shared_ptr< HandwritingProfile > profile, const String &fileName)=0
 

Detailed Description

A builder for handwriting profiles.

See also
HandwritingProfile
Since
4.1

Constructor & Destructor Documentation

◆ ~HandwritingProfileBuilder()

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

Member Function Documentation

◆ getPredefinedProfileCount()

virtual int myscript::iink::HandwritingProfileBuilder::getPredefinedProfileCount ( )
pure virtual

Retrieves the number of predefined writing profiles.

Returns
the number of predefined profiles.
Exceptions
std::runtime_errorwhen the number of predefined writing profiles cannot be retrieved.
Since
4.2

◆ getPredefinedProfileAt()

virtual std::shared_ptr< HandwritingProfile > myscript::iink::HandwritingProfileBuilder::getPredefinedProfileAt ( int  index)
pure virtual

Returns the predefined writing profile at the given index.

Parameters
indexthe index of the predefined writing profile.
Returns
the predefined writing profile.
Exceptions
std::invalid_argumentwhen index is not a valid index of predefined writing profile.
Since
4.2

◆ createFromSelection()

virtual std::shared_ptr< HandwritingProfile > myscript::iink::HandwritingProfileBuilder::createFromSelection ( const std::shared_ptr< ContentSelection > &  selection)
pure virtual

Creates a writing profile from a ContentSelection.

Parameters
selectionthe ContentSelection to be used for writing profile generation.
Returns
the newly created writing profile.
Exceptions
std::invalid_argumentwhen selection is nullptr or does not contain enough recognized text.

◆ createFromFile()

virtual std::shared_ptr< HandwritingProfile > myscript::iink::HandwritingProfileBuilder::createFromFile ( const String &  fileName)
pure virtual

Creates a writing profile from a ContentPackage file name.

Parameters
fileNamethe ContentPackage file name.
Returns
the newly created writing profile.
Exceptions
std::invalid_argumentwhen file cannot be opened.
std::invalid_argumentwhen file does not contain enough recognized text.

◆ load()

virtual std::shared_ptr< HandwritingProfile > myscript::iink::HandwritingProfileBuilder::load ( const String &  fileName)
pure virtual

Loads a writing profile from file.

Parameters
fileNamethe profile file name.
Returns
the newly loaded writing profile.
Exceptions
std::invalid_argumentwhen fileName is not a valid file name.
std::invalid_argumentwhen fileName does not exist.
std::runtime_errorwhen fileName is not a valid profile.

◆ store()

virtual void myscript::iink::HandwritingProfileBuilder::store ( std::shared_ptr< HandwritingProfile >  profile,
const String &  fileName 
)
pure virtual

Stores a writing profile to file.

Parameters
profilethe writing profile.
fileNamethe profile file name.
Exceptions
std::invalid_argumentwhen profile is nullptr.
std::invalid_argumentwhen profile is a predefined HandwritingProfile.
std::runtime_errorwhen profile cannot be stored.

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