KiCad PCB EDA Suite
PLUGIN::RELEASER Class Reference

Class RELEASER 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=NULL)
 
 ~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

Class RELEASER releases a PLUGIN in the context of a potential thrown exception, through its destructor.

Definition at line 568 of file io_mgr.h.

Constructor & Destructor Documentation

◆ RELEASER() [1/2]

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

Definition at line 576 of file io_mgr.h.

576 {}

◆ RELEASER() [2/2]

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

Definition at line 579 of file io_mgr.h.

579  :
580  plugin( aPlugin )
581  {
582  }
PLUGIN * plugin
Definition: io_mgr.h:570

◆ ~RELEASER()

PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 584 of file io_mgr.h.

585  {
586  if( plugin )
587  release();
588  }
void release()
Definition: io_mgr.h:590
PLUGIN * plugin
Definition: io_mgr.h:570

References plugin, and release().

Member Function Documentation

◆ operator ->()

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

Definition at line 608 of file io_mgr.h.

609  {
610  return plugin;
611  }
PLUGIN * plugin
Definition: io_mgr.h:570

References plugin.

◆ operator PLUGIN *()

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

Definition at line 603 of file io_mgr.h.

604  {
605  return plugin;
606  }
PLUGIN * plugin
Definition: io_mgr.h:570

References plugin.

◆ operator=()

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

Definition at line 573 of file io_mgr.h.

573 { return *this; }

◆ release()

void PLUGIN::RELEASER::release ( )
inline

Definition at line 590 of file io_mgr.h.

591  {
593  plugin = NULL;
594  }
static void PluginRelease(PLUGIN *aPlugin)
Function PluginRelease releases a PLUGIN back to the system, and may cause it to be unloaded from mem...
Definition: io_mgr.cpp:67
PLUGIN * plugin
Definition: io_mgr.h:570

References plugin, and IO_MGR::PluginRelease().

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

◆ set()

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

Definition at line 596 of file io_mgr.h.

597  {
598  if( plugin )
599  release();
600  plugin = aPlugin;
601  }
void release()
Definition: io_mgr.h:590
PLUGIN * plugin
Definition: io_mgr.h:570

References plugin, and release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

Member Data Documentation

◆ plugin

PLUGIN* PLUGIN::RELEASER::plugin
private

Definition at line 570 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: