NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/service-maker/includes/custom_object.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 
27 #ifndef NVIDIA_DEEPSTREAM_CUSTOM_OBJECT
28 #define NVIDIA_DEEPSTREAM_CUSTOM_OBJECT
29 
30 #include <map>
31 
32 #include "object.hpp"
33 
34 namespace deepstream {
35 
39 class CustomObject : public Object {
40  public:
48  CustomObject(unsigned long type_id, const char* factory, const std::string& name);
49 
50  CustomObject(CustomObject&&) noexcept = default;
51  CustomObject& operator=(CustomObject&&) noexcept = default;
52 
53  protected:
54  virtual void set_(const std::string& name, const Value& value);
55  virtual void set_(const std::string& name, const YAML::Node& value);
56  virtual Value get_(const std::string&name);
57 
59  std::string param_spec_;
61  std::map<std::string, Object::Value> properties_;
62 };
63 
64 }
65 
66 #endif
deepstream::CustomObject::get_
virtual Value get_(const std::string &name)
deepstream::CustomObject::CustomObject
CustomObject(unsigned long type_id, const char *factory, const std::string &name)
Constructor.
object.hpp
deepstream::CustomObject::param_spec_
std::string param_spec_
property spec in YAML format
Definition: service-maker/includes/custom_object.hpp:59
deepstream::CustomObject::properties_
std::map< std::string, Object::Value > properties_
property map
Definition: service-maker/includes/custom_object.hpp:61
deepstream
Definition: service-maker/includes/buffer.hpp:38
deepstream::Object::Object
Object()
Constructor of a void object.
deepstream::CustomObject::set_
virtual void set_(const std::string &name, const Value &value)