1 /*=========================================================================
4 Module: $RCSfile: bbtkBlackBoxInputConnector.h,v $
6 Date: $Date: 2008/04/22 14:30:25 $
7 Version: $Revision: 1.3 $
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.
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.
17 =========================================================================*/
21 * \brief Class bbtk::BlackBoxInputConnector :
24 * \class bbtk::BlackBoxInputConnector
28 #ifndef __bbtkBlackBoxInputConnector_h__
29 #define __bbtkBlackBoxInputConnector_h__
31 #include "bbtkConnection.h"
38 BBTK_FORWARD_DECLARE_POINTER(BlackBox);
40 class BBTK_EXPORT BlackBoxInputConnector
45 BlackBoxInputConnector(BlackBoxPointer b);
47 ~BlackBoxInputConnector();
49 void SetConnection(Connection* c);
50 /// Unsets the connection
51 /// The parameter is USELESS today but would be useful if we allow multiple connections on inputs
52 void UnsetConnection(Connection* c);
54 IOStatus BackwardUpdate();
56 /// Returns the connection plugged into this input (const)
57 Connection* GetConnection() const { 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; }
63 BlackBoxPointer GetBlackBox() const { return mBox.lock(); }
66 BlackBoxWeakPointer mBox;
67 /// The connection plugged into the input
68 Connection* mConnection;
69 /// The status of the input (UPTODATE | MODIFIED)