Prechádzať zdrojové kódy

Added assignment operator for Windows compatibility.

Sascha Zelzer 14 rokov pred
rodič
commit
42de304569

+ 6 - 0
Libs/PluginFramework/ctkPluginEvent.cpp

@@ -70,6 +70,12 @@ ctkPluginEvent::ctkPluginEvent(const ctkPluginEvent& other)
 
 }
 
+ctkPluginEvent& ctkPluginEvent::operator=(const ctkPluginEvent& other)
+{
+  d = other.d;
+  return *this;
+}
+
 ctkPlugin* ctkPluginEvent::getPlugin() const
 {
   return d->plugin;

+ 2 - 0
Libs/PluginFramework/ctkPluginEvent.h

@@ -170,6 +170,8 @@ public:
 
   ctkPluginEvent(const ctkPluginEvent& other);
 
+  ctkPluginEvent& operator=(const ctkPluginEvent& other);
+
   /**
    * Returns the plugin which had a lifecycle change.
    *

+ 6 - 0
Libs/PluginFramework/ctkPluginFrameworkEvent.cpp

@@ -91,6 +91,12 @@ ctkPluginFrameworkEvent::ctkPluginFrameworkEvent(const ctkPluginFrameworkEvent&
 
 }
 
+ctkPluginFrameworkEvent& ctkPluginFrameworkEvent::operator=(const ctkPluginFrameworkEvent& other)
+{
+  d = other.d;
+  return *this;
+}
+
 QString ctkPluginFrameworkEvent::getErrorString() const
 {
   return d->errorString;

+ 2 - 0
Libs/PluginFramework/ctkPluginFrameworkEvent.h

@@ -152,6 +152,8 @@ public:
 
   ctkPluginFrameworkEvent(const ctkPluginFrameworkEvent& other);
 
+  ctkPluginFrameworkEvent& operator=(const ctkPluginFrameworkEvent& other);
+
   /**
    * Returns the exception error string related to this event.
    *

+ 6 - 0
Libs/PluginFramework/ctkServiceEvent.cpp

@@ -70,6 +70,12 @@ ctkServiceEvent::ctkServiceEvent(const ctkServiceEvent& other)
 
 }
 
+ctkServiceEvent& ctkServiceEvent::operator=(const ctkServiceEvent& other)
+{
+  d = other.d;
+  return *this;
+}
+
 ctkServiceReference ctkServiceEvent::getServiceReference() const
 {
   return d->reference;

+ 2 - 0
Libs/PluginFramework/ctkServiceEvent.h

@@ -129,6 +129,8 @@ public:
 
   ctkServiceEvent(const ctkServiceEvent& other);
 
+  ctkServiceEvent& operator=(const ctkServiceEvent& other);
+
   /**
    * Returns a reference to the service that had a change occur in its
    * lifecycle.