willi преди 5 години
родител
ревизия
2f0db9ee0e

+ 198 - 198
.idea/workspace.xml

@@ -3,8 +3,8 @@
   <component name="CMakeRunConfigurationManager" shouldGenerate="true" shouldDeleteObsolete="true">
     <generated>
       <config projectName="mdd" targetName="gtest" />
-      <config projectName="mdd" targetName="gtest_main" />
       <config projectName="mdd" targetName="auslegung_test" />
+      <config projectName="mdd" targetName="gtest_main" />
       <config projectName="mdd" targetName="mdd_lib" />
     </generated>
   </component>
@@ -15,14 +15,12 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="4ddbafad-b85e-492e-80ec-3c73ef45688f" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" 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/ModuleHTTP.h" beforeDir="false" afterPath="$PROJECT_DIR$/lib/include/ModuleHTTP.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/ModuleHTTP.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/ModuleHTTP.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/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/test/test_ModuleHTTP.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -41,110 +39,110 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/ModuleHTTP.h">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="165">
-              <caret line="11" column="27" selection-start-line="11" selection-start-column="27" selection-end-line="11" selection-end-column="27" />
+            <state relative-caret-position="135">
+              <caret line="9" column="39" lean-forward="true" selection-start-line="9" selection-start-column="39" selection-end-line="9" selection-end-column="39" />
               <folding>
-                <element signature="e#51#74#0" expanded="true" />
+                <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/ModuleMath.h">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="510">
-              <caret line="34" column="22" selection-start-line="34" selection-start-column="22" selection-end-line="34" selection-end-column="22" />
+            <state relative-caret-position="74">
+              <caret line="38" selection-start-line="38" selection-end-line="38" />
+              <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/src/ModuleMath.cpp">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="180">
-              <caret line="12" column="10" selection-start-line="8" selection-start-column="8" selection-end-line="12" selection-end-column="10" />
+            <state relative-caret-position="388">
+              <caret line="64" column="31" selection-start-line="64" selection-start-column="31" selection-end-line="64" selection-end-column="31" />
               <folding>
-                <element signature="e#0#23#0" expanded="true" />
+                <element signature="e#0#24#0" expanded="true" />
+                <element signature="e#91#119#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp">
+        <entry file="file:///usr/include/c++/7/bits/shared_ptr_base.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="270">
-              <caret line="18" column="35" selection-start-line="18" selection-start-column="35" selection-end-line="18" selection-end-column="35" />
-              <folding>
-                <element signature="e#0#23#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="202">
+              <caret line="682" selection-start-line="682" selection-end-line="682" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="288">
-              <caret line="32" column="69" selection-start-line="32" selection-start-column="69" selection-end-line="32" selection-end-column="69" />
-              <folding>
-                <element signature="e#0#24#0" expanded="true" />
-                <element signature="e#91#119#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="187">
+              <caret line="46" column="20" selection-start-line="46" selection-start-column="20" selection-end-line="46" selection-end-column="20" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/.gitignore">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="30">
-              <caret line="2" column="5" lean-forward="true" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" />
+            <state relative-caret-position="112">
+              <caret line="8" column="39" lean-forward="true" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" />
+              <folding>
+                <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/test/CMakeLists.txt">
+        <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="30">
-              <caret line="2" column="27" selection-start-line="2" selection-start-column="27" selection-end-line="2" selection-end-column="27" />
+            <state relative-caret-position="390">
+              <caret line="30" column="26" selection-start-line="30" selection-start-column="26" selection-end-line="30" selection-end-column="26" />
+              <folding>
+                <element signature="e#41#58#0" expanded="true" />
+              </folding>
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/include/IInput.h">
+        <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="135">
-              <caret line="9" column="22" selection-start-line="9" selection-start-column="22" selection-end-line="9" selection-end-column="22" />
+            <state relative-caret-position="90">
+              <caret line="6" column="10" selection-start-line="6" selection-start-column="10" selection-end-line="6" selection-end-column="10" />
               <folding>
-                <element signature="e#43#63#0" expanded="true" />
+                <element signature="e#42#62#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/include/IType.h">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="375">
-              <caret line="25" column="29" selection-start-line="25" selection-start-column="29" selection-end-line="25" selection-end-column="29" />
-              <folding>
-                <element signature="e#51#69#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="75">
+              <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
+        <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1515">
-              <caret line="101" column="19" selection-start-line="101" selection-start-column="19" selection-end-line="101" selection-end-column="19" />
+            <state relative-caret-position="30">
+              <caret line="2" column="12" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
             </state>
           </provider>
         </entry>
@@ -211,8 +209,6 @@
         <option value="$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorBase.cpp" />
         <option value="$PROJECT_DIR$/lib/include/ProcessorBase.h" />
-        <option value="$PROJECT_DIR$/lib/src/ModuleMath.cpp" />
-        <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ProcessorManual.cpp" />
         <option value="$PROJECT_DIR$/lib/test/test_ProcessorManual.cpp" />
         <option value="$PROJECT_DIR$/lib/CMakeLists.txt" />
@@ -220,10 +216,12 @@
         <option value="$PROJECT_DIR$/lib/src/ModuleBase.cpp" />
         <option value="$PROJECT_DIR$/lib/include/ModuleBase.h" />
         <option value="$PROJECT_DIR$/lib/test/CMakeLists.txt" />
+        <option value="$PROJECT_DIR$/.gitignore" />
         <option value="$PROJECT_DIR$/lib/include/ModuleHTTP.h" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleMath.cpp" />
+        <option value="$PROJECT_DIR$/lib/src/ModuleSwitch.cpp" />
         <option value="$PROJECT_DIR$/lib/src/ModuleHTTP.cpp" />
         <option value="$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp" />
-        <option value="$PROJECT_DIR$/.gitignore" />
       </list>
     </option>
   </component>
@@ -232,10 +230,9 @@
     <option name="configuration" value="0-auslegung_test" />
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="182" />
-    <option name="y" value="57" />
-    <option name="width" value="1440" />
-    <option name="height" value="927" />
+    <option name="y" value="-2" />
+    <option name="width" value="960" />
+    <option name="height" value="1082" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -374,14 +371,14 @@
       </method>
     </configuration>
     <list>
-      <item itemvalue="Google Test.All in auslegung_test" />
-      <item itemvalue="Google Test.ModuleMath" />
-      <item itemvalue="Google Test.ModuleMath.ARRAYINT_PLUS_ARRAYInt" />
-      <item itemvalue="Google Test.ModuleMath.add" />
       <item itemvalue="CMake Application.auslegung_test" />
       <item itemvalue="CMake Application.gtest" />
       <item itemvalue="CMake Application.gtest_main" />
       <item itemvalue="CMake Application.mdd_lib" />
+      <item itemvalue="Google Test.All in auslegung_test" />
+      <item itemvalue="Google Test.ModuleMath" />
+      <item itemvalue="Google Test.ModuleMath.ARRAYINT_PLUS_ARRAYInt" />
+      <item itemvalue="Google Test.ModuleMath.add" />
     </list>
     <recent_temporary>
       <list>
@@ -429,46 +426,48 @@
       <workItem from="1590444664396" duration="2281000" />
       <workItem from="1590483561193" duration="9644000" />
       <workItem from="1590496125616" duration="6000" />
-      <workItem from="1590497401566" duration="17000" />
+      <workItem from="1590497401566" duration="1517000" />
+      <workItem from="1590576799306" duration="7324000" />
+      <workItem from="1590657068263" duration="4158000" />
     </task>
     <servers />
   </component>
   <component name="TestHistory">
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 39m 32s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 01m 11s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 39m 56s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 01m 18s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 40m 22s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 12m 50s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 44m 45s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 14m 19s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 50m 27s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 15m 12s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 51m 05s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 16m 08s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 52m 08s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 17m 42s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 52m 38s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 18m 33s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 13h 53m 24s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 19m 30s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
-    <history-entry file="All_in_auslegung_test - 2020.05.26 at 14h 00m 28s.xml">
+    <history-entry file="All_in_auslegung_test - 2020.05.28 at 12h 20m 06s.xml">
       <configuration name="All in auslegung_test" configurationId="CMakeGoogleTestRunConfigurationType" />
     </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="167824000" />
