فهرست منبع

fist build after big changes

willi 5 سال پیش
والد
کامیت
7b6b6826e3

+ 281 - 200
.idea/workspace.xml

@@ -15,8 +15,30 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="4ddbafad-b85e-492e-80ec-3c73ef45688f" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/lib/include/IInput.h" afterDir="false" />
       <change afterPath="$PROJECT_DIR$/thirdparty/json/single_include/json.hpp" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/lib/CMakeLists.txt" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/HandlerModule.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/HandlerModule.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/IModule.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/IModule.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/IOutput.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/IOutput.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/IProcessor.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/IProcessor.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/IUnique.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/IUnique.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/Input.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/Input.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/ModuleBase.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ModuleBase.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/Output.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/Output.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/ProcessorBase.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ProcessorBase.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/include/ProcessorManual.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ProcessorManual.h" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/Input.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/Input.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/ModuleBase.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleBase.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/ModuleMath.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleMath.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/Output.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/Output.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/test/test_ModuleMath.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/test/test_ModuleMath.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/thirdparty/json" beforeDir="false" afterPath="$PROJECT_DIR$/thirdparty/json" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
@@ -29,6 +51,52 @@
   <component name="ClangdSettings">
     <option name="formatViaClangd" value="false" />
   </component>
+  <component name="DockManager">
+    <window id="1">
+      <content type="file-editors">
+        <state>
+          <leaf>
+            <file pinned="false" current-in-tab="false">
+              <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+                <provider selected="true" editor-type-id="text-editor">
+                  <state relative-caret-position="510">
+                    <caret line="34" column="23" selection-start-line="34" selection-start-column="23" selection-end-line="34" selection-end-column="23" />
+                    <folding>
+                      <element signature="e#51#69#0" expanded="true" />
+                    </folding>
+                  </state>
+                </provider>
+              </entry>
+            </file>
+            <file pinned="false" current-in-tab="false">
+              <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
+                <provider selected="true" editor-type-id="text-editor">
+                  <state relative-caret-position="495">
+                    <caret line="33" column="23" lean-forward="true" selection-start-line="33" selection-start-column="23" selection-end-line="33" selection-end-column="23" />
+                    <folding>
+                      <element signature="e#57#72#0" expanded="true" />
+                    </folding>
+                  </state>
+                </provider>
+              </entry>
+            </file>
+            <file pinned="false" current-in-tab="true">
+              <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+                <provider selected="true" editor-type-id="text-editor">
+                  <state relative-caret-position="719">
+                    <caret line="67" column="13" lean-forward="true" selection-start-line="67" selection-start-column="13" selection-end-line="67" selection-end-column="13" />
+                    <folding>
+                      <element signature="e#0#23#0" expanded="true" />
+                    </folding>
+                  </state>
+                </provider>
+              </entry>
+            </file>
+          </leaf>
+        </state>
+      </content>
+    </window>
+  </component>
   <component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
   <component name="FavoritesManager">
     <favorites_list name="mdd" />
@@ -36,109 +104,111 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="375">
-              <caret line="25" selection-start-line="25" selection-end-line="25" />
+            <state relative-caret-position="435">
+              <caret line="29" column="24" lean-forward="true" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
               <folding>
-                <element signature="e#0#23#0" expanded="true" />
+                <element signature="e#0#25#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
+        <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="270">
-              <caret line="18" column="33" selection-start-line="18" selection-start-column="33" selection-end-line="18" selection-end-column="33" />
+            <state relative-caret-position="405">
+              <caret line="53" column="23" lean-forward="true" selection-start-line="53" selection-start-column="23" selection-end-line="53" selection-end-column="23" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
+        <entry file="file://$PROJECT_DIR$/lib/include/IUnique.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="405">
-              <caret line="27" selection-start-line="27" selection-end-line="27" />
-              <folding>
-                <element signature="e#45#65#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="135">
+              <caret line="9" column="28" selection-start-line="9" selection-start-column="28" selection-end-line="9" selection-end-column="28" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="345">
-              <caret line="24" column="54" selection-start-line="24" selection-start-column="54" selection-end-line="24" selection-end-column="54" />
+            <state relative-caret-position="450">
+              <caret line="30" column="1" lean-forward="true" selection-start-line="30" selection-start-column="1" selection-end-line="30" selection-end-column="1" />
               <folding>
-                <element signature="e#51#69#0" expanded="true" />
+                <element signature="e#0#28#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/include/ProcessorManual.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="105">
-              <caret line="7" column="40" selection-start-line="7" selection-start-column="40" selection-end-line="7" selection-end-column="40" />
+            <state relative-caret-position="135">
+              <caret line="9" column="37" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="37" />
               <folding>
-                <element signature="e#0#25#0" expanded="true" />
+                <element signature="e#60#86#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="345">
-              <caret line="23" column="34" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
+            <state relative-caret-position="220">
+              <caret line="47" column="10" selection-start-line="47" selection-start-column="10" selection-end-line="47" selection-end-column="10" />
+              <folding>
+                <element signature="e#0#24#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/IUnique.h">
+        <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="195">
-              <caret line="13" column="1" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
+            <state relative-caret-position="437">
+              <caret line="35" column="14" lean-forward="true" selection-start-line="35" selection-start-column="14" selection-end-line="35" selection-end-column="14" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="480">
-              <caret line="32" column="55" selection-start-line="32" selection-start-column="55" selection-end-line="32" selection-end-column="55" />
-              <folding>
-                <element signature="e#57#72#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="572">
+              <caret line="324" column="21" selection-start-line="324" selection-start-column="21" selection-end-line="324" selection-end-column="21" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/IProcessor.h">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="165">
-              <caret line="11" column="76" selection-start-line="11" selection-start-column="76" selection-end-line="11" selection-end-column="76" />
+            <state relative-caret-position="77">
+              <caret line="38" column="31" selection-start-line="38" selection-start-column="31" selection-end-line="38" selection-end-column="31" />
               <folding>
-                <element signature="e#51#71#0" expanded="true" />
+                <element signature="e#0#24#0" expanded="true" />
+                <element signature="e#70#98#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/HandlerModule.h">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="150">
-              <caret line="10" column="31" selection-start-line="10" selection-start-column="31" selection-end-line="10" selection-end-column="31" />
+            <state relative-caret-position="-238">
+              <caret line="43" column="47" selection-start-line="43" selection-start-column="47" selection-end-line="43" selection-end-column="47" />
+              <folding>
+                <element signature="e#0#24#0" expanded="true" />
+                <element signature="e#70#98#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
@@ -173,14 +243,12 @@
         <option value="$PROJECT_DIR$/lib/include/IListener.h" />
         <option value="$PROJECT_DIR$/README.MD" />
         <option value="$PROJECT_DIR$/lib/include/IValue.h" />
-        <option value="$PROJECT_DIR$/lib/include/IInput.h" />
         <option value="$PROJECT_DIR$/lib/include/BaseModule.h" />
         <option value="$PROJECT_DIR$/lib/include/Data.h" />
         <option value="$PROJECT_DIR$/lib/include/IData.h" />
         <option value="$PROJECT_DIR$/lib/include/IType.h" />
         <option value="$PROJECT_DIR$/thirdparty/json/single_include/json.hpp" />
         <option value="$PROJECT_DIR$/CMakeLists.txt" />
-        <option value="$PROJECT_DIR$/lib/test/test_ModuleMath.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorBase.h.cpp" />
         <option value="$PROJECT_DIR$/lib/include/ModuleHandler.h" />
         <option value="$PROJECT_DIR$/lib/include/ModulBase.h" />
@@ -189,30 +257,32 @@
         <option value="$PROJECT_DIR$/lib/include/ModulePass.h" />
         <option value="$PROJECT_DIR$/lib/src/ModulePass.cpp" />
         <option value="$PROJECT_DIR$/lib/include/ModuleSwitch.h" />
-        <option value="$PROJECT_DIR$/lib/include/ProcessorManual.h" />
         <option value="$PROJECT_DIR$/lib/test/CMakeLists.txt" />
-        <option value="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" />
-        <option value="$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp" />
-        <option value="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" />
-        <option value="$PROJECT_DIR$/lib/include/IUnique.h" />
+        <option value="$PROJECT_DIR$/lib/include/ModuleMath.h" />
         <option value="$PROJECT_DIR$/lib/include/UniqueBase.h" />
         <option value="$PROJECT_DIR$/lib/src/UniqueBase.cpp" />
-        <option value="$PROJECT_DIR$/lib/include/IOutput.h" />
+        <option value="$PROJECT_DIR$/lib/src/Output.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/IUnique.h" />
         <option value="$PROJECT_DIR$/lib/CMakeLists.txt" />
         <option value="$PROJECT_DIR$/lib/include/Output.h" />
+        <option value="$PROJECT_DIR$/lib/include/IInput.h" />
         <option value="$PROJECT_DIR$/lib/include/Input.h" />
         <option value="$PROJECT_DIR$/lib/src/Input.cpp" />
-        <option value="$PROJECT_DIR$/lib/src/Output.cpp" />
-        <option value="$PROJECT_DIR$/lib/include/ModuleMath.h" />
-        <option value="$PROJECT_DIR$/lib/src/ModuleMath.cpp" />
-        <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/ModuleBase.h" />
         <option value="$PROJECT_DIR$/lib/include/HandlerModule.h" />
