PPluginInstance Class Reference

Detailed Description

The PPluginInstance class is the super class for PAnalytics, PDetector, PDescriber which handle the data structure dynamically created by a Papillon plugin.

Definition at line 32 of file PPluginInstance.h.

#include <PPluginInstance.h>

Constructor & Destructor Documentation

◆ PPluginInstance() [1/2]

PPluginInstance::PPluginInstance ( )

Construct an empty plugin instance.

◆ PPluginInstance() [2/2]

PPluginInstance::PPluginInstance ( const PPluginInstance other)

Constructs a shared copy of other.

◆ ~PPluginInstance()

virtual PPluginInstance::~PPluginInstance ( )
virtual

Destroys this object.

Member Function Documentation

◆ Create()

PResult PPluginInstance::Create ( const PPlugin plugin,
const PProperties parameters,
const PString parametersPrefix 
)

Create an instance from the specified plugin with the specified parameters.

◆ Get() [1/6]

PResult PPluginInstance::Get ( const PString property,
PObject value 
) const

Gets the specified parameter.

Returns PResult::C_OK if success, another value otherwise (e.g.property does not exist, bad type, etc.)

◆ Get() [2/6]

PResult PPluginInstance::Get ( const PString property,
papillon::int32 &  value 
) const

An helper to easily get an int32 parameter (auto-unboxing with PInt32).

Returns PResult::C_OK if success, another value otherwise (e.g.property does not exist, bad type, etc.)

◆ Get() [3/6]

PResult PPluginInstance::Get ( const PString property,
papillon::int64 &  value 
) const

An helper to easily get an int64 parameter (auto-unboxing with PInt64).

Returns PResult::C_OK if success, another value otherwise (e.g.property does not exist, bad type, etc.)

◆ Get() [4/6]

PResult PPluginInstance::Get ( const PString property,
float &  value 
) const

An helper to easily get a float parameter (auto-unboxing with PFloat).

Returns PResult::C_OK if success, another value otherwise (e.g.property does not exist, bad type, etc.)

◆ Get() [5/6]

PResult PPluginInstance::Get ( const PString property,
double &  value 
) const

An helper to easily get a double parameter (auto-unboxing with PDouble).

Returns PResult::C_OK if success, another value otherwise (e.g.property does not exist, bad type, etc.)

◆ Get() [6/6]

PResult PPluginInstance::Get ( const PString property,
bool &  value 
) const

An helper to easily get a bool parameter (auto-unboxing with PBool).

Returns PResult::C_OK if success, another value otherwise (e.g.property does not exist, bad type, etc.)

◆ GetInstance()

void* PPluginInstance::GetInstance ( ) const

UNSAFE: returns the underlying instance.

◆ GetInstanceId()

PGuid PPluginInstance::GetInstanceId ( ) const

Returns the instance id.

Each instance has a unique id, i.e. you will get a different id each time you create an object from a plugin.

◆ GetInstanceName()

PString PPluginInstance::GetInstanceName ( ) const

Returns the instance name.

◆ GetPlugin()

PPlugin PPluginInstance::GetPlugin ( ) const

Returns the underlying plugin.

◆ GetPluginId()

PGuid PPluginInstance::GetPluginId ( ) const

Returns the id of this algorithm.

For example, if you create two instances of a face detector (PDetector), this method will return the same id for the two detectors (because they come from the same plugin).

◆ GetPluginName()

PString PPluginInstance::GetPluginName ( ) const

Returns the name of this algorithm.

◆ GetProperties()

PResult PPluginInstance::GetProperties ( PProperties properties) const

Gets all parameters associated with this plugin.

Returns PResult::C_OK if success, another value otherwise (getProperties failed for any reason).

◆ operator=()

PPluginInstance& PPluginInstance::operator= ( const PPluginInstance other)

Performs a shared copy of other to this object.

◆ Set() [1/6]

PResult PPluginInstance::Set ( const PString property,
const PObject value 
)

Sets the specified parameter.

Returns PResult::C_OK if success, another value otherwise (set failed for any reason).

◆ Set() [2/6]

PResult PPluginInstance::Set ( const PString property,
papillon::int32  value 
)

An helper to set the specified int32 parameter (auto-boxing).

Same as Set(property, PInt32(value)). Returns PResult::C_OK if success, another value otherwise (set failed for any reason).

◆ Set() [3/6]

PResult PPluginInstance::Set ( const PString property,
papillon::int64  value 
)

An helper to set the specified int64 parameter (auto-boxing).

Same as Set(property, PInt64(value)). Returns PResult::C_OK if success, another value otherwise (set failed for any reason).

◆ Set() [4/6]

PResult PPluginInstance::Set ( const PString property,
float  value 
)

An helper to set the specified float parameter (auto-boxing).

Same as Set(property, PFloat(value)). Returns PResult::C_OK if success, another value otherwise (set failed for any reason).

◆ Set() [5/6]

PResult PPluginInstance::Set ( const PString property,
double  value 
)

An helper to set the specified double parameter (auto-boxing).

Same as Set(property, PDouble(value)). Returns PResult::C_OK if success, another value otherwise (set failed for any reason).

◆ Set() [6/6]

PResult PPluginInstance::Set ( const PString property,
bool  value 
)

An helper to set the specified bool parameter (auto-boxing).

Same as Set(property, PBool(value)). Returns PResult::C_OK if success, another value otherwise (set failed for any reason).

◆ UpdateProperties()

PResult PPluginInstance::UpdateProperties ( const PProperties properties)

Updates parameters associated with this plugin.

Only properties passed in argument are modified, other plugin properties are left unchanged Returns PResult::C_OK if success, another value otherwise (updateProperties failed for any reason).