Browse Source

Merge branch 'master' of https://git.leobots.de/Leobots/mdd

Willi Zschiebsch 4 years atrás
parent
commit
22924e356f
73 changed files with 1090 additions and 275 deletions
  1. 2 2
      .gitignore
  2. 718 108
      .idea/workspace.xml
  3. 1 0
      CMakeLists.txt
  4. 2 2
      lib/CMakeLists.txt
  5. 2 2
      lib/include/Generator.h
  6. 3 3
      lib/include/IModule.h
  7. 0 55
      lib/include/IProperty.h
  8. 7 5
      lib/include/ModuleBase.h
  9. 0 61
      lib/include/Property.h
  10. 1 1
      lib/src/Connector.cpp
  11. 13 11
      lib/src/ModuleBase.cpp
  12. 18 13
      lib/src/ModuleMath.cpp
  13. 1 1
      lib/src/OptimizerEvolutionary.cpp
  14. 20 11
      lib/test/test_ModuleMath.cpp
  15. 0 0
      thirdparty/googletest/ci/env-linux.sh
  16. 0 0
      thirdparty/googletest/ci/env-osx.sh
  17. 0 0
      thirdparty/googletest/ci/get-nprocessors.sh
  18. 0 0
      thirdparty/googletest/ci/log-config.sh
  19. 0 0
      thirdparty/googletest/ci/travis.sh
  20. 0 0
      thirdparty/googletest/googlemock/scripts/fuse_gmock_files.py
  21. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/__init__.py
  22. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/ast.py
  23. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/gmock_class.py
  24. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py
  25. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/keywords.py
  26. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/tokenize.py
  27. 0 0
      thirdparty/googletest/googlemock/scripts/generator/cpp/utils.py
  28. 0 0
      thirdparty/googletest/googlemock/scripts/generator/gmock_gen.py
  29. 0 0
      thirdparty/googletest/googlemock/scripts/gmock-config.in
  30. 0 0
      thirdparty/googletest/googlemock/scripts/gmock_doctor.py
  31. 0 0
      thirdparty/googletest/googlemock/scripts/upload.py
  32. 0 0
      thirdparty/googletest/googlemock/scripts/upload_gmock.py
  33. 0 0
      thirdparty/googletest/googlemock/test/gmock_leak_test.py
  34. 0 0
      thirdparty/googletest/googlemock/test/gmock_output_test.py
  35. 0 0
      thirdparty/googletest/googlemock/test/gmock_test_utils.py
  36. 0 0
      thirdparty/googletest/googletest/scripts/fuse_gtest_files.py
  37. 0 0
      thirdparty/googletest/googletest/scripts/gen_gtest_pred_impl.py
  38. 0 0
      thirdparty/googletest/googletest/scripts/gtest-config.in
  39. 0 0
      thirdparty/googletest/googletest/scripts/pump.py
  40. 0 0
      thirdparty/googletest/googletest/scripts/release_docs.py
  41. 0 0
      thirdparty/googletest/googletest/scripts/upload.py
  42. 0 0
      thirdparty/googletest/googletest/scripts/upload_gtest.py
  43. 0 0
      thirdparty/googletest/googletest/test/googletest-break-on-failure-unittest.py
  44. 0 0
      thirdparty/googletest/googletest/test/googletest-catch-exceptions-test.py
  45. 0 0
      thirdparty/googletest/googletest/test/googletest-color-test.py
  46. 0 0
      thirdparty/googletest/googletest/test/googletest-env-var-test.py
  47. 0 0
      thirdparty/googletest/googletest/test/googletest-filter-unittest.py
  48. 0 0
      thirdparty/googletest/googletest/test/googletest-list-tests-unittest.py
  49. 0 0
      thirdparty/googletest/googletest/test/googletest-output-test.py
  50. 0 0
      thirdparty/googletest/googletest/test/googletest-shuffle-test.py
  51. 0 0
      thirdparty/googletest/googletest/test/googletest-throw-on-failure-test.py
  52. 0 0
      thirdparty/googletest/googletest/test/googletest-uninitialized-test.py
  53. 0 0
      thirdparty/googletest/googletest/test/gtest_help_test.py
  54. 0 0
      thirdparty/googletest/googletest/test/gtest_skip_environment_check_output_test.py
  55. 0 0
      thirdparty/googletest/googletest/test/gtest_test_utils.py
  56. 0 0
      thirdparty/googletest/googletest/test/gtest_testbridge_test.py
  57. 0 0
      thirdparty/googletest/googletest/test/gtest_xml_outfiles_test.py
  58. 0 0
      thirdparty/googletest/googletest/test/gtest_xml_output_unittest.py
  59. 0 0
      thirdparty/googletest/googletest/test/gtest_xml_test_utils.py
  60. 24 0
      thirdparty/json/.circleci/config.yml
  61. 6 0
      thirdparty/json/.github/CODEOWNERS
  62. 71 0
      thirdparty/json/.github/CONTRIBUTING.md
  63. 2 0
      thirdparty/json/.github/FUNDING.yml
  64. 22 0
      thirdparty/json/.github/ISSUE_TEMPLATE/Bug_report.md
  65. 12 0
      thirdparty/json/.github/ISSUE_TEMPLATE/Feature_request.md
  66. 16 0
      thirdparty/json/.github/ISSUE_TEMPLATE/question.md
  67. 19 0
      thirdparty/json/.github/PULL_REQUEST_TEMPLATE.md
  68. 5 0
      thirdparty/json/.github/SECURITY.md
  69. 19 0
      thirdparty/json/.github/config.yml
  70. 17 0
      thirdparty/json/.github/stale.yml
  71. 19 0
      thirdparty/json/.github/workflows/ccpp.yml
  72. 28 0
      thirdparty/json/.gitignore
  73. 42 0
      thirdparty/json/benchmarks/thirdparty/benchmark/BUILD.bazel

+ 2 - 2
.gitignore

@@ -1,3 +1,3 @@
-*install*
-*build*
+*install*/*
+*build*/*
 .idea

File diff suppressed because it is too large
+ 718 - 108
.idea/workspace.xml


+ 1 - 0
CMakeLists.txt

@@ -6,6 +6,7 @@ set(CMAKE_CXX_STANDARD 17)
 include(cmake/configure_msvc.cmake)
 configure_msvc_runtime()
 install(FILES cmake/mdd-config.cmake DESTINATION .)
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 
 if(${TESTS_ENABLED})
     enable_testing()

+ 2 - 2
lib/CMakeLists.txt

@@ -14,7 +14,6 @@ add_library(${PROJECT_NAME} SHARED
 	include/IOptimizer.h
         include/IOutput.h
         include/IProcessor.h
-	include/IProperty.h
 	include/IState.h
         include/IUnique.h
         include/ModuleBase.h
@@ -29,7 +28,6 @@ add_library(${PROJECT_NAME} SHARED
         include/ProcessorBase.h
         include/ProcessorEvolution.h
 	include/ProcessorStandard.h
-	include/Property.h
 	include/state.h
 
 	src/Connector.cpp
@@ -60,6 +58,8 @@ target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} sqlite3)
 set_target_properties( ${PROJECT_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
 if(WIN32)
 	target_compile_options(${PROJECT_NAME} PRIVATE /bigobj)
+elseif(UNIX)
+	target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} dl)
 endif(WIN32)
 
 install(DIRECTORY include DESTINATION .)

+ 2 - 2
lib/include/Generator.h

@@ -30,9 +30,9 @@ namespace mdd
 	public:
 		GeneratorRegistration(const std::string& name)
 		{
-			GetGenerators(name.substr(6), std::make_shared<Generator<MODULE_CLASS>>());
+			GetGenerators(name, std::make_shared<Generator<MODULE_CLASS>>());
 		}
 	};
 }
 
