Program: bbtk
Module: $RCSfile: bbtkConnection.h,v $
Language: C++
- Date: $Date: 2008/04/08 06:59:30 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/04/09 11:16:57 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
virtual void SetModifiedStatus();
std::string GetFullName() const;
+ /// Returns the original initial black box of the connection
+ BlackBox* GetOriginalBlackBoxFrom() const { return mOriginalFrom; }
+ /// Returns the origianl final black box of the connection
+ BlackBox* GetOriginalBlackBoxTo() const { return mOriginalTo; }
+ /// Returns the original output of the initial black box of the connection
+ const std::string& GetOriginalBlackBoxFromOutput() const { return mOriginalOutput; }
+ /// Returns the original input of the final black box of the connection
+ const std::string& GetOriginalBlackBoxToInput() const { return mOriginalInput; }
+
/// Returns the initial black box of the connection
BlackBox* GetBlackBoxFrom() const { return mFrom; }
/// Returns the final black box of the connection
/// Returns the input of the final black box of the connection
const std::string& GetBlackBoxToInput() const { return mInput; }
+ /// Sets the initial black box of the connection
+ void SetBlackBoxFrom(BlackBox* b) { mFrom = b; }
+ /// Sets the final black box of the connection
+ void SetBlackBoxTo(BlackBox* b) { mTo = b; }
/// Sets the output of the initial black box of the connection
void SetBlackBoxFromOutput(const std::string& o) { mOutput = o; }
+ /// Sets the input of the final black box of the connection
+ void SetBlackBoxToInput(const std::string& o) { mInput = o; }
+
+ /// Checks that the connection is ok (throws error if not)
+ void Check() const;
+
protected:
/// Black box origin of the connection
BlackBox* mFrom;
+ BlackBox* mOriginalFrom;
/// Output of mFrom which is connected
std::string mOutput;
+ std::string mOriginalOutput;
/// Output connector of mFrom which is connected
// BlackBoxOutputConnector* mOutputConnector;
/// Black box destination of the connection
BlackBox* mTo;
+ BlackBox* mOriginalTo;
/// Input of mTo which is connected
std::string mInput;
+ std::string mOriginalInput;
/// Input connector of mTo which is connected
// BlackBoxInputConnector* mInputConnector;
/// Adaptor black box if needed