+        <option value="$PROJECT_DIR$/lib/include/IOutput.h" />
+        <option value="$PROJECT_DIR$/lib/include/IModule.h" />
         <option value="$PROJECT_DIR$/lib/include/IProcessor.h" />
-        <option value="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
+        <option value="$PROJECT_DIR$/lib/test/test_ModuleMath.cpp" />
+        <option value="$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp" />
         <option value="$PROJECT_DIR$/lib/include/ProcessorBase.h" />
+        <option value="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/ProcessorManual.h" />
+        <option value="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ModuleBase.cpp" />
-        <option value="$PROJECT_DIR$/lib/include/IModule.h" />
-        <option value="$PROJECT_DIR$/lib/include/ModuleBase.h" />
+        <option value="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleMath.cpp" />
       </list>
     </option>
   </component>
@@ -220,7 +290,7 @@
   <component name="OCResolveContextSettings">
     <option name="configuration" value="0-mdd_lib" />
   </component>
-  <component name="ProjectFrameBounds">
+  <component name="ProjectFrameBounds" extendedState="6">
     <option name="x" value="406" />
     <option name="y" value="115" />
     <option name="width" value="1440" />
@@ -412,9 +482,6 @@
     <servers />
   </component>
   <component name="TestHistory">
-    <history-entry file="All_in_auslegung_test - 2020.05.13 at 19h 45m 12s.xml">
-      <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
-    </history-entry>
     <history-entry file="ModuleMath - 2020.05.13 at 19h 45m 27s.xml">
       <configuration name="ModuleMath" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
@@ -442,9 +509,12 @@
     <history-entry file="All_in_auslegung_test - 2020.05.21 at 16h 51m 43s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
+    <history-entry file="All_in_auslegung_test - 2020.05.25 at 20h 54m 03s.xml">
+      <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
+    </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="131539000" />
+    <option name="totallyTimeSpent" value="147730000" />
   </component>
   <component name="TodoView" selected-index="2">
     <todo-panel id="selected-file">
@@ -456,21 +526,22 @@
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="406" y="115" width="1440" height="927" extended-state="0" />
+    <frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
+    <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.32281205" />
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.24012807" />
       <window_info id="Structure" order="1" sideWeight="0.5007825" side_tool="true" weight="0.22572039" />
       <window_info id="Favorites" order="2" sideWeight="0.5007825" side_tool="true" weight="0.22572039" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info anchor="bottom" id="Run" order="2" weight="0.2980063" />
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.2980063" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.39874083" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" weight="0.32948583" />
       <window_info anchor="bottom" id="Database Changes" order="7" />
       <window_info anchor="bottom" id="Messages" order="8" weight="0.32423925" />
-      <window_info active="true" anchor="bottom" id="Terminal" order="9" visible="true" weight="0.30325815" />
+      <window_info anchor="bottom" id="Terminal" order="9" weight="0.25393495" />
       <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="11" weight="0.32948583" />
       <window_info anchor="bottom" id="CMake" order="12" weight="0.32948583" />
@@ -480,19 +551,19 @@
       <window_info anchor="right" id="Database" order="3" />
     </layout>
     <layout-to-restore>
-      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2230523" />
-      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
-      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.24012807" />
+      <window_info id="Structure" order="1" sideWeight="0.5007825" side_tool="true" weight="0.22572039" />
+      <window_info id="Favorites" order="2" sideWeight="0.5007825" side_tool="true" weight="0.22572039" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.2980063" />
+      <window_info anchor="bottom" id="Run" order="2" weight="0.2980063" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.39874083" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" weight="0.32948583" />
       <window_info anchor="bottom" id="Database Changes" order="7" />
       <window_info anchor="bottom" id="Messages" order="8" weight="0.32423925" />
-      <window_info anchor="bottom" id="Terminal" order="9" weight="0.25498426" />
+      <window_info anchor="bottom" id="Terminal" order="9" visible="true" weight="0.25393495" />
       <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="11" weight="0.32948583" />
       <window_info anchor="bottom" id="CMake" order="12" weight="0.32948583" />
@@ -506,20 +577,6 @@
     <option name="version" value="1" />
   </component>
   <component name="XDebuggerManager">
-    <breakpoint-manager>
-      <breakpoints>
-        <line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
-          <url>file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp</url>
-          <line>61</line>
-          <option name="timeStamp" value="1" />
-        </line-breakpoint>
-        <line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
-          <url>file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp</url>
-          <line>76</line>
-          <option name="timeStamp" value="2" />
-        </line-breakpoint>
-      </breakpoints>
-    </breakpoint-manager>
     <watches-manager>
       <configuration name="CMakeRunConfiguration">
         <watch expression="this-&gt;_inputs[0].output.get()" />
@@ -527,7 +584,6 @@
     </watches-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/lib/include/IValue.h" />
     <entry file="file://$PROJECT_DIR$/lib/src/BaseModule.cpp" />
     <entry file="file:///usr/include/c++/7/bits/shared_ptr.h">
       <provider selected="true" editor-type-id="text-editor">
@@ -554,13 +610,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IListener.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="60">
-          <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/thirdparty/rapidjson/include/rapidjson/document.h" />
     <entry file="file://$PROJECT_DIR$/.gitignore">
       <provider selected="true" editor-type-id="text-editor">
@@ -597,13 +646,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/thirdparty/json/single_include/nlohmann/json.hpp">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="163">
-          <caret line="14988" selection-start-line="14988" selection-end-line="14988" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/README.MD">
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
         <state split_layout="SPLIT">
@@ -616,228 +658,267 @@
     <entry file="file://$PROJECT_DIR$/lib/include/ModuleCompare.h" />
     <entry file="file://$PROJECT_DIR$/lib/include/ModulePass.h" />
     <entry file="file://$PROJECT_DIR$/lib/src/ModulePass.cpp" />
-    <entry file="file://$PROJECT_DIR$/lib/include/ProcessorManual.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/UniqueBase.cpp">
+      <provider selected="true" editor-type-id="text-editor" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/UniqueBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="105">
-          <caret line="7" column="43" selection-start-line="7" selection-start-column="43" selection-end-line="7" selection-end-column="43" />
-          <folding>
-            <element signature="e#60#86#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="60">
+          <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/test/CMakeLists.txt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="705">
-          <caret line="47" column="44" selection-start-line="47" selection-start-column="44" selection-end-line="47" selection-end-column="44" />
-          <folding>
-            <element signature="e#0#24#0" expanded="true" />
-            <element signature="e#70#98#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="135">
+          <caret line="9" column="7" lean-forward="true" selection-start-line="9" selection-start-column="7" selection-end-line="9" selection-end-column="7" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/IType.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="75">
-          <caret line="5" column="2" selection-start-line="5" selection-start-column="2" selection-end-line="5" selection-end-column="31" />
-          <folding>
-            <element signature="e#0#24#0" expanded="true" />
-          </folding>
+          <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/IListener.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="420">
-          <caret line="28" column="25" selection-start-line="28" selection-start-column="15" selection-end-line="28" selection-end-column="25" />
-          <folding>
-            <element signature="e#0#28#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="60">
+          <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/CMakeLists.txt">
+    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="45">
-          <caret line="3" column="33" selection-start-line="3" selection-start-column="33" selection-end-line="3" selection-end-column="33" />
+        <state relative-caret-position="180">
+          <caret line="12" column="70" selection-start-line="12" selection-start-column="70" selection-end-line="12" selection-end-column="70" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1170">
-          <caret line="78" column="74" selection-start-line="78" selection-start-column="68" selection-end-line="78" selection-end-column="74" />
+        <state relative-caret-position="480">
+          <caret line="32" column="16" selection-start-line="32" selection-start-column="16" selection-end-line="32" selection-end-column="16" />
           <folding>
-            <element signature="e#0#24#0" expanded="true" />
-            <element signature="e#70#98#0" expanded="true" />
+            <element signature="e#41#58#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleSwitch.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/Input.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="120">
-          <caret line="8" column="16" selection-start-line="8" selection-start-column="16" selection-end-line="8" selection-end-column="16" />
+        <state relative-caret-position="495">
+          <caret line="33" column="35" lean-forward="true" selection-start-line="33" selection-start-column="35" selection-end-line="33" selection-end-column="35" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
+    <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="105">
+          <caret line="7" column="23" lean-forward="true" selection-start-line="7" selection-start-column="23" selection-end-line="7" selection-end-column="23" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/IInput.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="150">
+          <caret line="10" column="46" selection-start-line="10" selection-start-column="16" selection-end-line="10" selection-end-column="46" />
+          <folding>
+            <element signature="e#43#63#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/HandlerModule.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="180">
-          <caret line="12" column="70" selection-start-line="12" selection-start-column="70" selection-end-line="12" selection-end-column="70" />
+          <caret line="12" column="35" selection-start-line="12" selection-start-column="35" selection-end-line="12" selection-end-column="35" />
+          <folding>
+            <element signature="e#56#73#0" expanded="true" />
+            <element signature="e#123#132#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IType.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="75">
-          <caret line="5" selection-start-line="5" selection-end-line="5" />
+        <state relative-caret-position="435">
+          <caret line="29" column="27" selection-start-line="29" selection-start-column="27" selection-end-line="29" selection-end-column="27" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
+    <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="345">
-          <caret line="23" column="28" selection-start-line="23" selection-start-column="28" selection-end-line="23" selection-end-column="28" />
+          <caret line="23" column="59" selection-start-line="23" selection-start-column="59" selection-end-line="23" selection-end-column="59" />
+          <folding>
+            <element signature="e#42#62#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/UniqueBase.h" />
     <entry file="file://$PROJECT_DIR$/lib/include/IOutput.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="180">
