]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/DataObject.cxx
Moved to version 1.0
[cpPlugins.git] / lib / cpPlugins / DataObject.cxx
1 // =========================================================================
2 // @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
3 // =========================================================================
4
5 #include <cpPlugins/DataObject.h>
6 #include <cpPlugins/ProcessObject.h>
7
8 // -------------------------------------------------------------------------
9 bool cpPlugins::DataObject::
10 IsUpdated( const TTimeStamp& d ) const
11 {
12   bool ok = this->Superclass::IsUpdated( d );
13   if( !( this->m_Source.expired( ) ) )
14     ok = this->m_Source.lock( )->IsUpdated( d );
15   return( ok );
16 }
17
18 // -------------------------------------------------------------------------
19 void cpPlugins::DataObject::
20 DisconnectPipeline( )
21 {
22   this->m_Source.reset( );
23 }
24
25 // -------------------------------------------------------------------------
26 void cpPlugins::DataObject::
27 SetSource( cpPlugins::ProcessObject* source )
28 {
29   if( source != NULL )
30     this->m_Source = source->CastWeakPtr< cpPlugins::ProcessObject >( );
31   else
32     this->m_Source.reset( );
33 }
34
35 // -------------------------------------------------------------------------
36 void cpPlugins::DataObject::
37 Update( )
38 {
39   if( !( this->m_Source.expired( ) ) )
40     this->m_Source.lock( )->Cast< cpPlugins::ProcessObject >( )->Update( );
41 }
42
43 // -------------------------------------------------------------------------
44 cpPlugins::DataObject::
45 DataObject( )
46   : Superclass( )
47 {
48 }
49
50 // -------------------------------------------------------------------------
51 cpPlugins::DataObject::
52 ~DataObject( )
53 {
54 }
55
56 // eof - $RCSfile$