cleaned up what should be private member access

master
Chris Punches 2017-04-29 17:35:03 -04:00
parent 69539ae019
commit d62df8b076
12 changed files with 479 additions and 240 deletions

View File

@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BookmarkManager">
<bookmark url="file://$PROJECT_DIR$/src/loaders/Units.cpp" line="18" />
</component>
<component name="CMakeRunConfigurationManager" shouldGenerate="true" buildAllGenerated="true">
<generated>
<config projectName="ftests" targetName="ftests" />
@ -12,36 +15,18 @@
</component>
<component name="ChangeListManager">
<list default="true" id="50b7ab1f-b700-44ff-b78d-e32f34492ff2" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/Conf.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/Conf.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/JLoader.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/JLoader.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/Plan.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/Plan.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/Units.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/Units.h" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/helpers.cpp" />
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/loaders/helpers.h" />
<change type="DELETED" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders.cpp.o" afterPath="" />
<change type="MOVED" beforePath="$PROJECT_DIR$/src/loaders.cpp" afterPath="$PROJECT_DIR$/src/loaders/loaders.cpp" />
<change type="MOVED" beforePath="$PROJECT_DIR$/src/loaders.h" afterPath="$PROJECT_DIR$/src/loaders/loaders.h" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/examplar.cpp.o" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/examplar.cpp.o" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Units.cpp.o" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Units.cpp.o" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/ftests" afterPath="$PROJECT_DIR$/cmake-build-debug/ftests" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CMakeLists.txt" afterPath="$PROJECT_DIR$/CMakeLists.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Makefile2" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Makefile2" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/CXX.includecache" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/CXX.includecache" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/DependInfo.cmake" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/DependInfo.cmake" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/build.make" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/build.make" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/cmake_clean.cmake" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/cmake_clean.cmake" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/depend.internal" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/depend.internal" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/depend.make" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/depend.make" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/link.txt" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/link.txt" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/progress.make" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/ftests.dir/progress.make" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/progress.marks" afterPath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/progress.marks" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/Makefile" afterPath="$PROJECT_DIR$/cmake-build-debug/Makefile" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/ftests.cbp" afterPath="$PROJECT_DIR$/cmake-build-debug/ftests.cbp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/conf/test.plan" afterPath="$PROJECT_DIR$/cmake-build-debug/conf/test.plan" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units" afterPath="$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/examplar.cpp" afterPath="$PROJECT_DIR$/examplar.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/loaders/Plan.cpp" afterPath="$PROJECT_DIR$/src/loaders/Plan.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/loaders/Plan.h" afterPath="$PROJECT_DIR$/src/loaders/Plan.h" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/loaders/Units.cpp" afterPath="$PROJECT_DIR$/src/loaders/Units.cpp" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/loaders/Units.h" afterPath="$PROJECT_DIR$/src/loaders/Units.h" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
@ -58,30 +43,70 @@
<favorites_list name="ftests" />
</component>
<component name="FileEditorManager">
<splitter split-orientation="horizontal" split-proportion="0.4510178">
<splitter split-orientation="horizontal" split-proportion="0.35468113">
<split-first>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="all_test.units" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="9" lean-forward="false" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<state relative-caret-position="216">
<caret line="12" column="47" lean-forward="false" selection-start-line="12" selection-start-column="47" selection-end-line="12" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Plan.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="558">
<caret line="31" column="0" lean-forward="true" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#802#966#0" expanded="true" />
<element signature="e#1632#1754#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="test.plan" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/test.plan">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="35" lean-forward="false" selection-start-line="4" selection-start-column="35" selection-end-line="4" selection-end-column="35" />
<state relative-caret-position="36">
<caret line="2" column="53" lean-forward="false" selection-start-line="2" selection-start-column="53" selection-end-line="2" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="loaders.h" pinned="false" current-in-tab="true">
<file leaf-file-name="Units.cpp" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/loaders/Units.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="738">
<caret line="41" column="5" lean-forward="true" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#98#170#0" expanded="true" />
<element signature="e#635#667#0" expanded="true" />
<element signature="e#1189#1313#0" expanded="true" />
<element signature="e#1563#1733#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Plan.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="576">
<caret line="34" column="44" lean-forward="false" selection-start-line="34" selection-start-column="44" selection-end-line="34" selection-end-column="44" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="loaders.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
@ -97,53 +122,21 @@
</split-first>
<split-second>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="loaders.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.cpp">
<file leaf-file-name="examplar.cpp" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/examplar.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="0" lean-forward="true" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<state relative-caret-position="432">
<caret line="24" column="115" lean-forward="false" selection-start-line="24" selection-start-column="115" selection-end-line="24" selection-end-column="115" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Units.cpp" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/loaders/Units.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1062">
<caret line="61" column="0" lean-forward="false" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
<folding>
<element signature="e#1095#1229#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Units.h" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/loaders/Units.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="9" column="19" lean-forward="false" selection-start-line="9" selection-start-column="19" selection-end-line="9" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="config.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="examplar.cpp" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/examplar.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<state relative-caret-position="144">
<caret line="10" column="0" lean-forward="true" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
<folding />
</state>
</provider>
@ -166,23 +159,23 @@
<option value="$PROJECT_DIR$/cmake-build-debug/config.json" />
<option value="$PROJECT_DIR$/main.cpp" />
<option value="$PROJECT_DIR$/src/jsoncpp.cpp.cpp" />
<option value="$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units" />
<option value="$PROJECT_DIR$/examplar.cpp" />
<option value="$PROJECT_DIR$/cmake-build-debug/conf/test.plan" />
<option value="$PROJECT_DIR$/src/loaders.h" />
<option value="$PROJECT_DIR$/src/loaders.cpp" />
<option value="$PROJECT_DIR$/src/loaders/JLoader.cpp" />
<option value="$PROJECT_DIR$/src/loaders/JLoader.h" />
<option value="$PROJECT_DIR$/src/loaders/helpers.cpp" />
<option value="$PROJECT_DIR$/src/loaders/helpers.h" />
<option value="$PROJECT_DIR$/src/loaders/Units.cpp" />
<option value="$PROJECT_DIR$/src/loaders/Units.h" />
<option value="$PROJECT_DIR$/src/loaders/Plan.cpp" />
<option value="$PROJECT_DIR$/src/loaders/Plan.h" />
<option value="$PROJECT_DIR$/src/loaders/loaders.cpp" />
<option value="$PROJECT_DIR$/src/loaders/Conf.cpp" />
<option value="$PROJECT_DIR$/src/loaders/Conf.h" />
<option value="$PROJECT_DIR$/src/loaders/loaders.h" />
<option value="$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units" />
<option value="$PROJECT_DIR$/cmake-build-debug/conf/test.plan" />
<option value="$PROJECT_DIR$/src/loaders/Plan.h" />
<option value="$PROJECT_DIR$/src/loaders/Plan.cpp" />
<option value="$PROJECT_DIR$/src/loaders/Units.h" />
<option value="$PROJECT_DIR$/examplar.cpp" />
<option value="$PROJECT_DIR$/src/loaders/Units.cpp" />
</list>
</option>
</component>
@ -528,12 +521,14 @@
<workItem from="1491540345736" duration="17928000" />
<workItem from="1491759279673" duration="614000" />
<workItem from="1492298506932" duration="46583000" />
<workItem from="1492752608203" duration="5072000" />
<workItem from="1492752608203" duration="13980000" />
<workItem from="1492984111087" duration="7006000" />
<workItem from="1493165364496" duration="10384000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="70197000" />
<option name="totallyTimeSpent" value="96495000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
@ -548,18 +543,18 @@
<frame x="1919" y="-21" width="3842" height="2160" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16719326" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.07187994" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3295342" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32941753" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32892805" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="CMake" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="LuaJ" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24278022" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.2499049" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24571708" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24986835" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32892805" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3999021" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39960337" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
@ -598,11 +593,163 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="1" />
<option name="time" value="3" />
</breakpoint-manager>
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="47" lean-forward="false" selection-start-line="12" selection-start-column="47" selection-end-line="12" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="378">
<caret line="21" column="0" lean-forward="false" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#802#966#0" expanded="true" />
<element signature="e#1632#1754#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/test.plan">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="53" lean-forward="false" selection-start-line="2" selection-start-column="53" selection-end-line="2" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="20" column="2" lean-forward="false" selection-start-line="20" selection-start-column="2" selection-end-line="20" selection-end-column="2" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#98#170#0" expanded="true" />
<element signature="e#635#667#0" expanded="true" />
<element signature="e#1189#1313#0" expanded="true" />
<element signature="e#1563#1733#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="558">
<caret line="31" column="2" lean-forward="false" selection-start-line="31" selection-start-column="2" selection-end-line="31" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="738">
<caret line="41" column="0" lean-forward="false" selection-start-line="41" selection-start-column="0" selection-end-line="41" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding>
<element signature="e#0#2#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examplar.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="234">
<caret line="13" column="32" lean-forward="false" selection-start-line="13" selection-start-column="32" selection-end-line="13" selection-end-column="32" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/test.plan">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="5" column="1" lean-forward="true" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1296">
<caret line="72" column="0" lean-forward="true" selection-start-line="72" selection-start-column="0" selection-end-line="72" selection-end-column="0" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#98#170#0" expanded="true" />
<element signature="e#635#667#0" expanded="true" />
<element signature="e#1189#1313#0" expanded="true" />
<element signature="e#1563#1733#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="20" lean-forward="false" selection-start-line="8" selection-start-column="20" selection-end-line="8" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="1" lean-forward="true" selection-start-line="12" selection-start-column="1" selection-end-line="12" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding>
<element signature="e#0#2#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examplar.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="19" column="3" lean-forward="true" selection-start-line="19" selection-start-column="3" selection-end-line="19" selection-end-column="3" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#802#966#0" expanded="true" />
<element signature="e#1632#1754#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
@ -633,7 +780,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1764">
<caret line="98" column="0" lean-forward="false" selection-start-line="98" selection-start-column="0" selection-end-line="98" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -682,7 +828,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="0" lean-forward="true" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
@ -803,32 +948,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1062">
<caret line="61" column="0" lean-forward="false" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
<folding>
<element signature="e#1095#1229#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="9" column="19" lean-forward="false" selection-start-line="9" selection-start-column="19" selection-end-line="9" selection-end-column="19" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/helpers.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
@ -857,64 +976,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="9" lean-forward="false" selection-start-line="2" selection-start-column="9" selection-end-line="2" selection-end-column="9" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/test.plan">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="35" lean-forward="false" selection-start-line="4" selection-start-column="35" selection-end-line="4" selection-end-column="35" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="8" column="20" lean-forward="false" selection-start-line="8" selection-start-column="20" selection-end-line="8" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="396">
<caret line="24" column="2" lean-forward="false" selection-start-line="24" selection-start-column="2" selection-end-line="24" selection-end-column="2" />
<folding>
<element signature="e#417#539#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="0" lean-forward="true" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examplar.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
<caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/JLoader.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="18" column="0" lean-forward="false" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Conf.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
@ -931,6 +992,36 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="72">
<caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/JLoader.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="486">
<caret line="29" column="0" lean-forward="true" selection-start-line="29" selection-start-column="0" selection-end-line="29" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="0" lean-forward="true" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/test.plan">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="36">
<caret line="2" column="53" lean-forward="false" selection-start-line="2" selection-start-column="53" selection-end-line="2" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/loaders.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="108">
@ -941,5 +1032,63 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/cmake-build-debug/conf/units/all_test.units">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="216">
<caret line="12" column="47" lean-forward="false" selection-start-line="12" selection-start-column="47" selection-end-line="12" selection-end-column="47" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="576">
<caret line="34" column="44" lean-forward="false" selection-start-line="34" selection-start-column="44" selection-end-line="34" selection-end-column="44" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.h">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="10" column="0" lean-forward="true" selection-start-line="10" selection-start-column="0" selection-end-line="10" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Plan.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="558">
<caret line="31" column="0" lean-forward="true" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#802#966#0" expanded="true" />
<element signature="e#1632#1754#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/examplar.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="432">
<caret line="24" column="115" lean-forward="false" selection-start-line="24" selection-start-column="115" selection-end-line="24" selection-end-column="115" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/loaders/Units.cpp">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="738">
<caret line="41" column="5" lean-forward="true" selection-start-line="41" selection-start-column="5" selection-end-line="41" selection-end-column="5" />
<folding>
<element signature="e#0#2#0" expanded="true" />
<element signature="e#98#170#0" expanded="true" />
<element signature="e#635#667#0" expanded="true" />
<element signature="e#1189#1313#0" expanded="true" />
<element signature="e#1563#1733#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

