KiCad PCB EDA Suite
SCH_PLUGIN::SCH_PLUGIN_RELEASER Class Reference

Class SCH_PLUGIN_RELEASER. More...

#include <sch_io_mgr.h>

Public Member Functions

 SCH_PLUGIN_RELEASER (SCH_PLUGIN *aPlugin=NULL)
 
 ~SCH_PLUGIN_RELEASER ()
 
void release ()
 
void set (SCH_PLUGIN *aPlugin)
 
 operator SCH_PLUGIN * () const
 
SCH_PLUGINoperator-> () const
 

Private Member Functions

SCH_PLUGIN_RELEASERoperator= (SCH_PLUGIN_RELEASER &aOther)
 
 SCH_PLUGIN_RELEASER (const SCH_PLUGIN_RELEASER &aOther)
 

Private Attributes

SCH_PLUGINplugin
 

Detailed Description

Class SCH_PLUGIN_RELEASER.

releases a SCH_PLUGIN in the context of a potential thrown exception, through its destructor.

Definition at line 524 of file sch_io_mgr.h.

Constructor & Destructor Documentation

SCH_PLUGIN::SCH_PLUGIN_RELEASER::SCH_PLUGIN_RELEASER ( const SCH_PLUGIN_RELEASER aOther)
inlineprivate

Definition at line 532 of file sch_io_mgr.h.

532 {}
SCH_PLUGIN::SCH_PLUGIN_RELEASER::SCH_PLUGIN_RELEASER ( SCH_PLUGIN aPlugin = NULL)
inline

Definition at line 535 of file sch_io_mgr.h.

535  :
536  plugin( aPlugin )
537  {
538  }
SCH_PLUGIN::SCH_PLUGIN_RELEASER::~SCH_PLUGIN_RELEASER ( )
inline

Definition at line 540 of file sch_io_mgr.h.

References release().

541  {
542  if( plugin )
543  release();
544  }

Member Function Documentation

SCH_PLUGIN::SCH_PLUGIN_RELEASER::operator SCH_PLUGIN * ( ) const
inline

Definition at line 559 of file sch_io_mgr.h.

References plugin.

560  {
561  return plugin;
562  }
SCH_PLUGIN* SCH_PLUGIN::SCH_PLUGIN_RELEASER::operator-> ( ) const
inline

Definition at line 564 of file sch_io_mgr.h.

References plugin.

565  {
566  return plugin;
567  }
SCH_PLUGIN_RELEASER& SCH_PLUGIN::SCH_PLUGIN_RELEASER::operator= ( SCH_PLUGIN_RELEASER aOther)
inlineprivate

Definition at line 529 of file sch_io_mgr.h.

529 { return *this; }
void SCH_PLUGIN::SCH_PLUGIN_RELEASER::release ( )
inline

Definition at line 546 of file sch_io_mgr.h.

References SCH_IO_MGR::ReleasePlugin().

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

547  {
549  plugin = NULL;
550  }
static void ReleasePlugin(SCH_PLUGIN *aPlugin)
Function PluginRelease releases a SCH_PLUGIN back to the system, and may cause it to be unloaded from...
Definition: sch_io_mgr.cpp:65
void SCH_PLUGIN::SCH_PLUGIN_RELEASER::set ( SCH_PLUGIN aPlugin)
inline

Definition at line 552 of file sch_io_mgr.h.

References release().

Referenced by SYMBOL_LIB_TABLE_ROW::setPlugin().

553  {
554  if( plugin )
555  release();
556  plugin = aPlugin;
557  }

Member Data Documentation

SCH_PLUGIN* SCH_PLUGIN::SCH_PLUGIN_RELEASER::plugin
private

Definition at line 526 of file sch_io_mgr.h.

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


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