OSDN Git Service

[dennco] re-working the doTick process flow. The work is still in progress.
[dennco/dennco.git] / Source / layer3 / QtScript / dnqsinputcell.cpp
index 9a34371..e33a175 100644 (file)
@@ -21,8 +21,8 @@
 #include "TKContainer.h"
 #include "TKAxon.h"
 
-DNQSInputCell::DNQSInputCell(TKContainer *container, std::string location, std::string name, bool canInterface):
-    TKCell(container,location,name,canInterface)
+DNQSInputCell::DNQSInputCell(TKContainer *container, std::string location, std::string name):
+    DNCellInterfaceable(container,location,name, true, false), mInputValue(0)
 {
 }
 
@@ -32,6 +32,7 @@ DNQSInputCell::~DNQSInputCell()
 
 bool DNQSInputCell::doTick(float time)
 {
+    (void)time;
     return true;
 }
 
@@ -44,3 +45,14 @@ bool DNQSInputCell::doDestroy()
 {
     return true;
 }
+
+void DNQSInputCell::updateReceptorValue()
+{
+    mAxon->setValue(mInputValue);
+}
+
+void DNQSInputCell::setValue(float value)
+{
+    mInputValue = value;
+    mReceptorValueUpdated = true;
+}