X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkBlackBoxInputConnector.h;h=4d6a91fa62c0baa944a7a6c6bbe6fa004234c4df;hb=6ac9074f717f22c4ffdc6a70d0704c1b1f8fe842;hp=05e414fbb56852cfab38763f417cb8358d1df429;hpb=3928b4ad06b5b5fd142f696f58a7828d064e2883;p=bbtk.git diff --git a/kernel/src/bbtkBlackBoxInputConnector.h b/kernel/src/bbtkBlackBoxInputConnector.h index 05e414f..4d6a91f 100644 --- a/kernel/src/bbtkBlackBoxInputConnector.h +++ b/kernel/src/bbtkBlackBoxInputConnector.h @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBoxInputConnector.h,v $ Language: C++ - Date: $Date: 2008/12/08 12:53:56 $ - Version: $Revision: 1.5 $ + Date: $Date: 2009/06/08 14:50:03 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -42,7 +42,7 @@ #define __bbtkBlackBoxInputConnector_h__ #include "bbtkConnection.h" -#include "bbtkChangeTime.h" +#include "bbtkPimpl.h" #include namespace bbtk @@ -59,57 +59,37 @@ namespace bbtk BlackBoxInputConnector(BlackBoxPointer b); /// Dtor ~BlackBoxInputConnector(); + /// Sets a connection void SetConnection(Connection* c); /// Unsets the connection /// The parameter is USELESS today but would be useful if we allow multiple connections on inputs void UnsetConnection(Connection* c); - - // IOStatus - void BackwardUpdate(); - - /// Returns the ChangeTime of the output (const) - // const ChangeTime& GetChangeTime() const { return mChangeTime; } - /// Returns the ChangeTime of the output - // ChangeTime& GetChangeTime() { return mChangeTime; } - // bool SetChangeTime(const ChangeTime& t) { return mChangeTime.Set(t); } - /// Returns the connection plugged into this input (const) - Connection* GetConnection() const { return mConnection; } + Connection* GetConnection() const; /// Returns true iff a connection is connected to it - bool IsConnected() const { return (mConnection != 0); } + bool IsConnected() const; + // Recursive execution + void RecursiveExecute(); + + /// Returns the status of the input - IOStatus GetStatus() const { return mStatus; } + IOStatus GetStatus() const; /// Sets the status of the input - void SetStatus(IOStatus s) { mStatus = s; } - + void SetStatus(IOStatus s); - /// Returns the black box which owns the connector - BlackBoxPointer GetBlackBox() const { return mBox.lock(); } - private: - /// - BlackBoxWeakPointer mBox; - /// The connection plugged into the input - Connection* mConnection; - /// The status of the input (UPTODATE | MODIFIED | OUTOFDATE) - IOStatus mStatus; - - // The change time - // ChangeTime mChangeTime; + BlackBoxPointer GetBlackBox() const; - /* - /// Returns the TimeStamp - const TimeStamp& GetTimeStamp() const { return mTimeStamp;} - TimeStamp& GetTimeStamp() { return mTimeStamp;} - /// Set the connector to MODIFIED status and increments the time stamp - void SetModified() - { mStatus = MODIFIED; mTimeStamp.Modified(); } - /// The TimeStamp - TimeStamp mTimeStamp; - */ + + /// Private implementation + BBTK_DECLARE_PIMPL(BlackBoxInputConnector); + + private: + /// Purposedly not implemented + BlackBoxInputConnector(const BlackBoxInputConnector&); }; }