]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBoxInputConnector.h
* Major changes on IOStatus update / propagation
[bbtk.git] / kernel / src / bbtkBlackBoxInputConnector.h
index d8cd58c56ba0d38dd207a3efc124c8e3649b1ada..05e414fbb56852cfab38763f417cb8358d1df429 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxInputConnector.h,v $
   Language:  C++
-  Date:      $Date: 2008/10/17 08:18:12 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/12/08 12:53:56 $
+  Version:   $Revision: 1.5 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -42,6 +42,7 @@
 #define __bbtkBlackBoxInputConnector_h__
 
 #include "bbtkConnection.h"
+#include "bbtkChangeTime.h"
 #include <vector>
 
 namespace bbtk
@@ -64,23 +65,51 @@ namespace bbtk
     /// The parameter is USELESS today but would be useful if we allow multiple connections on inputs
     void UnsetConnection(Connection* c);
   
-    IOStatus BackwardUpdate();
+    //    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; }
     /// Returns true iff a connection is connected to it
     bool IsConnected() const { return (mConnection != 0); }
-    /// Returns the status of the input (UPTODATE | MODIFIED)
-    const IOStatus& GetStatus() const { return mStatus; }
-    ///
+    
+
+    /// Returns the status of the input 
+    IOStatus GetStatus() const { return mStatus; }
+    /// Sets the status of the input 
+    void SetStatus(IOStatus s) { mStatus = 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)
+    /// The status of the input (UPTODATE | MODIFIED | OUTOFDATE)
     IOStatus mStatus;
+   // The change time
+    //   ChangeTime mChangeTime;
+
+    /*
+    /// 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;
+    */
   };
   
 }