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

Constructor & Destructor Documentation

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

Definition at line 484 of file io_mgr.h.

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

Definition at line 487 of file io_mgr.h.

487  :
488  plugin( aPlugin )
489  {
490  }
PLUGIN * plugin
Definition: io_mgr.h:478
PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 492 of file io_mgr.h.

References release().

493  {
494  if( plugin )
495  release();
496  }
void release()
Definition: io_mgr.h:498
PLUGIN * plugin
Definition: io_mgr.h:478

Member Function Documentation

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

Definition at line 511 of file io_mgr.h.

References plugin.

512  {
513  return plugin;
514  }
PLUGIN * plugin
Definition: io_mgr.h:478
PLUGIN* PLUGIN::RELEASER::operator-> ( ) const
inline

Definition at line 516 of file io_mgr.h.

References plugin.

517  {
518  return plugin;
519  }
PLUGIN * plugin
Definition: io_mgr.h:478
RELEASER& PLUGIN::RELEASER::operator= ( RELEASER aOther)
inlineprivate

Definition at line 481 of file io_mgr.h.

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

Definition at line 498 of file io_mgr.h.

References IO_MGR::PluginRelease().

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

499  {
501  plugin = NULL;
502  }
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:478
void PLUGIN::RELEASER::set ( PLUGIN aPlugin)
inline

Definition at line 504 of file io_mgr.h.

References release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

505  {
506  if( plugin )
507  release();
508  plugin = aPlugin;
509  }
void release()
Definition: io_mgr.h:498
PLUGIN * plugin
Definition: io_mgr.h:478

Member Data Documentation

PLUGIN* PLUGIN::RELEASER::plugin
private

Definition at line 478 of file io_mgr.h.

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


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