Skip to content
Snippets Groups Projects
Commit 4cf6fce6 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: fix bug in WriterWatcher: the base class copy and assignment are NOT automatic

parent 1e77e32f
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ StandardWriterWatcher
}
StandardWriterWatcher
::StandardWriterWatcher(const StandardWriterWatcher& watch)
::StandardWriterWatcher(const StandardWriterWatcher& watch) : WriterWatcherBase(watch)
{
// Initialize state
m_StarsCount = watch.m_StarsCount;
......@@ -67,6 +67,7 @@ StandardWriterWatcher
::operator =(const StandardWriterWatcher& watch)
{
// Initialize state
WriterWatcherBase::operator=(watch);
m_StarsCount = watch.m_StarsCount;
}
......
......@@ -62,6 +62,9 @@ public:
StandardWriterWatcher(itk::ProcessObject* process, itk::ProcessObject * source,
const std::string& comment = "");
/** Default constructor */
StandardWriterWatcher() : m_StarsCount(0) {};
/** Copy constructor */
StandardWriterWatcher(const StandardWriterWatcher&);
......
......@@ -66,6 +66,11 @@ public:
/** Destructor. */
virtual ~WriterWatcherBase();
const char *GetNameOfClass()
{
return (m_Process.GetPointer() ? m_Process->GetNameOfClass() : "None");
}
/** Methods to access member data */
/** Get a pointer to the process object being watched. */
itk::ProcessObject *GetProcess()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment