Bläddra i källkod

add ProcessorManual and ModuleSwitch

willi 5 år sedan
förälder
incheckning
7d4312c4f6

+ 304 - 130
.idea/workspace.xml

@@ -3,9 +3,9 @@
   <component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
     <generated>
       <config projectName="mdd" targetName="gtest" />
-      <config projectName="mdd" targetName="mdd_lib" />
-      <config projectName="mdd" targetName="auslegung_test" />
       <config projectName="mdd" targetName="gtest_main" />
+      <config projectName="mdd" targetName="auslegung_test" />
+      <config projectName="mdd" targetName="mdd_lib" />
     </generated>
   </component>
   <component name="CMakeSettings">
@@ -15,18 +15,26 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="4ddbafad-b85e-492e-80ec-3c73ef45688f" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/lib/include/HandlerModule.h" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/lib/include/Input.h" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/lib/include/ProcessorBase.h" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/lib/include/ModuleSwitch.h" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/lib/include/ProcessorManual.h" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" 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/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/ModuleBase.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ModuleBase.h" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/lib/include/ModuleMath.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ModuleMath.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/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/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/test/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/lib/test/CMakeLists.txt" 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$/thirdparty/json" beforeDir="false" afterPath="$PROJECT_DIR$/thirdparty/json" afterDir="false" />
     </list>
@@ -41,45 +49,121 @@
     <option name="formatViaClangd" value="false" />
   </component>
   <component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
+  <component name="FavoritesManager">
+    <favorites_list name="mdd" />
+  </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file pinned="false" current-in-tab="true">
+      <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="255">
-              <caret line="17" column="55" lean-forward="true" selection-start-line="17" selection-start-column="55" selection-end-line="17" selection-end-column="55" />
+            <state relative-caret-position="540">
+              <caret line="36" column="64" selection-start-line="36" selection-start-column="64" selection-end-line="36" selection-end-column="64" />
               <folding>
-                <element signature="e#57#75#0" expanded="true" />
+                <element signature="e#57#72#0" expanded="true" />
               </folding>
             </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/include/ModuleBase.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="150">
-              <caret line="10" column="55" selection-start-line="10" selection-start-column="55" selection-end-line="10" selection-end-column="55" />
+            <state relative-caret-position="330">
+              <caret line="22" column="20" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="20" />
+              <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/src/ProcessorBase.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="75">
-              <caret line="5" column="66" lean-forward="true" selection-start-line="5" selection-start-column="66" selection-end-line="5" selection-end-column="66" />
+            <state relative-caret-position="236">
+              <caret line="65" selection-start-line="65" selection-end-line="65" />
+              <folding>
+                <element signature="e#0#23#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+        <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="105">
-              <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
+            <state relative-caret-position="240">
+              <caret line="16" column="59" selection-start-line="16" selection-start-column="59" selection-end-line="16" selection-end-column="59" />
               <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/include/IModule.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" />
+              <folding>
+                <element signature="e#45#65#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/lib/include/ModuleSwitch.h">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="135">
+              <caret line="9" column="14" selection-start-line="9" selection-start-column="14" selection-end-line="9" selection-end-column="14" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <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="17" selection-start-line="9" selection-start-column="17" selection-end-line="9" selection-end-column="17" />
+              <folding>
+                <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/test/test_ProcessorManual.cpp">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="386">
+              <caret line="76" selection-start-line="76" selection-end-line="76" />
+              <folding>
+                <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/src/ProcessorBase.cpp">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="225">
+              <caret line="15" column="5" selection-start-line="15" selection-start-column="5" selection-end-line="15" selection-end-column="5" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="360">
+              <caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
+              <folding>
+                <element signature="e#0#25#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -122,32 +206,43 @@
         <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/CMakeLists.txt" />
-        <option value="$PROJECT_DIR$/lib/include/IOutput.h" />
-        <option value="$PROJECT_DIR$/lib/include/Output.h" />
-        <option value="$PROJECT_DIR$/lib/src/Output.cpp" />
-        <option value="$PROJECT_DIR$/lib/src/ModuleBase.cpp" />
-        <option value="$PROJECT_DIR$/lib/include/ModuleMath.h" />
-        <option value="$PROJECT_DIR$/lib/src/ModuleMath.cpp" />
         <option value="$PROJECT_DIR$/lib/test/test_ModuleMath.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorBase.h.cpp" />
         <option value="$PROJECT_DIR$/lib/include/Input.h" />
         <option value="$PROJECT_DIR$/lib/include/ModuleHandler.h" />
-        <option value="$PROJECT_DIR$/lib/CMakeLists.txt" />
         <option value="$PROJECT_DIR$/lib/include/HandlerModule.h" />
+        <option value="$PROJECT_DIR$/lib/include/IOutput.h" />
+        <option value="$PROJECT_DIR$/lib/src/Output.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/Output.h" />
+        <option value="$PROJECT_DIR$/lib/test/CMakeLists.txt" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleBase.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/ModulBase.h" />
         <option value="$PROJECT_DIR$/lib/include/IModule.h" />
         <option value="$PROJECT_DIR$/lib/include/ModuleBase.h" />
-        <option value="$PROJECT_DIR$/lib/include/ProcessorBase.h" />
-        <option value="$PROJECT_DIR$/lib/include/IProcessor.h" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleCompare.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/ModuleCompare.h" />
+        <option value="$PROJECT_DIR$/lib/include/ModulePass.h" />
+        <option value="$PROJECT_DIR$/lib/src/ModulePass.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/ModuleMath.h" />
+        <option value="$PROJECT_DIR$/lib/CMakeLists.txt" />
+        <option value="$PROJECT_DIR$/lib/include/ModuleSwitch.h" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/IProcessor.h" />
+        <option value="$PROJECT_DIR$/lib/include/ProcessorBase.h" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleMath.cpp" />
+        <option value="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
+        <option value="$PROJECT_DIR$/lib/include/ProcessorManual.h" />
+        <option value="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" />
       </list>
     </option>
   </component>
+  <component name="OCFindUsagesOptions" text="true" ivars="false" properties="true" derivedClasses="false" />
   <component name="OCResolveContextSettings">
     <option name="configuration" value="0-mdd_lib" />
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="327" />
+    <option name="x" value="141" />
     <option name="width" value="1440" />
     <option name="height" value="927" />
   </component>
@@ -157,7 +252,6 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
-      <pane id="Scope" />
       <pane id="ProjectPane">
         <subPane>
           <expand>
@@ -190,10 +284,18 @@
               <item name="lib" type="462c0819:PsiDirectoryNode" />
               <item name="src" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="mdd" type="b2602c69:ProjectViewProjectNode" />
+              <item name="master_thesis_ws" type="47feb1d3:ProjectViewModuleNode" />
+              <item name="master_thesis_ws" type="462c0819:PsiDirectoryNode" />
+              <item name="lib" type="462c0819:PsiDirectoryNode" />
+              <item name="test" type="462c0819:PsiDirectoryNode" />
+            </path>
           </expand>
           <select />
         </subPane>
       </pane>
+      <pane id="Scope" />
     </panes>
   </component>
   <component name="PropertiesComponent">
@@ -227,7 +329,7 @@
       </list>
     </option>
   </component>
-  <component name="RunManager" selected="Google Test.ModuleMath">
+  <component name="RunManager" selected="CMake Application.auslegung_test">
     <configuration name="All in auslegung_test" type="CMakeGoogleTestRunConfigurationType" factoryName="Google Test" nameIsGenerated="true" PASS_PARENT_ENVS_2="true" PROJECT_NAME="mdd" TARGET_NAME="auslegung_test" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="mdd" RUN_TARGET_NAME="auslegung_test" TEST_MODE="SUITE_TEST">
       <method v="2">
         <option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
@@ -315,7 +417,11 @@
       <workItem from="1588791515004" duration="3084000" />
       <workItem from="1588794698644" duration="7128000" />
       <workItem from="1589382925743" duration="20440000" />
-      <workItem from="1589404518690" duration="4148000" />
+      <workItem from="1589404518690" duration="4865000" />
+      <workItem from="1589963897477" duration="403000" />
+      <workItem from="1589965045546" duration="13832000" />
+      <workItem from="1589979027570" duration="3504000" />
+      <workItem from="1589982545546" duration="300000" />
     </task>
     <servers />
   </component>
@@ -352,9 +458,9 @@
     </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="83237000" />
+    <option name="totallyTimeSpent" value="101993000" />
   </component>
-  <component name="TodoView">
+  <component name="TodoView" selected-index="2">
     <todo-panel id="selected-file">
       <is-autoscroll-to-source value="true" />
     </todo-panel>
@@ -367,9 +473,9 @@
     <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" visible="true" weight="0.21771611" />
-      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
-      <window_info id="Favorites" order="2" side_tool="true" />
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.22838847" />
+      <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" />
@@ -378,8 +484,8 @@
       <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 active="true" anchor="bottom" id="Messages" order="8" visible="true" weight="0.32423925" />
-      <window_info anchor="bottom" id="Terminal" order="9" weight="0.27806926" />
+      <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="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" />
@@ -389,19 +495,19 @@
       <window_info anchor="right" id="Database" order="3" />
     </layout>
     <layout-to-restore>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.21771611" />
+      <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 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 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 anchor="bottom" id="Terminal" order="9" visible="true" weight="0.27806926" />
+      <window_info anchor="bottom" id="Terminal" order="9" weight="0.25498426" />
       <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" />
@@ -414,25 +520,38 @@
   <component name="TypeScriptGeneratedFilesManager">
     <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>
+        <line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
+          <url>file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp</url>
+          <line>20</line>
+          <option name="timeStamp" value="3" />
+        </line-breakpoint>
+        <line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
+          <url>file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp</url>
+          <line>22</line>
+          <option name="timeStamp" value="4" />
+        </line-breakpoint>
+      </breakpoints>
+    </breakpoint-manager>
+    <watches-manager>
+      <configuration name="CMakeRunConfiguration">
+        <watch expression="this-&gt;_inputs[0].output.get()" />
+      </configuration>
+    </watches-manager>
+  </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/cmake/auslegung-config.cmake">
-      <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>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/install/cmake/targets.cmake">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="510">
-          <caret line="43" column="56" lean-forward="true" selection-start-line="43" selection-start-column="56" selection-end-line="44" selection-end-column="72" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/TestClass.cpp" />
-    <entry file="file://$PROJECT_DIR$/install/mdd-config.cmake">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/include/TestClass.h" />
     <entry file="file://$PROJECT_DIR$/lib/thirdparty/__init__.py" />
     <entry file="file://$PROJECT_DIR$/README.MD">
@@ -501,21 +620,7 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/CMakeLists.txt">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="30">
-          <caret line="2" column="31" selection-start-line="2" selection-start-column="31" selection-end-line="2" selection-end-column="31" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/test/test_TestClass.cpp" />
-    <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="135">
-          <caret line="9" column="24" selection-start-line="9" selection-start-column="24" selection-end-line="9" selection-end-column="24" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/thirdparty/json/README.md">
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
         <state split_layout="SPLIT">
@@ -538,16 +643,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="651">
-          <caret line="69" lean-forward="true" selection-start-line="69" selection-end-line="69" />
-          <folding>
-            <element signature="e#0#24#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="180">
@@ -563,121 +658,200 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IOutput.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="150">
+          <caret line="10" column="25" lean-forward="true" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
+          <folding>
+            <element signature="e#41#58#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="105">
+          <caret line="7" column="17" selection-start-line="7" selection-start-column="4" selection-end-line="7" selection-end-column="17" />
+        </state>
+      </provider>
+    </entry>
+    <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" selection-start-line="5" selection-end-line="21" selection-end-column="1" />
+          <caret line="5" selection-start-line="5" selection-end-line="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleCompare.cpp" />
+    <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/CMakeLists.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="300">
+          <caret line="20" column="26" lean-forward="true" selection-start-line="20" selection-start-column="26" selection-end-line="20" selection-end-column="26" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/test/CMakeLists.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="45">
+          <caret line="3" column="36" selection-start-line="3" selection-start-column="36" selection-end-line="3" selection-end-column="36" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="210">
+          <caret line="14" selection-start-line="14" selection-end-line="14" />
           <folding>
-            <element signature="e#44#63#0" expanded="true" />
+            <element signature="e#42#62#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="150">
-          <caret line="10" column="25" lean-forward="true" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
+        <state relative-caret-position="300">
+          <caret line="20" column="52" selection-start-line="20" selection-start-column="52" selection-end-line="20" selection-end-column="52" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="510">
+          <caret line="34" column="58" selection-start-line="34" selection-start-column="58" selection-end-line="34" selection-end-column="58" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/IProcessor.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="195">
+          <caret line="13" column="67" selection-start-line="13" selection-start-column="67" selection-end-line="13" selection-end-column="67" />
           <folding>
-            <element signature="e#41#58#0" expanded="true" />
+            <element signature="e#51#71#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleMath.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="255">
-          <caret line="17" column="33" lean-forward="true" selection-start-line="17" selection-start-column="33" selection-end-line="17" selection-end-column="33" />
+        <state relative-caret-position="630">
+          <caret line="43" column="59" lean-forward="true" selection-start-line="43" selection-start-column="53" selection-end-line="43" selection-end-column="59" />
           <folding>
-            <element signature="e#42#62#0" expanded="true" />
+            <element signature="e#0#24#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1666">
-          <caret line="201" column="26" lean-forward="true" selection-start-line="201" selection-start-column="26" selection-end-line="201" selection-end-column="26" />
+        <state relative-caret-position="356">
+          <caret line="370" column="21" selection-start-line="370" selection-start-column="21" selection-end-line="370" selection-end-column="21" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/CMakeLists.txt">
+    <entry file="file://$PROJECT_DIR$/lib/include/IOutput.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="165">
           <caret line="11" column="28" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
+          <folding>
+            <element signature="e#44#63#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/ProcessorBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="376">
-          <caret line="43" column="8" selection-start-line="43" selection-start-column="8" selection-end-line="47" selection-end-column="19" />
+        <state relative-caret-position="540">
+          <caret line="36" column="64" selection-start-line="36" selection-start-column="64" selection-end-line="36" selection-end-column="64" />
           <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/HandlerModule.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="105">
-          <caret line="7" column="17" selection-start-line="7" selection-start-column="4" selection-end-line="7" selection-end-column="17" />
+        <state relative-caret-position="330">
+          <caret line="22" column="20" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="20" />
+          <folding>
+            <element signature="e#51#69#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="225">
-          <caret line="15" column="59" lean-forward="true" selection-start-line="15" selection-start-column="59" selection-end-line="15" selection-end-column="59" />
+        <state relative-caret-position="240">
+          <caret line="16" column="59" selection-start-line="16" selection-start-column="59" selection-end-line="16" selection-end-column="59" />
           <folding>
-            <element signature="e#45#65#0" expanded="true" />
+            <element signature="e#0#28#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IType.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/IModule.h">
       <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="375">
+          <caret line="25" selection-start-line="25" selection-end-line="25" />
+          <folding>
+            <element signature="e#45#65#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleSwitch.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="195">
-          <caret line="13" column="12" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="12" />
+        <state relative-caret-position="135">
+          <caret line="9" column="14" selection-start-line="9" selection-start-column="14" selection-end-line="9" selection-end-column="14" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+    <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" lean-forward="true" selection-start-line="7" selection-end-line="7" />
+        <state relative-caret-position="135">
+          <caret line="9" column="17" selection-start-line="9" selection-start-column="17" selection-end-line="9" selection-end-column="17" />
           <folding>
-            <element signature="e#51#69#0" expanded="true" />
+            <element signature="e#60#86#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/lib/src/ProcessorBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="75">
-          <caret line="5" column="66" lean-forward="true" selection-start-line="5" selection-start-column="66" selection-end-line="5" selection-end-column="66" />
+        <state relative-caret-position="225">
+          <caret line="15" column="5" selection-start-line="15" selection-start-column="5" selection-end-line="15" selection-end-column="5" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IProcessor.h">
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="150">
-          <caret line="10" column="55" selection-start-line="10" selection-start-column="55" selection-end-line="10" selection-end-column="55" />
+        <state relative-caret-position="236">
+          <caret line="65" selection-start-line="65" selection-end-line="65" />
+          <folding>
+            <element signature="e#0#23#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="386">
+          <caret line="76" selection-start-line="76" selection-end-line="76" />
+          <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/src/ModuleSwitch.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="255">
-          <caret line="17" column="55" lean-forward="true" selection-start-line="17" selection-start-column="55" selection-end-line="17" selection-end-column="55" />
+        <state relative-caret-position="360">
+          <caret line="24" lean-forward="true" selection-start-line="24" selection-end-line="24" />
           <folding>
-            <element signature="e#57#75#0" expanded="true" />
+            <element signature="e#0#25#0" expanded="true" />
           </folding>
         </state>
       </provider>

+ 4 - 0
lib/CMakeLists.txt

@@ -12,13 +12,17 @@ add_library(${PROJECT_NAME} STATIC
         include/IProcessor.h
         include/ModuleBase.h
         include/ModuleMath.h
+        include/ModuleSwitch.h
         include/Output.h
         include/ProcessorBase.h
+        include/ProcessorManual.h
 
         src/ModuleBase.cpp
         src/ModuleMath.cpp
+        src/ModuleSwitch.cpp
         src/Output.cpp
         src/ProcessorBase.cpp
+        src/ProcessorManual.cpp
         )
 
 target_include_directories(${PROJECT_NAME} PUBLIC

+ 4 - 9
lib/include/IModule.h

@@ -1,5 +1,5 @@
-#ifndef MDD_IMODULE_H
-#define MDD_IMODULE_H
+#ifndef MDD_IModule_H
+#define MDD_IModule_H
 
 #include "IOutput.h"
 #include <string>
@@ -12,18 +12,13 @@ namespace mdd {
     class IModule {
     public:
         virtual bool connectInput(int handle, std::shared_ptr<IOutput> output) = 0;
-
+        virtual std::string getType() = 0;
         virtual json& setInputDefaultValue(int handle) = 0;
         virtual const json& getInputValue(int handle) = 0;
-
         virtual std::vector<std::string> getInputs() = 0;
-
         virtual std::vector<std::string> getOutputs() = 0;
-
         virtual std::shared_ptr<IOutput> getOutput(int handle) = 0;
-
-        virtual void update() = 0;
-
+        virtual bool update() = 0;
         virtual ~IModule() = default;
     };
 }

+ 1 - 5
lib/include/IOutput.h

@@ -10,13 +10,9 @@ namespace mdd
     class IOutput {
     public:
         virtual const json& getValue() = 0;
-
         virtual std::string getType() = 0;
-
-        virtual bool hasChanges() = 0;
-
+        virtual bool hasChanged() = 0;
         virtual void resetChange() = 0;
-
         virtual ~IOutput() = default;
     };
 }

+ 3 - 0
lib/include/IProcessor.h

@@ -2,6 +2,7 @@
 #define MDD_IPROCESSOR_H
 
 #include "IModule.h"
+#include <vector>
 
 namespace mdd
 {
@@ -9,6 +10,8 @@ namespace mdd
     class IProcessor: public  IModule{
     public:
         virtual int  addModule(std::shared_ptr<IModule> module) = 0;
+        virtual std::vector<std::string> getModules() = 0;
+        virtual std::shared_ptr<IModule> getModule(int handle) = 0;
     };
 }
 

+ 5 - 11
lib/include/ModuleBase.h

@@ -1,5 +1,5 @@
-#ifndef MDD_BASEMODULE_H
-#define MDD_BASEMODULE_H
+#ifndef MDD_ModuleBase_H
+#define MDD_ModuleBase_H
 
 #include "Input.h"
 #include "IModule.h"
@@ -8,6 +8,7 @@ namespace mdd {
 
 class ModuleBase : public  IModule{
     private:
+        std::string _type;
         std::vector<Input> _inputs;
         std::vector<std::shared_ptr<Output>> _outputs;
 
@@ -15,23 +16,16 @@ class ModuleBase : public  IModule{
         int addInput(const std::string& type, const json& value,
                      const std::function<bool(const json&)>& verification = [](
                              const json&) { return true; });
-
+        void setType(std:: string type);
+        std::string getType() override;
         json& setInputDefaultValue(int handle) override;
         const json& getInputValue(int handle) override;
-
         bool connectInput(int handle, std::shared_ptr<IOutput> output) override;
-
         std::vector<std::string> getInputs() override;
-
-
         std::vector<std::string> getOutputs() override;
-
         std::shared_ptr<IOutput> getOutput(int handle) override;
-
         int addOutput(const std::string& type, const json& initial);
-
         json &setOutputValue(int handle);
-
     };
 }
 #endif //MDD_BASEMODULE_H

+ 14 - 5
lib/include/ModuleMath.h

@@ -7,7 +7,13 @@ namespace mdd {
         ADD = 1,
         SUBTRACT = 2,
         MULTIPLY = 3,
-        DIVIDE = 4
+        DIVIDE = 4,
+        POWER = 5,
+        LOGARITHM = 6,
+        MINIMUM = 7,
+        MAXIMUM = 8,
+        LESS_THAN = 9,
+        GREATER_THAN = 10
     };
 
     class ModuleMath : public ModuleBase {
@@ -18,14 +24,17 @@ namespace mdd {
         json subtract(const json &val1, const json &val2);
         json multiply(const json &val1, const json &val2);
         json divide(const json &val1, const json &val2);
+        json power(const json &val1, const json &val2);
+        json logarithm(const json &val1, const json &val2);
+        json minimum(const json &val1, const json &val2);
+        json maximum(const json &val1, const json &val2);
+        json less(const json &val1, const json &val2);
+        json greater(const json &val1, const json &val2);
 
     public:
         explicit ModuleMath(MathOperation operation = ADD);
-
-        void update() override;
-
+        bool update() override;
         void setMathOperation(MathOperation operation);
-
         MathOperation getMathOperation();
     };
 }

+ 13 - 0
lib/include/ModuleSwitch.h

@@ -0,0 +1,13 @@
+#ifndef MDD_MODULESWITCH_H
+#define MDD_MODULESWITCH_H
+
+#include "ModuleBase.h"
+
+namespace mdd{
+    class ModuleSwitch : public ModuleBase{
+    public:
+        ModuleSwitch();
+        bool update() override;
+    };
+}
+#endif //MDD_MODULESWITCH_H

+ 1 - 1
lib/include/Output.h

@@ -19,7 +19,7 @@ namespace mdd {
 
         std::string getType() override;
 
-        bool hasChanges() override;
+        bool hasChanged() override;
 
         void resetChange() override;
     };

+ 19 - 5
lib/include/ProcessorBase.h

@@ -1,26 +1,40 @@
 #ifndef MDD_PROCESSORBASE_H
 #define MDD_PROCESSORBASE_H
 
+#include <list>
 #include "Input.h"
 #include "IProcessor.h"
 #include "HandlerModule.h"
 
-
 namespace mdd {
-    class ProcessorBase : IProcessor{
-        std::vector<HandlerModule> _inputs;
-        std::vector<HandlerModule> _outputs;
+    class ProcessorBase : public IProcessor{
+    private:
+        std::string _type;
+        //std::vector<Input> _processor_inputs;
+        //std::vector<std::shared_ptr<Output>> _processor_outputs;
+
+        std::vector<HandlerModule> _module_inputs;
+        std::vector<HandlerModule> _module_outputs;
         std::vector<std::shared_ptr<IModule>> _modules;
     public:
+        void setType(std:: string type);
+        std::string getType() override;
         int addModule(std::shared_ptr<IModule> module) override ;
+        //int addInput(const std::string& type, const json& value,
+        //             const std::function<bool(const json&)>& verification = [](
+        //                     const json&) { return true; });
         int addInput(int moduleHandler, int inputHandler);
+        int addOutput(int moduleHandler, int outputHandler);
+        //int addOutput(const std::string& type, const json& initial);
         json& setInputDefaultValue(int handle) override;
+        //json& setOutputValue(int handle);
         const json& getInputValue(int handle) override;
         bool connectInput(int handle, std::shared_ptr<IOutput> output) override;
         std::vector<std::string> getInputs() override;
         std::vector<std::string> getOutputs() override;
         std::shared_ptr<IOutput> getOutput(int handle) override;
-        int addOutput(int moduleHandler, int outputHandler);
+        std::vector<std::string> getModules() override;
+        std::shared_ptr<IModule> getModule(int handle) override;
     };
 }
 #endif

+ 17 - 0
lib/include/ProcessorManual.h

@@ -0,0 +1,17 @@
+#ifndef MDD_PROCESSORMANUAL_H
+#define MDD_PROCESSORMANUAL_H
+#include "ProcessorBase.h"
+#include "Output.h"
+namespace mdd {
+    class ProcessorManual : public ProcessorBase {
+    private:
+        Output _iteration;
+    public:
+        ProcessorManual();
+
+        bool update() override;
+        std::shared_ptr<IOutput> getIteration();
+    };
+}
+
+#endif //MDD_PROCESSORMANUAL_H

+ 7 - 1
lib/src/ModuleBase.cpp

@@ -10,11 +10,17 @@ namespace mdd {
         this->verification = std::move(verification);
     }
 
+    void ModuleBase::setType(std:: string type){
+        _type=type;
+    }
+    std::string ModuleBase::getType(){
+        return _type;
+    }
+
     json& ModuleBase::setInputDefaultValue(int handle) {
         return _inputs[handle].value;
     }
 
-
     const json& ModuleBase::getInputValue(int handle) {
         if (_inputs[handle].output == nullptr)
             return _inputs[handle].value;

+ 166 - 12
lib/src/ModuleMath.cpp

@@ -8,10 +8,12 @@ namespace mdd {
         auto veri = [](const json& val){
             if(val.find("value")==val.end())
                 return false;
-            return true;};
+            return true;
+        };
         addInput("Value", default_val, veri);
         addInput("Value", default_val, veri);
         addOutput("Value", default_val);
+        setType("Math");
     }
 
     json ModuleMath::add(const json &val1, const json &val2) {
@@ -186,7 +188,141 @@ namespace mdd {
         return ret;
     }
 
-    void ModuleMath::update() {
+    json ModuleMath::power(const json &val1, const json &val2){
+
+    }
+
+    json ModuleMath::logarithm(const json &val1, const json &val2){
+
+    }
+
+    json ModuleMath::minimum(const json &val1, const json &val2){
+        json ret = json::array();
+        if (val1.is_array()) {
+            for (int i = 0; i < val1.size(); i++) {
+                if (val2.is_array()) {
+                    if (val1.size() == val2.size()) {
+                        ret.push_back(minimum(val1[i],val2[i]));
+                    }
+                } else {
+                    ret.push_back(minimum(val1[i],val2));
+                }
+            }
+
+        } else {
+            if (val2.is_array()) {
+                for (int i = 0; i < val2.size(); i++) {
+                    ret.push_back(minimum(val1,val2[i]));
+                }
+            } else {
+                if (val1.is_number() && val2.is_number()) {
+                    if (val1.is_number_float()) {
+                        if (val2.is_number_float()) {
+                            if(val1.get<float>()<= val2.get<float>()){
+                                ret = val1.get<float>();
+                            } else{
+                                ret = val2.get<float>();
+                            }
+                        } else {
+                            if(val1.get<float>()<= val2.get<int>()*1.0){
+                                ret = val1.get<float>();
+                            } else{
+                                ret = val2.get<int>();
+                            }
+                        }
+                    } else {
+                        if (val2.is_number_float()) {
+                            if(val1.get<int>()*1.0 <= val2.get<float>()){
+                                ret = val1.get<int>();
+                            } else{
+                                ret = val2.get<float>();
+                            }
+                        } else {
+                            if(val1.get<int>()<= val2.get<int>()){
+                                ret = val1.get<int>();
+                            } else{
+                                ret = val2.get<int>();
+                            }
+                        }
+                    }
+
+                } else {
+
+                }
+
+            }
+        }
+        return ret;
+    }
+
+    json ModuleMath::maximum(const json &val1, const json &val2){
+        json ret = json::array();
+        if (val1.is_array()) {
+            for (int i = 0; i < val1.size(); i++) {
+                if (val2.is_array()) {
+                    if (val1.size() == val2.size()) {
+                        ret.push_back(minimum(val1[i],val2[i]));
+                    }
+                } else {
+                    ret.push_back(minimum(val1[i],val2));
+                }
+            }
+
+        } else {
+            if (val2.is_array()) {
+                for (int i = 0; i < val2.size(); i++) {
+                    ret.push_back(minimum(val1,val2[i]));
+                }
+            } else {
+                if (val1.is_number() && val2.is_number()) {
+                    if (val1.is_number_float()) {
+                        if (val2.is_number_float()) {
+                            if(val1.get<float>()>= val2.get<float>()){
+                                ret = val1.get<float>();
+                            } else{
+                                ret = val2.get<float>();
+                            }
+                        } else {
+                            if(val1.get<float>()>= val2.get<int>()*1.0){
+                                ret = val1.get<float>();
+                            } else{
+                                ret = val2.get<int>();
+                            }
+                        }
+                    } else {
+                        if (val2.is_number_float()) {
+                            if(val1.get<int>()*1.0 >= val2.get<float>()){
+                                ret = val1.get<int>();
+                            } else{
+                                ret = val2.get<float>();
+                            }
+                        } else {
+                            if(val1.get<int>()>= val2.get<int>()){
+                                ret = val1.get<int>();
+                            } else{
+                                ret = val2.get<int>();
+                            }
+                        }
+                    }
+
+                } else {
+
+                }
+
+            }
+        }
+        return ret;
+    }
+
+    json ModuleMath::less(const json &val1, const json &val2){
+
+    }
+
+    json ModuleMath::greater(const json &val1, const json &val2){
+
+    }
+
+    bool ModuleMath::update() {
         json ret = getOutput(0)->getValue()["value"];
 
         switch (_operation) {
@@ -198,7 +334,6 @@ namespace mdd {
                 ret = subtract(getInputValue(0)["value"], getInputValue(1)["value"]);
                 break;
 
-
             case MULTIPLY:
                 ret = multiply(getInputValue(0)["value"], getInputValue(1)["value"]);
                 break;
@@ -206,10 +341,38 @@ namespace mdd {
             case DIVIDE:
                 ret = divide(getInputValue(0)["value"], getInputValue(1)["value"]);
                 break;
+
+            case POWER:
+                ret = power(getInputValue(0)["value"], getInputValue(1)["value"]);
+                break;
+
+            case LOGARITHM:
+                ret = logarithm(getInputValue(0)["value"], getInputValue(1)["value"]);
+                break;
+
+            case MINIMUM:
+                ret = minimum(getInputValue(0)["value"], getInputValue(1)["value"]);
+                break;
+
+            case MAXIMUM:
+                ret = maximum(getInputValue(0)["value"], getInputValue(1)["value"]);
+                break;
+
+            case LESS_THAN:
+                ret = less(getInputValue(0)["value"], getInputValue(1)["value"]);
+                break;
+
+            case GREATER_THAN:
+                ret = greater(getInputValue(0)["value"], getInputValue(1)["value"]);
+                break;
         }
 
         if (ret.dump() != getOutput(0)->getValue()["value"].dump()) {
             setOutputValue(0)["value"] = ret ;
+            return true;
+        }
+        else{
+            return false;
         }
     }
 
@@ -221,15 +384,6 @@ namespace mdd {
     MathOperation ModuleMath::getMathOperation(){
         return _operation;
     }
-/*
- * Document:
- *  var:
- *          value0, value1, value2, ...
- *  var1:
- *      args:
- *          etc.
- *
- */
 }
 
 //gdb

+ 36 - 0
lib/src/ModuleSwitch.cpp

@@ -0,0 +1,36 @@
+#include "ModuleSwitch.h"
+#include <iostream>
+
+namespace mdd{
+    ModuleSwitch::ModuleSwitch(){
+        json default_val;
+        default_val["value"] = 42;
+        auto veri = [](const json& val){
+            if(val.find("value")==val.end())
+                return false;
+            return true;
+        };
+        addInput("Switch", default_val, veri);
+        addInput("Value", default_val, veri);
+        addInput("Value", default_val, veri);
+        addOutput("Value", default_val);
+        setType("Switch");
+    }
+    bool ModuleSwitch::update(){
+        std::cout << "SWITCH"<<"\n" << getInputValue(0).dump()<<"\n";
+        int index = getInputValue(0)["value"].get<int>();
+        if(index > getInputs().size() - 2){
+            index = getInputs().size() - 2;
+        }
+
+        json ret = getInputValue(index + 1)["value"];
+
+        if (ret.dump() != getOutput(0)->getValue()["value"].dump()) {
+            setOutputValue(0)["value"] = ret ;
+            return true;
+        }
+        else{
+            return false;
+        }
+    }
+}

+ 1 - 1
lib/src/Output.cpp

@@ -16,7 +16,7 @@ namespace mdd {
 
     std::string Output::getType() { return _type; }
 
-    bool Output::hasChanges() { return _changed; }
+    bool Output::hasChanged() { return _changed; }
 
     void Output::resetChange() { _changed = false; }
 }

+ 29 - 10
lib/src/ProcessorBase.cpp

@@ -3,31 +3,38 @@
 
 
 namespace mdd{
+    void ProcessorBase::setType(std:: string type){
+        _type=type;
+    }
+    std::string ProcessorBase::getType(){
+        return _type;
+    }
+
     int ProcessorBase::addModule(std::shared_ptr<IModule> module){
         _modules.emplace_back(module);
         return _modules.size()-1;
     }
 
     int ProcessorBase::addInput(int moduleHandler, int inputHandler){
-        _inputs.emplace_back(HandlerModule(moduleHandler, inputHandler));
-        return _inputs.size()-1;
+        _module_inputs.emplace_back(HandlerModule(moduleHandler, inputHandler));
+        return _module_inputs.size()-1;
     }
 
     json& ProcessorBase::setInputDefaultValue(int handle){
-        _modules[_inputs[handle].moduleHandler]->setInputDefaultValue(_inputs[handle].accessHandler);
+        return _modules[_module_inputs[handle].moduleHandler]->setInputDefaultValue(_module_inputs[handle].accessHandler);
     }
 
     const json& ProcessorBase::getInputValue(int handle){
-        _modules[_inputs[handle].moduleHandler]->getInputValue(_inputs[handle].accessHandler);
+        _modules[_module_inputs[handle].moduleHandler]->getInputValue(_module_inputs[handle].accessHandler);
     }
 
     bool ProcessorBase::connectInput(int handle, std::shared_ptr<IOutput> output){
-        return _modules[_inputs[handle].moduleHandler]->connectInput(_inputs[handle].accessHandler, output);
+        return _modules[_module_inputs[handle].moduleHandler]->connectInput(_module_inputs[handle].accessHandler, output);
     }
 
     std::vector<std::string> ProcessorBase::getInputs(){
         std::vector<std::string> ret;
-        for (auto &input  : _inputs) {
+        for (auto &input  : _module_inputs) {
             ret.push_back(_modules[input.moduleHandler]->getOutput(input.accessHandler)->getType());
         }
         return ret;
@@ -35,18 +42,30 @@ namespace mdd{
 
     std::vector<std::string> ProcessorBase::getOutputs(){
         std::vector<std::string> ret;
-        for (auto &output  : _outputs) {
+        for (auto &output  : _module_outputs) {
             ret.push_back(_modules[output.moduleHandler]->getOutput(output.accessHandler)->getType());
         }
         return ret;
     }
 
     std::shared_ptr<IOutput> ProcessorBase::getOutput(int handle){
-        _modules[_outputs[handle].moduleHandler]->getOutput(_outputs[handle].accessHandler);
+        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) {
+            ret.push_back(module->getType());
+        }
+        return ret;
+    }
+
+    std::shared_ptr<IModule> ProcessorBase::getModule(int handle){
+        return _modules[handle];
     }
 
     int ProcessorBase::addOutput(int moduleHandler, int outputHandler){
-        _outputs.emplace_back(HandlerModule(moduleHandler, outputHandler));
-        return _outputs.size()-1;
+        _module_outputs.emplace_back(HandlerModule(moduleHandler, outputHandler));
+        return _module_outputs.size()-1;
     }
 }

+ 33 - 0
lib/src/ProcessorManual.cpp

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

+ 1 - 0
lib/test/CMakeLists.txt

@@ -1,6 +1,7 @@
 if(EXISTS /usr/src/gtest)
     add_executable(auslegung_test
             test_ModuleMath.cpp
+            test_ProcessorManual.cpp
             )
     target_link_libraries(auslegung_test gtest gtest_main ${PROJECT_NAME})
     add_test(auslegung_test auslegung_test)

+ 80 - 0
lib/test/test_ProcessorManual.cpp

@@ -0,0 +1,80 @@
+#include <gtest/gtest.h>
+#include <json.hpp>
+//#define private public
+#include <ProcessorManual.h>
+#include <ModuleMath.h>
+#include <ModuleSwitch.h>
+
+
+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);
+}
+
+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);
+}
+
+TEST(ProcessorManual, CalculateExtremeFormula){
+    //x_0=8, x_i=x_{i-1}/2
+    ModuleSwitch switchModule = ModuleSwitch();
+    ModuleMath calcModule = ModuleMath(DIVIDE);
+    ProcessorManual processor = ProcessorManual();
+    processor.addModule(std::make_shared<ModuleSwitch>(switchModule));
+    processor.addModule(std::make_shared<ModuleMath>(calcModule));
+
+    bool connect;
+    connect =switchModule.connectInput(0,processor.getIteration());
+    switchModule.setInputDefaultValue(1)["value"] = 8.0;
+    connect = switchModule.connectInput(2,calcModule.getOutput(0));
+
+    calcModule.connectInput(0,switchModule.getOutput(0));
+    calcModule.setInputDefaultValue(1)["value"] = 2.0;
+
+    processor.addOutput(1,0);
+    processor.update();
+
+    EXPECT_FLOAT_EQ(processor.getOutput(0)->getValue()["value"].get<float>(), 0.0);
+}