KiCad PCB EDA Suite
PLUGIN::RELEASER Class Reference

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

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

Definition at line 579 of file io_mgr.h.

Constructor & Destructor Documentation

◆ RELEASER() [1/2]

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

Definition at line 587 of file io_mgr.h.

587 {}

◆ RELEASER() [2/2]

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

Definition at line 590 of file io_mgr.h.

590  :
591  plugin( aPlugin )
592  {
593  }
PLUGIN * plugin
Definition: io_mgr.h:581

◆ ~RELEASER()

PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 595 of file io_mgr.h.

596  {
597  if( plugin )
598  release();
599  }
void release()
Definition: io_mgr.h:601
PLUGIN * plugin
Definition: io_mgr.h:581

References plugin, and release().

Member Function Documentation

◆ operator ->()

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

Definition at line 619 of file io_mgr.h.

620  {
621  return plugin;
622  }
PLUGIN * plugin
Definition: io_mgr.h:581

References plugin.

◆ operator PLUGIN *()

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

Definition at line 614 of file io_mgr.h.

615  {
616  return plugin;
617  }
PLUGIN * plugin
Definition: io_mgr.h:581

References plugin.

◆ operator=()

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

Definition at line 584 of file io_mgr.h.

584 { return *this; }

◆ release()

void PLUGIN::RELEASER::release ( )
inline

Definition at line 601 of file io_mgr.h.

602  {
604  plugin = NULL;
605  }
#define NULL
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:70
PLUGIN * plugin
Definition: io_mgr.h:581

References NULL, plugin, and IO_MGR::PluginRelease().

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

◆ set()

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

Definition at line 607 of file io_mgr.h.

608  {
609  if( plugin )
610  release();
611  plugin = aPlugin;
612  }
void release()
Definition: io_mgr.h:601
PLUGIN * plugin
Definition: io_mgr.h:581

References plugin, and release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

Member Data Documentation

◆ plugin

PLUGIN* PLUGIN::RELEASER::plugin
private

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