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 546 of file io_mgr.h.

Constructor & Destructor Documentation

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

Definition at line 554 of file io_mgr.h.

554 {}
PLUGIN::RELEASER::RELEASER ( PLUGIN aPlugin = NULL)
inline

Definition at line 557 of file io_mgr.h.

557  :
558  plugin( aPlugin )
559  {
560  }
PLUGIN * plugin
Definition: io_mgr.h:548
PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 562 of file io_mgr.h.

References release().

563  {
564  if( plugin )
565  release();
566  }
void release()
Definition: io_mgr.h:568
PLUGIN * plugin
Definition: io_mgr.h:548

Member Function Documentation

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

Definition at line 581 of file io_mgr.h.

References plugin.

582  {
583  return plugin;
584  }
PLUGIN * plugin
Definition: io_mgr.h:548
PLUGIN* PLUGIN::RELEASER::operator-> ( ) const
inline

Definition at line 586 of file io_mgr.h.

References plugin.

587  {
588  return plugin;
589  }
PLUGIN * plugin
Definition: io_mgr.h:548
RELEASER& PLUGIN::RELEASER::operator= ( RELEASER aOther)
inlineprivate

Definition at line 551 of file io_mgr.h.

551 { return *this; }
void PLUGIN::RELEASER::release ( )
inline

Definition at line 568 of file io_mgr.h.

References IO_MGR::PluginRelease().

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

569  {
571  plugin = NULL;
572  }
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:548
void PLUGIN::RELEASER::set ( PLUGIN aPlugin)
inline

Definition at line 574 of file io_mgr.h.

References release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

575  {
576  if( plugin )
577  release();
578  plugin = aPlugin;
579  }
void release()
Definition: io_mgr.h:568
PLUGIN * plugin
Definition: io_mgr.h:548

Member Data Documentation

PLUGIN* PLUGIN::RELEASER::plugin
private

Definition at line 548 of file io_mgr.h.

Referenced by operator PLUGIN *(), and operator->().


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