SignDoc SDK (C++)  5.0.0
SignDocMatchParameters Class Reference

Parameters for SignDocSignatureData::matchSignature(), SignDocSignatureData::matchReference(), SignDocImage::matchSignature(), and SignDocImage::matchReference(). More...

#include <SignDocSDK-cpp.h>

Public Types

enum  Type { t_undefined = 0, t_boolean = 1, t_integer = 2 }
 Return values of getType(). More...
 
enum  Flags {
  f_engine_auto = 0x0001, f_engine_static = 0x0002, f_engine_dynamic = 0x0004, f_engine_dstat = 0x0008,
  f_normalize_sample_rates = 0x0100, f_mirror = 0x0200, f_keep_resolution = 0x0400
}
 Flags for integer parameter "%Flags". More...
 

Public Member Functions

 SignDocMatchParameters ()
 Constructor. More...
 
 SignDocMatchParameters (const SignDocMatchParameters &aSource)
 Copy constructor. More...
 
 ~SignDocMatchParameters ()
 Destructor. More...
 
SignDocMatchParametersoperator= (const SignDocMatchParameters &aSource)
 Assignment operator. More...
 
void swap (SignDocMatchParameters &aOther)
 Efficiently swap this object with another one. More...
 
void clear ()
 Unset all parameters. More...
 
ReturnCode setBoolean (const std::string &aName, bool aValue)
 Set a boolean parameter. More...
 
ReturnCode setInteger (const std::string &aName, int aValue)
 Set an integer parameter. More...
 
const int * getBoolean (const std::string &aName) const
 Get the value of a boolean parameter. More...
 
const int * getInteger (const std::string &aName) const
 Get the value of an integer parameter. More...
 
const char * getErrorMessage (Encoding aEncoding) const
 Get an error message for the last function call. More...
 
const wchar_t * getErrorMessageW () const
 Get an error message for the last function call. More...
 
 SignDocMatchParameters (SIGNDOC_MatchParameters *aP)
 Internal function. More...
 
SIGNDOC_MatchParameters * getImpl ()
 Internal function. More...
 
const SIGNDOC_MatchParameters * getImpl () const
 Internal function. More...
 
void setImpl (SIGNDOC_MatchParameters *aP)
 Internal function. More...
 

Static Public Member Functions

static Type getType (const std::string &aName)
 Get the type of a parameter. More...
 

Detailed Description

Member Enumeration Documentation

enum Flags

Flags for integer parameter "%Flags".

Enumerator
f_engine_auto 

Use all matching engines suitable for the data at hand.

The static matching engine will always be used, the DStat matching engine and the dynamic matching engine will be used when matching a signature against a reference with at least 3 signatures.

This flag is equivalent to boolean parameter "EngineAuto".

f_engine_static 

Enable static matching (SIVAL engine).

This flag is equivalent to boolean parameter "EngineStatic".

f_engine_dynamic 

Enable dynamic matching (ADSV engine).

This flag is equivalent to boolean parameter "EngineDynamic".

f_engine_dstat 

Enable statistic matching (DStat engine).

This flag is equivalent to boolean parameter "EngineDStat".

f_normalize_sample_rates 

Normalize the sample rates of signatures and references for dynamic matching.

This flag is ignored unless the dynamic matching engine is used. This flag is equivalent to boolean parameter "NormalizeSampleRates".

f_mirror 

Mirror rendered signature and reference images for static matching.

Set this flag when matching signatures that have been written in RTL scripts.

This flag is ignored unless the static matching engine is used. This flag is equivalent to boolean parameter "Mirror".

f_keep_resolution 

Flag for integer parameter "Flags": do not scale signatures.

If this flag is set, signatures, references, and signature images will be matched without adjusting their resolutions, even if those resolutions are different.

