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

Constructor & Destructor Documentation

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

Definition at line 482 of file io_mgr.h.

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

Definition at line 485 of file io_mgr.h.

485  :
486  plugin( aPlugin )
487  {
488  }
PLUGIN * plugin
Definition: io_mgr.h:476
PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 490 of file io_mgr.h.

References release().

491  {
492  if( plugin )
493  release();
494  }
void release()
Definition: io_mgr.h:496
PLUGIN * plugin
Definition: io_mgr.h:476

Member Function Documentation

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

Definition at line 509 of file io_mgr.h.

References plugin.

510  {
511  return plugin;
512  }
PLUGIN * plugin
Definition: io_mgr.h:476
PLUGIN* PLUGIN::RELEASER::operator-> ( ) const
inline

Definition at line 514 of file io_mgr.h.

References plugin.

515  {
516  return plugin;
517  }
PLUGIN * plugin
Definition: io_mgr.h:476
RELEASER& PLUGIN::RELEASER::operator= ( RELEASER aOther)
inlineprivate

Definition at line 479 of file io_mgr.h.

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

Definition at line 496 of file io_mgr.h.

References IO_MGR::PluginRelease().

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

497  {
499  plugin = NULL;
500  }
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:95
PLUGIN * plugin
Definition: io_mgr.h:476
void PLUGIN::RELEASER::set ( PLUGIN aPlugin)
inline

Definition at line 502 of file io_mgr.h.

References release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

503  {
504  if( plugin )
505  release();
506  plugin = aPlugin;
507  }
void release()
Definition: io_mgr.h:496
PLUGIN * plugin
Definition: io_mgr.h:476

Member Data Documentation

PLUGIN* PLUGIN::RELEASER::plugin
private

Definition at line 476 of file io_mgr.h.

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


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