stub_analytics_plugin
1.6
Network Optix Video Analytics SDK
|
#include <plugin_tools.h>
Public Member Functions | |
ScopedRef (void *ptr) | |
ScopedRef (T *ptr=nullptr, bool increaseRef=true) | |
ScopedRef (ScopedRef< T > &&right) | |
ScopedRef< T > & | operator= (ScopedRef< T > &&right) |
ScopedRef (const ScopedRef< T > &)=delete | |
ScopedRef< T > & | operator= (const ScopedRef< T > &)=delete |
operator bool () const | |
T * | get () |
const T * | get () const |
T * | operator-> () |
const T * | operator-> () const |
T * | release () |
void | reset (T *ptr=nullptr) |
Automatic scoped pointer class which uses PluginInterface reference counting interface (PluginInterface::addRef() and PluginInterface::releaseRef()) instead of new/delete. Increments object's reference counter (PluginInterface::addRef()) at construction, decrements at destruction (PluginInterface::releaseRef()).
NOTE: The class is reentrant, but not thread-safe.
T | Must inherit PluginInterface. |
|
inlineexplicit |
Intended to be applied to queryInterface().
|
inlineexplicit |
Calls ptr->addRef() if ptr is not null and increaseRef is true.
|
inline |
|
inline |
|
inline |
Releases protected pointer without calling nxpl::PluginInterface::releaseRef().
|
inline |
Calls nxpl::PluginInterface::releaseRef() on protected pointer (if any) and takes the new pointer ptr (calling nxpl::PluginInterface::addRef()).