If this flag is not set, a common resolution will be computed as the smallest resolution encountered in the involved signatures, references, and signature images, and integer parameter "MaxResolution" (that parameter will be ignored if its value is 0). Then, the sample coordinates in signatures and references will be scaled to the computed resolutions and signature images will be resized to that resolution. (The SignDocSignatureData and SignDocImage objects won't be modified.)

See also integer parameter "MaxResolution". This flag is equivalent to boolean parameter "KeepResolution".

enum Type

Return values of getType().

Enumerator
t_undefined 

The specified parameter is not defined.

t_boolean 

Boolean.

See also
getBoolean(), setBoolean()
t_integer 

Integer.

See also
getInteger(), setInteger()

Constructor & Destructor Documentation

Constructor.

No parameters will be set except for integer parameter "%Flags" (which will be zero) and the boolean parameters derived from that parameter.

SignDocMatchParameters ( const SignDocMatchParameters aSource)
inline

Copy constructor.

Parameters
[in]aSourceThe object to be copied.

Destructor.

SignDocMatchParameters ( SIGNDOC_MatchParameters *  aP)
inline

Internal function.

Member Function Documentation

void clear ( )
inline

Unset all parameters.

After calling this function no parameters will be set except for integer parameter "%Flags" (which will be zero) and the boolean parameters derived from that parameter.

const int * getBoolean ( const std::string &  aName) const
inline

Get the value of a boolean parameter.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter or nullptr if the parameter is not set or is not a boolean parameter.
See also
setBoolean()
const char * getErrorMessage ( Encoding  aEncoding) const
inline

Get an error message for the last function call.

Parameters
[in]aEncodingThe encoding to be used for the error message.
Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until this object is destroyed or a member function of this object is called.
See also
getErrorMessageW()
const wchar_t * getErrorMessageW ( ) const
inline

Get an error message for the last function call.

Returns
A pointer to a string describing the reason for the failure of the last function call. The string is empty if the last call succeeded. The pointer is valid until this object is destroyed or a member function of this object is called.
See also
getErrorMessage()
SIGNDOC_MatchParameters* getImpl ( )
inline

Internal function.

const SIGNDOC_MatchParameters* getImpl ( ) const
inline

Internal function.

const int * getInteger ( const std::string &  aName) const
inline

Get the value of an integer parameter.

This function does not set an error message.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
A pointer to the value of the specified parameter or nullptr if the parameter is not set or is not an integer parameter.
See also
setInteger()
SignDocMatchParameters::Type getType ( const std::string &  aName)
inlinestatic

Get the type of a parameter.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
Returns
The type of the parameter, see enum Type.
SignDocMatchParameters & operator= ( const SignDocMatchParameters aSource)
inline

Assignment operator.

Parameters
[in]aSourceThe source object.
Returns
This object.
ReturnCode setBoolean ( const std::string &  aName,
bool  aValue 
)
inline

Set a boolean parameter.

The following boolean parameters are available:

These boolean parameters allow controlling individual bits in integer parameter "%Flags". Initially, all boolean parameters have value false.

Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
ReturnCode::rc_ok iff successful.
See also
getBoolean(), setInteger()
void setImpl ( SIGNDOC_MatchParameters *  aP)
inline

Internal function.

ReturnCode setInteger ( const std::string &  aName,
int  aValue 
)
inline

Set an integer parameter.

The following integer parameters are available:

  • Flags: set of flags controlling matching behavior:
  • MaxResolution: maximum resolution for f_keep_resolution, set to 0 for no maximum resolution. The default value is 300.
  • MinDStatQuality (0 through 100): minimum acceptable match value from the DStat matching engine. The default value is 80.
  • MinDynamicQuality (0 through 100): minimum acceptable match value from the dynamic matching engine. The default value is 80.
  • MinStaticQuality (0 through 100): minimum acceptable match value from the static matching engine. The default value is 80.
Parameters
[in]aNameThe name of the parameter (case-sensitive).
[in]aValueThe value of the parameter.
Returns
ReturnCode::rc_ok iff successful.
See also
getInteger(), setBoolean()
void swap ( SignDocMatchParameters aOther)
inline

Efficiently swap this object with another one.

Parameters
[in]aOtherThe other object.

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