SimpleITK  
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::HolderCommand< T > Class Template Reference

An ITK Command class to hold a object until destruction. More...

#include <itkHolderCommand.h>

+ Inheritance diagram for itk::HolderCommand< T >:
+ Collaboration diagram for itk::HolderCommand< T >:

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
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) 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
 
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)
 
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
 

Detailed Description

template<class T>
class itk::HolderCommand< T >

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 36 of file itkHolderCommand.h.

Member Typedef Documentation

◆ ConstPointer

template<class T >
using itk::HolderCommand< T >::ConstPointer = itk::SmartPointer<const Self>

Definition at line 46 of file itkHolderCommand.h.

◆ ObjectType

template<class T >
using itk::HolderCommand< T >::ObjectType = T

Definition at line 40 of file itkHolderCommand.h.

◆ Pointer

template<class T >
using itk::HolderCommand< T >::Pointer = itk::SmartPointer<Self>

Definition at line 45 of file itkHolderCommand.h.

◆ Self

template<class T >
using itk::HolderCommand< T >::Self = HolderCommand

Definition at line 42 of file itkHolderCommand.h.

◆ Superclass

template<class T >
using itk::HolderCommand< T >::Superclass = itk::Command

Definition at line 43 of file itkHolderCommand.h.

Constructor & Destructor Documentation

◆ HolderCommand() [1/2]

template<class T >
itk::HolderCommand< T >::HolderCommand ( const HolderCommand< T > &  )
delete

◆ HolderCommand() [2/2]

template<class T >
itk::HolderCommand< T >::HolderCommand ( )
protecteddefault

◆ ~HolderCommand()

template<class T >
itk::HolderCommand< T >::~HolderCommand ( )
overrideprotecteddefault

Member Function Documentation

◆ Execute() [1/2]

template<class T >
void itk::HolderCommand< T >::Execute ( const itk::Object *  ,
const itk::EventObject &   
)
inlineoverridevirtual

Implements itk::Command.

Definition at line 55 of file itkHolderCommand.h.

◆ Execute() [2/2]

template<class T >
void itk::HolderCommand< T >::Execute ( itk::Object *  ,
const itk::EventObject &   
)
inlineoverridevirtual

Implements itk::Command.

Definition at line 54 of file itkHolderCommand.h.

◆ Get() [1/2]

template<class T >
ObjectType& itk::HolderCommand< T >::Get ( )
inline

Definition at line 51 of file itkHolderCommand.h.

References itk::HolderCommand< T >::m_Object.

◆ Get() [2/2]

template<class T >
const ObjectType& itk::HolderCommand< T >::Get ( ) const
inline

Definition at line 52 of file itkHolderCommand.h.

References itk::HolderCommand< T >::m_Object.

◆ itkNewMacro()

template<class T >
itk::HolderCommand< T >::itkNewMacro ( HolderCommand< T >  )

◆ operator=()

template<class T >
void itk::HolderCommand< T >::operator= ( const HolderCommand< T > &  )
delete

◆ Set()

template<class T >
void itk::HolderCommand< T >::Set ( const ObjectType  object)
inline

Definition at line 50 of file itkHolderCommand.h.

References itk::HolderCommand< T >::m_Object.

Member Data Documentation

◆ m_Object

template<class T >
ObjectType itk::HolderCommand< T >::m_Object
private

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