X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FDataObject.cxx;h=21b5f1d416d4dbfe0046e11b5799c333ead3f54d;hb=c820e7665125bc5ccda8580a0511f2d8fce3ede8;hp=0b64bec5d93f5d4f757cb8ec5f0ce9a87321371c;hpb=8c23766af88a29c3e830299dffc4b95d9fe61df9;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/DataObject.cxx b/lib/cpPlugins/Interface/DataObject.cxx index 0b64bec..21b5f1d 100644 --- a/lib/cpPlugins/Interface/DataObject.cxx +++ b/lib/cpPlugins/Interface/DataObject.cxx @@ -1,40 +1,79 @@ #include // ------------------------------------------------------------------------- -cpPlugins::Interface::DataObject:: -DataObject( ) - : Superclass( ), - m_Source( NULL ) +std::string cpPlugins::Interface::DataObject:: +GetClassName( ) const { + return( "cpPlugins::Interface::DataObject" ); } // ------------------------------------------------------------------------- -cpPlugins::Interface::DataObject:: -~DataObject( ) +std::string cpPlugins::Interface::DataObject:: +GetClassType( ) const { + return( "DataObject" ); } // ------------------------------------------------------------------------- -std::string cpPlugins::Interface::DataObject:: -GetClassName( ) const +itk::DataObject* cpPlugins::Interface::DataObject:: +GetRealDataObject( ) const { - return( "cpPlugins::Interface::DataObject" ); + return( this->m_RealDataObject ); +} + +// ------------------------------------------------------------------------- +void cpPlugins::Interface::DataObject:: +SetRealDataObject( itk::DataObject* dobj ) +{ + this->m_RealDataObject = dobj; +} + +// ------------------------------------------------------------------------- +cpPlugins::Interface::Object* cpPlugins::Interface::DataObject:: +GetSource( ) +{ + return( this->m_Source ); } // ------------------------------------------------------------------------- -cpPlugins::Interface::ProcessObject* cpPlugins::Interface::DataObject:: -GetSource( ProcessObject* src ) const +const cpPlugins::Interface::Object* cpPlugins::Interface::DataObject:: +GetSource( ) const { return( this->m_Source ); } // ------------------------------------------------------------------------- void cpPlugins::Interface::DataObject:: -SetSource( cpPlugins::Interface::ProcessObject* src ) +SetSource( cpPlugins::Interface::Object* src ) { this->m_Source = src; } -#endif // __CPPLUGINS__INTERFACE__DATAOBJECT__H__ +// ------------------------------------------------------------------------- +void cpPlugins::Interface::DataObject:: +DisconnectPipeline( ) +{ + if( this->m_RealDataObject.IsNotNull( ) ) + { + this->m_RealDataObject->DisconnectPipeline( ); + if( this->m_Source.IsNotNull( ) ) + this->m_Source->Delete( ); + this->Register( ); + + } // fi +} + +// ------------------------------------------------------------------------- +cpPlugins::Interface::DataObject:: +DataObject( ) + : Superclass( ) +{ +} + +// ------------------------------------------------------------------------- +cpPlugins::Interface::DataObject:: +~DataObject( ) +{ +} // eof - $RCSfile$