NVIDIA DeepStream SDK API Reference

9.2 Release
sdk::resource::Resource Class Reference

Detailed Description

Public Member Functions

 Resource () noexcept
 
 Resource (const ResourceAttributes &attributes) noexcept
 
 Resource (const ResourceAttributes &attributes, const std::string &schema_url) noexcept
 
 Resource (const Resource &)=default
 
Resource & operator= (const Resource &)=default
 
const ResourceAttributes & GetAttributes () const noexcept
 
const std::string & GetSchemaURL () const noexcept
 
Resource Merge (const Resource &other) const noexcept
 Returns a new, merged Resource by merging the current Resource with the other Resource. More...
 
 Resource () noexcept
 
 Resource (const ResourceAttributes &attributes) noexcept
 
 Resource (const ResourceAttributes &attributes, const std::string &schema_url) noexcept
 
 Resource (const Resource &)=default
 
Resource & operator= (const Resource &)=default
 
const ResourceAttributes & GetAttributes () const noexcept
 
const std::string & GetSchemaURL () const noexcept
 
Resource Merge (const Resource &other) const noexcept
 Returns a new, merged Resource by merging the current Resource with the other Resource. More...
 

Static Public Member Functions

static Resource Create (const ResourceAttributes &attributes, const std::string &schema_url=std::string{})
 Returns a newly created Resource with the specified attributes. More...
 
static Resource & GetEmpty ()
 Returns an Empty resource. More...
 
static Resource & GetDefault ()
 Returns a Resource that indentifies the SDK in use. More...
 
static Resource Create (const ResourceAttributes &attributes, const std::string &schema_url=std::string{})
 Returns a newly created Resource with the specified attributes. More...
 
static Resource & GetEmpty ()
 Returns an Empty resource. More...
 
static Resource & GetDefault ()
 Returns a Resource that indentifies the SDK in use. More...
 

Constructor & Destructor Documentation

◆ Resource() [1/8]

sdk::resource::Resource::Resource ( )
noexcept

◆ Resource() [2/8]

sdk::resource::Resource::Resource ( const ResourceAttributes &  attributes)
noexcept

◆ Resource() [3/8]

sdk::resource::Resource::Resource ( const ResourceAttributes &  attributes,
const std::string &  schema_url 
)
noexcept

◆ Resource() [4/8]

sdk::resource::Resource::Resource ( const Resource &  )
default

◆ Resource() [5/8]

sdk::resource::Resource::Resource ( )
noexcept

◆ Resource() [6/8]

sdk::resource::Resource::Resource ( const ResourceAttributes &  attributes)
noexcept

◆ Resource() [7/8]

sdk::resource::Resource::Resource ( const ResourceAttributes &  attributes,
const std::string &  schema_url 
)
noexcept

◆ Resource() [8/8]

sdk::resource::Resource::Resource ( const Resource &  )
default

Member Function Documentation

◆ Create() [1/2]

static Resource sdk::resource::Resource::Create ( const ResourceAttributes &  attributes,
const std::string &  schema_url = std::string{} 
)
static

Returns a newly created Resource with the specified attributes.

It adds (merge) SDK attributes and OTEL attributes before returning.

Parameters
attributesfor this resource
Returns
the newly created Resource.

◆ Create() [2/2]

static Resource sdk::resource::Resource::Create ( const ResourceAttributes &  attributes,
const std::string &  schema_url = std::string{} 
)
static

Returns a newly created Resource with the specified attributes.

It adds (merge) SDK attributes and OTEL attributes before returning.

Parameters
attributesfor this resource
Returns
the newly created Resource.

◆ GetAttributes() [1/2]

const ResourceAttributes& sdk::resource::Resource::GetAttributes ( ) const
noexcept

◆ GetAttributes() [2/2]

const ResourceAttributes& sdk::resource::Resource::GetAttributes ( ) const
noexcept

◆ GetDefault() [1/2]

static Resource& sdk::resource::Resource::GetDefault ( )
static

Returns a Resource that indentifies the SDK in use.

◆ GetDefault() [2/2]

static Resource& sdk::resource::Resource::GetDefault ( )
static

Returns a Resource that indentifies the SDK in use.

◆ GetEmpty() [1/2]

static Resource& sdk::resource::Resource::GetEmpty ( )
static

Returns an Empty resource.

◆ GetEmpty() [2/2]

static Resource& sdk::resource::Resource::GetEmpty ( )
static

Returns an Empty resource.

◆ GetSchemaURL() [1/2]

const std::string& sdk::resource::Resource::GetSchemaURL ( ) const
noexcept

◆ GetSchemaURL() [2/2]

const std::string& sdk::resource::Resource::GetSchemaURL ( ) const
noexcept

◆ Merge() [1/2]

Resource sdk::resource::Resource::Merge ( const Resource &  other) const
noexcept

Returns a new, merged Resource by merging the current Resource with the other Resource.

In case of a collision, the other Resource takes precedence.

The specification notes that if schema urls collide, the resulting schema url is implementation-defined. In the C++ implementation, the schema url of

Parameters
otheris picked.
otherthe Resource that will be merged with this.
Returns
the newly merged Resource.

◆ Merge() [2/2]

Resource sdk::resource::Resource::Merge ( const Resource &  other) const
noexcept

Returns a new, merged Resource by merging the current Resource with the other Resource.

In case of a collision, the other Resource takes precedence.

The specification notes that if schema urls collide, the resulting schema url is implementation-defined. In the C++ implementation, the schema url of

Parameters
otheris picked.
otherthe Resource that will be merged with this.
Returns
the newly merged Resource.

◆ operator=() [1/2]

Resource& sdk::resource::Resource::operator= ( const Resource &  )
default

◆ operator=() [2/2]

Resource& sdk::resource::Resource::operator= ( const Resource &  )
default

The documentation for this class was generated from the following file: