NVIDIA DeepStream SDK API Reference

9.1 Release
service-maker/includes/custom_factory.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
26 #ifndef NVIDIA_DEEPSTREAM_CUSTOM_FACTORY
27 #define NVIDIA_DEEPSTREAM_CUSTOM_FACTORY
28 
29 #include "custom_object.hpp"
30 #include "factory_metadata.h"
31 
32 namespace deepstream {
33 
37 class CustomFactory : public Object {
38 public:
45  CustomFactory(const std::string& name, unsigned long factory_type);
46 
48  virtual ~CustomFactory();
49 
55  virtual CustomObject *createObject(const std::string& name) = 0;
56 
58  unsigned long getObjectType();
59 };
60 
61 }
62 
63 
64 #endif
deepstream::CustomObject
Base class for all the custom objects.
Definition: service-maker/includes/custom_object.hpp:39
deepstream::CustomFactory::createObject
virtual CustomObject * createObject(const std::string &name)=0
Virtual method for creating custom object.
deepstream::CustomFactory::~CustomFactory
virtual ~CustomFactory()
Destructor.
factory_metadata.h
deepstream
Definition: service-maker/includes/buffer.hpp:38
deepstream::CustomFactory::getObjectType
unsigned long getObjectType()
Return the type id of objects created by this factory.
custom_object.hpp
deepstream::CustomFactory
Interface definition for a custom factory.
Definition: service-maker/includes/custom_factory.hpp:37
deepstream::Object
Base Object class.
Definition: service-maker/includes/object.hpp:49
deepstream::CustomFactory::CustomFactory
CustomFactory(const std::string &name, unsigned long factory_type)
Constructor.