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

Helper class for RefObjectBase indicating interface support without direct inheritance. More...

#include <nvneural/RefObject.h>

Classes

struct  BaseType
 Provide an empty struct 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, typename TIntermediateType>
struct nvneural::refobj::IndirectlyImplements< TInterface, TIntermediateType >

Helper class for RefObjectBase indicating interface support without direct inheritance.

Include this in the RefObjectBase parameter list; your resulting object will not derive publicly from either TInterface or TIntermediateType, but will support IRefObject-based casting to TInterface by routing through the TIntermediateType parameter.

Use this for intermediate interfaces, where you directly implement a more- derived version of the interface and thus do not need to reimplement the smaller version. Note that direct inheritance is required at some level, so do not forget to include an Implements<T> parameter as well for the leaf version of the type.

Template Parameters
TInterfaceInterface to support in IRefObject::queryInterface
TIntermediateTypeType name to cast through when providing a TInterface

Member Function Documentation

◆ querySingleInterface() [1/2]

template<typename TInterface , typename TIntermediateType >
template<typename TObject >
static const void* nvneural::refobj::IndirectlyImplements< TInterface, TIntermediateType >::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 , typename TIntermediateType >
template<typename TObject >
static void* nvneural::refobj::IndirectlyImplements< TInterface, TIntermediateType >::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: