]> Creatis software - bbtk.git/blob - kernel/src/bbtkBlackBoxInputConnector.cxx
Recreated the complete cvs tree because the project architecture deeply changed
[bbtk.git] / kernel / src / bbtkBlackBoxInputConnector.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkBlackBoxInputConnector.cxx,v $
5   Language:  C++
6   Date:      $Date: 2008/01/22 15:02:00 $
7   Version:   $Revision: 1.1.1.1 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 /**
20  *  \file 
21  *  \brief Class bbtk::BlackBoxInputConnector : 
22  */
23 #include "bbtkBlackBoxInputConnector.h"
24 #include "bbtkMessageManager.h"
25
26 namespace bbtk
27 {
28   BlackBoxInputConnector::BlackBoxInputConnector(BlackBox* b)  
29     : mBox(b), mConnection(0), mStatus(MODIFIED)
30   {
31     bbtkDebugMessage("Core",9,"BlackBoxInputConnector::BlackBoxInputConnector()"<<std::endl);
32   }
33
34
35   BlackBoxInputConnector::~BlackBoxInputConnector() 
36   {
37     bbtkDebugMessageInc("Core",9,"BlackBoxInputConnector::~BlackBoxInputConnector()"<<std::endl);
38     if (mConnection) delete mConnection;
39     bbtkDebugDecTab("Core",9);
40   }
41   
42   void BlackBoxInputConnector::SetConnection(Connection* c) 
43   { 
44     bbtkDebugMessage("Core",9,"BlackBoxInputConnector::SetConnection("<<c<<")"<<std::endl);
45     mConnection = c; 
46   }
47   
48   void BlackBoxInputConnector::UnsetConnection(Connection* c) 
49   { 
50     bbtkDebugMessage("Core",9,"BlackBoxInputConnector::UnsetConnection("
51                      <<c<<")"<<std::endl);
52     mConnection = 0; 
53   }
54   
55   IOStatus BlackBoxInputConnector::BackwardUpdate()
56   {
57     bbtkDebugMessageInc("Process",4,"BlackBoxInputConnector::BackwardUpdate()"
58                         <<std::endl);
59
60     if (mConnection) 
61       {
62         IOStatus s = mConnection->BackwardUpdate();
63         mStatus = s;
64       }
65     else 
66       {
67         mStatus = UPTODATE;
68       }
69
70     bbtkDecTab("Process",4);
71
72     return mStatus;
73
74   }
75
76
77   //    void Modified();
78   
79 }
80 // namespace bbtk
81