+    <option name="totallyTimeSpent" value="180806000" />
   </component>
-  <component name="TodoView" selected-index="2">
+  <component name="TodoView" selected-index="1">
     <todo-panel id="selected-file">
       <is-autoscroll-to-source value="true" />
     </todo-panel>
@@ -481,19 +480,19 @@
     <frame x="0" y="-2" width="1920" height="1082" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.2561366" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.49921754" visible="true" weight="0.2614728" />
       <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 anchor="bottom" id="Debug" order="3" weight="0.39874083" />
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.3557188" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.3336831" />
       <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.25393495" />
+      <window_info anchor="bottom" id="Messages" order="8" weight="0.3231899" />
+      <window_info anchor="bottom" id="Terminal" order="9" weight="0.2518797" />
       <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" />
@@ -563,15 +562,10 @@
   <component name="XDebuggerManager">
     <breakpoint-manager>
       <breakpoints>
-        <line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
-          <url>file://$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp</url>
-          <line>50</line>
-          <option name="timeStamp" value="1" />
-        </line-breakpoint>
         <line-breakpoint enabled="true" type="com.jetbrains.cidr.execution.debugger.OCBreakpointType">
           <url>file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp</url>
-          <line>18</line>
-          <option name="timeStamp" value="3" />
+          <line>39</line>
+          <option name="timeStamp" value="25" />
         </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
@@ -582,14 +576,6 @@
     </watches-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file:///usr/include/c++/7/bits/shared_ptr_base.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="293">
-          <caret line="964" column="18" selection-start-line="964" selection-start-column="6" selection-end-line="964" selection-end-column="18" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/thirdparty/rapidjson/include/rapidjson/document.h" />
     <entry file="file://$PROJECT_DIR$/thirdparty/json/CMakeLists.txt">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-315" />
@@ -632,13 +618,6 @@
     <entry file="file://$PROJECT_DIR$/lib/src/ModulePass.cpp" />
     <entry file="file://$PROJECT_DIR$/lib/src/UniqueBase.cpp" />
     <entry file="file://$PROJECT_DIR$/lib/include/UniqueBase.h" />
-    <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" lean-forward="true" selection-start-line="5" selection-end-line="5" />
-        </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">
@@ -657,33 +636,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
-      <provider selected="true" editor-type-id="text-editor">
-        <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/include/Output.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="345">
-          <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/IOutput.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <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/include/IProcessor.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="285">
@@ -718,16 +670,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="390">
-          <caret line="30" column="23" selection-start-line="30" selection-start-column="23" selection-end-line="30" selection-end-column="23" />
-          <folding>
-            <element signature="e#41#58#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/include/ModuleSwitch.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="135">
@@ -735,13 +677,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/Input.cpp">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="750">
-          <caret line="50" selection-start-line="50" selection-end-line="50" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file:///usr/include/c++/7/bits/shared_ptr.h">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="10605">
@@ -773,16 +708,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleSwitch.cpp">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="240">
-          <caret line="16" column="26" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" />
-          <folding>
-            <element signature="e#0#25#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleSwitch.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="135">
@@ -794,16 +719,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="885">
-          <caret line="59" selection-start-line="59" selection-end-line="59" />
-          <folding>
-            <element signature="e#0#24#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/lib/src/ProcessorManual.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="390">
@@ -851,92 +766,177 @@
         </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="22" selection-start-line="34" selection-start-column="22" selection-end-line="34" selection-end-column="22" />
+        </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="702">
+          <caret line="59" selection-start-line="59" selection-end-line="59" />
+          <folding>
+            <element signature="e#0#24#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/lib/include/ModuleHTTP.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="165">
-          <caret line="11" column="27" selection-start-line="11" selection-start-column="27" selection-end-line="11" selection-end-column="27" />
+        <state relative-caret-position="240">
+          <caret line="16" column="20" selection-start-line="16" selection-start-column="20" selection-end-line="16" selection-end-column="20" />
           <folding>
             <element signature="e#51#74#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleMath.h">
+    <entry file="file://$PROJECT_DIR$/thirdparty/cpp-httplib/httplib.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="510">
-          <caret line="34" column="22" selection-start-line="34" selection-start-column="22" selection-end-line="34" selection-end-column="22" />
+        <state relative-caret-position="3150">
+          <caret line="210" selection-start-line="210" selection-end-line="210" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleMath.cpp">
+    <entry file="file://$PROJECT_DIR$/.gitignore">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="180">
-          <caret line="12" column="10" selection-start-line="8" selection-start-column="8" selection-end-line="12" selection-end-column="10" />
+        <state relative-caret-position="30">
+          <caret line="2" column="5" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" />
+        </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="27" selection-start-line="2" selection-start-column="27" selection-end-line="2" selection-end-column="27" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="375">
+          <caret line="25" column="29" selection-start-line="25" selection-start-column="29" selection-end-line="25" selection-end-column="29" />
           <folding>
-            <element signature="e#0#23#0" expanded="true" />
+            <element signature="e#51#69#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/include/IInput.h">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="18" column="35" selection-start-line="18" selection-start-column="35" selection-end-line="18" selection-end-column="35" />
+        <state relative-caret-position="120">
+          <caret line="8" column="28" selection-start-line="8" selection-start-column="28" selection-end-line="8" selection-end-column="28" />
           <folding>
-            <element signature="e#0#23#0" expanded="true" />
+            <element signature="e#43#63#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/CMakeLists.txt">
+    <entry file="file://$PROJECT_DIR$/lib/src/Input.cpp">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="420">
+          <caret line="37" column="21" lean-forward="true" selection-start-line="37" selection-start-column="21" selection-end-line="37" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/IOutput.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <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/include/IType.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="75">
+          <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/include/Input.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="390">
+          <caret line="30" column="26" selection-start-line="30" selection-start-column="26" selection-end-line="30" selection-end-column="26" />
+          <folding>
+            <element signature="e#41#58#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/lib/src/Output.cpp">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="30">
-          <caret line="2" column="27" selection-start-line="2" selection-start-column="27" selection-end-line="2" selection-end-column="27" />
+          <caret line="2" column="12" selection-start-line="2" selection-start-column="12" selection-end-line="2" selection-end-column="12" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/IInput.h">
+    <entry file="file://$PROJECT_DIR$/lib/include/Output.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="90">
+          <caret line="6" column="10" selection-start-line="6" selection-start-column="10" selection-end-line="6" selection-end-column="10" />
+          <folding>
+            <element signature="e#42#62#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="135">
-          <caret line="9" column="22" selection-start-line="9" selection-start-column="22" selection-end-line="9" selection-end-column="22" />
+          <caret line="9" column="39" lean-forward="true" selection-start-line="9" selection-start-column="39" selection-end-line="9" selection-end-column="39" />
           <folding>
-            <element signature="e#43#63#0" expanded="true" />
+            <element signature="e#0#23#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/include/ModuleBase.h">
+    <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" column="29" selection-start-line="25" selection-start-column="29" selection-end-line="25" selection-end-column="29" />
+        <state relative-caret-position="112">
+          <caret line="8" column="39" lean-forward="true" selection-start-line="8" selection-start-column="39" selection-end-line="8" selection-end-column="39" />
           <folding>
-            <element signature="e#51#69#0" expanded="true" />
+            <element signature="e#0#25#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
+    <entry file="file:///usr/include/c++/7/bits/shared_ptr_base.h">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="202">
+          <caret line="682" selection-start-line="682" selection-end-line="682" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/lib/src/ModuleBase.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1515">
-          <caret line="101" column="19" selection-start-line="101" selection-start-column="19" selection-end-line="101" selection-end-column="19" />
+        <state relative-caret-position="187">
+          <caret line="46" column="20" selection-start-line="46" selection-start-column="20" selection-end-line="46" selection-end-column="20" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp">
+    <entry file="file://$PROJECT_DIR$/lib/src/ModuleHTTP.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="288">
-          <caret line="32" column="69" selection-start-line="32" selection-start-column="69" selection-end-line="32" selection-end-column="69" />
+        <state relative-caret-position="74">
+          <caret line="38" selection-start-line="38" selection-end-line="38" />
           <folding>
