NVIDIA DeepStream SDK API Reference
9.0 Release
9.0/service-maker/includes/common_factory.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4
*
5
* NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6
* property and proprietary rights in and to this material, related
7
* documentation and any modifications thereto. Any use, reproduction,
8
* disclosure or distribution of this material and related documentation
9
* without an express license agreement from NVIDIA CORPORATION or
10
* its affiliates is strictly prohibited.
11
*/
12
21
#ifndef NVIDIA_DEEPSTREAM_COMMON_FACTORY
22
#define NVIDIA_DEEPSTREAM_COMMON_FACTORY
23
24
#include <string>
25
#include <memory>
26
27
#include "
object.hpp
"
28
#include "
custom_factory.hpp
"
29
30
namespace
deepstream
{
31
35
class
CommonFactory {
36
public
:
37
virtual
~CommonFactory
() =
default
;
38
39
CommonFactory
(
const
CommonFactory
&) =
delete
;
40
CommonFactory
(
CommonFactory
&&) =
delete
;
41
CommonFactory
&
operator=
(
const
CommonFactory
&) =
delete
;
42
CommonFactory
&
operator=
(
CommonFactory
&&) =
delete
;
43
50
virtual
std::unique_ptr<CustomObject>
createObject
(
const
std::string& factory_key,
const
std::string& name) = 0;
51
61
virtual
bool
addCustomFactory
(CustomFactory* factory,
const
char
* key) = 0;
62
69
virtual
CustomFactory*
getCustomFactory
(
const
char
* factory_name) = 0;
70
72
static
CommonFactory
&
getInstance
();
73
74
protected
:
75
CommonFactory
() =
default
;
76
77
static
bool
_load
(
const
std::string& plugin_name);
78
};
79
80
}
81
82
#endif
object.hpp
deepstream::CommonFactory::operator=
CommonFactory & operator=(const CommonFactory &)=delete
deepstream::CommonFactory::_load
static bool _load(const std::string &plugin_name)
deepstream::CommonFactory::getInstance
static CommonFactory & getInstance()
Acquire the reference of the singleton.
deepstream::CommonFactory::CommonFactory
CommonFactory()=default
deepstream::CommonFactory::addCustomFactory
virtual bool addCustomFactory(CustomFactory *factory, const char *key)=0
Add a custom factory.
custom_factory.hpp
deepstream
Definition:
service-maker/includes/buffer.hpp:33
deepstream::CommonFactory::getCustomFactory
virtual CustomFactory * getCustomFactory(const char *factory_name)=0
Find a custom factory that supports a certan object type.
deepstream::CommonFactory::~CommonFactory
virtual ~CommonFactory()=default
deepstream::CommonFactory::createObject
virtual std::unique_ptr< CustomObject > createObject(const std::string &factory_key, const std::string &name)=0
Create a custom object from a custom factory.
Privacy Policy
|
Manage My Privacy
|
Do Not Sell or Share My Data
|
Terms of Service
|
Accessibility
|
Corporate Policies
|
Product Security
|
Contact
© 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
NVIDIA Confidential | Subject to Change | For test and development only.
Fri Mar 20 2026 14:36:58 | PR-09318-R32