NVIDIA DeepStream SDK API Reference
9.2 Release
9.2/includes/opentelemetry/common/key_value_iterable.h
Go to the documentation of this file.
1
// Copyright The OpenTelemetry Authors
2
// SPDX-License-Identifier: Apache-2.0
3
4
#pragma once
5
6
#include "opentelemetry/common/attribute_value.h"
7
#include "opentelemetry/nostd/function_ref.h"
8
#include "opentelemetry/nostd/string_view.h"
9
#include "opentelemetry/version.h"
10
11
OPENTELEMETRY_BEGIN_NAMESPACE
12
namespace
common
13
{
17
class
KeyValueIterable
18
{
19
public
:
20
virtual
~KeyValueIterable
() =
default
;
21
28
virtual
bool
ForEachKeyValue
(
nostd::function_ref
<
bool
(
nostd::string_view
,
common::AttributeValue
)>
29
callback)
const
noexcept = 0;
30
34
virtual
size_t
size
() const noexcept = 0;
35
};
36
40
class NoopKeyValueIterable : public KeyValueIterable
41
{
42
public
:
43
~NoopKeyValueIterable()
override
=
default
;
44
49
bool
ForEachKeyValue
(
50
nostd::function_ref
<
bool
(
nostd::string_view
,
common::AttributeValue
)>
/*callback*/
)
51
const noexcept
override
52
{
53
return
true
;
54
}
55
59
size_t
size
() const noexcept
override
{
return
0; }
60
};
61
62
}
// namespace common
63
OPENTELEMETRY_END_NAMESPACE
nostd::function_ref
Definition:
includes/opentelemetry/nostd/function_ref.h:17
absl::OTABSL_OPTION_NAMESPACE_NAME::variant
Definition:
includes/opentelemetry/nostd/variant.h:61
common::KeyValueIterable::size
virtual size_t size() const noexcept=0
OPENTELEMETRY_BEGIN_NAMESPACE
#define OPENTELEMETRY_BEGIN_NAMESPACE
Definition:
includes/opentelemetry/version.h:21
common::KeyValueIterable::~KeyValueIterable
virtual ~KeyValueIterable()=default
common::KeyValueIterable::ForEachKeyValue
virtual bool ForEachKeyValue(nostd::function_ref< bool(nostd::string_view, common::AttributeValue)> callback) const noexcept=0
Iterate over key-value pairs.
OPENTELEMETRY_END_NAMESPACE
#define OPENTELEMETRY_END_NAMESPACE
Definition:
includes/opentelemetry/version.h:24
common::NoopKeyValueIterable::size
size_t size() const noexcept override
Definition:
9.2/includes/opentelemetry/common/key_value_iterable.h:59
common::NoopKeyValueIterable::ForEachKeyValue
bool ForEachKeyValue(nostd::function_ref< bool(nostd::string_view, common::AttributeValue)>) const noexcept override
No-op implementation: does not invoke the callback, even if key-value pairs are present.
Definition:
9.2/includes/opentelemetry/common/key_value_iterable.h:49
common
Definition:
includes/opentelemetry/common/attribute_value.h:14
nostd::string_view
Back port of std::string_view to work with pre-cpp-17 compilers.
Definition:
includes/opentelemetry/nostd/string_view.h:37
Privacy Policy
|
Your Privacy Choices
|
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.
Wed Oct 28 2026 12:02:07 | PR-09318-R32