-            <element signature="e#0#24#0" expanded="true" />
-            <element signature="e#91#119#0" expanded="true" />
+            <element signature="e#0#23#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/.gitignore">
+    <entry file="file://$PROJECT_DIR$/lib/test/test_ModuleHTTP.cpp">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="30">
-          <caret line="2" column="5" lean-forward="true" selection-start-line="2" selection-start-column="5" selection-end-line="2" selection-end-column="5" />
+        <state relative-caret-position="388">
+          <caret line="64" column="31" selection-start-line="64" selection-start-column="31" selection-end-line="64" selection-end-column="31" />
+          <folding>
+            <element signature="e#0#24#0" expanded="true" />
+            <element signature="e#91#119#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

+ 1 - 0
lib/include/ModuleHTTP.h

@@ -13,6 +13,7 @@ namespace mdd{
         std::string _id;
         int _port;
     protected:
+        std::string str_to_json(const std::string& input);
         void updateLayout();
 
     public:

+ 47 - 43
lib/src/ModuleHTTP.cpp

@@ -6,6 +6,24 @@ using namespace httplib;
 
 namespace mdd{
 
+    std::string ModuleHTTP::str_to_json(const std::string& input){
+        if(input.empty()){
+            return input;
+        }
+        std::string str = input;
+        size_t start_pos = 0;
+        while((start_pos = str.find('[', start_pos)) != std::string::npos) {
+            str.replace(start_pos, 1, "{");
+            start_pos += 1;
+        }
+        start_pos = 0;
+        while((start_pos = str.find(']', start_pos)) != std::string::npos) {
+            str.replace(start_pos, 1, "}");
+            start_pos += 1;
+        }
+        return str;
+    }
+
     void ModuleHTTP::updateLayout(){
         Client cli(_id, _port);
 
@@ -15,66 +33,47 @@ namespace mdd{
                                body.append(data, data_length);
                                return true;
                            });
-        //assert(res->body.empty());
-        std::cout<<body<<std::endl;
-        json inputs = json::parse(body);
-
-        if(getInputs().size() != inputs.size()){
-            while(getInputs().size()>inputs.size()){
-                pop_backInput();
-            }
+        assert(res->body.empty());
+        body =  std::string(R"()") + body;
+        json inputs = json::parse(body.c_str());
 
-            int diff =inputs.size()-getInputs().size();
-            auto veri = [](const json& val){
-                if(val.find("value")==val.end())
-                    return false;
-                return true;
-            };
-            while(diff > 0){
-                int index=inputs.size()-diff;
-                addInput(inputs[index]["type"],inputs[index]["value"], veri);
-                diff =inputs.size()-getInputs().size();
-            }
+        for(int j = 0; j < (int)getInputs().size()-(int)inputs.size(); ++j){
+            pop_backInput();
         }
-
-        for(size_t i=0; i < inputs.size(); i++){
+        for(size_t i=0; i < getInputs().size(); i++){
             getInput(i)->setType(inputs[i]["type"].get<std::string>());
             getInput(i)->setAppendix(i);
-            getInput(i)->setDefaultValue()=inputs[i]["value"];
+            getInput(i)->setDefaultValue() = inputs[i];
+        }
+        for(int index = getInputs().size(); index < inputs.size(); ++index){
+            json val;
+            val["value"] = inputs[index]["value"];
+            addInput(inputs[index]["type"].get<std::string>(),val);
         }
 
+        body.clear();
         res = cli.Get("/outputs",
                            [&](const char *data, size_t data_length) {
                                body.append(data, data_length);
                                return true;
                            });
 
-        //assert(res->body.empty());
-
+        assert(res->body.empty());
+        body =  std::string(R"()") + body;
         json outputs = json::parse(body);
 
-        if(getOutputs().size() != outputs.size()){
-            while(getOutputs().size()>outputs.size()){
-                pop_backOutput();
-            }
-
-            int diff =outputs.size()-getOutputs().size();
-            auto veri = [](const json& val){
-                if(val.find("value")==val.end())
-                    return false;
-                return true;
-            };
-            while(diff > 0){
-                int index=outputs.size()-diff;
-                addInput(outputs[index]["type"],outputs[index]["value"], veri);
-                diff =outputs.size()-getOutputs().size();
-            }
+        for(int j = 0; j < (int)getOutputs().size()-(int)outputs.size(); ++j){
+            pop_backOutput();
         }
-
-        for(size_t i=0; i < outputs.size(); i++){
+        for(size_t i=0; i < getOutputs().size(); i++){
             getOutput(i)->setType(outputs[i]["type"].get<std::string>());
             getOutput(i)->setAppendix(i);
-            getOutput(i)->getValueInternal() = outputs[i]["value"];
+            getOutput(i)->getValueInternal() = outputs[i];
+        }
+        for(int index = getOutputs().size(); index < outputs.size(); ++index){
+            json val;
+            val["value"] = outputs[index]["value"];
+            addOutput(outputs[index]["type"].get<std::string>(),val);
         }
     }
 
@@ -83,6 +82,11 @@ namespace mdd{
         _id(id),
         _port(port)
     {
+
+        if(!fname.empty()){
+            std::string command = "python3 " + fname;
+            system(command.c_str());
+        }
         updateLayout();
     }
 

+ 2 - 7
lib/src/ModuleMath.cpp

@@ -6,13 +6,8 @@ namespace mdd {
         _operation = operation;
         json default_val;
         default_val["value"] = 1;
-        auto veri = [](const json& val){
-            if(val.find("value")==val.end())
-                return false;
-            return true;
-        };
-        addInput("Value", default_val, veri);
-        addInput("Value", default_val, veri);
+        addInput("Value", default_val);
+        addInput("Value", default_val);
         addOutput("Value", default_val);
         setType("Math");
     }

+ 3 - 8
lib/src/ModuleSwitch.cpp

@@ -5,14 +5,9 @@ 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("Default", default_val, veri);
+        addInput("Switch", default_val);
+        addInput("Value", default_val);
+        addInput("Default", default_val);
         addOutput("Value", default_val);
         setType("Switch");
     }

+ 1 - 0
lib/test/server/.gitignore

@@ -0,0 +1 @@
+.idea

BIN
lib/test/server/__pycache__/ini_logger.cpython-36.pyc


+ 27 - 0
lib/test/server/ini_logger.py

@@ -0,0 +1,27 @@
+import logging
+import os.path
+ 
+def ini_logger(output_dir):
+    logger = logging.getLogger()
+    logger.setLevel(logging.DEBUG)
+     
+    # create console handler and set level to info
+    handler = logging.StreamHandler()
+    handler.setLevel(logging.INFO)
+    formatter = logging.Formatter("%(levelname)s - %(message)s")
+    handler.setFormatter(formatter)
+    logger.addHandler(handler)
+ 
+    # create error file handler and set level to error
+    handler = logging.FileHandler(os.path.join(output_dir, "server_error.log"),"w", encoding=None, delay="true")
+    handler.setLevel(logging.ERROR)
+    formatter = logging.Formatter("%(levelname)s - %(message)s")
+    handler.setFormatter(formatter)
+    logger.addHandler(handler)
+ 
+    # create debug file handler and set level to debug
+    handler = logging.FileHandler(os.path.join(output_dir, "server_all.log"),"w")
+    handler.setLevel(logging.DEBUG)
+    formatter = logging.Formatter("%(levelname)s - %(message)s")
+    handler.setFormatter(formatter)
+    logger.addHandler(handler)

+ 2 - 0
lib/test/server/links.txt

@@ -0,0 +1,2 @@
+https://www.w3schools.com/python/python_mysql_insert.asp
+https://www.sqlitetutorial.net/sqlite-python/insert/

+ 79 - 0
lib/test/server/server.py

@@ -0,0 +1,79 @@
+from abc import ABC
+
+import tornado.ioloop
+import tornado.web
+import tornado.escape
+import collections
+import json
+
+import sqlite3 as lite
+import sys
+
+import logging
+
+from ini_logger import *
+
+#log_dir = r'/var/log/server'
+#ini_logger(log_dir)
+
+inputs = [
+    {'type': "INPUT", 'value': 0},
+    {'type': "INPUT", 'value': 1},
+    {'type': "INPUT", 'value': 2},
+    {'type': "INPUT", 'value': 3},
+    {'type': "INPUT", 'value': 4}
+]
+
+outputs = [
+    {'type': "OUTPUT", 'value': 0},
+    {'type': "OUTPUT", 'value': 2},
+    {'type': "OUTPUT", 'value': 4}
+]
+
+def update():
+    do_something = 1
+
+
+class MainHandler(tornado.web.RequestHandler, ABC):
+    def prepare(self):
+        self.set_header("Content-Type", "application/json")
+        if self.request.headers.get('Content-Type') == 'application/json':
+            print(self.request.body)
+            self.json_args = json.loads(self.request.body.decode('utf-8'))
+        else:
+            self.json_args = None
+
+    def get(self, param):
+        print("INFO: GET /" + param)
+        if param == "inputs":
+            self.write(json.dumps(inputs))
+        elif param == "outputs":
+            self.write(json.dumps(outputs))
+        else:
+            self.write("Error: GET /" + param)
+            print("Error: GET /" + param)
+
+    def post(self, param):
+        if param == "update":
+            if self.json_args is not None:
+                counter = 0
+                for entity in self.json_args:
+                    inputs[counter]['value'] = entity['value']
+                    counter = counter + 1
+                update()
+            self.write(json.dumps(outputs))
+        else:
+            self.write("Error: POST /" + param)
+            print("Error: POST /" + param)
+
+
+def make_app():
+    return tornado.web.Application([
+        (r"/(.*)", MainHandler),
+    ])
+
+
+if __name__ == "__main__":
+    app = make_app()
+    app.listen(8888)
+    tornado.ioloop.IOLoop.current().start()

+ 14 - 5
lib/test/test_ModuleHTTP.cpp

@@ -48,21 +48,30 @@ TEST(ModuleHTTP, updateLayout_create){
         res.set_content(output_body.dump(), "application/json");
     });
 
-    svr.listen("localhost",123);
-    ModuleHTTP module("","localhost",123);
+    svr.listen("localhost",8888);
+
+    json input_body;
+    for (int i = 0; i < 5; ++i) {
+        json entity;
+        entity["type"] = "INPUT";
+        entity["value"] = i;
+        input_body.push_back(entity);
+    }
+
+    ModuleHTTP module("","localhost",8888);
 
     auto inputs_types = module.getInputs();
     auto inputs_ids = module.getInputIDs();
     for(int i = 0; i < 5; ++i){
         EXPECT_EQ(inputs_types[i], "INPUT");
-        EXPECT_EQ(module.getInput(inputs_ids[1])->getValue()["value"].get<int>(), i);
+        EXPECT_EQ(module.getInput(inputs_ids[i])->getValue()["value"].get<int>(), i);
     }
 
     auto outputs_types = module.getOutputs();
     auto outputs_ids = module.getOutputIDs();
-    for(int i = 0; i < 5; ++i){
+    for(int i = 0; i < 3; ++i){
         EXPECT_EQ(outputs_types[i], "OUTPUT");
-        EXPECT_EQ(module.getOutput(outputs_ids[1])->getValue()["value"].get<int>(), i*2);
+        EXPECT_EQ(module.getOutput(outputs_ids[i])->getValue()["value"].get<int>(), i*2);
     }
 
 }