-          <caret line="12" column="43" selection-start-line="12" selection-start-column="43" selection-end-line="12" selection-end-column="43" />
+        <state relative-caret-position="210">
+          <caret line="14" column="38" lean-forward="true" selection-start-line="14" selection-start-column="38" selection-end-line="14" selection-end-column="38" />
           <folding>
             <element signature="e#44#63#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/UniqueBase.cpp" />
-    <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="375">
-          <caret line="25" column="17" lean-forward="true" selection-start-line="25" selection-start-column="17" selection-end-line="25" selection-end-column="17" />
+        <state relative-caret-position="255">
+          <caret line="17" column="8" lean-forward="true" selection-start-line="17" selection-start-column="8" selection-end-line="18" selection-end-column="60" />
           <folding>
-            <element signature="e#41#58#0" expanded="true" />
+            <element signature="e#45#65#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/Input.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/IProcessor.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="435">
-          <caret line="29" column="24" lean-forward="true" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
+        <state relative-caret-position="285">
+          <caret line="19" lean-forward="true" selection-start-line="19" selection-end-line="19" />
+          <folding>
+            <element signature="e#51#71#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleSwitch.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="324">
-          <caret line="370" column="46" lean-forward="true" selection-start-line="370" selection-start-column="46" selection-end-line="370" selection-end-column="46" />
+        <state relative-caret-position="135">
+          <caret line="9" column="15" lean-forward="true" selection-start-line="9" selection-start-column="15" selection-end-line="9" selection-end-column="15" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="90">
-          <caret line="6" column="21" lean-forward="true" selection-start-line="6" selection-start-column="21" selection-end-line="6" selection-end-column="21" />
+        <state relative-caret-position="435">
+          <caret line="29" column="24" lean-forward="true" selection-start-line="29" selection-start-column="24" selection-end-line="29" selection-end-column="24" />
+          <folding>
+            <element signature="e#0#25#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="330">
-          <caret line="22" column="21" selection-start-line="22" selection-start-column="21" selection-end-line="22" selection-end-column="21" />
+        <state relative-caret-position="510">
+          <caret line="34" column="23" selection-start-line="34" selection-start-column="23" selection-end-line="34" selection-end-column="23" />
+          <folding>
+            <element signature="e#51#69#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/IUnique.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="135">
+          <caret line="9" column="28" selection-start-line="9" selection-start-column="28" selection-end-line="9" selection-end-column="28" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="375">
-          <caret line="25" selection-start-line="25" selection-end-line="25" />
+        <state relative-caret-position="495">
+          <caret line="33" column="23" lean-forward="true" selection-start-line="33" selection-start-column="23" selection-end-line="33" selection-end-column="23" />
           <folding>
-            <element signature="e#0#23#0" expanded="true" />
+            <element signature="e#57#72#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="18" column="33" selection-start-line="18" selection-start-column="33" selection-end-line="18" selection-end-column="33" />
+        <state relative-caret-position="405">
+          <caret line="53" column="23" lean-forward="true" selection-start-line="53" selection-start-column="23" selection-end-line="53" selection-end-column="23" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
+    <entry file="file://$PROJECT_DIR$/thirdparty/json/single_include/nlohmann/json.hpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="405">
-          <caret line="27" selection-start-line="27" selection-end-line="27" />
+        <state relative-caret-position="720">
+          <caret line="48" column="27" lean-forward="true" selection-start-line="48" selection-start-column="27" selection-end-line="48" selection-end-column="27" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ProcessorManual.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="135">
+          <caret line="9" column="37" selection-start-line="9" selection-start-column="37" selection-end-line="9" selection-end-column="37" />
           <folding>
-            <element signature="e#45#65#0" expanded="true" />
+            <element signature="e#60#86#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="105">
-          <caret line="7" column="40" selection-start-line="7" selection-start-column="40" selection-end-line="7" selection-end-column="40" />
+        <state relative-caret-position="719">
+          <caret line="67" column="13" lean-forward="true" selection-start-line="67" selection-start-column="13" selection-end-line="67" selection-end-column="13" />
           <folding>
-            <element signature="e#0#25#0" expanded="true" />
+            <element signature="e#0#23#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="345">
-          <caret line="23" column="34" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
+        <state relative-caret-position="450">
+          <caret line="30" column="1" lean-forward="true" selection-start-line="30" selection-start-column="1" selection-end-line="30" selection-end-column="1" />
+          <folding>
+            <element signature="e#0#28#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IUnique.h">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="195">
-          <caret line="13" column="1" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" />
+        <state relative-caret-position="77">
+          <caret line="38" column="31" selection-start-line="38" selection-start-column="31" selection-end-line="38" selection-end-column="31" />
+          <folding>
+            <element signature="e#0#24#0" expanded="true" />
+            <element signature="e#70#98#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="480">
-          <caret line="32" column="55" selection-start-line="32" selection-start-column="55" selection-end-line="32" selection-end-column="55" />
+        <state relative-caret-position="-238">
+          <caret line="43" column="47" selection-start-line="43" selection-start-column="47" selection-end-line="43" selection-end-column="47" />
           <folding>
-            <element signature="e#57#72#0" expanded="true" />
+            <element signature="e#0#24#0" expanded="true" />
+            <element signature="e#70#98#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IProcessor.h">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="165">
-          <caret line="11" column="76" selection-start-line="11" selection-start-column="76" selection-end-line="11" selection-end-column="76" />
+        <state relative-caret-position="220">
+          <caret line="47" column="10" selection-start-line="47" selection-start-column="10" selection-end-line="47" selection-end-column="10" />
           <folding>
-            <element signature="e#51#71#0" expanded="true" />
+            <element signature="e#0#24#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/HandlerModule.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="150">
-          <caret line="10" column="31" selection-start-line="10" selection-start-column="31" selection-end-line="10" selection-end-column="31" />
+        <state relative-caret-position="437">
+          <caret line="35" column="14" lean-forward="true" selection-start-line="35" selection-start-column="14" selection-end-line="35" selection-end-column="14" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="345">
-          <caret line="24" column="54" selection-start-line="24" selection-start-column="54" selection-end-line="24" selection-end-column="54" />
-          <folding>
-            <element signature="e#51#69#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="572">
+          <caret line="324" column="21" selection-start-line="324" selection-start-column="21" selection-end-line="324" selection-end-column="21" />
         </state>
       </provider>
     </entry>

+ 1 - 0
lib/CMakeLists.txt

