PPluginInstance.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2018 Digital Barriers plc. All rights reserved.
3  * Contact: http://www.digitalbarriers.com/
4  *
5  * This file is part of the Papillon SDK.
6  *
7  * You can't use, modify or distribute any part of this file without
8  * the explicit written agreements of Digital Barriers.
9  */
10 
15 #pragma once
16 #include <PObject.h>
17 #include <PString.h>
18 
19 PAPILLON_BEGIN_NAMESPACE
20 
21 class PGuid;
22 class PPlugin;
23 class PProperties;
24 
27 
32 class PAPILLON_API_CORE PPluginInstance : public PObject
33 {
34 public:
39 
43  PResult Create(const PPlugin& plugin, const PProperties& parameters, const PString& parametersPrefix);
44 
48  PPluginInstance(const PPluginInstance& other);
49 
53  virtual ~PPluginInstance();
54 
59 
63  void* GetInstance() const;
64 
68  PPlugin GetPlugin() const;
69 
75  PGuid GetPluginId() const;
76 
80  PString GetPluginName() const;
81 
86  PGuid GetInstanceId() const;
87 
91  PString GetInstanceName() const;
92 
97  PResult Get(const PString& property, PObject& value) const;
98 
103  PResult Get(const PString& property, papillon::int32& value) const;
104 
109  PResult Get(const PString& property, papillon::int64& value) const;
110 
115  PResult Get(const PString& property, float& value) const;
116 
121  PResult Get(const PString& property, double& value) const;
122 
127  PResult Get(const PString& property, bool& value) const;
128 
133  PResult Set(const PString& property, const PObject& value);
134 
139  PResult Set(const PString& property, papillon::int32 value);
140 
145  PResult Set(const PString& property, papillon::int64 value);
146 
151  PResult Set(const PString& property, float value);
152 
157  PResult Set(const PString& property, double value);
158 
163  PResult Set(const PString& property, bool value);
164 
169  PResult GetProperties(PProperties& properties) const;
170 
176  PResult UpdateProperties(const PProperties& properties);
177 };
178 
180 
181 PAPILLON_END_NAMESPACE
The PString class provides an Unicode character strings.
Definition: PString.h:37
The PResult class represents the result returned by most of Papillon functions; this class is used to...
Definition: PResult.h:159
The PProperties class represents a container of properties; each property has a name (PString) and a ...
Definition: PProperties.h:38
The PObject class is the root class of all Papillon classes; all PObject behaves like shared referenc...
Definition: PObject.h:27
The PPlugin class represents a Papillon plugin (input video source, detector, describer, ...); thread-safe.
Definition: PPlugin.h:45
Class PString: an unicode character strings (use copy-on-write idiom).
The PPluginInstance class is the super class for PAnalytics, PDetector, PDescriber which handle the d...
The PGuid class represents a Globally Unique Identifier (GUID); PGuid instances are immutable (thread...
Definition: PGuid.h:28
Class PObject: the root class of all Papillon classes.
PObject & operator=(const PObject &obj)
Performs a shared copy of other to this object.
Definition: PObject.h:45