]> Creatis software - bbtk.git/blob - kernel/src/bbtkBlackBoxInputConnector.h
Recreated the complete cvs tree because the project architecture deeply changed
[bbtk.git] / kernel / src / bbtkBlackBoxInputConnector.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbtkBlackBoxInputConnector.h,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 /**
24  * \class bbtk::BlackBoxInputConnector
25  * \brief 
26  */
27  
28 #ifndef __bbtkBlackBoxInputConnector_h__
29 #define __bbtkBlackBoxInputConnector_h__
30
31 #include "bbtkConnection.h"
32 #include <vector>
33
34 namespace bbtk
35 {
36
37
38   class BBTK_EXPORT BlackBoxInputConnector 
39   {
40   public:
41      
42     /// Ctor
43     BlackBoxInputConnector(BlackBox* b);
44     /// Dtor
45     ~BlackBoxInputConnector();    
46     /// Sets a connection
47     void SetConnection(Connection* c);
48     /// Unsets the connection 
49     /// The parameter is USELESS today but would be useful if we allow multiple connections on inputs
50     void UnsetConnection(Connection* c);
51   
52     IOStatus BackwardUpdate();
53
54     /// Returns the connection plugged into this input (const)
55     const Connection* GetConnection() const { return mConnection; }
56     /// Returns the connection plugged into this input
57     Connection* GetConnection() { return mConnection; }
58     /// Returns true iff a connection is connected to it
59     bool IsConnected() const { return (mConnection != 0); }
60     /// Returns the status of the input (UPTODATE | MODIFIED)
61     const IOStatus& GetStatus() const { return mStatus; }
62     ///
63     BlackBox* GetBlackBox() const { return mBox; } 
64   private:
65     /// 
66     BlackBox* mBox;
67     /// The connection plugged into the input
68     Connection* mConnection;
69     /// The status of the input (UPTODATE | MODIFIED)
70     IOStatus mStatus;
71   };
72   
73 }
74 // namespace bbtk
75 #endif