-#define ADD_GENERATOR(CLASS) namespace{mdd::GeneratorRegistration<CLASS> reg_sdewfdsf(typeid(CLASS).name());}
+#define ADD_GENERATOR(CLASS) namespace{mdd::GeneratorRegistration<CLASS> reg_sdewfdsf(#CLASS);}

+ 3 - 3
lib/include/IModule.h

@@ -3,7 +3,6 @@
 
 #include "IOutput.h"
 #include "IInput.h"
-#include "IProperty.h"
 #include "state.h"
 #include <string>
 #include <vector>
@@ -12,7 +11,7 @@
 namespace mdd {
     class IOutput;
 
-    class IModule : public IUnique, public IProperty{
+    class IModule : public IUnique{
     public:
         typedef std::shared_ptr<IModule> Ptr;
 
@@ -32,7 +31,8 @@ namespace mdd {
         virtual state update() = 0;
         virtual ~IModule() = default;
 
-        virtual void configure() = 0;
+        virtual bool configure(const std::string& config) = 0;
+        virtual std::string getBaseConfiguration() = 0;
     };
 }
 #endif //MDD_IMODULE_H

+ 0 - 55
lib/include/IProperty.h

@@ -1,55 +0,0 @@
-
-
-#pragma once
-
-#include <memory>
-#include <string>
-
-namespace mdd
-{
-	class IPropertyValue
-	{
-	public:
-		virtual ~IPropertyValue(){}
-		virtual std::string GetPropertyType() = 0;
-	};
-
-	template<typename TYPE>
-	class PropertyValue : public IPropertyValue
-	{
-	public:
-		std::string GetPropertyType()
-		{
-			return typeid(TYPE).name();
-		}
-
-		std::shared_ptr<TYPE> value = std::make_shared<TYPE>();
-	};
-
-	class IProperty
-	{
-	protected:
-		virtual IPropertyValue* GetPropertyValue() = 0;
-
-	public:
-
-		virtual ~IProperty(){}
-
-		virtual std::shared_ptr<IProperty> GetSubProp(const std::string& name) = 0;
-
-
-		template<typename EXPECTED_TYPE>
-		std::shared_ptr<EXPECTED_TYPE> Value()
-		{
-			if (GetPropertyValue()->GetPropertyType() != typeid(EXPECTED_TYPE).name())
-			{
-				return std::make_shared<EXPECTED_TYPE>();
-			}
-			else
-			{
-				return dynamic_cast<PropertyValue<EXPECTED_TYPE>>(GetPropertyValue())->value;
-			}
-		}
-	};
-
-}

+ 7 - 5
lib/include/ModuleBase.h

@@ -4,21 +4,25 @@
 #include "Input.h"
 #include "Output.h"
 #include "IModule.h"
-#include "Property.h"
 #include "Generator.h"
 
 namespace mdd {
 
-class ModuleBase : public  IModule, protected Property<bool>{
+class ModuleBase : public  IModule{
     private:
         std::string _prefix = "";
         std::string _type = "";
+        std::string _base_config = "";
         int _appendix = 0;
         std::vector<std::shared_ptr<Input>> _inputs;
         std::vector<std::shared_ptr<Output>> _outputs;
 
     protected:
-        virtual void configure() {};
+        ModuleBase(const std::string& base_config = "{}");
+
+        virtual bool configure(const std::string& config) {return true;};
+        virtual std::string getBaseConfiguration();
+
         std::shared_ptr<IOutput> getOutput(int handle);
         std::shared_ptr<IInput> getInput(int handle);
         int addInput(const std::string& type, const std::vector<double>& value);
@@ -33,8 +37,6 @@ class ModuleBase : public  IModule, protected Property<bool>{
         int eraseInput(int index);
         int eraseOutput(int index);
 
-        IPropertyValue* GetPropertyValue();
-        std::shared_ptr<IProperty> GetSubProp(const std::string& name);
     public:
         std::vector<std::string> getInputs() override;
         std::vector<std::string> getInputIDs() override;

+ 0 - 61
lib/include/Property.h

@@ -1,61 +0,0 @@
-
-
-#pragma once
-
-#include <map>
-#include "IProperty.h"
-
-namespace mdd
-{
-
-	template<typename TYPE>
-	class Property : public IProperty
-	{
-		PropertyValue<TYPE> val;
-		std::map<std::string, std::shared_ptr<IProperty>> _subprops;
-	protected:
-		virtual IPropertyValue* GetPropertyValue()
-		{
-			return &val;
-		}
-
-	public:
-		typedef std::shared_ptr<Property<TYPE>> Ptr;
-
-		virtual std::shared_ptr<IProperty> GetSubProp(const std::string& name)
-		{
-			auto sub = _subprops.find(name);
-			if (sub == _subprops.end())
-			{
-				return std::make_shared<Property<bool>>();
-			}
-			else
-			{
-				return sub->second;
-			}
-		}
-
-		template<typename T>
-		std::shared_ptr<Property<T>> addSubProperty(const std::string& name)
-		{
-			auto newprop = std::make_shared<Property<T>>();
-			_subprops[name] = newprop;
-			return newprop;
-		}
-
-		template<typename T>
-		std::shared_ptr<Property<T>> addSubProperty(const std::string& name, const T& default)
-		{
-			auto newprop = std::make_shared<Property<T>>();
-			newprop->Value() = default;
-			_subprops[name] = newprop;
-			return newprop;
-		}
-
-		TYPE& Value()
-		{
-			return *val.value;
-		}
-	};
-
-}

+ 1 - 1
lib/src/Connector.cpp

@@ -1,4 +1,4 @@
-#include "..\include\Connector.h"
+#include "Connector.h"
 namespace mdd {
 	std::shared_ptr<IModule> Connector::decode(const json& structure)
 	{

+ 13 - 11
lib/src/ModuleBase.cpp

@@ -88,7 +88,7 @@ namespace mdd {
     std::vector<std::shared_ptr<IInput>> ModuleBase::getOptimizableInputs()
     {
         std::vector<std::shared_ptr<IInput>> ret;
-        for (auto& it = _inputs.begin(); it != _inputs.end();  ++it)
+        for (auto it = _inputs.begin(); it != _inputs.end();  ++it)
         {
             if ((*it)->isOptimizable())
             {
@@ -101,7 +101,7 @@ namespace mdd {
     std::vector<std::shared_ptr<IOutput>> ModuleBase::getOptimizableOutputs()
     {
         std::vector<std::shared_ptr<IOutput>> ret;
-        for (auto& it = _outputs.begin(); it != _outputs.end(); ++it)
+        for (auto it = _outputs.begin(); it != _outputs.end(); ++it)
         {
             if ((*it)->isOptimizable())
             {
@@ -129,6 +129,17 @@ namespace mdd {
         return nullptr;
     }
 
+    ModuleBase::ModuleBase(const std::string& base_config)
+        : _base_config(base_config)
+    {
+
+    }
+
+    std::string ModuleBase::getBaseConfiguration()
+    {
+        return _base_config;
+    }
+
     std::shared_ptr<IOutput> ModuleBase::getOutput(int handle) {
         return _outputs[handle];
     }
@@ -174,15 +185,6 @@ namespace mdd {
         return _prefix + "/" + _type + std::to_string(_appendix);
     }
 
-    IPropertyValue* ModuleBase::GetPropertyValue()
-    {
-        return Property<bool>::GetPropertyValue();
-    }
-
-    std::shared_ptr<IProperty> ModuleBase::GetSubProp(const std::string& name)
-    {
-        return Property<bool>::GetSubProp(name);
-    }
 
     std::string ModuleBase::setPrefix(const std::string& prefix){
         _prefix = prefix;

+ 18 - 13
lib/src/ModuleMath.cpp

@@ -2,6 +2,7 @@
 
 #include <iostream>
 #include <cmath>
+#include <json.hpp>
 
 namespace mdd {
 
@@ -19,12 +20,12 @@ namespace mdd {
             GREATER_THAN = 10
         };
         const std::map<std::string, std::function<double(double, double)>> _ops = {
-            {"mutiply", [](double a, double b) {return a * b; }}
+            {"add", [](double a, double b) {return a + b; }},
+            {"subtract", [](double a, double b) {return a - b; }}
         };
         std::function<double(double, double)> operation;
     private:
         MathOperation _operation;
-        Property<std::string>::Ptr _operation_prop;
 
         static std::vector<double> add(const std::vector<double>& val1, const std::vector<double>& val2);
         static std::vector<double> subtract(const std::vector<double>& val1, const std::vector<double>& val2);
@@ -39,33 +40,37 @@ namespace mdd {
 
     public:
         explicit ModuleMath();
-        void configure();
+        bool configure(const std::string& config);
         state update() override;
         void setMathOperation(MathOperation operation);
         MathOperation getMathOperation();
     };
 
-    ModuleMath::ModuleMath() {
+    ModuleMath::ModuleMath()
+        : ModuleBase(R"JSON({"operation":"add"})JSON"){
         std::vector<double> default_val = {1};
         addInput("Value", default_val);
         addInput("Value", default_val);
         addOutput("Value", default_val);
         setType("Math");
-        _operation_prop = addSubProperty<std::string>("operation");
     }
 
-    void ModuleMath::configure()
+    bool ModuleMath::configure(const std::string& config)
     {
         _operation = ModuleMath::MathOperation::ADD;
-        /*if (_operation_prop->Value() == "multiply")
+        json config_parsed = json::parse(config);
+        if(config_parsed.contains("operation"))
         {
-            _operation = ModuleMath::MathOperation::MULTIPLY;
-        }
-        else if (_operation_prop->Value() == "add")
-        {
-            _operation = ModuleMath::MathOperation::ADD;
+            const std::string op = config_parsed["operation"];
+            if("multiply" == op)
+            {
+                _operation = ModuleMath::MathOperation::MULTIPLY;
+            }
+            else if ("add" == op)
+            {
+                _operation = ModuleMath::MathOperation::ADD;
+            }
         }
-        */
     }
 
     std::vector<double> ModuleMath::add(const std::vector<double>&val1, const std::vector<double>&val2) {

+ 1 - 1
lib/src/OptimizerEvolutionary.cpp

@@ -5,7 +5,7 @@ namespace mdd {
 	void OptimizerEvolutionary::evaluate(size_t ignore_len)
 	{
 		//calculate fitness
-		for (auto& it = _children.begin() + ignore_len; it != _children.end(); ++it)
+		for (auto it = _children.begin() + ignore_len; it != _children.end(); ++it)
 		{
 			for (size_t j = 0; j < _inputs.size(); j++)
 			{

+ 20 - 11
lib/test/test_ModuleMath.cpp

@@ -14,7 +14,7 @@ TEST(ModuleMath, INT_PLUS_INT){
     
     auto generators = GetGenerators();
     IModule::Ptr mod = generators["mdd::ModuleMath"]->Generate();
-    //mod->configure();
+    mod->configure(mod->getBaseConfiguration());
     mod->update();
     auto ids = mod->getOutputIDs();
     auto id = ids[0];
@@ -23,16 +23,17 @@ TEST(ModuleMath, INT_PLUS_INT){
     EXPECT_FLOAT_EQ(res[0], 2.0);
 }
 
-/*
+
 TEST(ModuleMath, FLOAT_PLUS_FLOAT){
-    IModule::Ptr test = GetGenerators()["class mdd::ModuleMath"]->Generate();
-    test->configure();
+    IModule::Ptr test = GetGenerators()["mdd::ModuleMath"]->Generate();
+    test->configure(test->getBaseConfiguration());
     test->getInput(test->getInputIDs()[0])->setValue() = { 1.25 };
     test->getInput(test->getInputIDs()[1])->setValue() = { 3.125 };
     test->update();
 
     EXPECT_FLOAT_EQ(test->getOutput(test->getOutputIDs()[0])->getValue()[0], 4.375);
 }
+/*
 TEST(ModuleMath, FLOAT_PLUS_FLOAT_HARDER){
     ModuleMath test = ModuleMath();
     test.getInput(test.getInputIDs()[0])->setValue() = { 2.2 };
@@ -80,17 +81,25 @@ TEST(ModuleMath, ARRAY_MINUS_ARRAY){
 
     EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue(), expect);
 }
-
+*/
 TEST(ModuleMath, ARRAY_MAL_ARRAY){
-    ModuleMath test = ModuleMath(MathOperation::MULTIPLY);
-    test.getInput(test.getInputIDs()[0])->setValue() = {10,30,-3.5,45};
-    test.getInput(test.getInputIDs()[1])->setValue() = {1,2.5,2.25,20};
+    IModule::Ptr test = GetGenerators()["mdd::ModuleMath"]->Generate();
+
+    test->configure(R"JSON(
+    {
+        "operation": "multiply"
+    }
+    )JSON");
+    test->update();
+
+    test->getInput(test->getInputIDs()[0])->setValue() = {10,30,-3.5,45};
+    test->getInput(test->getInputIDs()[1])->setValue() = {1,2.5,2.25,20};
     std::vector<double> expect = { 10,75.0,-7.875,900 };
-    test.update();
+    test->update();
 
-    EXPECT_EQ(test.getOutput(test.getOutputIDs()[0])->getValue(), expect);
+    EXPECT_EQ(test->getOutput(test->getOutputIDs()[0])->getValue(), expect);
 }
-
+/*
 TEST(ModuleMath, ARRAY_DURCH_ARRAY){
     ModuleMath test = ModuleMath(MathOperation::DIVIDE);
     test.getInput(test.getInputIDs()[0])->setValue() = {10,30,-3.5,45};

+ 0 - 0
thirdparty/googletest/ci/env-linux.sh


+ 0 - 0
thirdparty/googletest/ci/env-osx.sh


+ 0 - 0
thirdparty/googletest/ci/get-nprocessors.sh


+ 0 - 0
thirdparty/googletest/ci/log-config.sh


+ 0 - 0
thirdparty/googletest/ci/travis.sh


+ 0 - 0
thirdparty/googletest/googlemock/scripts/fuse_gmock_files.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/__init__.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/ast.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/gmock_class.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/keywords.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/tokenize.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/cpp/utils.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/generator/gmock_gen.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/gmock-config.in


+ 0 - 0
thirdparty/googletest/googlemock/scripts/gmock_doctor.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/upload.py


+ 0 - 0
thirdparty/googletest/googlemock/scripts/upload_gmock.py


+ 0 - 0
thirdparty/googletest/googlemock/test/gmock_leak_test.py


+ 0 - 0
thirdparty/googletest/googlemock/test/gmock_output_test.py


+ 0 - 0
thirdparty/googletest/googlemock/test/gmock_test_utils.py


+ 0 - 0
thirdparty/googletest/googletest/scripts/fuse_gtest_files.py


+ 0 - 0
thirdparty/googletest/googletest/scripts/gen_gtest_pred_impl.py


+ 0 - 0
thirdparty/googletest/googletest/scripts/gtest-config.in


+ 0 - 0
thirdparty/googletest/googletest/scripts/pump.py


+ 0 - 0
thirdparty/googletest/googletest/scripts/release_docs.py


+ 0 - 0
thirdparty/googletest/googletest/scripts/upload.py


+ 0 - 0
thirdparty/googletest/googletest/scripts/upload_gtest.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-break-on-failure-unittest.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-catch-exceptions-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-color-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-env-var-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-filter-unittest.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-list-tests-unittest.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-output-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-shuffle-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-throw-on-failure-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/googletest-uninitialized-test.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_help_test.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_skip_environment_check_output_test.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_test_utils.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_testbridge_test.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_xml_outfiles_test.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_xml_output_unittest.py


+ 0 - 0
thirdparty/googletest/googletest/test/gtest_xml_test_utils.py


+ 24 - 0
thirdparty/json/.circleci/config.yml

@@ -0,0 +1,24 @@
+version: 2
+jobs:
+  build:
+    docker:
+      - image: debian:stretch
+
+    steps:
+      - checkout
+
+      - run:
+          name: Install required tools
+          command: 'apt-get update && apt-get install -y gcc g++ git cmake'
+      - run:
+          name: Show versions
+          command: 'g++ --version ; uname -a; cmake --version'
+      - run:
+          name: Run CMake
+          command: 'mkdir build ; cd build ; cmake ..'
+      - run:
+          name: Compile
+          command: 'cmake --build build'
+      - run:
+          name: Execute test suite
+          command: 'cd build ; ctest --output-on-failure -j 2'

+ 6 - 0
thirdparty/json/.github/CODEOWNERS

@@ -0,0 +1,6 @@
+# JSON for Modern C++ has been originally written by Niels Lohmann.
+# Since 2013 over 140 contributors have helped to improve the library.
+# This CODEOWNERS file is only to make sure that @nlohmann is requested
+# for a code review in case of a pull request.
+
+* @nlohmann

File diff suppressed because it is too large
+ 71 - 0
thirdparty/json/.github/CONTRIBUTING.md


+ 2 - 0
thirdparty/json/.github/FUNDING.yml

@@ -0,0 +1,2 @@
+github: nlohmann
+custom: http://paypal.me/nlohmann

+ 22 - 0
thirdparty/json/.github/ISSUE_TEMPLATE/Bug_report.md

@@ -0,0 +1,22 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: ''
+labels: 'kind: bug'
+assignees: ''
+
+---
+
+- What is the issue you have?
+
+- Please describe the steps to reproduce the issue. Can you provide a small but working code example?
+
+- What is the expected behavior?
+
+- And what is the actual behavior instead?
+
+- Which compiler and operating system are you using? Is it a [supported compiler](https://github.com/nlohmann/json#supported-compilers)?
+
+- Did you use a released version of the library or the version from the `develop` branch?
+
+- If you experience a compilation error: can you [compile and run the unit tests](https://github.com/nlohmann/json#execute-unit-tests)?

+ 12 - 0
thirdparty/json/.github/ISSUE_TEMPLATE/Feature_request.md

@@ -0,0 +1,12 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: 'kind: enhancement/improvement'
+assignees: ''
+
+---
+
+- Describe the feature in as much detail as possible.
+
+- Include sample usage where appropriate.

+ 16 - 0
thirdparty/json/.github/ISSUE_TEMPLATE/question.md

@@ -0,0 +1,16 @@
+---
+name: Question
+about: Ask a question regarding the library.
+title: ''
+labels: 'kind: question'
+assignees: ''
+
+---
+
+- Describe what you want to achieve.
+
+- Describe what you tried.
+
+- Describe which system (OS, compiler) you are using.
+
+- Describe which version of the library you are using (release version, develop branch).

File diff suppressed because it is too large
+ 19 - 0
thirdparty/json/.github/PULL_REQUEST_TEMPLATE.md


+ 5 - 0
thirdparty/json/.github/SECURITY.md

@@ -0,0 +1,5 @@
+# Security Policy
+
+## Reporting a Vulnerability
+
+Usually, all issues are tracked publicly on [GitHub](https://github.com/nlohmann/json/issues). If you want to make a private report (e.g., for a vulnerability or to attach an example that is not meant to be published), please send an email to <mail@nlohmann.me>. You can use [this key](https://keybase.io/nlohmann/pgp_keys.asc?fingerprint=797167ae41c0a6d9232e48457f3cea63ae251b69) for encryption.

+ 19 - 0
thirdparty/json/.github/config.yml

@@ -0,0 +1,19 @@
+# Configuration for sentiment-bot - https://github.com/behaviorbot/sentiment-bot
+
+# *Required* toxicity threshold between 0 and .99 with the higher numbers being the most toxic
+# Anything higher than this threshold will be marked as toxic and commented on
+sentimentBotToxicityThreshold: .7
+
+# *Required* Comment to reply with
+sentimentBotReplyComment: >
+  Please be sure to review the [code of conduct](https://github.com/nlohmann/json/blob/develop/CODE_OF_CONDUCT.md) and be respectful of other users. cc/ @nlohmann
+
+
+# Configuration for request-info - https://github.com/behaviorbot/request-info
+
+# *Required* Comment to reply with
+requestInfoReplyComment: >
+  We would appreciate it if you could provide us with more info about this issue or pull request! Please check the [issue template](https://github.com/nlohmann/json/blob/develop/.github/ISSUE_TEMPLATE.md) and the [pull request template](https://github.com/nlohmann/json/blob/develop/.github/PULL_REQUEST_TEMPLATE.md).
+
+# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
+requestInfoLabelToAdd: "state: needs more info"

+ 17 - 0
thirdparty/json/.github/stale.yml

@@ -0,0 +1,17 @@
+# Number of days of inactivity before an issue becomes stale
+daysUntilStale: 30
+# Number of days of inactivity before a stale issue is closed
+daysUntilClose: 7
+# Issues with these labels will never be considered stale
+exemptLabels:
+  - pinned
+  - security
+# Label to use when marking an issue as stale
+staleLabel: "state: stale"
+# Comment to post when marking an issue as stale. Set to `false` to disable
+markComment: >
+  This issue has been automatically marked as stale because it has not had
+  recent activity. It will be closed if no further activity occurs. Thank you
+  for your contributions.
+# Comment to post when closing a stale issue. Set to `false` to disable
+closeComment: false

+ 19 - 0
thirdparty/json/.github/workflows/ccpp.yml

@@ -0,0 +1,19 @@
+name: C/C++ CI
+
+on: [push]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+    
+    steps:
+    - uses: actions/checkout@v1
+    - name: prepare
+      run: mkdir build
+    - name: cmake
+      run: cd build ; cmake ..
+    - name: build
+      run: make -C build
+    - name: test
+      run: cd build ; ctest -j 10

+ 28 - 0
thirdparty/json/.gitignore

@@ -0,0 +1,28 @@
+json_unit
+json_benchmarks
+json_benchmarks_simple
+fuzz-testing
+
+*.dSYM
+*.o
+*.gcno
+*.gcda
+
+build
+build_coverage
+clang_analyze_build
+
+doc/xml
+doc/html
+me.nlohmann.json.docset
+
+benchmarks/files/numbers/*.json
+
+.wsjcpp-logs/*
+.wsjcpp/*
+
+.idea
+cmake-build-debug
+
+test/test-*
+/.vs

+ 42 - 0
thirdparty/json/benchmarks/thirdparty/benchmark/BUILD.bazel

@@ -0,0 +1,42 @@
+licenses(["notice"])
+
+config_setting(
+    name = "windows",
+    values = {
+        "cpu": "x64_windows",
+    },
+    visibility = [":__subpackages__"],
+)
+
+cc_library(
+    name = "benchmark",
+    srcs = glob(
+        [
+            "src/*.cc",
+            "src/*.h",
+        ],
+        exclude = ["src/benchmark_main.cc"],
+    ),
+    hdrs = ["include/benchmark/benchmark.h"],
+    linkopts = select({
+        ":windows": ["-DEFAULTLIB:shlwapi.lib"],
+        "//conditions:default": ["-pthread"],
+    }),
+    strip_include_prefix = "include",
+    visibility = ["//visibility:public"],
+)
+
+cc_library(
+    name = "benchmark_main",
+    srcs = ["src/benchmark_main.cc"],
+    hdrs = ["include/benchmark/benchmark.h"],
+    strip_include_prefix = "include",
+    visibility = ["//visibility:public"],
+    deps = [":benchmark"],
+)
+
+cc_library(
+    name = "benchmark_internal_headers",
+    hdrs = glob(["src/*.h"]),
+    visibility = ["//test:__pkg__"],
+)