some structure updates

This commit is contained in:
max mustermann 2019-05-06 21:43:17 +02:00
parent 3971a8ab24
commit 3b7e78193a
2 changed files with 134 additions and 50 deletions

179
.idea/workspace.xml generated
View File

@ -16,7 +16,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="59c80f39-2468-4db0-9afd-14b8acdbffed" name="Default Changelist" comment=""> <list default="true" id="59c80f39-2468-4db0-9afd-14b8acdbffed" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.cpp" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/API.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/API.cpp" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/cmake-build-debug/" /> <ignored path="$PROJECT_DIR$/cmake-build-debug/" />
<ignored path="$PROJECT_DIR$/CMakeFiles/" /> <ignored path="$PROJECT_DIR$/CMakeFiles/" />
@ -35,17 +35,43 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/CMakeLists.txt"> <entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75"> <state relative-caret-position="180">
<caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" /> <caret line="12" selection-start-line="12" selection-end-line="12" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/API.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="210">
<caret line="14" column="36" selection-start-line="14" selection-start-column="36" selection-end-line="14" selection-end-column="36" />
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/API.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="18" selection-start-line="18" selection-end-line="18" />
<folding>
<element signature="e#40#56#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Hashmap.h">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main.cpp"> <entry file="file://$PROJECT_DIR$/src/main.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="211"> <state relative-caret-position="330">
<caret line="30" column="32" selection-start-line="30" selection-start-column="32" selection-end-line="30" selection-end-column="32" /> <caret line="22" selection-start-line="22" selection-end-line="22" />
<folding> <folding>
<element signature="e#0#19#0" expanded="true" /> <element signature="e#0#19#0" expanded="true" />
</folding> </folding>
@ -53,11 +79,20 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/dynurefresher.log">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195">
<caret line="13" column="31" selection-start-line="13" selection-start-column="31" selection-end-line="13" selection-end-column="31" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Logger.cpp"> <entry file="file://$PROJECT_DIR$/src/Logger.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360"> <state relative-caret-position="555">
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" /> <caret line="37" column="38" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
<folding> <folding>
<element signature="e#40#58#0" expanded="true" /> <element signature="e#40#58#0" expanded="true" />
</folding> </folding>
@ -65,6 +100,20 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/ip.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Logger.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="14" selection-start-line="8" selection-start-column="14" selection-end-line="8" selection-end-column="14" />
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="Git.Settings"> <component name="Git.Settings">
@ -78,18 +127,18 @@
<option value="$PROJECT_DIR$/API.cpp" /> <option value="$PROJECT_DIR$/API.cpp" />
<option value="$PROJECT_DIR$/.gitignore" /> <option value="$PROJECT_DIR$/.gitignore" />
<option value="$PROJECT_DIR$/src/Logger.h" /> <option value="$PROJECT_DIR$/src/Logger.h" />
<option value="$PROJECT_DIR$/src/API.cpp" />
<option value="$PROJECT_DIR$/CMakeLists.txt" /> <option value="$PROJECT_DIR$/CMakeLists.txt" />
<option value="$PROJECT_DIR$/src/Logger.cpp" /> <option value="$PROJECT_DIR$/src/Logger.cpp" />
<option value="$PROJECT_DIR$/src/main.cpp" /> <option value="$PROJECT_DIR$/src/main.cpp" />
<option value="$PROJECT_DIR$/src/API.cpp" />
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="528" /> <option name="x" value="1020" />
<option name="y" value="311" /> <option name="y" value="236" />
<option name="width" value="1392" /> <option name="width" value="1914" />
<option name="height" value="995" /> <option name="height" value="1051" />
</component> </component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView"> <component name="ProjectView">
@ -103,13 +152,22 @@
<expand> <expand>
<path> <path>
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" /> <item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
<item name="iprefresher" type="462c0819:PsiDirectoryNode" /> <item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path> <path>
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" /> <item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
<item name="iprefresher" type="462c0819:PsiDirectoryNode" /> <item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" /> <item name="src" type="462c0819:PsiDirectoryNode" />
</path> </path>
<path>
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
<item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
</path>
<path>
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
<item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
<item name="Header Search Paths" type="70bed36:NamedLibraryElementNode" />
</path>
</expand> </expand>
<select /> <select />
</subPane> </subPane>
@ -122,6 +180,7 @@
<property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="run.code.analysis.last.selected.profile" value="pProject Default" />
<property name="settings.editor.selected.configurable" value="CLionExternalConfigurable" /> <property name="settings.editor.selected.configurable" value="CLionExternalConfigurable" />
</component> </component>
<component name="RecentsManager"> <component name="RecentsManager">
@ -210,31 +269,48 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1557128368242</updated> <updated>1557128368242</updated>
</task> </task>
<option name="localTasksCounter" value="7" /> <task id="LOCAL-00007" summary="reformated output of main">
<created>1557161378116</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1557161378116</updated>
</task>
<option name="localTasksCounter" value="8" />
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="28207000" /> <option name="totallyTimeSpent" value="32403000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
<is-autoscroll-to-source value="true" />
</todo-panel>
<todo-panel id="all">
<are-packages-shown value="true" />
<is-autoscroll-to-source value="true" />
</todo-panel>
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-1" y="25" width="1922" height="1056" extended-state="6" /> <frame x="1919" y="0" width="1922" height="1081" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25773746" /> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26307365" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Favorites" order="2" side_tool="true" /> <window_info id="Favorites" order="2" side_tool="true" />
<window_info anchor="bottom" id="Inspection Results" weight="0.32916668" />
<window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" /> <window_info anchor="bottom" id="Find" order="1" />
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3187166" /> <window_info anchor="bottom" id="Run" order="2" weight="0.31770834" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <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="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="TODO" order="6" weight="0.32916668" />
<window_info anchor="bottom" id="Database Changes" order="7" /> <window_info anchor="bottom" id="Database Changes" order="7" />
<window_info anchor="bottom" id="Messages" order="8" weight="0.3262032" /> <window_info anchor="bottom" id="Messages" order="8" visible="true" weight="0.32604167" />
<window_info anchor="bottom" id="Terminal" order="9" /> <window_info anchor="bottom" id="Terminal" order="9" weight="0.32916668" />
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
<window_info anchor="bottom" id="Version Control" order="11" /> <window_info anchor="bottom" id="Version Control" order="11" weight="0.32916668" />
<window_info anchor="bottom" id="CMake" order="12" weight="0.328125" /> <window_info anchor="bottom" id="CMake" order="12" weight="0.328125" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@ -251,7 +327,8 @@
<MESSAGE value="added loggin methods" /> <MESSAGE value="added loggin methods" />
<MESSAGE value="log on error" /> <MESSAGE value="log on error" />
<MESSAGE value="syntax update and sperate variable for dynu domain id" /> <MESSAGE value="syntax update and sperate variable for dynu domain id" />
<option name="LAST_COMMIT_MESSAGE" value="syntax update and sperate variable for dynu domain id" /> <MESSAGE value="reformated output of main" />
<option name="LAST_COMMIT_MESSAGE" value="reformated output of main" />
</component> </component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/test.cpp" /> <entry file="file://$PROJECT_DIR$/test.cpp" />
@ -271,42 +348,33 @@
<entry file="file://$PROJECT_DIR$/cmake-build-debug/out.myfile" /> <entry file="file://$PROJECT_DIR$/cmake-build-debug/out.myfile" />
<entry file="file://$PROJECT_DIR$/src/Logger.h"> <entry file="file://$PROJECT_DIR$/src/Logger.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150"> <state relative-caret-position="120">
<caret line="10" column="38" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="38" /> <caret line="8" column="14" selection-start-line="8" selection-start-column="14" selection-end-line="8" selection-end-column="14" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/dynurefresher.log" /> <entry file="file://$PROJECT_DIR$/cmake-build-debug/dynurefresher.log">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/ip.txt" />
<entry file="file://$PROJECT_DIR$/src/API.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="195"> <state relative-caret-position="195">
<caret line="14" column="124" selection-start-line="14" selection-start-column="124" selection-end-line="14" selection-end-column="124" /> <caret line="13" column="31" selection-start-line="13" selection-start-column="31" selection-end-line="13" selection-end-column="31" />
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/API.cpp"> <entry file="file://$PROJECT_DIR$/cmake-build-debug/ip.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/API.h">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45"> <state relative-caret-position="210">
<caret line="3" selection-start-line="3" selection-end-line="3" /> <caret line="14" column="36" selection-start-line="14" selection-start-column="36" selection-end-line="14" selection-end-column="36" />
<folding>
<element signature="e#40#56#0" expanded="true" />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt" /> <entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt" />
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="27" selection-start-line="5" selection-start-column="27" selection-end-line="5" selection-end-column="27" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Logger.cpp"> <entry file="file://$PROJECT_DIR$/src/Logger.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360"> <state relative-caret-position="555">
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" /> <caret line="37" column="38" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
<folding> <folding>
<element signature="e#40#58#0" expanded="true" /> <element signature="e#40#58#0" expanded="true" />
</folding> </folding>
@ -315,13 +383,30 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main.cpp"> <entry file="file://$PROJECT_DIR$/src/main.cpp">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="211"> <state relative-caret-position="330">
<caret line="30" column="32" selection-start-line="30" selection-start-column="32" selection-end-line="30" selection-end-column="32" /> <caret line="22" selection-start-line="22" selection-end-line="22" />
<folding> <folding>
<element signature="e#0#19#0" expanded="true" /> <element signature="e#0#19#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" selection-start-line="12" selection-end-line="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/API.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="18" selection-start-line="18" selection-end-line="18" />
<folding>
<element signature="e#40#56#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component> </component>
</project> </project>

View File

@ -8,7 +8,6 @@
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
#include <curl/curl.h> #include <curl/curl.h>
@ -16,7 +15,7 @@ std::string API::request(std::string myurl) {
Hashmap<std::string,std::string> map; Hashmap<std::string,std::string> map;
std::vector<std::string> str; std::vector<std::string> str;
return request(myurl,false,map,str); return request(std::move(myurl),false,map,str);
} }
std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::string> &map, std::vector<std::string> &headers) { std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::string> &map, std::vector<std::string> &headers) {
@ -26,7 +25,7 @@ std::string API::request(std::string myurl, bool post, Hashmap<std::string,std::
curl = curl_easy_init(); curl = curl_easy_init();
struct curl_slist *list = NULL; struct curl_slist *list = nullptr;
for (int j = 0; j < headers.size(); ++j) { for (int j = 0; j < headers.size(); ++j) {
list = curl_slist_append(list, headers.at(j).c_str()); list = curl_slist_append(list, headers.at(j).c_str());
} }