added command line arguments
This commit is contained in:
parent
1754dd8385
commit
1c752847d9
169
.idea/workspace.xml
generated
169
.idea/workspace.xml
generated
@ -16,8 +16,6 @@
|
||||
<component name="ChangeListManager">
|
||||
<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$/CMakeLists.txt" beforeDir="false" afterPath="$PROJECT_DIR$/CMakeLists.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/API.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/API.cpp" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main.cpp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.cpp" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/cmake-build-debug/" />
|
||||
@ -37,43 +35,17 @@
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/CMakeLists.txt">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="90">
|
||||
<caret line="6" column="40" lean-forward="true" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
|
||||
<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>
|
||||
</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="195">
|
||||
<caret line="14" column="124" selection-start-line="14" selection-start-column="124" selection-end-line="14" selection-end-column="124" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/API.cpp">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="45">
|
||||
<caret line="3" selection-start-line="3" selection-end-line="3" />
|
||||
<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="true">
|
||||
<entry file="file://$PROJECT_DIR$/src/main.cpp">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="240">
|
||||
<caret line="16" column="69" selection-start-line="16" selection-start-column="69" selection-end-line="16" selection-end-column="69" />
|
||||
<state relative-caret-position="211">
|
||||
<caret line="30" column="32" selection-start-line="30" selection-start-column="32" selection-end-line="30" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
</folding>
|
||||
@ -81,16 +53,11 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.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.cpp">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="555">
|
||||
<caret line="37" column="38" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
|
||||
<state relative-caret-position="360">
|
||||
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#40#58#0" expanded="true" />
|
||||
</folding>
|
||||
@ -98,29 +65,6 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</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="150">
|
||||
<caret line="10" column="38" selection-start-line="10" selection-start-column="22" selection-end-line="10" selection-end-column="38" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="424">
|
||||
<caret line="38" column="23" selection-start-line="38" selection-start-column="23" selection-end-line="38" selection-end-column="23" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
@ -134,50 +78,42 @@
|
||||
<option value="$PROJECT_DIR$/API.cpp" />
|
||||
<option value="$PROJECT_DIR$/.gitignore" />
|
||||
<option value="$PROJECT_DIR$/src/Logger.h" />
|
||||
<option value="$PROJECT_DIR$/src/Logger.cpp" />
|
||||
<option value="$PROJECT_DIR$/src/API.cpp" />
|
||||
<option value="$PROJECT_DIR$/CMakeLists.txt" />
|
||||
<option value="$PROJECT_DIR$/src/Logger.cpp" />
|
||||
<option value="$PROJECT_DIR$/src/main.cpp" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds" extendedState="6">
|
||||
<option name="x" value="1020" />
|
||||
<option name="y" value="236" />
|
||||
<option name="width" value="1914" />
|
||||
<option name="height" value="1051" />
|
||||
<option name="x" value="528" />
|
||||
<option name="y" value="311" />
|
||||
<option name="width" value="1392" />
|
||||
<option name="height" value="995" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
<navigator proportions="" version="1">
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="Scope" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<expand>
|
||||
<path>
|
||||
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="iprefresher" type="462c0819:PsiDirectoryNode" />
|
||||
</path>
|
||||
<path>
|
||||
<item name="iprefresher" type="b2602c69:ProjectViewProjectNode" />
|
||||
<item name="DynuIPRefresher" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="iprefresher" type="462c0819:PsiDirectoryNode" />
|
||||
<item name="src" type="462c0819:PsiDirectoryNode" />
|
||||
</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>
|
||||
<select />
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
@ -230,6 +166,7 @@
|
||||
<workItem from="1556710548728" duration="6200000" />
|
||||
<workItem from="1557047487321" duration="761000" />
|
||||
<workItem from="1557061811880" duration="10758000" />
|
||||
<workItem from="1557135515205" duration="1933000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="edited api class and made it to work">
|
||||
<created>1557063528491</created>
|
||||
@ -266,28 +203,35 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1557067359327</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="6" />
|
||||
<task id="LOCAL-00006" summary="syntax update and sperate variable for dynu domain id">
|
||||
<created>1557128368242</created>
|
||||
<option name="number" value="00006" />
|
||||
<option name="presentableId" value="LOCAL-00006" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1557128368242</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="7" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="23609000" />
|
||||
<option name="totallyTimeSpent" value="28207000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="1919" y="0" width="1922" height="1081" extended-state="6" />
|
||||
<frame x="-1" y="25" width="1922" height="1056" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26040554" />
|
||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25773746" />
|
||||
<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 active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.31875" />
|
||||
<window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3187166" />
|
||||
<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="Inspection" order="5" weight="0.4" />
|
||||
<window_info anchor="bottom" id="TODO" order="6" />
|
||||
<window_info anchor="bottom" id="Database Changes" order="7" />
|
||||
<window_info anchor="bottom" id="Messages" order="8" weight="0.32708332" />
|
||||
<window_info anchor="bottom" id="Messages" order="8" weight="0.3262032" />
|
||||
<window_info anchor="bottom" id="Terminal" order="9" />
|
||||
<window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
|
||||
<window_info anchor="bottom" id="Version Control" order="11" />
|
||||
@ -306,7 +250,8 @@
|
||||
<MESSAGE value="deleted cmake files" />
|
||||
<MESSAGE value="added loggin methods" />
|
||||
<MESSAGE value="log on error" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="log on error" />
|
||||
<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" />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/test.cpp" />
|
||||
@ -323,13 +268,7 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/out.myfile">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="15">
|
||||
<caret line="1" column="6" selection-start-line="1" selection-start-column="6" selection-end-line="1" selection-end-column="6" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/out.myfile" />
|
||||
<entry file="file://$PROJECT_DIR$/src/Logger.h">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="150">
|
||||
@ -337,26 +276,8 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/Logger.cpp">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="555">
|
||||
<caret line="37" column="38" selection-start-line="37" selection-start-column="38" selection-end-line="37" selection-end-column="38" />
|
||||
<folding>
|
||||
<element signature="e#40#58#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<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>
|
||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/ip.txt">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<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">
|
||||
<state relative-caret-position="195">
|
||||
@ -374,20 +295,28 @@
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt">
|
||||
<provider selected="true" editor-type-id="text-editor" />
|
||||
</entry>
|
||||
<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="90">
|
||||
<caret line="6" column="40" lean-forward="true" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
|
||||
<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">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="360">
|
||||
<caret line="24" column="18" selection-start-line="24" selection-start-column="18" selection-end-line="24" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#40#58#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/main.cpp">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="240">
|
||||
<caret line="16" column="69" selection-start-line="16" selection-start-column="69" selection-end-line="16" selection-end-column="69" />
|
||||
<state relative-caret-position="211">
|
||||
<caret line="30" column="32" selection-start-line="30" selection-start-column="32" selection-end-line="30" selection-end-column="32" />
|
||||
<folding>
|
||||
<element signature="e#0#19#0" expanded="true" />
|
||||
</folding>
|
||||
|
14
src/main.cpp
14
src/main.cpp
@ -4,7 +4,18 @@
|
||||
#include "API.h"
|
||||
#include "Logger.h"
|
||||
|
||||
int main() {
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
if(argc > 1){
|
||||
std::string firstarg(argv[1]);
|
||||
if (firstarg == "-h" || firstarg == "--help"){
|
||||
std::cout << "help page: " << std::endl << "[-h] [--help] print this help page" << std::endl << "[-v] [--version] print the software version" <<std::endl << "[no argument] normal ip check and refresh" << std::endl;
|
||||
}else if(firstarg == "-v" || firstarg == "--version"){
|
||||
std::cout << "Version 1.0" << std::endl;
|
||||
}else{
|
||||
std::cout << "wrong arguments! -h for help" << std::endl;
|
||||
}
|
||||
} else{
|
||||
API api;
|
||||
Logger logger;
|
||||
|
||||
@ -50,6 +61,7 @@ int main() {
|
||||
logger.safeip(ip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user