HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ort::ModelMetadata Struct Reference

Wrapper around ::OrtModelMetadata. More...

#include <onnxruntime_cxx_api.h>

+ Inheritance diagram for Ort::ModelMetadata:

Public Member Functions

 ModelMetadata (std::nullptr_t)
 Create an empty ModelMetadata object, must be assigned a valid one to be used. More...
 
 ModelMetadata (OrtModelMetadata *p)
 
AllocatedStringPtr GetGraphNameAllocated (OrtAllocator *allocator) const
 Used for interop with the C API. More...
 
AllocatedStringPtr GetDomainAllocated (OrtAllocator *allocator) const
 Returns a copy of the domain name. More...
 
AllocatedStringPtr GetDescriptionAllocated (OrtAllocator *allocator) const
 Returns a copy of the description. More...
 
AllocatedStringPtr GetGraphDescriptionAllocated (OrtAllocator *allocator) const
 Returns a copy of the graph description. More...
 
std::vector< AllocatedStringPtrGetCustomMetadataMapKeysAllocated (OrtAllocator *allocator) const
 Returns a vector of copies of the custom metadata keys. More...
 
AllocatedStringPtr LookupCustomMetadataMapAllocated (const char *key, OrtAllocator *allocator) const
 Looks up a value by a key in the Custom Metadata map. More...
 
int64_t GetVersion () const
 Wraps OrtApi::ModelMetadataGetVersion. More...
 
- Public Member Functions inherited from Ort::detail::Base< OrtModelMetadata >
constexpr Base ()=default
 
constexpr Base (contained_type *p) noexcept
 
 Base (const Base &)=delete
 
 Base (Base &&v) noexcept
 
 ~Base ()
 
Baseoperator= (const Base &)=delete
 
Baseoperator= (Base &&v) noexcept
 
constexpr operator contained_type * () const noexcept
 
contained_typerelease ()
 Relinquishes ownership of the contained C object pointer The underlying object is not destroyed. More...
 

Additional Inherited Members

- Public Types inherited from Ort::detail::Base< OrtModelMetadata >
using contained_type = OrtModelMetadata
 
- Protected Attributes inherited from Ort::detail::Base< OrtModelMetadata >
contained_typep_
 

Detailed Description

Wrapper around ::OrtModelMetadata.

Definition at line 616 of file onnxruntime_cxx_api.h.

Constructor & Destructor Documentation

Ort::ModelMetadata::ModelMetadata ( std::nullptr_t  )
inlineexplicit

Create an empty ModelMetadata object, must be assigned a valid one to be used.

Definition at line 617 of file onnxruntime_cxx_api.h.

Ort::ModelMetadata::ModelMetadata ( OrtModelMetadata *  p)
inlineexplicit

Definition at line 618 of file onnxruntime_cxx_api.h.

Member Function Documentation

std::vector< AllocatedStringPtr > Ort::ModelMetadata::GetCustomMetadataMapKeysAllocated ( OrtAllocator allocator) const
inline

Returns a vector of copies of the custom metadata keys.

Parameters
allocatorto allocate memory for the copy of the string returned
Returns
a instance std::vector of smart pointers that would deallocate the buffers when out of scope. The OrtAllocator instance must be valid at the point of memory release.Wraps OrtApi::ModelMetadataGetCustomMetadataMapKeys

Definition at line 992 of file onnxruntime_cxx_inline.h.

AllocatedStringPtr Ort::ModelMetadata::GetDescriptionAllocated ( OrtAllocator allocator) const
inline

Returns a copy of the description.

Parameters
allocatorto allocate memory for the copy of the string returned
Returns
a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release.Wraps OrtApi::ModelMetadataGetDescription

Definition at line 974 of file onnxruntime_cxx_inline.h.

AllocatedStringPtr Ort::ModelMetadata::GetDomainAllocated ( OrtAllocator allocator) const
inline

Returns a copy of the domain name.

Parameters
allocatorto allocate memory for the copy of the name returned
Returns
a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release.Wraps OrtApi::ModelMetadataGetDomain

Definition at line 968 of file onnxruntime_cxx_inline.h.

AllocatedStringPtr Ort::ModelMetadata::GetGraphDescriptionAllocated ( OrtAllocator allocator) const
inline

Returns a copy of the graph description.

Parameters
allocatorto allocate memory for the copy of the string returned
Returns
a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release.Wraps OrtApi::ModelMetadataGetGraphDescription

Definition at line 980 of file onnxruntime_cxx_inline.h.

AllocatedStringPtr Ort::ModelMetadata::GetGraphNameAllocated ( OrtAllocator allocator) const
inline

Used for interop with the C API.

Wraps OrtApi::ModelMetadataGetProducerName Returns a copy of the graph name.

Parameters
allocatorto allocate memory for the copy of the name returned
Returns
a instance of smart pointer that would deallocate the buffer when out of scope. The OrtAllocator instances must be valid at the point of memory release.Wraps OrtApi::ModelMetadataGetGraphName

Definition at line 962 of file onnxruntime_cxx_inline.h.

int64_t Ort::ModelMetadata::GetVersion ( ) const
inline

Wraps OrtApi::ModelMetadataGetVersion.

Definition at line 1017 of file onnxruntime_cxx_inline.h.

AllocatedStringPtr Ort::ModelMetadata::LookupCustomMetadataMapAllocated ( const char *  key,
OrtAllocator allocator 
) const
inline

Looks up a value by a key in the Custom Metadata map.

Parameters
keyzero terminated string key to lookup
allocatorto allocate memory for the copy of the string returned
Returns
a instance of smart pointer that would deallocate the buffer when out of scope. maybe nullptr if key is not found.

The OrtAllocator instances must be valid at the point of memory release.Wraps OrtApi::ModelMetadataLookupCustomMetadataMap

Definition at line 986 of file onnxruntime_cxx_inline.h.


The documentation for this struct was generated from the following files: