NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
nvneural::refobj::Implements< TInterface > Struct Template Referencefinal

Helper class for RefObjectBase indicating direct inheritance. More...

#include <nvneural/RefObject.h>

Public Types

using BaseType = TInterface
 Provide TInterface as a recommended base type. More...
 

Static Public Member Functions

Helper functions for queryInterface

These functions return the appropriately-adjusted void* or const void* for casting an object to the specific interface type provided as TInterface, and return nullptr if casting to any other interface type ID.

They are implementation details of the RefObjectBase version of queryInterface. You should not need to modify them.

template<typename TObject >
static void * querySingleInterface (IRefObject::TypeId interfaceId, TObject *me)
 Non-const querySingleInterface implementation. More...
 
template<typename TObject >
static const void * querySingleInterface (IRefObject::TypeId interfaceId, const TObject *me)
 Const querySingleInterface implementation. More...
 

Static Public Attributes

static const bool EnableLogging = true
 This trait normally allows lifecycle logging.
 

Detailed Description

template<typename TInterface>
struct nvneural::refobj::Implements< TInterface >

Helper class for RefObjectBase indicating direct inheritance.

Include this in the RefObjectBase parameter list; your resulting object will derive publicly from TInterface, and provide automatic support for queryInterface.

Use this only for leaf interfaces; if you add Implements<> for multiple versions of the same interface tree, you will observe "ambiguous base class" errors when building.

Template Parameters
TInterfaceInterface to inherit from

Member Typedef Documentation

◆ BaseType

template<typename TInterface >
using nvneural::refobj::Implements< TInterface >::BaseType = TInterface

Provide TInterface as a recommended base type.

RefObjectBase<Implements<TInterface>> will inherit from TInterface.

Member Function Documentation

◆ querySingleInterface() [1/2]

template<typename TInterface >
template<typename TObject >
static const void* nvneural::refobj::Implements< TInterface >::querySingleInterface ( IRefObject::TypeId  interfaceId,
const TObject *  me 
)
inlinestatic

Const querySingleInterface implementation.

Parameters
interfaceIdInterface ID to cast to ("IInterface")
meObject to cast
Returns
Object converted to const IInterface* as const void*, or nullptr if IInterface is not TInterface

◆ querySingleInterface() [2/2]

template<typename TInterface >
template<typename TObject >
static void* nvneural::refobj::Implements< TInterface >::querySingleInterface ( IRefObject::TypeId  interfaceId,
TObject *  me 
)
inlinestatic

Non-const querySingleInterface implementation.

Parameters
interfaceIdInterface ID to cast to ("IInterface")
meObject to cast
Returns
Object converted to IInterface* as void*, or nullptr if IInterface is not TInterface

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