SimpleITK
|
An ITK Command class to hold a object until destruction. More...
#include <itkHolderCommand.h>
An ITK Command class to hold a object until destruction.
This command is to add resource management, by utilizing the lifetime of a Command added to an object is about the same as that managed object. So this command holds onto a resource or object for lifetime of itself. By adding as a command to an ITK object it will be released on destruction of the ITK object ( subject to the reference counting on the Command ).
Definition at line 37 of file itkHolderCommand.h.
Public Types | |
using | ConstPointer = itk::SmartPointer< const Self > |
using | ObjectType = T |
using | Pointer = itk::SmartPointer< Self > |
using | Self = HolderCommand |
using | Superclass = itk::Command |
Public Types inherited from itk::Command | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Command | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Public Member Functions | |
void | Execute (const itk::Object *, const itk::EventObject &) override |
void | Execute (itk::Object *, const itk::EventObject &) override |
ObjectType & | Get () |
const ObjectType & | Get () const |
HolderCommand (const HolderCommand &)=delete | |
itkNewMacro (HolderCommand) | |
void | operator= (const HolderCommand &)=delete |
void | Set (const ObjectType object) |
Public Member Functions inherited from itk::Command | |
const char * | GetNameOfClass () const override |
Public Member Functions inherited from itk::Object | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const std::string & | GetObjectName () const |
virtual const std::string & | GetObjectName () const |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual void | SetObjectName (std::string _arg) |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Protected Member Functions | |
HolderCommand ()=default | |
~HolderCommand () override=default | |
Protected Member Functions inherited from itk::Command | |
Command () | |
~Command () override | |
Protected Member Functions inherited from itk::Object | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
ObjectType | m_Object |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount |
using itk::HolderCommand< T >::ConstPointer = itk::SmartPointer<const Self> |
Definition at line 46 of file itkHolderCommand.h.
using itk::HolderCommand< T >::ObjectType = T |
Definition at line 40 of file itkHolderCommand.h.
using itk::HolderCommand< T >::Pointer = itk::SmartPointer<Self> |
Definition at line 45 of file itkHolderCommand.h.
using itk::HolderCommand< T >::Self = HolderCommand |
Definition at line 42 of file itkHolderCommand.h.
using itk::HolderCommand< T >::Superclass = itk::Command |
Definition at line 43 of file itkHolderCommand.h.
|
delete |
|
protecteddefault |
|
overrideprotecteddefault |
|
inlineoverridevirtual |
Implements itk::Command.
Definition at line 70 of file itkHolderCommand.h.
|
inlineoverridevirtual |
Implements itk::Command.
Definition at line 67 of file itkHolderCommand.h.
|
inline |
Definition at line 56 of file itkHolderCommand.h.
References itk::HolderCommand< T >::m_Object.
|
inline |
Definition at line 61 of file itkHolderCommand.h.
References itk::HolderCommand< T >::m_Object.
itk::HolderCommand< T >::itkNewMacro | ( | HolderCommand< T > | ) |
|
delete |
|
inline |
Definition at line 51 of file itkHolderCommand.h.
References itk::HolderCommand< T >::m_Object.
|
private |
Definition at line 82 of file itkHolderCommand.h.
Referenced by itk::HolderCommand< T >::Get(), and itk::HolderCommand< T >::Set().