@@ -5,6 +5,7 @@ project(mdd_lib)
 
 add_library(${PROJECT_NAME} STATIC
         include/HandlerModule
+        include/Input.h
         include/IListener.h
         include/IModule.h
         include/Input.h

+ 13 - 9
lib/include/HandlerModule.h

@@ -1,15 +1,19 @@
 #ifndef MDD_HANDLERMODULE_H
 #define MDD_HANDLERMODULE_H
 #include <string>
+#include <IModule.h>
 
-struct HandlerModule{
-public:
-    std::string moduleHandler;
-    std::string accessHandler;
-    HandlerModule(std::string module, std::string access){
-        moduleHandler = module;
-        accessHandler = access;
-    }
-};
+namespace mdd{
+    template<class T>
+    class HandlerModule{
+    public:
+        std::shared_ptr<IModule> moduleHandler;
+        std::shared_ptr<T> accessHandler;
+        HandlerModule(std::shared_ptr<IModule> module, std::shared_ptr<T> access){
+            moduleHandler = module;
+            accessHandler = access;
+        }
+    };
+}
 
 #endif //MDD_MODULEHANDLER_H

+ 16 - 0
lib/include/IInput.h

@@ -0,0 +1,16 @@
+#ifndef MDD_IINPUT_H
+#define MDD_IINPUT_H
+
+#include "IUnique.h"
+#include "IOutput.h"
+namespace mdd{
+    class IInput : public IUnique{
+    public:
+        virtual const json& getValue() = 0;
+        virtual json& setDefaultValue() = 0;
+        virtual bool verify(const json & data) = 0;
+        virtual bool connect(std::shared_ptr<IOutput> output) = 0;
+        virtual ~IInput() = default;
+    };
+}
+#endif

+ 4 - 5
lib/include/IModule.h

@@ -2,6 +2,7 @@
 #define MDD_IModule_H
 
 #include "IOutput.h"
+#include "IInput.h"
 #include <string>
 #include <vector>
 #include <memory>
@@ -11,15 +12,13 @@ namespace mdd {
 
     class IModule : public IUnique{
     public:
-        virtual bool connectInput(std::string input_id, std::shared_ptr<IOutput> output) = 0;
-        virtual json& setInputDefaultValue(std::string input_id) = 0;
-        virtual json& setInputDefaultValue(int handler) = 0;
-        virtual const json& getInputValue(std::string input_id) = 0;
+        virtual void updateID() = 0;
         virtual std::vector<std::string> getInputs() = 0;
-        virtual std::vector<std::string> getInputIDs() = 0;
         virtual std::vector<std::string> getOutputs() = 0;
+        virtual std::vector<std::string> getInputIDs() = 0;
         virtual std::vector<std::string> getOutputIDs() = 0;
         virtual std::shared_ptr<IOutput> getOutput(std::string output_id) = 0;
+        virtual std::shared_ptr<IInput> getInput(std::string input_id) = 0;
         virtual bool update() = 0;
         virtual ~IModule() = default;
     };

+ 2 - 1
lib/include/IOutput.h

@@ -8,9 +8,10 @@ namespace mdd
 {
     class IModule;
 
-    class IOutput : IUnique{
+    class IOutput : public IUnique{
     public:
         virtual const json& getValue() = 0;
+        virtual json& getValueInternal() = 0;
         virtual bool hasChanged() = 0;
         virtual void resetChange() = 0;
         virtual ~IOutput() = default;

+ 1 - 0
lib/include/IProcessor.h

@@ -11,6 +11,7 @@ namespace mdd
     public:
         virtual std::string  addModule(std::shared_ptr<IModule> module) = 0;
         virtual std::vector<std::string> getModules() = 0;
+        virtual std::vector<std::string> getModuleIDs() = 0;
         virtual std::shared_ptr<IModule> getModule(std::string module_id) = 0;
     };
 }

+ 1 - 1
lib/include/IUnique.h

@@ -5,7 +5,7 @@
 namespace mdd{
     class IUnique{
     public:
-        virtual void setType(std::string type) = 0;
+        virtual std::string setType(std::string type) = 0;
         virtual std::string getType() = 0;
         virtual std::string getID() = 0;
         virtual std::string setPrefix(std::string prefix) = 0;

+ 12 - 7
lib/include/Input.h

@@ -8,26 +8,31 @@
 #include "IUnique.h"
 
 namespace mdd {
-    class Input : public IUnique{
+    class Input : public IInput{
     private:
         std::string _prefix;
         std::string _type;
         int _appendix;
 
-    public:
-        json value;
-        std::function<bool(const json &)> verification;
-        std::shared_ptr <IOutput> output;
-
+        json _value;
+        std::function<bool(const json &)> _verification;
+        std::shared_ptr <IOutput> _output;
 
+    public:
         Input(const std::string &type, int appendix, const json &default_value,
               const std::function<bool(const json &)> &verification = [](
                       const json &) { return true; });
-        void setType(std::string type) override;
+        std::string setType(std::string type) override;
         std::string getType() override;
         std::string getID() override;
         std::string setPrefix(std::string prefix) override;
         std::string setAppendix(int appendix) override;
+
+        const json& getValue() override;
+        json& setDefaultValue() override;
+        bool verify(const json & data) override;
+        bool connect(std::shared_ptr<IOutput> output) override;
+
     };
 }
 

+ 13 - 11
lib/include/ModuleBase.h

@@ -11,29 +11,31 @@ class ModuleBase : public  IModule{
         std::string _prefix;
         std::string _type;
         int _appendix;
-        std::vector<Input> _inputs;
+        std::vector<std::shared_ptr<Input>> _inputs;
         std::vector<std::shared_ptr<Output>> _outputs;
 
+    protected:
+        std::shared_ptr<IOutput> getOutput(int handle);
+        std::shared_ptr<IInput> getInput(int handle);
+        int addInput(const std::string& type, int appendix, const json& value,
+                         const std::function<bool(const json&)>& verification = [](
+                                 const json&) { return true; });
+        int addOutput(const std::string& type, int appendix, const json& initial);
+
+
     public:
-        std::string addInput(const std::string& type, int appendix, const json& value,
-                     const std::function<bool(const json&)>& verification = [](
-                             const json&) { return true; });
-        json& setInputDefaultValue(int handler) override;
-        json& setInputDefaultValue(std::string input_id) override;
-        const json& getInputValue(std::string input_id) override;
-        bool connectInput(std::string input_id, std::shared_ptr<IOutput> output) override;
         std::vector<std::string> getInputs() override;
         std::vector<std::string> getInputIDs() override;
         std::vector<std::string> getOutputs() override;
         std::vector<std::string> getOutputIDs() override;
         std::shared_ptr<IOutput> getOutput(std::string output_id) override;
-        std::string addOutput(const std::string& type, int appendix, const json& initial);
-        json &setOutputValue(int handle);
-        void setType(std::string type) override;
+        std::shared_ptr<IInput> getInput(std::string input_id) override;
+        std::string setType(std::string type) override;
         std::string getType() override;
         std::string getID() override;
         std::string setPrefix(std::string prefix) override;
         std::string setAppendix(int appendix) override;
+        void updateID() override ;
     };
 }
 #endif //MDD_BASEMODULE_H

+ 2 - 3
lib/include/Output.h

@@ -2,7 +2,6 @@
 #define MDD_OUTPUT_H
 #include "IOutput.h"
 #include "IModule.h"
-#include "UniqueBase.h"
 
 namespace mdd {
     class Output : public IOutput{
@@ -16,10 +15,10 @@ namespace mdd {
     public:
         Output(const std::string& type, int appendix, const json& initial);
         const json& getValue() override;
-        json& getValueInternal();
+        json& getValueInternal() override;
         bool hasChanged() override;
         void resetChange() override;
-        void setType(std::string type) override;
+        std::string setType(std::string type) override;
         std::string getType() override;
         std::string getID() override;
         std::string setPrefix(std::string prefix) override;

+ 32 - 15
lib/include/ProcessorBase.h

@@ -12,30 +12,47 @@ namespace mdd {
         std::string _prefix;
         std::string _type;
         int _appendix;
-        std::vector<Input> _processor_inputs;
+
+        std::vector<std::shared_ptr<Input>> _processor_inputs;
         std::vector<std::shared_ptr<Output>> _processor_outputs;
 
-        std::vector<HandlerModule> _module_inputs;
-        std::vector<HandlerModule> _module_outputs;
+        std::vector<HandlerModule<IInput>> _module_inputs;
+        std::vector<HandlerModule<IOutput>> _module_outputs;
         std::vector<std::shared_ptr<IModule>> _modules;
+
+    protected:
+        int addProcesorInput(const std::string& type, int appendix,  const json& value,
+        const std::function<bool(const json&)>& verification = [](
+                const json&) { return true; });
+        int addProcessorOutput(const std::string& type, int appendix, const json& initial);
+        std::shared_ptr<IOutput> getProcessorOutput(int handle);
+        std::shared_ptr<IInput> getProcessorInput(int handle);
+        std::shared_ptr<IModule> getModule(int handle);
+
     public:
-        void setType(std:: string type) override;
+        std::string getID() override ;
+        std::string setType(std:: string type) override;
         std::string getType() override;
+        std::string setPrefix(std::string prefix) override;
+        std::string setAppendix(int appendix) override;
+        void updateID() override ;
+
         std::string addModule(std::shared_ptr<IModule> module) override ;
-        std::string addProcesorInput(const std::string& type, int  const json& value,
-                     const std::function<bool(const json&)>& verification = [](
-                             const json&) { return true; });
-        std::string addModuleInput(std::string moduleHandler, std::string inputHandler);
-        std::string addModuleOutput(std::string moduleHandler, std::string outputHandler);
-        std::string addProcessorOutput(const std::string& type, const json& initial);
-        json& setInputDefaultValue(std::string input_id) override;
-        json& setOutputValue(int handle);
-        const json& getInputValue(int handle) override;
-        bool connectInput(std::string input_id, std::shared_ptr<IOutput> output) override;
+        std::string addModuleInput(std::string module_ID, std::string input_ID);
+        std::string addModuleInput(std::shared_ptr<IModule> module, std::shared_ptr<IInput> input);
+        std::string addModuleOutput(std::string module_ID, std::string output_ID);
+        std::string addModuleOutput(std::shared_ptr<IModule> module, std::shared_ptr<IOutput> output);
+
         std::vector<std::string> getInputs() override;
         std::vector<std::string> getOutputs() override;
-        std::shared_ptr<IOutput> getOutput(std::string output_id) override;
         std::vector<std::string> getModules() override;
+
+        std::vector<std::string> getInputIDs();
+        std::vector<std::string> getOutputIDs();
+        std::vector<std::string> getModuleIDs();
+
+        std::shared_ptr<IOutput> getOutput(std::string output_id) override;
+        std::shared_ptr<IInput> getInput(std::string input_id) override;
         std::shared_ptr<IModule> getModule(std::string module_id) override;
     };
 }

+ 0 - 3
lib/include/ProcessorManual.h

@@ -4,11 +4,8 @@
 #include "Output.h"
 namespace mdd {
     class ProcessorManual : public ProcessorBase {
-    private:
-        std::shared_ptr<Output> _iteration;
     public:
         ProcessorManual();
-
         bool update() override;
         std::shared_ptr<IOutput> getIteration();
     };

+ 23 - 3
lib/src/Input.cpp

@@ -4,14 +4,15 @@ namespace mdd{
     Input::Input(const std::string& type, int appendix, const json& default_value,
                  const std::function<bool(const json&)>& verification) {
         _type = type;
-        value = default_value;
-        this->verification = std::move(verification);
+        _value = default_value;
+        _verification = std::move(verification);
         _prefix = "";
         _appendix = appendix;
     }
 
-    void Input::setType(std::string type){
+    std::string Input::setType(std::string type){
         _type = type;
+        return getID();
     }
     std::string Input::getType(){
         return  _type;
@@ -29,4 +30,23 @@ namespace mdd{
         _appendix = appendix;
         return  getID();
     }
+
+    const json& Input::getValue() {
+        return _value;
+    }
+
+    json& Input::setDefaultValue(){
+        return _value;
+    }
+
+    bool Input::verify(const json & data){
+        return _verification(data);
+    }
+
+    bool Input::connect(std::shared_ptr<IOutput> output){
+        if (verify(output->getValue())) {
+            _output = output;
+            return true;
+        }
+    }
 }

+ 41 - 69
lib/src/ModuleBase.cpp

@@ -3,52 +3,19 @@
 
 namespace mdd {
 
-    void ModuleBase::setType(std:: string type){
+    std::string ModuleBase::setType(std:: string type){
         _type=type;
-        std::string new_prefix =  _prefix + "/" + _type + std::to_string(_appendix);
-        for (auto &input  : _inputs){
-            input.setPrefix(new_prefix);
-        }
-        for (auto &output  : _outputs){
-            output->setPrefix(new_prefix);
-        }
+        updateID();
+        return getID();
     }
     std::string ModuleBase::getType(){
         return _type;
     }
 
-    json& ModuleBase::setInputDefaultValue(std::string input_id) {
-        auto handler = std::find(_inputs.begin(), _inputs.end(), input_id);
-        if (handler != _inputs.end()){
-            return handler->value;
-        }
-    }
-
-    json& ModuleBase::setInputDefaultValue(int handle) {
-        return _inputs[handle].value;
-    }
-
-    const json& ModuleBase::getInputValue(int handle) {
-        if (_inputs[handle].output == nullptr)
-            return _inputs[handle].value;
-
-        return _inputs[handle].output->getValue();
-
-    }
-
-    json& ModuleBase::setOutputValue(int handle) {
-        static json empty;
-        if (_outputs.size() <= handle)
-            return empty;
-
-        return _outputs[handle]->getValueInternal();
-    }
-
-
     std::vector<std::string> ModuleBase::getInputs() {
         std::vector<std::string> ret;
         for (auto &input  : _inputs) {
-            ret.push_back(input.getType());
+            ret.push_back(input->getType());
         }
         return ret;
     }
@@ -56,7 +23,7 @@ namespace mdd {
     std::vector<std::string> ModuleBase::getInputIDs(){
         std::vector<std::string> ret;
         for (auto &input  : _inputs) {
-            ret.push_back(input.getID());
+            ret.push_back(input->getID());
         }
         return ret;
     }
@@ -77,36 +44,44 @@ namespace mdd {
         return ret;
     }
 
-    std::string ModuleBase::addInput(const std::string& type, int appendix , const json& value,
+    int ModuleBase::addInput(const std::string& type, int appendix , const json& value,
                              const std::function<bool(const json&)>& verification) {
-        _inputs.emplace_back(Input(type, appendix, value, verification));
-        _inputs[_inputs.size() - 1].setPrefix(getID());
-        return _inputs[_inputs.size() - 1].getID();
+        _inputs.emplace_back(std::make_shared<Input>(type, appendix, value, verification));
+        _inputs.back()->setPrefix(getID());
+        return _inputs.size() - 1;
     }
 
-    bool ModuleBase::connectInput(std::string input_id, std::shared_ptr<IOutput> output) {
-        auto handler = std::find(_inputs.begin(),_inputs.end(), input_id);
-        if (handler != _inputs.end()){
-            if (handler->verification(output->getValue())) {
-                handler->output = output;
-                return true;
-            }
+
+    std::shared_ptr<IOutput> ModuleBase::getOutput(std::string output_id) {
+        for(auto& output : _outputs){
+                if (output->getID() == output_id) {
+                    return output;
+                }
         }
-        return false;
+        return nullptr;
     }
 
-    std::shared_ptr<IOutput> ModuleBase::getOutput(std::string output_id) {
-        auto handler = std::find(_outputs.begin(),_outputs.end(), output_id);
-        if (handler != _outputs.end()) {
-            return *handler;
+    std::shared_ptr<IInput> ModuleBase::getInput(std::string input_id){
+        for(auto& input : _inputs){
+            if (input->getID() == input_id) {
+                return input;
+            }
         }
         return nullptr;
     }
 
-    std::string ModuleBase::addOutput(const std::string& type, int appendix, const json& initial) {
-        _outputs.push_back(std::make_shared<Output>( type, initial));
-        _outputs[_outputs.size() - 1]->setPrefix(getID());
-        return  _outputs[_outputs.size()-1]->getID();
+    std::shared_ptr<IOutput> ModuleBase::getOutput(int handle) {
+        return _outputs[handle];
+    }
+
+    std::shared_ptr<IInput> ModuleBase::getInput(int handle){
+        return _inputs[handle];
+    }
+
+    int ModuleBase::addOutput(const std::string& type, int appendix, const json& initial) {
+        _outputs.push_back(std::make_shared<Output>( type, appendix, initial));
+        _outputs.back()->setPrefix(getID());
+        return  _outputs.size()-1;
     }
 
     std::string ModuleBase::getID(){
@@ -115,26 +90,23 @@ namespace mdd {
 
     std::string ModuleBase::setPrefix(std::string prefix){
         _prefix = prefix;
-        std::string new_prefix =  getID();
-        for (auto &input  : _inputs){
-            input.setPrefix(new_prefix);
-        }
-        for (auto &output  : _outputs){
-            output->setPrefix(new_prefix);
-        }
-        return new_prefix;
+        updateID();
+        return getID();
     }
 
     std::string ModuleBase::setAppendix(int appendix){
         _appendix = appendix;
+        updateID();
+        return getID();
+    }
+
+    void ModuleBase::updateID(){
         std::string new_prefix =  getID();
         for (auto &input  : _inputs){
-            input.setPrefix(new_prefix);
+            input->setPrefix(new_prefix);
         }
         for (auto &output  : _outputs){
             output->setPrefix(new_prefix);
         }
-        return new_prefix;
     }
-
 }

+ 11 - 11
lib/src/ModuleMath.cpp

@@ -327,48 +327,48 @@ namespace mdd {
 
         switch (_operation) {
             case ADD:
-                ret = add(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = add(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case SUBTRACT:
-                ret = subtract(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = subtract(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case MULTIPLY:
-                ret = multiply(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = multiply(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case DIVIDE:
-                ret = divide(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = divide(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case POWER:
-                ret = power(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = power(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case LOGARITHM:
-                ret = logarithm(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = logarithm(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case MINIMUM:
-                ret = minimum(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = minimum(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case MAXIMUM:
-                ret = maximum(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = maximum(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case LESS_THAN:
-                ret = less(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = less(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
 
             case GREATER_THAN:
-                ret = greater(getInputValue(0)["value"], getInputValue(1)["value"]);
+                ret = greater(getInput(0)->getValue()["value"], getInput(1)->getValue()["value"]);
                 break;
         }
 
         if (ret.dump() != getOutput(0)->getValue()["value"].dump()) {
-            setOutputValue(0)["value"] = ret ;
+            getOutput(0)->getValueInternal()["value"] = ret ;
             return true;
         }
         else{

+ 3 - 3
lib/src/ModuleSwitch.cpp

@@ -17,16 +17,16 @@ namespace mdd{
         setType("Switch");
     }
     bool ModuleSwitch::update(){
-        int index = getInputValue(0)["value"].get<int>();
+        int index = getInput(0)->getValue()["value"].get<int>();
         if(index == 0){
             index = 1;
         }
         if(index > getInputs().size() - 1){
             index = getInputs().size() - 1;
         }
-        json ret = getInputValue(index)["value"];
+        json ret = getInput(index)->getValue()["value"];
         if (ret.dump() != getOutput(0)->getValue()["value"].dump()) {
-            setOutputValue(0)["value"] = ret ;
+            getOutput(0)->getValueInternal()["value"] = ret ;
             return true;
         }
         else{

+ 2 - 1
lib/src/Output.cpp

@@ -22,8 +22,9 @@ namespace mdd {
 
     void Output::resetChange() { _changed = false; }
 
-    void Output::setType(std::string type){
+    std::string Output::setType(std::string type){
         _type = type;
+        return getID();
     }
 
     std::string Output::getID(){

+ 153 - 36
lib/src/ProcessorBase.cpp

@@ -3,71 +3,130 @@
 
 
 namespace mdd{
-    void ProcessorBase::setType(std:: string type){
+
+    int ProcessorBase::addProcesorInput(const std::string &type, int appendix, const json &value,
+                                        const std::function<bool(const json &)> &verification){
+        _processor_inputs.push_back(std::make_shared<Input>( type, appendix, value, verification));
+        _processor_inputs[_processor_inputs.size() - 1]->setPrefix(getID());
+        return  _processor_inputs.size()-1;
+    }
+
+    int ProcessorBase::addProcessorOutput(const std::string& type, int appendix, const json& initial){
+        _processor_outputs.push_back(std::make_shared<Output>( type, appendix, initial));
+        _processor_outputs[_processor_outputs.size() - 1]->setPrefix(getID());
+        return  _processor_outputs.size()-1;
+    }
+
+    std::shared_ptr<IOutput> ProcessorBase::getProcessorOutput(int handle){
+
+        return _processor_outputs[handle];
+    }
+
+    std::shared_ptr<IInput> ProcessorBase::getProcessorInput(int handle){
+
+        return _processor_inputs[handle];
+    }
+
+    std::shared_ptr<IModule> ProcessorBase::getModule(int handle){
+        return _modules[handle];
+    }
+
+    void ProcessorBase::updateID(){
+        std::string new_prefix =  getID();
+        for (auto &input  : _processor_inputs){
+            input->setPrefix(new_prefix);
+        }
+        for (auto &output  : _processor_outputs){
+            output->setPrefix(new_prefix);
+        }
+        for (auto& module : _modules) {
+            module->setPrefix(new_prefix);
+        }
+    }
+
+    std::string ProcessorBase::getID() {
+        return _prefix + "/" + _type + std::to_string(_appendix);
+    }
+
+    std::string ProcessorBase::setType(std:: string type){
         _type=type;
+        updateID();
+        return getID();
     }
     std::string ProcessorBase::getType(){
         return _type;
     }
 
+    std::string ProcessorBase::setPrefix(std::string prefix){
+        _prefix = prefix;
+        updateID();
+        return getID();
+    }
+
+    std::string ProcessorBase::setAppendix(int appendix){
+        _appendix = appendix;
+        updateID();
+        return getID();
+    }
+
+
     std::string ProcessorBase::addModule(std::shared_ptr<IModule> module){
         _modules.emplace_back(module);
         _modules[_modules.size()-1]->setPrefix(getID());
         return _modules[_modules.size()-1]->getID();
     }
 
-    std::string ProcessorBase::addModuleInput(std::string moduleHandler, std::string inputHandler){
-        _module_inputs.emplace_back(HandlerModule(moduleHandler, inputHandler));
-        return _module_inputs[_module_inputs.size()-1].accessHandler;
-    }
-
-    json& ProcessorBase::setInputDefaultValue(int handle){
-        return _modules[_module_inputs[handle].moduleHandler]->setInputDefaultValue(_module_inputs[handle].accessHandler);
+    std::string ProcessorBase::addModuleInput(std::string module_ID, std::string input_ID){
+        int ret = _processor_inputs.size();
+        for (auto& module : _modules) {
+            if(module->getID() == module_ID){
+                _module_inputs.emplace_back(HandlerModule<IInput>(module, module->getInput(input_ID)));
+            }
+        }
+        return _module_inputs.back().accessHandler->getID();
     }
 
-    const json& ProcessorBase::getInputValue(int handle){
-        _modules[_module_inputs[handle].moduleHandler]->getInputValue(_module_inputs[handle].accessHandler);
+    std::string ProcessorBase::addModuleInput(std::shared_ptr<IModule> module, std::shared_ptr<IInput> input){
+        _module_inputs.emplace_back(HandlerModule<IInput>(module, input));
+        return _module_inputs.back().accessHandler->getID();
     }
 
-    bool ProcessorBase::connectInput(std::string input_id, std::shared_ptr<IOutput> output){
-        auto module_handler = std::find(_module_inputs.begin(),_module_inputs.end(), input_id);
-        if (module_handler != _module_inputs.end()){
-            auto handler = std::find(_modules.begin(),_modules.end(), module_handler->moduleHandler);
-            if(handler != _modules.end()){
-                return (*handler)->connectInput(module_handler->accessHandler, output);
-            }
-        } else{
-            auto procesor_handler = std::find(_processor_inputs.begin(),_processor_inputs.end(), input_id);
-            if (procesor_handler != _processor_inputs.end()){
-                if (procesor_handler->verification(output->getValue())) {
-                    procesor_handler->output = output;
-                    return true;
-                }
+    std::string ProcessorBase::addModuleOutput(std::string module_ID, std::string output_ID){
+        for (auto& module : _modules) {
+            if(module->getID() == module_ID){
+                _module_outputs.emplace_back(HandlerModule<IOutput>(module, module->getOutput(output_ID)));
             }
         }
-        return false;
+        return _module_outputs.back().accessHandler->getID();
+    }
+
+    std::string ProcessorBase::addModuleOutput(std::shared_ptr<IModule> module, std::shared_ptr<IOutput> output){
+        _module_outputs.emplace_back(HandlerModule<IOutput>(module, output));
+        return _module_outputs.back().accessHandler->getID();
     }
 
     std::vector<std::string> ProcessorBase::getInputs(){
         std::vector<std::string> ret;
+        for (auto &input  : _processor_inputs) {
+            ret.push_back(input->getType());
+        }
         for (auto &input  : _module_inputs) {
-            ret.push_back(_modules[input.moduleHandler]->getOutput(input.accessHandler)->getType());
+            ret.push_back(input.accessHandler->getType());
         }
         return ret;
     }
 
     std::vector<std::string> ProcessorBase::getOutputs(){
         std::vector<std::string> ret;
+        for (auto &output  : _processor_outputs) {
+            ret.push_back(output->getType());
+        }
         for (auto &output  : _module_outputs) {
-            ret.push_back(_modules[output.moduleHandler]->getOutput(output.accessHandler)->getType());
+            ret.push_back(output.accessHandler->getType());
         }
         return ret;
     }
 
-    std::shared_ptr<IOutput> ProcessorBase::getOutput(int handle){
-        return _modules[_module_outputs[handle].moduleHandler]->getOutput(_module_outputs[handle].accessHandler);
-    }
-
     std::vector<std::string> ProcessorBase::getModules(){
         std::vector<std::string> ret;
         for (auto &module  : _modules) {
@@ -76,12 +135,70 @@ namespace mdd{
         return ret;
     }
 
-    std::shared_ptr<IModule> ProcessorBase::getModule(int handle){
-        return _modules[handle];
+    std::vector<std::string> ProcessorBase::getInputIDs(){
+        std::vector<std::string> ret;
+        for (auto &input  : _processor_inputs) {
+            ret.push_back(input->getID());
+        }
+        for (auto &input  : _module_inputs) {
+            ret.push_back(input.accessHandler->getID());
+        }
+        return ret;
+    }
+
+    std::vector<std::string> ProcessorBase::getOutputIDs(){
+        std::vector<std::string> ret;
+        for (auto &output  : _processor_outputs) {
+            ret.push_back(output->getID());
+        }
+        for (auto &output  : _module_outputs) {
+            ret.push_back(output.accessHandler->getID());
+        }
+        return ret;
+    }
+
+    std::vector<std::string> ProcessorBase::getModuleIDs(){
+        std::vector<std::string> ret;
+        for (auto &module  : _modules) {
+            ret.push_back(module->getID());
+        }
+        return ret;
+    }
+
+    std::shared_ptr<IOutput> ProcessorBase::getOutput(std::string output_id){
+        for (auto& output : _processor_outputs) {
+            if(output->getID() == output_id){
+                return output;
+            }
+        }
+        for (auto& output : _module_outputs) {
+            if(output.accessHandler->getID() == output_id){
+                return output.accessHandler;
+            }
+        }
+        return nullptr;
     }
 
-    int ProcessorBase::addOutput(int moduleHandler, int outputHandler){
-        _module_outputs.emplace_back(HandlerModule(moduleHandler, outputHandler));
-        return _module_outputs.size()-1;
+    std::shared_ptr<IInput> ProcessorBase::getInput(std::string input_id){
+        for (auto& input : _processor_inputs) {
+            if(input->getID() == input_id){
+                return input;
+            }
+        }
+        for (auto& input : _module_inputs) {
+            if(input.accessHandler->getID() == input_id){
+                return input.accessHandler;
+            }
+        }
+        return nullptr;
+    }
+
+    std::shared_ptr<IModule> ProcessorBase::getModule(std::string module_id){
+        for (auto& module : _modules) {
+            if(module->getID() == module_id){
+                return module;
+            }
+        }
+        return nullptr;
     }
 }

+ 4 - 4
lib/src/ProcessorManual.cpp

@@ -4,15 +4,15 @@
 namespace mdd {
     ProcessorManual::ProcessorManual()
     {
-        _iteration = std::make_shared<Output>("Value", "{ \"value\": 0 }"_json);
+        addProcessorOutput("Value",0, "{ \"value\": 0 }"_json);
     }
 
     bool ProcessorManual::update() {
         bool ret = false;
         bool group_state = true;
         while(group_state){
-            _iteration->getValueInternal()["value"]= _iteration->getValue()["value"].get<int>()+1;
-            std::cout << _iteration->getValue().dump()<<"\n";
+            getOutput(0)->getValueInternal()["value"]= getOutput(0)->getValue()["value"].get<int>()+1;
+            std::cout << getOutput(0)->getValue().dump()<<"\n";
             group_state = false;
             for (int i = 0; i < getModules().size(); ++i) {
                 bool module_state = getModule(i)->update();
@@ -26,6 +26,6 @@ namespace mdd {
     }
 
     std::shared_ptr<IOutput> ProcessorManual::getIteration(){
-        return _iteration;
+        return getOutput(0);
     }
 }

+ 26 - 26
lib/test/test_ModuleMath.cpp

@@ -14,77 +14,77 @@ TEST(ModuleMath, INT_PLUS_INT){
     ModuleMath test = ModuleMath();
     test.update();
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].get<int>(), 2);
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].get<int>(), 2);
 }
 
 TEST(ModuleMath, FLOAT_PLUS_FLOAT){
     ModuleMath test = ModuleMath();
-    test.setInputDefaultValue(0)["value"] = 1.25;
-    test.setInputDefaultValue(1)["value"] = 3.125;
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = 1.25;
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = 3.125;
     test.update();
 
-    EXPECT_FLOAT_EQ(test.getOutput(0)->getValue()["value"], 4.375);
+    EXPECT_FLOAT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"], 4.375);
 }
 
 TEST(ModuleMath, FLOAT_PLUS_FLOAT_HARDER){
     ModuleMath test = ModuleMath();
-    test.setInputDefaultValue(0)["value"] = 2.2;
-    test.setInputDefaultValue(1)["value"] = -3.4;
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = 2.2;
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = -3.4;
     test.update();
 
-    EXPECT_FLOAT_EQ(test.getOutput(0)->getValue()["value"], -1.2);
+    EXPECT_FLOAT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"], -1.2);
 }
 
 TEST(ModuleMath, ARRAY_PLUS_ARRAY){
     ModuleMath test = ModuleMath();
-    test.setInputDefaultValue(0)["value"] = {1,2.5,3.75,45};
-    test.setInputDefaultValue(1)["value"] = {10,31,23,23};
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = {1,2.5,3.75,45};
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = {10,31,23,23};
     test.update();
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "[11,33.5,26.75,68]");
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].dump(), "[11,33.5,26.75,68]");
 }
 
 TEST(ModuleMath, INT_PLUS_ARRAY){
     ModuleMath test = ModuleMath();
-    test.setInputDefaultValue(0)["value"] = 2.5;
-    test.setInputDefaultValue(1)["value"] = {10,31,23,23};
-    test.update();
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = 2.5;
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = {10,31,23,23};
+
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "[12.5,33.5,25.5,25.5]");
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].dump(), "[12.5,33.5,25.5,25.5]");
 }
 
 TEST(ModuleMath, ARRAY_PLUS_INT){
     ModuleMath test = ModuleMath();
-    test.setInputDefaultValue(0)["value"] = {10,31,23,23};
-    test.setInputDefaultValue(1)["value"] = 2.5;
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = {10,31,23,23};
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = 2.5;
     test.update();
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "[12.5,33.5,25.5,25.5]");
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].dump(), "[12.5,33.5,25.5,25.5]");
 }
 
 TEST(ModuleMath, ARRAY_MINUS_ARRAY){
     ModuleMath test = ModuleMath(SUBTRACT);
-    test.setInputDefaultValue(0)["value"] = {10,31,3,45};
-    test.setInputDefaultValue(1)["value"] = {1,2.5,23,23};
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = {10,31,3,45};
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = {1,2.5,23,23};
     test.update();
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "[9,28.5,-20,22]");
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].dump(), "[9,28.5,-20,22]");
 }
 
 TEST(ModuleMath, ARRAY_MAL_ARRAY){
     ModuleMath test = ModuleMath(MULTIPLY);
-    test.setInputDefaultValue(0)["value"] = {10,30,-3.5,45};
-    test.setInputDefaultValue(1)["value"] = {1,2.5,2.25,20};
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = {10,30,-3.5,45};
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = {1,2.5,2.25,20};
     test.update();
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "[10,75.0,-7.875,900]");
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].dump(), "[10,75.0,-7.875,900]");
 }
 
 TEST(ModuleMath, ARRAY_DURCH_ARRAY){
     ModuleMath test = ModuleMath(DIVIDE);
-    test.setInputDefaultValue(0)["value"] = {10,30,-3.5,45};
-    test.setInputDefaultValue(1)["value"] = {4,2.5,2,20};
+    test.getInput(test.getInputIDs()[0])->setDefaultValue()["value"] = {10,30,-3.5,45};
+    test.getInput(test.getInputIDs()[1])->setDefaultValue()["value"] = {4,2.5,2,20};
     test.update();
 
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].dump(), "[2.5,12.0,-1.75,2.25]");
+    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue()["value"].dump(), "[2.5,12.0,-1.75,2.25]");
 }

+ 29 - 23
lib/test/test_ModuleSwitch.cpp

@@ -9,49 +9,55 @@
 using namespace mdd;
 TEST(ModuleSwitch, EasySwitch){
     ModuleSwitch sModule = ModuleSwitch();
+    auto inputs = sModule.getInputIDs();
+    auto outputs = sModule.getOutputIDs();
 
-    sModule.setInputDefaultValue(0)["value"] = 0;
-    sModule.setInputDefaultValue(1)["value"] = 1;
-    sModule.setInputDefaultValue(2)["value"] = 2;
+    sModule.getInput(inputs[0])->setDefaultValue()["value"] = 0;
+    sModule.getInput(inputs[1])->setDefaultValue()["value"] = 1;
+    sModule.getInput(inputs[2])->setDefaultValue()["value"] = 2;
 
     sModule.update();
 
-    EXPECT_EQ(sModule.getOutput(0)->getValue()["value"].get<int>(), 1);
+    EXPECT_EQ(sModule.getOutput(outputs[0])->getValue()["value"].get<int>(), 1);
 
-    sModule.setInputDefaultValue(0)["value"] = 1;
+    sModule.getInput(inputs[0])->setDefaultValue()["value"] = 1;
     sModule.update();
-    EXPECT_EQ(sModule.getOutput(0)->getValue()["value"].get<int>(), 1);
+    EXPECT_EQ(sModule.getOutput(outputs[0])->getValue()["value"].get<int>(), 1);
 
-    sModule.setInputDefaultValue(0)["value"] = 2;
+    sModule.getInput(inputs[0])->setDefaultValue()["value"] = 2;
     sModule.update();
-    EXPECT_EQ(sModule.getOutput(0)->getValue()["value"].get<int>(), 2);
+    EXPECT_EQ(sModule.getOutput(outputs[0])->getValue()["value"].get<int>(), 2);
 
-    sModule.setInputDefaultValue(0)["value"] = 3;
+    sModule.getInput(inputs[0])->setDefaultValue()["value"] = 3;
     sModule.update();
-    EXPECT_EQ(sModule.getOutput(0)->getValue()["value"].get<int>(), 2);
-    sModule.setInputDefaultValue(0)["value"] = 33;
+    EXPECT_EQ(sModule.getOutput(outputs[0])->getValue()["value"].get<int>(), 2);
+    sModule.getInput(inputs[0])->setDefaultValue()["value"] = 33;
     sModule.update();
-    EXPECT_EQ(sModule.getOutput(0)->getValue()["value"].get<int>(), 2);
+    EXPECT_EQ(sModule.getOutput(outputs[0])->getValue()["value"].get<int>(), 2);
 }
 
 TEST(ModuleSwitch, ConnectTest){
+
     ModuleMath f0 = ModuleMath(MULTIPLY);
-    f0.setInputDefaultValue(0)["value"] = 1;
-    f0.setInputDefaultValue(1)["value"] = 1;
+    auto inputs = f0.getInputIDs();
+    f0.getInput(inputs[0])->setDefaultValue()["value"] = 1;
+    f0.getInput(inputs[1])->setDefaultValue()["value"] = 1;
 
     ModuleMath f1 = ModuleMath(MULTIPLY);
-    f1.setInputDefaultValue(0)["value"] = 2;
-    f1.setInputDefaultValue(1)["value"] = 3;
+    inputs = f1.getInputIDs();
+    f1.getInput(inputs[0])->setDefaultValue()["value"] = 2;
+    f1.getInput(inputs[1])->setDefaultValue()["value"] = 3;
 
     ModuleMath f2 = ModuleMath(MULTIPLY);
-    f2.setInputDefaultValue(0)["value"] = 5;
-    f2.setInputDefaultValue(1)["value"] = 7;
+    inputs = f2.getInputIDs();
+    f2.getInput(inputs[0])->setDefaultValue()["value"] = 5;
+    f2.getInput(inputs[1])->setDefaultValue()["value"] = 7;
 
     ModuleSwitch sModule = ModuleSwitch();
-
-    sModule.connectInput(0,f0.getOutput(0));
-    sModule.connectInput(1,f1.getOutput(0));
-    sModule.connectInput(2,f2.getOutput(0));
+    inputs = sModule.getInputIDs();
+    sModule.getInput(inputs[0])->connect(f0.getOutput(f0.getOutputIDs()[0]));
+    sModule.getInput(inputs[1])->connect(f1.getOutput(f1.getOutputIDs()[0]));
+    sModule.getInput(inputs[2])->connect(f2.getOutput(f2.getOutputIDs()[0]));
 
     f0.update();
     f1.update();
@@ -59,5 +65,5 @@ TEST(ModuleSwitch, ConnectTest){
     sModule.update();
 
 
-    EXPECT_EQ(sModule.getOutput(0)->getValue()["value"].get<int>(), 6);
+    EXPECT_EQ(sModule.getOutput(sModule.getOutputIDs()[0])->getValue()["value"].get<int>(), 6);
 }

+ 71 - 53
lib/test/test_ProcessorManual.cpp

@@ -9,72 +9,90 @@
 using namespace mdd;
 TEST(ProcessorManual, CalculateSimpleFormula){
     //f4:(f3:(f1:(5*3)-f2:(4+5))/2)==(15-9)/2==6/2==3
-    ModuleMath f1 = ModuleMath(MULTIPLY);
-    f1.setInputDefaultValue(0)["value"] = 5;
-    f1.setInputDefaultValue(1)["value"] = 3;
-    ModuleMath f2 = ModuleMath(ADD);
-    f2.setInputDefaultValue(0)["value"] = 4;
-    f2.setInputDefaultValue(1)["value"] = 5;
-    ModuleMath f3 = ModuleMath(SUBTRACT);
-    f3.connectInput(0,f1.getOutput(0));
-    f3.connectInput(1,f2.getOutput(0));
-    ModuleMath f4 = ModuleMath(DIVIDE);
-    f4.connectInput(0,f3.getOutput(0));
-    f4.setInputDefaultValue(1)["value"] = 2;
-    ProcessorManual test = ProcessorManual();
-    test.addModule(std::make_shared<ModuleMath>(f1));
-    test.addModule(std::make_shared<ModuleMath>(f2));
-    test.addModule(std::make_shared<ModuleMath>(f3));
-    test.addModule(std::make_shared<ModuleMath>(f4));
-    test.addOutput(3,0);
-    test.update();
-
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].get<int>(), 3);
+    std::vector<std::string> inputs;
+    std::shared_ptr<ModuleMath> f1 = std::make_shared<ModuleMath>(MULTIPLY);
+    inputs = f1->getInputIDs();
+    f1->getInput(inputs[0])->setDefaultValue()["value"] = 5;
+    f1->getInput(inputs[1])->setDefaultValue()["value"] = 3;
+
+    std::shared_ptr<ModuleMath> f2 = std::make_shared<ModuleMath>(ADD);
+    inputs = f2->getInputIDs();
+    f2->getInput(inputs[0])->setDefaultValue()["value"] = 4;
+    f2->getInput(inputs[1])->setDefaultValue()["value"] = 5;
+
+    std::shared_ptr<ModuleMath> f3 = std::make_shared<ModuleMath>(SUBTRACT);
+    inputs = f3->getInputIDs();
+    f3->getInput(inputs[0])->connect(f1->getOutput(f1->getOutputIDs()[0]));
+    f3->getInput(inputs[1])->connect(f1->getOutput(f2->getOutputIDs()[0]));
+
+    std::shared_ptr<ModuleMath> f4 = std::make_shared<ModuleMath>(DIVIDE);
+    inputs = f4->getInputIDs();
+    f4->getInput(inputs[0])->connect(f1->getOutput(f3->getOutputIDs()[0]));
+    f4->getInput(inputs[1])->setDefaultValue()["value"] = 2;
+
+    std::shared_ptr<ProcessorManual> test = std::make_shared<ProcessorManual>();
+    test->addModule(f1);
+    test->addModule(f2);
+    test->addModule(f3);
+    test->addModule(f4);
+    test->addModuleOutput(f3, f3->getOutput(f3->getOutputIDs()[0]));
+    test->update();
+
+    EXPECT_EQ(test->getOutput(test->getOutputIDs()[1])->getValue()["value"].get<int>(), 3);
 }
 
 TEST(ProcessorManual, CalculateAdvancedFormula){
     //f4:(f3:(f1:(5*3)-f2:(4+5))/2)==(15-9)/2==6/2==3
-    ModuleMath f1 = ModuleMath(MULTIPLY);
-    f1.setInputDefaultValue(0)["value"] = 5;
-    f1.setInputDefaultValue(1)["value"] = 3;
-    ModuleMath f2 = ModuleMath(ADD);
-    f2.setInputDefaultValue(0)["value"] = 4;
-    f2.setInputDefaultValue(1)["value"] = 5;
-    ModuleMath f3 = ModuleMath(SUBTRACT);
-    f3.connectInput(0,f1.getOutput(0));
-    f3.connectInput(1,f2.getOutput(0));
-    ModuleMath f4 = ModuleMath(DIVIDE);
-    f4.connectInput(0,f3.getOutput(0));
-    f4.setInputDefaultValue(1)["value"] = 2;
-    ProcessorManual test = ProcessorManual();
-    test.addModule(std::make_shared<ModuleMath>(f4));
-    test.addModule(std::make_shared<ModuleMath>(f3));
-    test.addModule(std::make_shared<ModuleMath>(f2));
-    test.addModule(std::make_shared<ModuleMath>(f1));
-    test.addOutput(0,0);
-    test.update();
-
-    EXPECT_EQ(test.getOutput(0)->getValue()["value"].get<int>(), 3);
+    std::vector<std::string> inputs;
+    std::shared_ptr<ModuleMath> f1 = std::make_shared<ModuleMath>(MULTIPLY);
+    inputs = f1->getInputIDs();
+    f1->getInput(inputs[0])->setDefaultValue()["value"] = 5;
+    f1->getInput(inputs[1])->setDefaultValue()["value"] = 3;
+
+    std::shared_ptr<ModuleMath> f2 = std::make_shared<ModuleMath>(ADD);
+    inputs = f2->getInputIDs();
+    f2->getInput(inputs[0])->setDefaultValue()["value"] = 4;
+    f2->getInput(inputs[1])->setDefaultValue()["value"] = 5;
+
+    std::shared_ptr<ModuleMath> f3 = std::make_shared<ModuleMath>(SUBTRACT);
+    inputs = f3->getInputIDs();
+    f3->getInput(inputs[0])->connect(f1->getOutput(f1->getOutputIDs()[0]));
+    f3->getInput(inputs[1])->connect(f1->getOutput(f2->getOutputIDs()[0]));
+
+    std::shared_ptr<ModuleMath> f4 = std::make_shared<ModuleMath>(DIVIDE);
+    inputs = f4->getInputIDs();
+    f4->getInput(inputs[0])->connect(f1->getOutput(f3->getOutputIDs()[0]));
+    f4->getInput(inputs[1])->setDefaultValue()["value"] = 2;
+
+    std::shared_ptr<ProcessorManual> test = std::make_shared<ProcessorManual>();
+    test->addModule(f4);
+    test->addModule(f3);
+    test->addModule(f2);
+    test->addModule(f1);
+    test->addModuleOutput(f3, f3->getOutput(f3->getOutputIDs()[0]));
+    test->update();
+
+    EXPECT_EQ(test->getOutput(test->getOutputIDs()[1])->getValue()["value"].get<int>(), 3);
 }
 
 TEST(ProcessorManual, CalculateExtremeFormula){
     //x_0=8, x_i=x_{i-1}/2
     std::shared_ptr<ModuleSwitch> switchModule =  std::make_shared<ModuleSwitch>();
     std::shared_ptr<ModuleMath> calcModule = std::make_shared<ModuleMath>(DIVIDE);
-    ProcessorManual processor = ProcessorManual();
-    processor.addModule(switchModule);
-    processor.addModule(calcModule);
+    std::shared_ptr<ProcessorManual> processor = std::make_shared<ProcessorManual>();
+    processor->addModule(switchModule);
+    processor->addModule(calcModule);
 
     bool connect;
-    connect =switchModule->connectInput(0,processor.getIteration());
-    switchModule->setInputDefaultValue(1)["value"] = 8.0;
-    connect = switchModule->connectInput(2,calcModule->getOutput(0));
+    connect =switchModule->getInput(switchModule->getInputIDs()[0])->connect(processor->getIteration());
+    switchModule->getInput(switchModule->getInputIDs()[1])->setDefaultValue()["value"] = 8.0;
+    connect = switchModule->getInput(switchModule->getInputIDs()[2])->connect(calcModule->getOutput(calcModule->getOutputIDs()[0]));
 
-    calcModule->connectInput(0,switchModule->getOutput(0));
-    calcModule->setInputDefaultValue(1)["value"] = 2.0;
+    calcModule->getInput(calcModule->getInputIDs()[0])->connect(switchModule->getOutput(switchModule->getInputIDs()[0]));
+    calcModule->getInput(calcModule->getInputIDs()[1])->setDefaultValue()["value"] = 2.0;
 
-    processor.addOutput(1,0);
-    processor.update();
+    processor->addModuleOutput(calcModule,calcModule->getOutput(calcModule->getOutputIDs()[0]));
+    processor->update();
 
-    EXPECT_FLOAT_EQ(processor.getOutput(0)->getValue()["value"].get<double>(), 0.0);
+    EXPECT_FLOAT_EQ(processor->getOutput(processor->getOutputIDs()[1])->getValue()["value"].get<double>(), 0.0);
 }