View File

@ -1,8 +1,6 @@
{
"plan": [
{ "name": "gcc is present", "depends on": [ null ] },
{ "name": "gcc can compile", "depends on": [ "gcc is present" ] },
{ "name": "gcc can compile2", "depends on": [ "gcc is present" ] },
{ "name": "gcc can compile", "depends on": [ "gcc is present" ] }
{ "name": "independent test", "depends on": null },
{ "name": "dependent test", "depends on": [ "independent test", null, null ] }
]
}

View File

@ -1,19 +1,19 @@
{
"units": [
{
"name": "gcc is present",
"target": "./ubuntu/xenial/check_gcc_present.run",
"output": "present",
"rectifier": "./ubuntu/xenial/install_gcc",
"name": "independent test",
"target": "/home/phanes/tests/test-script-pass.sh",
"output": "pass",
"rectifier": "/home/phanes/tests/test-script-rectifier.sh",
"active": true,
"required": true,
"rectify": true
},
{
"name": "gcc can compile",
"target": "./ubuntu/xenial/check_gcc_compiles.run",
"output": "can compile",
"rectifier": "echo pass",
"name": "dependent test",
"target": "/home/phanes/tests/test-script-pass.sh",
"output": "pass",
"rectifier": "/home/phanes/tests/test-script-rectifier.sh",
"active": true,
"required": true,
"rectify": false

Binary file not shown.

View File

@ -4,22 +4,38 @@
int main()
{
// A Plan is made up of Tasks, and a Suite is made up of Units.
// A Plan declares what units are executed and a Suite declares the definitions of those units.
Conf configuration = Conf("config.json");
UnitHolder unitHolder = UnitHolder( configuration.get_units_path() );
Plan plan = Plan( configuration.get_plan_path() );
// load the configuration file which contains filepaths to definitions of a plan and definitions of units.
std::string definitions_file = configuration.get_units_path();
std::string plan_file = configuration.get_plan_path();
for ( int i = 0; i < plan.tasks.size(); ++i )
Suite unit_definitions = Suite( definitions_file );
Plan plan = Plan( plan_file );
for ( int i = 0; i < plan.num_tasks(); ++i )
{
std::string current_task_name = plan.tasks[i].get_name();
std::cout << "Found task name in \"" << configuration.get_plan_path() << "\":\t" << current_task_name << std::endl << std::endl;
Task current_task = plan.select_task_index( i );
Unit current_unit = unitHolder.select_unit( current_task_name );
Unit current_unit = unit_definitions.select_unit( current_task.get_name() );
std::cout << "Associated Unit name:\t\t" << current_unit.get_name() << std::endl;
std::cout << "Associated Unit target:\t\t" << current_unit.get_target() << std::endl;
std::cout << "Associated Unit healer:\t\t" << current_unit.get_rectifier() << std::endl;
std::cout << "Associated Unit heals:\t\t" << current_unit.get_rectify() << std::endl << std::endl;
std::cout << "Found task name in \"" << configuration.get_plan_path() << "\":\t" << current_task.get_name() << std::endl << std::endl;
std::cout << "Associated Unit name:\t\t" << current_unit.get_name() << std::endl;
std::cout << "Associated Unit target:\t\t" << current_unit.get_target() << std::endl;
std::cout << "Associated Unit healer:\t\t" << current_unit.get_rectifier() << std::endl;
std::cout << "Associated Unit heals:\t\t" << current_unit.get_rectify() << std::endl;
Json::Value deps = current_task.get_dependencies();
for ( int j = 0; j < deps.size(); ++j )
{
std::cout << "Associated Dependency:\t\t" << deps[j] << std::endl;
}
std::cout << std::endl;
}
return 0;

View File

@ -1,16 +1,71 @@
//
// Created by phanes on 4/22/17.
//
#include "Plan.h"
Task::Task( Json::Value loader_root )
{
this->name = loader_root.get("name", "?").asString();
this->dependencies = loader_root.get("depends on", "");
this->has_succeeded = false;
}
std::string Task::get_name() { return this->name; }
std::string Task::get_name() { return this->name; }
bool Task::isDone() { return this->has_succeeded; }
void Task::finish() { this->has_succeeded = true; }
// returns Json::Value for dependencies
Json::Value Task::get_dependencies() { return this->dependencies;}
Json::Value Task::set_dependencies()
{
}
int Plan::num_tasks()
{
return (int)this->tasks.size();
}
Task Plan::select_task_index(int index) {
return this->tasks[index];
}
Task Plan::select_task( std::string provided_name )
{
/*
* returns a task from a Plan object by name
* this will need reworked. maybe should return int, populate a pointer.
* error handling is the concern here.
*/
{
Task * returnable;
bool foundMatch = false;
for ( int i = 0; i < this->tasks.size(); i++ )
{
std::string task_name = this->tasks[i].get_name();
if ( task_name == provided_name )
{
returnable = & this->tasks[i];
foundMatch = true;
break;
}
}
if (! foundMatch )
{
std::cerr << "Task name \"" << provided_name << "\" was referenced but not defined!" << std::endl;
std::exit(1);
}
return * returnable;
}
}
Plan::Plan( std::string filename ): JLoader( filename )
{
/* Plan loads a file and deserializes the Unit JSON object to Task types as a vector member
@ -22,4 +77,4 @@ Plan::Plan( std::string filename ): JLoader( filename )
{
this->tasks.push_back( Task( raw_tasks[index] ) );
}
};
};

View File

@ -10,24 +10,30 @@
class Task
{
private:
std::string name;
Json::Value dependencies;
private:
std::string name;
Json::Value dependencies;
bool has_succeeded;
public:
Task( Json::Value loader_root );
std::string get_name();
Json::Value get_dependencies();
public:
Task( Json::Value loader_root );
std::string get_name();
Json::Value get_dependencies();
Json::Value set_dependencies();
bool isDone();
void finish();
};
class Plan: public JLoader
{
public:
using JLoader::JLoader;
std::vector<Task> tasks;
Plan( std::string filename );
private:
std::vector<Task> tasks;
public:
Plan( std::string filename );
Task select_task( std::string provided_name );
Task select_task_index( int index );
int num_tasks();
};
#endif //FTESTS_PLAN_H

View File

@ -3,7 +3,11 @@
//
#include "Units.h"
Unit::Unit( Json::Value loader_root )
/*
* Constructor for Unit type. Receives a UnitHolder loader_root.
*/
{
this->name = loader_root.get("name", "?").asString();
this->target = loader_root.get("target", "?").asString();
@ -14,7 +18,9 @@ Unit::Unit( Json::Value loader_root )
this->rectify = loader_root.get("rectify", "?").asString();
}
/*
* getters for Unit type.
*/
std::string Unit::get_name() { return this->name; }
std::string Unit::get_target() { return this->target; }
std::string Unit::get_output() { return this->output; }
@ -23,20 +29,25 @@ std::string Unit::get_active() { return this->active; }
std::string Unit::get_required() { return this->required; }
std::string Unit::get_rectify() { return this->rectify; }
UnitHolder::UnitHolder( std::string filename ): JLoader( filename )
{
/* UnitHolder loads a file and deserializes the Unit JSON object to Unit types as a vector member
* UnitHolder { vector<Unit> }
Suite::Suite( std::string filename ): JLoader( filename )
/* Suite loads a file and deserializes the Unit JSON object to Unit types as a vector member
* Suite { vector<Unit> }
*/
{
Json::Value raw_units = this->get_root()["units"];
for ( int index = 0; index < raw_units.size(); index++ )
{
this->units.push_back(Unit( raw_units[index] ));
this->units.push_back( Unit( raw_units[ index ] ) );
}
};
Unit UnitHolder::select_unit(std::string provided_name)
Unit Suite::select_unit( std::string provided_name )
/*
* returns a unit from a unitholder object by name
* this will need reworked. maybe should return int, populate a pointer.
* error handling is the concern here.
*/
{
Unit * returnable;
bool foundMatch = false;
@ -53,7 +64,7 @@ Unit UnitHolder::select_unit(std::string provided_name)
}
if (! foundMatch )
{
std::cerr << "Unit name \"" << provided_name << "\" was referenced in a plan task but not defined!" << std::endl;
std::cerr << "Unit name \"" << provided_name << "\" was referenced but not defined!" << std::endl;
std::exit(1);
}

View File

@ -11,33 +11,37 @@
class Unit
{
private:
std::string name;
std::string target;
std::string output;
std::string rectifier;
std::string active;
std::string required;
std::string rectify;
private:
std::string name;
std::string target;
std::string output;
std::string rectifier;
std::string active;
std::string required;
std::string rectify;
public:
Unit( Json::Value loader_root );
std::string get_name();
std::string get_target();
std::string get_output();
std::string get_rectifier();
std::string get_active();
std::string get_required();
std::string get_rectify();
public:
Unit( Json::Value loader_root );
std::string get_name();
std::string get_target();
std::string get_output();
std::string get_rectifier();
std::string get_active();
std::string get_required();
std::string get_rectify();
};
class UnitHolder: public JLoader
class Suite: public JLoader
{
public:
using JLoader::JLoader;
std::vector<Unit> units;
UnitHolder( std::string filename );
Unit select_unit( std::string provided_name );
private:
std::vector<Unit> units;
public:
// constructor
Suite( std::string filename );
// returns the unit type identified by name or null
Unit select_unit( std::string provided_name );
};