KiCad PCB EDA Suite
PLUGIN::RELEASER Class Reference

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=nullptr)
 
 ~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

Releases a PLUGIN in the context of a potential thrown exception through its destructor.

Definition at line 563 of file io_mgr.h.

Constructor & Destructor Documentation

◆ RELEASER() [1/2]

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

Definition at line 571 of file io_mgr.h.

571: plugin( nullptr ) {}
PLUGIN * plugin
Definition: io_mgr.h:565

◆ RELEASER() [2/2]

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

Definition at line 574 of file io_mgr.h.

574 :
575 plugin( aPlugin )
576 {
577 }

◆ ~RELEASER()

PLUGIN::RELEASER::~RELEASER ( )
inline

Definition at line 579 of file io_mgr.h.

580 {
581 if( plugin )
582 release();
583 }
void release()
Definition: io_mgr.h:585

References plugin, and release().

Member Function Documentation

◆ operator PLUGIN *()

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

Definition at line 598 of file io_mgr.h.

599 {
600 return plugin;
601 }

References plugin.

◆ operator->()

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

Definition at line 603 of file io_mgr.h.

604 {
605 return plugin;
606 }

References plugin.

◆ operator=()

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

Definition at line 568 of file io_mgr.h.

568{ return *this; }

◆ release()

void PLUGIN::RELEASER::release ( )
inline

Definition at line 585 of file io_mgr.h.

586 {
588 plugin = nullptr;
589 }
static void PluginRelease(PLUGIN *aPlugin)
Release a PLUGIN back to the system and may cause it to be unloaded from memory.
Definition: io_mgr.cpp:67

References plugin, and IO_MGR::PluginRelease().

Referenced by set(), FP_LIB_TABLE_ROW::SetType(), and ~RELEASER().

◆ set()

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

Definition at line 591 of file io_mgr.h.

592 {
593 if( plugin )
594 release();
595 plugin = aPlugin;
596 }

References plugin, and release().

Referenced by FP_LIB_TABLE_ROW::setPlugin().

Member Data Documentation

◆ plugin

PLUGIN* PLUGIN::RELEASER::plugin
private

Definition at line 565 of file io_mgr.h.

Referenced by operator PLUGIN *(), operator->(), release(), set(), and ~RELEASER().


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