diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ab27815..82029e2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,7 @@ - + @@ -15,10 +15,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -514,12 +584,12 @@ - + - @@ -534,15 +604,15 @@ - + - + - + @@ -602,8 +672,8 @@ - - + + @@ -616,16 +686,13 @@ - + - - - - - + + @@ -638,7 +705,7 @@ - + @@ -680,16 +747,13 @@ - + - - - - - + + @@ -702,7 +766,7 @@ - + @@ -733,8 +797,8 @@ - - + + @@ -1003,14 +1067,6 @@ - - - - - - - - @@ -1019,61 +1075,101 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - + - + - - + + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + diff --git a/CMakeLists.txt b/CMakeLists.txt index c38d574..15182f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,5 +3,5 @@ project(ftests) set(CMAKE_CXX_STANDARD 11) -set(SOURCE_FILES examplar.cpp src/loaders/loaders.cpp src/loaders/loaders.h src/json/jsoncpp.cpp src/loaders/JLoader.cpp src/loaders/JLoader.h src/loaders/helpers.cpp src/loaders/helpers.h src/loaders/Units.cpp src/loaders/Units.h src/loaders/Plan.cpp src/loaders/Plan.h src/loaders/Conf.cpp src/loaders/Conf.h) +set(SOURCE_FILES examplar.cpp src/loaders/loaders.cpp src/loaders/loaders.h src/json/jsoncpp.cpp src/loaders/JLoader.cpp src/loaders/JLoader.h src/loaders/helpers.cpp src/loaders/helpers.h src/loaders/Suite.cpp src/loaders/Suite.h src/loaders/Plan.cpp src/loaders/Plan.h src/loaders/Conf.cpp src/loaders/Conf.h src/loaders/Unit.cpp src/loaders/Unit.h src/loaders/Task.cpp src/loaders/Task.h) add_executable(ftests ${SOURCE_FILES}) \ No newline at end of file diff --git a/cmake-build-debug/CMakeFiles/Makefile2 b/cmake-build-debug/CMakeFiles/Makefile2 index 376a1d7..9101e33 100644 --- a/cmake-build-debug/CMakeFiles/Makefile2 +++ b/cmake-build-debug/CMakeFiles/Makefile2 @@ -66,7 +66,7 @@ CMAKE_BINARY_DIR = /home/phanes/Development/internal/ftests/cmake-build-debug CMakeFiles/ftests.dir/all: $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/depend $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=1,2,3,4,5,6,7,8,9 "Built target ftests" + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=1,2,3,4,5,6,7,8,9,10,11 "Built target ftests" .PHONY : CMakeFiles/ftests.dir/all # Include target in all. @@ -76,7 +76,7 @@ all: CMakeFiles/ftests.dir/all # Build rule for subdir invocation for target. CMakeFiles/ftests.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start /home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles 9 + $(CMAKE_COMMAND) -E cmake_progress_start /home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles 11 $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/ftests.dir/all $(CMAKE_COMMAND) -E cmake_progress_start /home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles 0 .PHONY : CMakeFiles/ftests.dir/rule diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/CXX.includecache b/cmake-build-debug/CMakeFiles/ftests.dir/CXX.includecache index 65fda6a..78a8586 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/CXX.includecache +++ b/cmake-build-debug/CMakeFiles/ftests.dir/CXX.includecache @@ -201,18 +201,42 @@ string /home/phanes/Development/internal/ftests/src/json/json.h JLoader.h /home/phanes/Development/internal/ftests/src/loaders/JLoader.h +Task.h +/home/phanes/Development/internal/ftests/src/loaders/Task.h -/home/phanes/Development/internal/ftests/src/loaders/Units.cpp -Units.h -/home/phanes/Development/internal/ftests/src/loaders/Units.h +/home/phanes/Development/internal/ftests/src/loaders/Suite.cpp +Suite.h +/home/phanes/Development/internal/ftests/src/loaders/Suite.h -/home/phanes/Development/internal/ftests/src/loaders/Units.h +/home/phanes/Development/internal/ftests/src/loaders/Suite.h vector - ../json/json.h /home/phanes/Development/internal/ftests/src/json/json.h JLoader.h /home/phanes/Development/internal/ftests/src/loaders/JLoader.h +Unit.h +/home/phanes/Development/internal/ftests/src/loaders/Unit.h + +/home/phanes/Development/internal/ftests/src/loaders/Task.cpp +Task.h +/home/phanes/Development/internal/ftests/src/loaders/Task.h + +/home/phanes/Development/internal/ftests/src/loaders/Task.h +string +- +../json/json.h +/home/phanes/Development/internal/ftests/src/json/json.h + +/home/phanes/Development/internal/ftests/src/loaders/Unit.cpp +Unit.h +/home/phanes/Development/internal/ftests/src/loaders/Unit.h + +/home/phanes/Development/internal/ftests/src/loaders/Unit.h +string +- +../json/json.h +/home/phanes/Development/internal/ftests/src/json/json.h /home/phanes/Development/internal/ftests/src/loaders/helpers.cpp helpers.h @@ -231,8 +255,8 @@ loaders.h /home/phanes/Development/internal/ftests/src/loaders/loaders.h JLoader.h /home/phanes/Development/internal/ftests/src/loaders/JLoader.h -Units.h -/home/phanes/Development/internal/ftests/src/loaders/Units.h +Suite.h +/home/phanes/Development/internal/ftests/src/loaders/Suite.h Plan.h /home/phanes/Development/internal/ftests/src/loaders/Plan.h Conf.h diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/DependInfo.cmake b/cmake-build-debug/CMakeFiles/ftests.dir/DependInfo.cmake index dc1c365..e485705 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/DependInfo.cmake +++ b/cmake-build-debug/CMakeFiles/ftests.dir/DependInfo.cmake @@ -9,7 +9,9 @@ set(CMAKE_DEPENDS_CHECK_CXX "/home/phanes/Development/internal/ftests/src/loaders/Conf.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o" "/home/phanes/Development/internal/ftests/src/loaders/JLoader.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o" "/home/phanes/Development/internal/ftests/src/loaders/Plan.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o" - "/home/phanes/Development/internal/ftests/src/loaders/Units.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Units.cpp.o" + "/home/phanes/Development/internal/ftests/src/loaders/Suite.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o" + "/home/phanes/Development/internal/ftests/src/loaders/Task.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Task.cpp.o" + "/home/phanes/Development/internal/ftests/src/loaders/Unit.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o" "/home/phanes/Development/internal/ftests/src/loaders/helpers.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o" "/home/phanes/Development/internal/ftests/src/loaders/loaders.cpp" "/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o" ) diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/build.make b/cmake-build-debug/CMakeFiles/ftests.dir/build.make index 8472b9c..b8c4e33 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/build.make +++ b/cmake-build-debug/CMakeFiles/ftests.dir/build.make @@ -177,28 +177,28 @@ CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o.provides: CMakeFiles/ftests.dir/ CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o.provides.build: CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o: CMakeFiles/ftests.dir/flags.make -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o: ../src/loaders/Units.cpp - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object CMakeFiles/ftests.dir/src/loaders/Units.cpp.o" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/ftests.dir/src/loaders/Units.cpp.o -c /home/phanes/Development/internal/ftests/src/loaders/Units.cpp +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: CMakeFiles/ftests.dir/flags.make +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: ../src/loaders/Suite.cpp + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building CXX object CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o -c /home/phanes/Development/internal/ftests/src/loaders/Suite.cpp -CMakeFiles/ftests.dir/src/loaders/Units.cpp.i: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/ftests.dir/src/loaders/Units.cpp.i" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/phanes/Development/internal/ftests/src/loaders/Units.cpp > CMakeFiles/ftests.dir/src/loaders/Units.cpp.i +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/ftests.dir/src/loaders/Suite.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/phanes/Development/internal/ftests/src/loaders/Suite.cpp > CMakeFiles/ftests.dir/src/loaders/Suite.cpp.i -CMakeFiles/ftests.dir/src/loaders/Units.cpp.s: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/ftests.dir/src/loaders/Units.cpp.s" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/phanes/Development/internal/ftests/src/loaders/Units.cpp -o CMakeFiles/ftests.dir/src/loaders/Units.cpp.s +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/ftests.dir/src/loaders/Suite.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/phanes/Development/internal/ftests/src/loaders/Suite.cpp -o CMakeFiles/ftests.dir/src/loaders/Suite.cpp.s -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.requires: +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.requires: -.PHONY : CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.requires +.PHONY : CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.requires -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.provides: CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.requires - $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.provides.build -.PHONY : CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.provides +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.provides: CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.requires + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.provides.build +.PHONY : CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.provides -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.provides.build: CMakeFiles/ftests.dir/src/loaders/Units.cpp.o +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.provides.build: CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o: CMakeFiles/ftests.dir/flags.make @@ -249,6 +249,54 @@ CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o.provides: CMakeFiles/ftests.dir/src CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o.provides.build: CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o: CMakeFiles/ftests.dir/flags.make +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o: ../src/loaders/Unit.cpp + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building CXX object CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o -c /home/phanes/Development/internal/ftests/src/loaders/Unit.cpp + +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/ftests.dir/src/loaders/Unit.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/phanes/Development/internal/ftests/src/loaders/Unit.cpp > CMakeFiles/ftests.dir/src/loaders/Unit.cpp.i + +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/ftests.dir/src/loaders/Unit.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/phanes/Development/internal/ftests/src/loaders/Unit.cpp -o CMakeFiles/ftests.dir/src/loaders/Unit.cpp.s + +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.requires: + +.PHONY : CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.requires + +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.provides: CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.requires + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.provides.build +.PHONY : CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.provides + +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.provides.build: CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o + + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o: CMakeFiles/ftests.dir/flags.make +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o: ../src/loaders/Task.cpp + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building CXX object CMakeFiles/ftests.dir/src/loaders/Task.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/ftests.dir/src/loaders/Task.cpp.o -c /home/phanes/Development/internal/ftests/src/loaders/Task.cpp + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/ftests.dir/src/loaders/Task.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/phanes/Development/internal/ftests/src/loaders/Task.cpp > CMakeFiles/ftests.dir/src/loaders/Task.cpp.i + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/ftests.dir/src/loaders/Task.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/phanes/Development/internal/ftests/src/loaders/Task.cpp -o CMakeFiles/ftests.dir/src/loaders/Task.cpp.s + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.requires: + +.PHONY : CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.requires + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.provides: CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.requires + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.provides.build +.PHONY : CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.provides + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.provides.build: CMakeFiles/ftests.dir/src/loaders/Task.cpp.o + + # Object files for target ftests ftests_OBJECTS = \ "CMakeFiles/ftests.dir/examplar.cpp.o" \ @@ -256,9 +304,11 @@ ftests_OBJECTS = \ "CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o" \ "CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o" \ "CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o" \ -"CMakeFiles/ftests.dir/src/loaders/Units.cpp.o" \ +"CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o" \ "CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o" \ -"CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o" +"CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o" \ +"CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o" \ +"CMakeFiles/ftests.dir/src/loaders/Task.cpp.o" # External object files for target ftests ftests_EXTERNAL_OBJECTS = @@ -268,12 +318,14 @@ ftests: CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o ftests: CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o ftests: CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o ftests: CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o -ftests: CMakeFiles/ftests.dir/src/loaders/Units.cpp.o +ftests: CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o ftests: CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o ftests: CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o +ftests: CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o +ftests: CMakeFiles/ftests.dir/src/loaders/Task.cpp.o ftests: CMakeFiles/ftests.dir/build.make ftests: CMakeFiles/ftests.dir/link.txt - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Linking CXX executable ftests" + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/phanes/Development/internal/ftests/cmake-build-debug/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Linking CXX executable ftests" $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/ftests.dir/link.txt --verbose=$(VERBOSE) # Rule to build all files generated by this target. @@ -286,9 +338,11 @@ CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o. CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o.requires CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o.requires CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o.requires -CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/Units.cpp.o.requires +CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o.requires CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o.requires CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o.requires +CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o.requires +CMakeFiles/ftests.dir/requires: CMakeFiles/ftests.dir/src/loaders/Task.cpp.o.requires .PHONY : CMakeFiles/ftests.dir/requires diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/cmake_clean.cmake b/cmake-build-debug/CMakeFiles/ftests.dir/cmake_clean.cmake index 4ad02f1..4d65666 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/cmake_clean.cmake +++ b/cmake-build-debug/CMakeFiles/ftests.dir/cmake_clean.cmake @@ -4,9 +4,11 @@ file(REMOVE_RECURSE "CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o" "CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o" "CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o" - "CMakeFiles/ftests.dir/src/loaders/Units.cpp.o" + "CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o" "CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o" "CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o" + "CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o" + "CMakeFiles/ftests.dir/src/loaders/Task.cpp.o" "ftests.pdb" "ftests" ) diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/depend.internal b/cmake-build-debug/CMakeFiles/ftests.dir/depend.internal index d7e43fc..f2f2b02 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/depend.internal +++ b/cmake-build-debug/CMakeFiles/ftests.dir/depend.internal @@ -7,7 +7,9 @@ CMakeFiles/ftests.dir/examplar.cpp.o /home/phanes/Development/internal/ftests/src/loaders/Conf.h /home/phanes/Development/internal/ftests/src/loaders/JLoader.h /home/phanes/Development/internal/ftests/src/loaders/Plan.h - /home/phanes/Development/internal/ftests/src/loaders/Units.h + /home/phanes/Development/internal/ftests/src/loaders/Suite.h + /home/phanes/Development/internal/ftests/src/loaders/Task.h + /home/phanes/Development/internal/ftests/src/loaders/Unit.h /home/phanes/Development/internal/ftests/src/loaders/loaders.h CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o /home/phanes/Development/internal/ftests/src/json/json.h @@ -27,11 +29,21 @@ CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o /home/phanes/Development/internal/ftests/src/loaders/JLoader.h /home/phanes/Development/internal/ftests/src/loaders/Plan.cpp /home/phanes/Development/internal/ftests/src/loaders/Plan.h -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o + /home/phanes/Development/internal/ftests/src/loaders/Task.h +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o /home/phanes/Development/internal/ftests/src/json/json.h /home/phanes/Development/internal/ftests/src/loaders/JLoader.h - /home/phanes/Development/internal/ftests/src/loaders/Units.cpp - /home/phanes/Development/internal/ftests/src/loaders/Units.h + /home/phanes/Development/internal/ftests/src/loaders/Suite.cpp + /home/phanes/Development/internal/ftests/src/loaders/Suite.h + /home/phanes/Development/internal/ftests/src/loaders/Unit.h +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o + /home/phanes/Development/internal/ftests/src/json/json.h + /home/phanes/Development/internal/ftests/src/loaders/Task.cpp + /home/phanes/Development/internal/ftests/src/loaders/Task.h +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o + /home/phanes/Development/internal/ftests/src/json/json.h + /home/phanes/Development/internal/ftests/src/loaders/Unit.cpp + /home/phanes/Development/internal/ftests/src/loaders/Unit.h CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o /home/phanes/Development/internal/ftests/src/loaders/helpers.cpp /home/phanes/Development/internal/ftests/src/loaders/helpers.h @@ -40,6 +52,8 @@ CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o /home/phanes/Development/internal/ftests/src/loaders/Conf.h /home/phanes/Development/internal/ftests/src/loaders/JLoader.h /home/phanes/Development/internal/ftests/src/loaders/Plan.h - /home/phanes/Development/internal/ftests/src/loaders/Units.h + /home/phanes/Development/internal/ftests/src/loaders/Suite.h + /home/phanes/Development/internal/ftests/src/loaders/Task.h + /home/phanes/Development/internal/ftests/src/loaders/Unit.h /home/phanes/Development/internal/ftests/src/loaders/loaders.cpp /home/phanes/Development/internal/ftests/src/loaders/loaders.h diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/depend.make b/cmake-build-debug/CMakeFiles/ftests.dir/depend.make index cbb475d..10b8db2 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/depend.make +++ b/cmake-build-debug/CMakeFiles/ftests.dir/depend.make @@ -6,7 +6,9 @@ CMakeFiles/ftests.dir/examplar.cpp.o: ../src/json/json.h CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/Conf.h CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/JLoader.h CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/Plan.h -CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/Units.h +CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/Suite.h +CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/Task.h +CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/Unit.h CMakeFiles/ftests.dir/examplar.cpp.o: ../src/loaders/loaders.h CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o: ../src/json/json.h @@ -26,11 +28,21 @@ CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o: ../src/json/json.h CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o: ../src/loaders/JLoader.h CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o: ../src/loaders/Plan.cpp CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o: ../src/loaders/Plan.h +CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o: ../src/loaders/Task.h -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o: ../src/json/json.h -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o: ../src/loaders/JLoader.h -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o: ../src/loaders/Units.cpp -CMakeFiles/ftests.dir/src/loaders/Units.cpp.o: ../src/loaders/Units.h +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: ../src/json/json.h +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: ../src/loaders/JLoader.h +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: ../src/loaders/Suite.cpp +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: ../src/loaders/Suite.h +CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o: ../src/loaders/Unit.h + +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o: ../src/json/json.h +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o: ../src/loaders/Task.cpp +CMakeFiles/ftests.dir/src/loaders/Task.cpp.o: ../src/loaders/Task.h + +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o: ../src/json/json.h +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o: ../src/loaders/Unit.cpp +CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o: ../src/loaders/Unit.h CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o: ../src/loaders/helpers.cpp CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o: ../src/loaders/helpers.h @@ -39,7 +51,9 @@ CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/json/json.h CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/Conf.h CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/JLoader.h CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/Plan.h -CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/Units.h +CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/Suite.h +CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/Task.h +CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/Unit.h CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/loaders.cpp CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o: ../src/loaders/loaders.h diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/examplar.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/examplar.cpp.o index 1e08cc8..597b32d 100644 Binary files a/cmake-build-debug/CMakeFiles/ftests.dir/examplar.cpp.o and b/cmake-build-debug/CMakeFiles/ftests.dir/examplar.cpp.o differ diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/link.txt b/cmake-build-debug/CMakeFiles/ftests.dir/link.txt index 860463a..8a319f7 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/link.txt +++ b/cmake-build-debug/CMakeFiles/ftests.dir/link.txt @@ -1 +1 @@ -/usr/bin/c++ -g CMakeFiles/ftests.dir/examplar.cpp.o CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o CMakeFiles/ftests.dir/src/loaders/Units.cpp.o CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o -o ftests +/usr/bin/c++ -g CMakeFiles/ftests.dir/examplar.cpp.o CMakeFiles/ftests.dir/src/loaders/loaders.cpp.o CMakeFiles/ftests.dir/src/json/jsoncpp.cpp.o CMakeFiles/ftests.dir/src/loaders/JLoader.cpp.o CMakeFiles/ftests.dir/src/loaders/helpers.cpp.o CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o CMakeFiles/ftests.dir/src/loaders/Conf.cpp.o CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o CMakeFiles/ftests.dir/src/loaders/Task.cpp.o -o ftests diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/progress.make b/cmake-build-debug/CMakeFiles/ftests.dir/progress.make index d4f6ce3..eeadf29 100644 --- a/cmake-build-debug/CMakeFiles/ftests.dir/progress.make +++ b/cmake-build-debug/CMakeFiles/ftests.dir/progress.make @@ -7,4 +7,6 @@ CMAKE_PROGRESS_6 = 6 CMAKE_PROGRESS_7 = 7 CMAKE_PROGRESS_8 = 8 CMAKE_PROGRESS_9 = 9 +CMAKE_PROGRESS_10 = 10 +CMAKE_PROGRESS_11 = 11 diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o index 66152b7..d9b544a 100644 Binary files a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o and b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Plan.cpp.o differ diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o new file mode 100644 index 0000000..db67e84 Binary files /dev/null and b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o differ diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Task.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Task.cpp.o new file mode 100644 index 0000000..481572a Binary files /dev/null and b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Task.cpp.o differ diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o new file mode 100644 index 0000000..b045a99 Binary files /dev/null and b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o differ diff --git a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Units.cpp.o b/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Units.cpp.o deleted file mode 100644 index fa0b0aa..0000000 Binary files a/cmake-build-debug/CMakeFiles/ftests.dir/src/loaders/Units.cpp.o and /dev/null differ diff --git a/cmake-build-debug/CMakeFiles/progress.marks b/cmake-build-debug/CMakeFiles/progress.marks index ec63514..b4de394 100644 --- a/cmake-build-debug/CMakeFiles/progress.marks +++ b/cmake-build-debug/CMakeFiles/progress.marks @@ -1 +1 @@ -9 +11 diff --git a/cmake-build-debug/Makefile b/cmake-build-debug/Makefile index be8554c..e8a2299 100644 --- a/cmake-build-debug/Makefile +++ b/cmake-build-debug/Makefile @@ -258,32 +258,86 @@ src/loaders/Plan.cpp.s: $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Plan.cpp.s .PHONY : src/loaders/Plan.cpp.s -src/loaders/Units.o: src/loaders/Units.cpp.o +src/loaders/Suite.o: src/loaders/Suite.cpp.o -.PHONY : src/loaders/Units.o +.PHONY : src/loaders/Suite.o # target to build an object file -src/loaders/Units.cpp.o: - $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Units.cpp.o -.PHONY : src/loaders/Units.cpp.o +src/loaders/Suite.cpp.o: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Suite.cpp.o +.PHONY : src/loaders/Suite.cpp.o -src/loaders/Units.i: src/loaders/Units.cpp.i +src/loaders/Suite.i: src/loaders/Suite.cpp.i -.PHONY : src/loaders/Units.i +.PHONY : src/loaders/Suite.i # target to preprocess a source file -src/loaders/Units.cpp.i: - $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Units.cpp.i -.PHONY : src/loaders/Units.cpp.i +src/loaders/Suite.cpp.i: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Suite.cpp.i +.PHONY : src/loaders/Suite.cpp.i -src/loaders/Units.s: src/loaders/Units.cpp.s +src/loaders/Suite.s: src/loaders/Suite.cpp.s -.PHONY : src/loaders/Units.s +.PHONY : src/loaders/Suite.s # target to generate assembly for a file -src/loaders/Units.cpp.s: - $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Units.cpp.s -.PHONY : src/loaders/Units.cpp.s +src/loaders/Suite.cpp.s: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Suite.cpp.s +.PHONY : src/loaders/Suite.cpp.s + +src/loaders/Task.o: src/loaders/Task.cpp.o + +.PHONY : src/loaders/Task.o + +# target to build an object file +src/loaders/Task.cpp.o: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Task.cpp.o +.PHONY : src/loaders/Task.cpp.o + +src/loaders/Task.i: src/loaders/Task.cpp.i + +.PHONY : src/loaders/Task.i + +# target to preprocess a source file +src/loaders/Task.cpp.i: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Task.cpp.i +.PHONY : src/loaders/Task.cpp.i + +src/loaders/Task.s: src/loaders/Task.cpp.s + +.PHONY : src/loaders/Task.s + +# target to generate assembly for a file +src/loaders/Task.cpp.s: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Task.cpp.s +.PHONY : src/loaders/Task.cpp.s + +src/loaders/Unit.o: src/loaders/Unit.cpp.o + +.PHONY : src/loaders/Unit.o + +# target to build an object file +src/loaders/Unit.cpp.o: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Unit.cpp.o +.PHONY : src/loaders/Unit.cpp.o + +src/loaders/Unit.i: src/loaders/Unit.cpp.i + +.PHONY : src/loaders/Unit.i + +# target to preprocess a source file +src/loaders/Unit.cpp.i: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Unit.cpp.i +.PHONY : src/loaders/Unit.cpp.i + +src/loaders/Unit.s: src/loaders/Unit.cpp.s + +.PHONY : src/loaders/Unit.s + +# target to generate assembly for a file +src/loaders/Unit.cpp.s: + $(MAKE) -f CMakeFiles/ftests.dir/build.make CMakeFiles/ftests.dir/src/loaders/Unit.cpp.s +.PHONY : src/loaders/Unit.cpp.s src/loaders/helpers.o: src/loaders/helpers.cpp.o @@ -363,9 +417,15 @@ help: @echo "... src/loaders/Plan.o" @echo "... src/loaders/Plan.i" @echo "... src/loaders/Plan.s" - @echo "... src/loaders/Units.o" - @echo "... src/loaders/Units.i" - @echo "... src/loaders/Units.s" + @echo "... src/loaders/Suite.o" + @echo "... src/loaders/Suite.i" + @echo "... src/loaders/Suite.s" + @echo "... src/loaders/Task.o" + @echo "... src/loaders/Task.i" + @echo "... src/loaders/Task.s" + @echo "... src/loaders/Unit.o" + @echo "... src/loaders/Unit.i" + @echo "... src/loaders/Unit.s" @echo "... src/loaders/helpers.o" @echo "... src/loaders/helpers.i" @echo "... src/loaders/helpers.s" diff --git a/cmake-build-debug/ftests b/cmake-build-debug/ftests index b1309e2..7c81e13 100755 Binary files a/cmake-build-debug/ftests and b/cmake-build-debug/ftests differ diff --git a/cmake-build-debug/ftests.cbp b/cmake-build-debug/ftests.cbp index 83c4c59..868dead 100644 --- a/cmake-build-debug/ftests.cbp +++ b/cmake-build-debug/ftests.cbp @@ -108,10 +108,22 @@ - + - + + + + + + + + + diff --git a/examplar.cpp b/examplar.cpp index 62ff37e..376d1b9 100644 --- a/examplar.cpp +++ b/examplar.cpp @@ -18,9 +18,9 @@ int main() for ( int i = 0; i < plan.num_tasks(); ++i ) { - Task current_task = plan.select_task_index( i ); + Task current_task = plan.get_task(i); - Unit current_unit = unit_definitions.select_unit( current_task.get_name() ); + Unit current_unit = unit_definitions.get_unit(current_task.get_name()); std::cout << "Found task name in \"" << configuration.get_plan_path() << "\":\t" << current_task.get_name() << std::endl << std::endl; diff --git a/src/loaders/Plan.cpp b/src/loaders/Plan.cpp index b90675a..d8a1d8b 100644 --- a/src/loaders/Plan.cpp +++ b/src/loaders/Plan.cpp @@ -1,43 +1,18 @@ -// -// 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; } -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() // returns the number of tasks in a Plan { return (int)this->tasks.size(); } -Task Plan::select_task_index(int index) +Task Plan::get_task(int index) // returns a task from its parent Plan by index { return this->tasks[index]; } -Task Plan::select_task( std::string provided_name ) +Task Plan::get_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. diff --git a/src/loaders/Plan.h b/src/loaders/Plan.h index 9d2af69..1023e97 100644 --- a/src/loaders/Plan.h +++ b/src/loaders/Plan.h @@ -1,28 +1,11 @@ -// -// Created by phanes on 4/22/17. -// - #ifndef FTESTS_PLAN_H #define FTESTS_PLAN_H + #include #include "../json/json.h" #include "JLoader.h" +#include "Task.h" -class Task -{ - private: - std::string name; - Json::Value dependencies; - bool has_succeeded; - - 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 { @@ -31,8 +14,8 @@ class Plan: public JLoader public: Plan( std::string filename ); - Task select_task( std::string provided_name ); - Task select_task_index( int index ); + Task get_task(std::string provided_name); + Task get_task(int index); int num_tasks(); }; diff --git a/src/loaders/Suite.cpp b/src/loaders/Suite.cpp new file mode 100644 index 0000000..aa3005f --- /dev/null +++ b/src/loaders/Suite.cpp @@ -0,0 +1,43 @@ +#include "Suite.h" + +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 } + */ +{ + 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 ] ) ); + } +}; + +Unit Suite::get_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; + + for ( int i = 0; i < this->units.size(); i++ ) + { + std::string unit_name = this->units[i].get_name(); + if ( unit_name == provided_name ) + { + returnable = & this->units[i]; + foundMatch = true; + break; + } + } + if (! foundMatch ) + { + std::cerr << "Unit name \"" << provided_name << "\" was referenced but not defined!" << std::endl; + std::exit(1); + } + + return * returnable; +} diff --git a/src/loaders/Suite.h b/src/loaders/Suite.h new file mode 100644 index 0000000..d71f571 --- /dev/null +++ b/src/loaders/Suite.h @@ -0,0 +1,29 @@ +// +// Created by phanes on 4/22/17. +// + +#ifndef FTESTS_UNITS_H +#define FTESTS_UNITS_H + +#include +#include "../json/json.h" +#include "JLoader.h" +#include "Unit.h" + + +class Suite: public JLoader +{ + private: + std::vector units; + + public: + // constructor + Suite( std::string filename ); + + // returns the unit type identified by name or null + Unit get_unit(std::string provided_name); +}; + + + +#endif //FTESTS_UNITS_H diff --git a/src/loaders/Task.cpp b/src/loaders/Task.cpp new file mode 100644 index 0000000..5770349 --- /dev/null +++ b/src/loaders/Task.cpp @@ -0,0 +1,22 @@ +#include "Task.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; } +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() +{ + +} \ No newline at end of file diff --git a/src/loaders/Task.h b/src/loaders/Task.h new file mode 100644 index 0000000..b1b886e --- /dev/null +++ b/src/loaders/Task.h @@ -0,0 +1,26 @@ +// +// Created by phanes on 4/30/17. +// + +#ifndef FTESTS_TASK_H +#define FTESTS_TASK_H +#include +#include "../json/json.h" + +class Task +{ + private: + std::string name; + Json::Value dependencies; + bool has_succeeded; + + public: + Task( Json::Value loader_root ); + std::string get_name(); + Json::Value get_dependencies(); + Json::Value set_dependencies(); + bool isDone(); + void finish(); +}; + +#endif //FTESTS_TASK_H diff --git a/src/loaders/Unit.cpp b/src/loaders/Unit.cpp new file mode 100644 index 0000000..a839b70 --- /dev/null +++ b/src/loaders/Unit.cpp @@ -0,0 +1,53 @@ +#include "Unit.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(); + this->output = loader_root.get("output", "?").asString(); + this->rectifier = loader_root.get("rectifier", "?").asString(); + this->active = loader_root.get("active", "?").asString(); + this->required = loader_root.get("required", "?").asString(); + 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; +} + +std::string Unit::get_rectifier() +{ + return this->rectifier; +} + +std::string Unit::get_active() +{ + return this->active; +} + +std::string Unit::get_required() +{ + return this->required; +} + +std::string Unit::get_rectify() +{ + return this->rectify; +} \ No newline at end of file diff --git a/src/loaders/Unit.h b/src/loaders/Unit.h new file mode 100644 index 0000000..59835f7 --- /dev/null +++ b/src/loaders/Unit.h @@ -0,0 +1,32 @@ +// +// Created by phanes on 4/29/17. +// + +#ifndef FTESTS_UNIT_H +#define FTESTS_UNIT_H +#include +#include "../json/json.h" + +class Unit +{ +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(); +}; + +#endif //FTESTS_UNIT_H diff --git a/src/loaders/Units.cpp b/src/loaders/Units.cpp deleted file mode 100644 index 1274ff1..0000000 --- a/src/loaders/Units.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// -// Created by phanes on 4/22/17. -// - -#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(); - this->output = loader_root.get("output", "?").asString(); - this->rectifier = loader_root.get("rectifier", "?").asString(); - this->active = loader_root.get("active", "?").asString(); - this->required = loader_root.get("required", "?").asString(); - 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; } -std::string Unit::get_rectifier() { return this->rectifier; } -std::string Unit::get_active() { return this->active; } -std::string Unit::get_required() { return this->required; } -std::string Unit::get_rectify() { return this->rectify; } - -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 } - */ -{ - 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 ] ) ); - } -}; - -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; - - for ( int i = 0; i < this->units.size(); i++ ) - { - std::string unit_name = this->units[i].get_name(); - if ( unit_name == provided_name ) - { - returnable = & this->units[i]; - foundMatch = true; - break; - } - } - if (! foundMatch ) - { - std::cerr << "Unit name \"" << provided_name << "\" was referenced but not defined!" << std::endl; - std::exit(1); - } - - return * returnable; -} diff --git a/src/loaders/Units.h b/src/loaders/Units.h deleted file mode 100644 index 58b1cb5..0000000 --- a/src/loaders/Units.h +++ /dev/null @@ -1,49 +0,0 @@ -// -// Created by phanes on 4/22/17. -// - -#ifndef FTESTS_UNITS_H -#define FTESTS_UNITS_H - -#include -#include "../json/json.h" -#include "JLoader.h" - -class Unit -{ - 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(); -}; - -class Suite: public JLoader -{ - private: - std::vector units; - - public: - // constructor - Suite( std::string filename ); - - // returns the unit type identified by name or null - Unit select_unit( std::string provided_name ); -}; - - - -#endif //FTESTS_UNITS_H diff --git a/src/loaders/loaders.h b/src/loaders/loaders.h index 158089c..740075b 100644 --- a/src/loaders/loaders.h +++ b/src/loaders/loaders.h @@ -5,7 +5,7 @@ #define FTESTS_LOADERS_H #include "JLoader.h" -#include "Units.h" +#include "Suite.h" #include "Plan.h" #include "Conf.h"