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

#include <HandwritingProfileBuilder.h>

Public Member Functions

virtual ~HandwritingProfileBuilder ()=default
 
virtual std::shared_ptr< HandwritingProfile > createFromId (PredefinedHandwritingProfileId id)=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

◆ createFromId()

virtual std::shared_ptr<HandwritingProfile> myscript::iink::HandwritingProfileBuilder::createFromId ( PredefinedHandwritingProfileId  id)
pure virtual

Creates a writing profile from a predefined list of ids.

Parameters
idthe id of the writing profile.
Returns
the newly created writing profile.
Exceptions
std::invalid_argumentwhen id is not in the expected range.

◆ 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: