KiCad PCB EDA Suite
PLUGIN::RELEASER Class Reference

Releases a PLUGIN in the context of a potential thrown exception through its destructor. More...

#include <io_mgr.h>

Public Member Functions

 RELEASER (PLUGIN *aPlugin=nullptr)
 
 ~RELEASER ()
 
void release ()
 
void set (PLUGIN *aPlugin)
 
 operator PLUGIN * () const
 
PLUGINoperator -> () const
 

Private Member Functions

RELEASERoperator= (RELEASER &aOther)
 
 RELEASER (const RELEASER &aOther)
 

Private Attributes

PLUGINplugin
 

Detailed Description

Releases a PLUGIN in the context of a potential thrown exception through its destructor.

Definition at line 555 of file io_mgr.h.

Constructor & Destructor Documentation

◆ RELEASER() [1/2]

PLUGIN::RELEASER::RELEASER ( const RELEASER aOther)
inlineprivate

Definition at line 563 of file io_mgr.h.

563 : plugin( nullptr ) {}
PLUGIN * plugin
Definition: io_mgr.h:557

◆ RELEASER() [2/2]

PLUGIN::RELEASER::RELEASER ( PLUGIN aPlugin = nullptr)
inline

Definition at line 566 of file io_mgr.h.

566  :
567  plugin( aPlugin )
568  {
569  }
PLUGIN * plugin
Definition: io_mgr.h:557

◆ ~RELEASER()

PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 571 of file io_mgr.h.

572  {
573  if( plugin )
574  release();
575  }
void release()
Definition: io_mgr.h:577
PLUGIN * plugin
Definition: io_mgr.h:557

References plugin, and release().

Member Function Documentation

◆ operator ->()

PLUGIN* PLUGIN::RELEASER::operator -> ( ) const
inline

Definition at line 595 of file io_mgr.h.

596  {
597  return plugin;
598  }
PLUGIN * plugin
Definition: io_mgr.h:557

References plugin.

◆ operator PLUGIN *()

PLUGIN::RELEASER::operator PLUGIN * ( ) const
inline

Definition at line 590 of file io_mgr.h.

591  {
592  return plugin;
593  }
PLUGIN * plugin
Definition: io_mgr.h:557

References plugin.

◆ operator=()

RELEASER& PLUGIN::RELEASER::operator= ( RELEASER aOther)
inlineprivate

Definition at line 560 of file io_mgr.h.

560 { return *this; }

◆ release()

void PLUGIN::RELEASER::release ( )
inline

Definition at line 577 of file io_mgr.h.

578  {
580  plugin = nullptr;
581  }
static void PluginRelease(PLUGIN *aPlugin)
Release a PLUGIN back to the system and may cause it to be unloaded from memory.
Definition: io_mgr.cpp:67
PLUGIN * plugin
Definition: io_mgr.h:557

References plugin, and IO_MGR::PluginRelease().

Referenced by set(), and ~RELEASER().

◆ set()

void PLUGIN::RELEASER::set ( PLUGIN aPlugin)
inline

Definition at line 583 of file io_mgr.h.

584  {
585  if( plugin )
586  release();
587  plugin = aPlugin;
588  }
void release()
Definition: io_mgr.h:577
PLUGIN * plugin
Definition: io_mgr.h:557

References plugin, and release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

Member Data Documentation

◆ plugin

PLUGIN* PLUGIN::RELEASER::plugin
private

Definition at line 557 of file io_mgr.h.

Referenced by operator ->(), operator PLUGIN *(), release(), set(), and ~RELEASER().


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