diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt deleted file mode 100644 index fd233290f9ca77fb39ec14c1c590d2ca9e8797ac..0000000000000000000000000000000000000000 --- a/modules/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -cmake_minimum_required(VERSION 3.5.1) -project(global) - -add_subdirectory(Communication/NetworkingLib) -add_subdirectory(Communication/PlatoonProtocolLib) -add_subdirectory(Communication/PC2CarLib) -add_subdirectory(catkin_ws/src/car) \ No newline at end of file diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Busyable.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Busyable.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Busyable.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Busyable.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Closeable.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Closeable.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Closeable.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Closeable.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/DatagramReceiver.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/DatagramReceiver.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/DatagramReceiver.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/DatagramReceiver.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/DatagramSender.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/DatagramSender.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/DatagramSender.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/DatagramSender.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Error.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Error.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Error.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Error.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Frame.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Frame.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Frame.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Frame.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Message.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Message.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Message.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Message.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Networking.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Networking.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Networking.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Networking.h diff --git a/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/NetworkingLibConfig.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/NetworkingLibConfig.h new file mode 100644 index 0000000000000000000000000000000000000000..37413c8453eda29c2c9cb3b050c1465834e00704 --- /dev/null +++ b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/NetworkingLibConfig.h @@ -0,0 +1,11 @@ +// +// Created by philipp on 17.12.17. +// + +#ifndef NETWORKINGLIB_NETWORKINGCONFIG_H +#define NETWORKINGLIB_NETWORKINGCONFIG_H + +#define NetworkingLib_VERSION_MAJOR 0 +#define NetworkingLib_VERSION_MINOR 1 + +#endif //NETWORKINGLIB_NETWORKINGCONFIG_H diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Resolver.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Resolver.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Resolver.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Resolver.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/ServiceClient.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/ServiceClient.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/ServiceClient.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/ServiceClient.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/ServiceServer.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/ServiceServer.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/ServiceServer.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/ServiceServer.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Socket.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Socket.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Socket.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Socket.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Stream.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Stream.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Stream.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Stream.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Time.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Time.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Time.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Time.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Timer.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Timer.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Timer.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Timer.h diff --git a/modules/Communication/NetworkingLib/include/NetworkingLib/Utils.h b/modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Utils.h similarity index 100% rename from modules/Communication/NetworkingLib/include/NetworkingLib/Utils.h rename to modules/catkin_ws/install/NetworkingLib/include/NetworkingLib/Utils.h diff --git a/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibConfig.cmake b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..786d84690379cf73cf1492872ea03a1f7cd2c846 --- /dev/null +++ b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibConfig.cmake @@ -0,0 +1,12 @@ +# - Config file for the NetworkingLib package +# It defines the following variable +# NETWORKINGLIB_INCLUDE_DIRS - include directories for NetworkingLib + +# Compute paths +get_filename_component(NETWORKINGLIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(NETWORKINGLIB_INCLUDE_DIRS "${NETWORKINGLIB_CMAKE_DIR}/../../../include/NetworkingLib/..") + +# Our library dependencies (contains definitions for IMPORTED targets) +if(NOT TARGET NetworkingLib) + include("${NETWORKINGLIB_CMAKE_DIR}/NetworkingLibTargets.cmake") +endif() diff --git a/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibConfigVersion.cmake b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..51cbc01e7569266e52fd6fc90939d63202cfe3f0 --- /dev/null +++ b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibConfigVersion.cmake @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibTargets-debug.cmake b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibTargets-debug.cmake new file mode 100644 index 0000000000000000000000000000000000000000..da97755286cd009dbed6d2b6231fbca8044416f7 --- /dev/null +++ b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibTargets-debug.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Debug". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "NetworkingLib" for configuration "Debug" +set_property(TARGET NetworkingLib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(NetworkingLib PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/NetworkingLib/../../install/NetworkingLib/lib/NetworkingLib/libNetworkingLib.a" + ) + +list(APPEND _IMPORT_CHECK_TARGETS NetworkingLib ) +list(APPEND _IMPORT_CHECK_FILES_FOR_NetworkingLib "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/NetworkingLib/../../install/NetworkingLib/lib/NetworkingLib/libNetworkingLib.a" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibTargets.cmake b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibTargets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..fbf201e64982a24ac5678f7e829ad09dd5ec6c9b --- /dev/null +++ b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/NetworkingLibTargets.cmake @@ -0,0 +1,92 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget NetworkingLib) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# The installation prefix configured by this project. +set(_IMPORT_PREFIX "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/NetworkingLib/../../install/NetworkingLib") + +# Create imported target NetworkingLib +add_library(NetworkingLib STATIC IMPORTED) + +set_target_properties(NetworkingLib PROPERTIES + INTERFACE_LINK_LIBRARIES "/usr/lib/x86_64-linux-gnu/libboost_system.so;/usr/lib/x86_64-linux-gnu/libboost_regex.so" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/NetworkingLibTargets-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/libNetworkingLib.a b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/libNetworkingLib.a new file mode 100644 index 0000000000000000000000000000000000000000..0cd7b30013e72e505d7cbdb44015b2870d73d9f2 Binary files /dev/null and b/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/libNetworkingLib.a differ diff --git a/modules/Communication/PC2CarLib/include/PC2CarLib/CommandReceiver.h b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/CommandReceiver.h similarity index 100% rename from modules/Communication/PC2CarLib/include/PC2CarLib/CommandReceiver.h rename to modules/catkin_ws/install/PC2Car/include/PC2CarLib/CommandReceiver.h diff --git a/modules/Communication/PC2CarLib/include/PC2CarLib/CommandSender.h b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/CommandSender.h similarity index 100% rename from modules/Communication/PC2CarLib/include/PC2CarLib/CommandSender.h rename to modules/catkin_ws/install/PC2Car/include/PC2CarLib/CommandSender.h diff --git a/modules/Communication/PC2CarLib/include/PC2CarLib/PC2Car.h b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/PC2Car.h similarity index 100% rename from modules/Communication/PC2CarLib/include/PC2CarLib/PC2Car.h rename to modules/catkin_ws/install/PC2Car/include/PC2CarLib/PC2Car.h diff --git a/modules/catkin_ws/install/PC2Car/include/PC2CarLib/PC2CarLibConfig.h b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/PC2CarLibConfig.h new file mode 100644 index 0000000000000000000000000000000000000000..dbd1697229c0cdc60acb0fa54fa4aaa620154c6b --- /dev/null +++ b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/PC2CarLibConfig.h @@ -0,0 +1,11 @@ +// +// Created by philipp on 22.01.18. +// + +#ifndef PC2CAR_PC2CARLIBCONFIG_H_IN_H +#define PC2CAR_PC2CARLIBCONFIG_H_IN_H + +#define PC2CarLib_VERSION_MAJOR +#define PC2CarLib_VERSION_MINOR + +#endif //PC2CAR_PC2CARLIBCONFIG_H_IN_H diff --git a/modules/Communication/PC2CarLib/include/PC2CarLib/TimedValue.h b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/TimedValue.h similarity index 100% rename from modules/Communication/PC2CarLib/include/PC2CarLib/TimedValue.h rename to modules/catkin_ws/install/PC2Car/include/PC2CarLib/TimedValue.h diff --git a/modules/Communication/PC2CarLib/include/PC2CarLib/json.hpp b/modules/catkin_ws/install/PC2Car/include/PC2CarLib/json.hpp similarity index 100% rename from modules/Communication/PC2CarLib/include/PC2CarLib/json.hpp rename to modules/catkin_ws/install/PC2Car/include/PC2CarLib/json.hpp diff --git a/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibConfig.cmake b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..58953e577a69c79232857a2a0e7fa19bb525514b --- /dev/null +++ b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibConfig.cmake @@ -0,0 +1,12 @@ +# - Config file for the NetworkingLib package +# It defines the following variable +# PC2CARLIB_INCLUDE_DIRS - include directories for PC2CarLib + +# Compute paths +get_filename_component(PC2CARLIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(PC2CARLIB_INCLUDE_DIRS "${PC2CARLIB_CMAKE_DIR}/../../../include/PC2CarLib/..") + +# Our library dependencies (contains definitions for IMPORTED targets) +if(NOT TARGET PC2CarLib) + include("${PC2CARLIB_CMAKE_DIR}/PC2CarLibTargets.cmake") +endif() diff --git a/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibConfigVersion.cmake b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..51cbc01e7569266e52fd6fc90939d63202cfe3f0 --- /dev/null +++ b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibConfigVersion.cmake @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibTargets-debug.cmake b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibTargets-debug.cmake new file mode 100644 index 0000000000000000000000000000000000000000..4718210ad1a6582110210d426a030a0e799fa141 --- /dev/null +++ b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibTargets-debug.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Debug". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "PC2CarLib" for configuration "Debug" +set_property(TARGET PC2CarLib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(PC2CarLib PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PC2CarLib/../../install/PC2Car/lib/PC2CarLib/libPC2CarLib.a" + ) + +list(APPEND _IMPORT_CHECK_TARGETS PC2CarLib ) +list(APPEND _IMPORT_CHECK_FILES_FOR_PC2CarLib "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PC2CarLib/../../install/PC2Car/lib/PC2CarLib/libPC2CarLib.a" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibTargets.cmake b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibTargets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..607827aff06e4fcde84f7bc8608ae69c72ced63b --- /dev/null +++ b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/CMake/PC2CarLibTargets.cmake @@ -0,0 +1,93 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget PC2CarLib) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# The installation prefix configured by this project. +set(_IMPORT_PREFIX "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PC2CarLib/../../install/PC2Car") + +# Create imported target PC2CarLib +add_library(PC2CarLib STATIC IMPORTED) + +set_target_properties(PC2CarLib PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/NetworkingLib/include;/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PlatoonProtocolLib/include" + INTERFACE_LINK_LIBRARIES "NetworkingLib;PlatoonProtocolLib" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/PC2CarLibTargets-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/libPC2CarLib.a b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/libPC2CarLib.a new file mode 100644 index 0000000000000000000000000000000000000000..f53c21ffd445ae2d36bbab7b6cfcaa4834362a2c Binary files /dev/null and b/modules/catkin_ws/install/PC2Car/lib/PC2CarLib/libPC2CarLib.a differ diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Definitions.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Definitions.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Definitions.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Definitions.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/FollowerVehicle.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/FollowerVehicle.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/FollowerVehicle.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/FollowerVehicle.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/LeaderVehicle.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/LeaderVehicle.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/LeaderVehicle.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/LeaderVehicle.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonMessage.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonMessage.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonMessage.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonMessage.h diff --git a/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonProtocolLibConfig.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonProtocolLibConfig.h new file mode 100644 index 0000000000000000000000000000000000000000..f7305ccefe5bd8d27baf0ab1c84a2c00f36f169b --- /dev/null +++ b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonProtocolLibConfig.h @@ -0,0 +1,11 @@ +// +// Created by philipp on 18.12.17. +// + +#ifndef PLATOON_PROTOCOL_CONFIG_H +#define PLATOON_PROTOCOL_CONFIG_H + +#define PlatoonProtocol_VERSION_MAJOR 0 +#define PlatoonProtocol_VERSION_MINOR 1 + +#endif //PLATOON_PROTOCOL_CONFIG_H diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonService.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonService.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonService.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/PlatoonService.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Protocol.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Protocol.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Protocol.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Protocol.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Utils.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Utils.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Utils.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Utils.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Vehicle.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Vehicle.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/Vehicle.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/Vehicle.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/VehicleEndpoint.h b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/VehicleEndpoint.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/VehicleEndpoint.h rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/VehicleEndpoint.h diff --git a/modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/json.hpp b/modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/json.hpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/include/PlatoonProtocolLib/json.hpp rename to modules/catkin_ws/install/PlatoonProtocol/include/PlatoonProtocolLib/json.hpp diff --git a/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibConfig.cmake b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibConfig.cmake new file mode 100644 index 0000000000000000000000000000000000000000..21f8116ba8caf8032278902883e4e4bb4b9ab7a7 --- /dev/null +++ b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibConfig.cmake @@ -0,0 +1,12 @@ +# - Config file for the PlatoonProtocolLib package +# It defines the following variable +# PLATOON_PROTOCOL_LIB_INCLUDE_DIRS - include directories for NetworkingLib + +# Compute paths +get_filename_component(PLATOON_PROTOCOL_LIB_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(PLATOON_PROTOCOL_LIB_INCLUDE_DIRS "${PLATOON_PROTOCOL_LIB_CMAKE_DIR}/../../../include/PlatoonProtocolLib/..") + +# Our library dependencies (contains definitions for IMPORTED targets) +if(NOT TARGET PlatoonProtocolLib) + include("${PLATOON_PROTOCOL_LIB_CMAKE_DIR}/PlatoonProtocolLibTargets.cmake") +endif() diff --git a/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibConfigVersion.cmake b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibConfigVersion.cmake new file mode 100644 index 0000000000000000000000000000000000000000..51cbc01e7569266e52fd6fc90939d63202cfe3f0 --- /dev/null +++ b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibConfigVersion.cmake @@ -0,0 +1,11 @@ +set(PACKAGE_VERSION "") + +# Check whether the requested PACKAGE_FIND_VERSION is compatible +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibTargets-debug.cmake b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibTargets-debug.cmake new file mode 100644 index 0000000000000000000000000000000000000000..adae4b37b64f003b29831aa264d6c13a832e29db --- /dev/null +++ b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibTargets-debug.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Debug". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "PlatoonProtocolLib" for configuration "Debug" +set_property(TARGET PlatoonProtocolLib APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) +set_target_properties(PlatoonProtocolLib PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX" + IMPORTED_LOCATION_DEBUG "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PlatoonProtocolLib/../../install/PlatoonProtocol/lib/PlatoonProtocolLib/libPlatoonProtocolLib.a" + ) + +list(APPEND _IMPORT_CHECK_TARGETS PlatoonProtocolLib ) +list(APPEND _IMPORT_CHECK_FILES_FOR_PlatoonProtocolLib "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PlatoonProtocolLib/../../install/PlatoonProtocol/lib/PlatoonProtocolLib/libPlatoonProtocolLib.a" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibTargets.cmake b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibTargets.cmake new file mode 100644 index 0000000000000000000000000000000000000000..57026d815f7d72a1aeeb789981b1dba41a72c019 --- /dev/null +++ b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/CMake/PlatoonProtocolLibTargets.cmake @@ -0,0 +1,93 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5) + message(FATAL_ERROR "CMake >= 2.6.0 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.6) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_targetsDefined) +set(_targetsNotDefined) +set(_expectedTargets) +foreach(_expectedTarget PlatoonProtocolLib) + list(APPEND _expectedTargets ${_expectedTarget}) + if(NOT TARGET ${_expectedTarget}) + list(APPEND _targetsNotDefined ${_expectedTarget}) + endif() + if(TARGET ${_expectedTarget}) + list(APPEND _targetsDefined ${_expectedTarget}) + endif() +endforeach() +if("${_targetsDefined}" STREQUAL "${_expectedTargets}") + unset(_targetsDefined) + unset(_targetsNotDefined) + unset(_expectedTargets) + set(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT "${_targetsDefined}" STREQUAL "") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n") +endif() +unset(_targetsDefined) +unset(_targetsNotDefined) +unset(_expectedTargets) + + +# The installation prefix configured by this project. +set(_IMPORT_PREFIX "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/PlatoonProtocolLib/../../install/PlatoonProtocol") + +# Create imported target PlatoonProtocolLib +add_library(PlatoonProtocolLib STATIC IMPORTED) + +set_target_properties(PlatoonProtocolLib PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/install/NetworkingLib/lib/NetworkingLib/CMake/../../../include/NetworkingLib/.." + INTERFACE_LINK_LIBRARIES "NetworkingLib;NetworkingLib" +) + +if(CMAKE_VERSION VERSION_LESS 2.8.12) + message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.") +endif() + +# Load information for each installed configuration. +get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +file(GLOB CONFIG_FILES "${_DIR}/PlatoonProtocolLibTargets-*.cmake") +foreach(f ${CONFIG_FILES}) + include(${f}) +endforeach() + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(target ${_IMPORT_CHECK_TARGETS} ) + foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} ) + if(NOT EXISTS "${file}" ) + message(FATAL_ERROR "The imported target \"${target}\" references the file + \"${file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + unset(_IMPORT_CHECK_FILES_FOR_${target}) +endforeach() +unset(_IMPORT_CHECK_TARGETS) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/libPlatoonProtocolLib.a b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/libPlatoonProtocolLib.a new file mode 100644 index 0000000000000000000000000000000000000000..47d8ffb00f51a95d6235fdffef6595d6b905d232 Binary files /dev/null and b/modules/catkin_ws/install/PlatoonProtocol/lib/PlatoonProtocolLib/libPlatoonProtocolLib.a differ diff --git a/modules/Communication/NetworkingLib/.gitignore b/modules/catkin_ws/src/NetworkingLib/.gitignore similarity index 100% rename from modules/Communication/NetworkingLib/.gitignore rename to modules/catkin_ws/src/NetworkingLib/.gitignore diff --git a/modules/Communication/NetworkingLib/CMakeLists.txt b/modules/catkin_ws/src/NetworkingLib/CMakeLists.txt similarity index 96% rename from modules/Communication/NetworkingLib/CMakeLists.txt rename to modules/catkin_ws/src/NetworkingLib/CMakeLists.txt index a086ab32d0e586fa1f021edaafbd527cf7bbfd27..024ecbaf3968d05a13dcbdd5ab3e82f9e809dbe8 100644 --- a/modules/Communication/NetworkingLib/CMakeLists.txt +++ b/modules/catkin_ws/src/NetworkingLib/CMakeLists.txt @@ -77,11 +77,6 @@ endforeach() # Specify public header files set_target_properties(NetworkingLib PROPERTIES PUBLIC_HEADER ${PUBLIC_HEADER_FILES_COMBINED}) -set(IS_SUBPROJECT OFF) -if(IS_SUBPROJECT) - target_include_directories(NetworkingLib PUBLIC "${PROJECT_SOURCE_DIR}/include") -endif() - target_link_libraries(NetworkingLib ${Boost_LIBRARIES}) set(INSTALL_PACKAGE ON) @@ -89,6 +84,7 @@ if(INSTALL_PACKAGE) ############################# # Specify install directories ############################# + set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../install/NetworkingLib") set(INSTALL_LIB_DIR lib/NetworkingLib) set(INSTALL_INCLUDE_DIR include/NetworkingLib) set(INSTALL_CMAKE_DIR lib/NetworkingLib/CMake) @@ -117,14 +113,14 @@ if(INSTALL_PACKAGE) # Configure *Config.cmake.in for the build tree # Put it inside the binary directory - set(CONF_INCLUDE_DIRS "${PROJECT_BINARY_DIR}") + set(CONF_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include") configure_file(NetworkingLibConfig.cmake.in "${PROJECT_BINARY_DIR}/NetworkingLibConfig.cmake" @ONLY) # Configure *Config.cmake.in for the install tree # Put it inside the cmake-files directory (which is located inside the binary directory) - set(CONF_INCLUDE_DIRS "\${NETWORKINGLIB_CMAKE_DIR}/${REL_INCLUDE_DIR}") + set(CONF_INCLUDE_DIRS "\${NETWORKINGLIB_CMAKE_DIR}/${REL_INCLUDE_DIR}/..") configure_file(NetworkingLibConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/NetworkingLibConfig.cmake" @ONLY) diff --git a/modules/Communication/NetworkingLib/NetworkingLibConfig.cmake.in b/modules/catkin_ws/src/NetworkingLib/NetworkingLibConfig.cmake.in similarity index 100% rename from modules/Communication/NetworkingLib/NetworkingLibConfig.cmake.in rename to modules/catkin_ws/src/NetworkingLib/NetworkingLibConfig.cmake.in diff --git a/modules/Communication/NetworkingLib/NetworkingLibConfigVersion.cmake.in b/modules/catkin_ws/src/NetworkingLib/NetworkingLibConfigVersion.cmake.in similarity index 100% rename from modules/Communication/NetworkingLib/NetworkingLibConfigVersion.cmake.in rename to modules/catkin_ws/src/NetworkingLib/NetworkingLibConfigVersion.cmake.in diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Busyable.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Busyable.h new file mode 100644 index 0000000000000000000000000000000000000000..df60b1233852edb0799fabd29dcab54af68fa096 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Busyable.h @@ -0,0 +1,58 @@ +// +// Created by philipp on 18.01.18. +// + +#ifndef NETWORKINGLIB_BUSYABLE_H +#define NETWORKINGLIB_BUSYABLE_H + + +#include <mutex> +#include <atomic> +#include "Error.h" + +namespace networking +{ + +class Busyable +{ +public: + friend class BusyLock; + + /** + * @return true if busy, false if not busy + * @attention Returning false does not guarantee that a subsequent + * BusyLock instantiation with this object won't throw! + */ + bool isBusy() const noexcept; + +private: + std::mutex busyMutex; + std::atomic<bool> busy{false}; +}; + +class BusyLock +{ +public: + BusyLock(Busyable & busyable); + + ~BusyLock(); + + BusyLock(const BusyLock &) = delete; + + BusyLock & operator=(const BusyLock &) = delete; + + BusyLock(BusyLock && other) noexcept; + + BusyLock & operator=(BusyLock && other) noexcept; + + void unlock(); + +private: + Busyable * busyable{nullptr}; + std::atomic<bool> owns{false}; +}; + +} + + +#endif //NETWORKINGLIB_BUSYABLE_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Closeable.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Closeable.h new file mode 100644 index 0000000000000000000000000000000000000000..92e9497fca853ed76eca94aec4e0ae6b0db3d1e1 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Closeable.h @@ -0,0 +1,162 @@ +// +// Created by philipp on 02.01.18. +// + +#ifndef NETWORKINGLIB_CLOSEABLE_H_H +#define NETWORKINGLIB_CLOSEABLE_H_H + +#include "Networking.h" +#include "Timer.h" +#include "Error.h" + +namespace networking +{ +namespace closeable +{ + +template<typename Closeable> +class Closer +{ +public: + Closer(Closeable & closeable) + : closeable(closeable) + {} + + ~Closer() + { + if (alive) + close(closeable); + } + + Closer(const Closer &) = delete; + + Closer & operator=(const Closer &) = delete; + + Closer(Closer && other) + : closeable(other.closeable) + { + other.alive = false; + } + + Closer & operator=(Closer && other) + { + closeable = other.closeable; + alive = other.alive; + other.alive = false; + return *this; + } + + static void close(Closeable & closeable) + { + boost::system::error_code ignoredError; + closeable.close(ignoredError); + } + +private: + Closeable & closeable; + bool alive{true}; +}; + +template<typename Closeable> +struct IsOpen +{ + bool operator()(Closeable & closeable) const + { + return closeable.is_open(); + } +}; + +template< + typename ResultTuple, + typename AsyncOperation, + typename... AsyncOperationArgs, + typename Closeable> +void timedOperation(ResultTuple & result, + Networking & net, + AsyncOperation asyncOperation, + Closeable & closeable, + const time::Duration & timeout, + AsyncOperationArgs && ... args) +{ + auto & ioService = net.getIoService(); + + auto timer = time::Timer::create(net); + timer->startTimeout( + timeout, + [&closeable] + { + // Timeout expired: close the closeable. + Closer<Closeable>::close(closeable); + }); + + // A 'would_block' closeableError is guaranteed to never occur on an asynchronous operation. + boost::system::error_code closeableError = boost::asio::error::would_block; + + // Run asynchronous connect. + asyncOperation( + std::forward<AsyncOperationArgs>(args)..., + [&closeableError, timer, &result](const boost::system::error_code & error, auto && ... remainingHandlerArgs) + { + timer->stop(); + // Create a tuple to store the results. + result = std::make_tuple(error, remainingHandlerArgs...); + // Update closeableError variable. + closeableError = error; + }); + + // Wait until "something happens" with the closeable. + net.waitUntil([&closeableError]() + { return closeableError != boost::asio::error::would_block; }); + + // Determine whether a connection was successfully established. + // Even though our timer handler might have run to close the closeable, the connect operation + // might have notionally succeeded! + if (closeableError || !IsOpen<Closeable>{}(closeable)) + { + if (closeableError == boost::asio::error::operation_aborted) + throw error::Aborted{}; + + throw error::FailedOperation{}; + } +} + +template< + typename AsyncOperation, + typename... AsyncOperationArgs, + typename Closeable, + typename Handler> +void timedAsyncOperation(Networking & net, + AsyncOperation asyncOperation, + Closeable & closeable, + const time::Duration & timeout, + const Handler & handler, + AsyncOperationArgs && ... asyncOperationArgs) +{ + auto timer = time::Timer::create(net); + timer->startTimeout( + timeout, + [&closeable] + { + Closer<Closeable>::close(closeable); + }); + + asyncOperation( + std::forward<AsyncOperationArgs>(asyncOperationArgs)..., + [&closeable, timer, handler](const boost::system::error_code & opError, auto && ... remainingHandlerArgs) + { + timer->stop(); + + auto errorCode = error::codes::SUCCESS; + if (!IsOpen<Closeable>{}(closeable)) + errorCode = error::codes::ABORTED; + else if (opError) + errorCode = error::codes::FAILED_OPERATION; + + handler(errorCode, opError, std::forward<decltype(remainingHandlerArgs)>(remainingHandlerArgs)...); + }); +} + +} +} + +#endif //NETWORKINGLIB_CLOSEABLE_H_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/DatagramReceiver.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/DatagramReceiver.h new file mode 100644 index 0000000000000000000000000000000000000000..0a581094d053bfc18a227d072d4c9af323214132 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/DatagramReceiver.h @@ -0,0 +1,121 @@ +// +// Created by philipp on 15.01.18. +// + +#ifndef NETWORKINGLIB_DATAGRAMRECEIVER_H +#define NETWORKINGLIB_DATAGRAMRECEIVER_H + +#include "Networking.h" +#include "Stream.h" +#include "Socket.h" +#include "Message.h" + +namespace networking +{ +namespace message +{ + +template<typename Message> +class DatagramReceiver + : public std::enable_shared_from_this<DatagramReceiver<Message>> + , private Busyable +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<DatagramReceiver<Message>>; + + using ReceiveHandler = std::function< + void(const error::ErrorCode & error, + Message & message, + const std::string & host, + std::uint16_t port)>; + + static Ptr create(Networking & net, std::uint16_t bindingPort, std::size_t maxMessageSize = 512) + { + return std::make_shared<DatagramReceiver<Message>>(PrivateTag{}, net, bindingPort, maxMessageSize); + } + + DatagramReceiver(PrivateTag, Networking & net, std::uint16_t bindingPort, std::size_t maxMessageSize) + : net(net) + , bindingPort(bindingPort) + , socket(net.getIoService(), Udp::v4()) + , buffer(maxMessageSize + Frame::HEADER_SIZE) + {} + + void receive(Message & message, std::string & host, std::uint16_t & port, const time::Duration & timeout) + { + BusyLock busyLock{*this}; + newSocket(); + message::receiveDatagram<Message>(net, socket, buffer, message, host, port, timeout); + } + + void asyncReceive(const time::Duration & timeout, const ReceiveHandler & handler) + { + auto self = this->shared_from_this(); + auto state = std::make_shared<AsyncState>(self, handler); + + newSocket(); + + message::asyncReceiveDatagram<Message>( + net, socket, buffer, timeout, + [state](const auto & error, + auto & message, + const std::string & senderHost, + std::uint16_t senderPort) + { + state->busyLock.unlock(); + state->handler(error, message, senderHost, senderPort); + }); + } + + bool isReceiving() const noexcept + { + return isBusy(); + }; + + void stop() + { + closeable::Closer<Socket>::close(socket); + } + +private: + using Udp = boost::asio::ip::udp; + using Endpoint = Udp::endpoint; + using Socket = Udp::socket; + using Frame = networking::internal::Frame; + + Networking & net; + std::uint16_t bindingPort; + Socket socket; + std::vector<char> buffer; + + void newSocket() + { + socket = Socket(net.getIoService(), Udp::v4()); + socket.set_option(boost::asio::socket_base::reuse_address{true}); + socket.set_option(boost::asio::socket_base::broadcast{true}); + socket.bind(Endpoint(Udp::v4(), bindingPort)); + } + + struct AsyncState + { + AsyncState(Ptr self, const ReceiveHandler & handler) + : busyLock(*self) + , self(self) + , handler(handler) + {} + + BusyLock busyLock; + Ptr self; + ReceiveHandler handler; + }; +}; + +} +} + +#endif //NETWORKINGLIB_DATAGRAMRECEIVER_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/DatagramSender.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/DatagramSender.h new file mode 100644 index 0000000000000000000000000000000000000000..80fe3448524e91ae4cea60c8b844db0d2e4976c0 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/DatagramSender.h @@ -0,0 +1,115 @@ +// +// Created by philipp on 29.12.17. +// + +#ifndef NETWORKINGLIB_DATAGRAMSENDER_H +#define NETWORKINGLIB_DATAGRAMSENDER_H + +#include "Stream.h" +#include "Networking.h" +#include "Message.h" +#include "Utils.h" + +namespace networking +{ +namespace message +{ + +template<typename Message> +class DatagramSender + : public std::enable_shared_from_this<DatagramSender<Message>> + , private Busyable +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<DatagramSender>; + + using SendHandler = std::function<void(const error::ErrorCode & error)>; + + static Ptr create(Networking & net) + { + return std::make_shared<DatagramSender>(PrivateTag{}, net); + } + + DatagramSender(PrivateTag, Networking & net) + : net(net) + , socket(net.getIoService()) + {} + + void send(const Message & message, + const std::string & ip, + std::uint16_t port, + const time::Duration & timeout) + { + BusyLock busyLock{*this}; + openSocket(); + networking::message::sendDatagram(net, socket, message, ip, port, timeout); + } + + void asyncSend(const Message & message, + const std::string & ip, + std::uint16_t port, + const time::Duration & timeout, + const SendHandler & handler) + { + auto self = this->shared_from_this(); + auto state = std::make_shared<AsyncState>(self, handler); + openSocket(); + + networking::message::asyncSendDatagram( + net, socket, message, ip, port, timeout, + [state](const auto & error) + { + state->busyLock.unlock(); + state->handler(error); + }); + } + + bool isSending() const noexcept + { + return isBusy(); + } + + void stop() + { + closeable::Closer<Socket>::close(socket); + } + +private: + using Udp = boost::asio::ip::udp; + using Socket = Udp::socket; + + Networking & net; + Socket socket; + + void openSocket() + { + if (!socket.is_open()) + { + boost::system::error_code ignoredError; + socket.open(Udp::v4(), ignoredError); + } + } + + struct AsyncState + { + AsyncState(Ptr self, const SendHandler & handler) + : busyLock(*self) + , self(self) + , handler(handler) + {} + + BusyLock busyLock; + Ptr self; + SendHandler handler; + }; +}; + +} +} + +#endif //NETWORKINGLIB_DATAGRAMSENDER_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Error.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Error.h new file mode 100644 index 0000000000000000000000000000000000000000..ec67c3d7ea4a1a0f7ff067e8c6dbaf2ec9dcb525 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Error.h @@ -0,0 +1,86 @@ +// +// Created by philipp on 02.01.18. +// + +#ifndef NETWORKINGLIB_EXCEPTION_H +#define NETWORKINGLIB_EXCEPTION_H + +#include <stdexcept> +#include <boost/system/error_code.hpp> +#include <boost/asio/error.hpp> + +namespace networking +{ +namespace error +{ + +using ErrorCode = int; + +namespace codes +{ +constexpr ErrorCode SUCCESS = ErrorCode{0}; +constexpr ErrorCode FAILED_OPERATION = ErrorCode{1}; +constexpr ErrorCode ABORTED = ErrorCode{2}; +constexpr ErrorCode BUSY = ErrorCode{3}; +constexpr ErrorCode ENCODING = ErrorCode{4}; +constexpr ErrorCode DECODING = ErrorCode{5}; +} + +class Error : std::runtime_error +{ +public: + Error(const std::string & msg, ErrorCode code) + : runtime_error(msg), code(code) + {} + + ErrorCode getErrorCode() const noexcept + { return code; } + +protected: + ErrorCode code; +}; + +class FailedOperation : public Error +{ +public: + FailedOperation() + : Error("networking error: failed operation", codes::FAILED_OPERATION) + {} +}; + +class Aborted : public Error +{ +public: + Aborted() + : Error("networking error: aborted", codes::ABORTED) + {} +}; + +class Busy : public Error +{ +public: + Busy() + : Error("networking error: busy", codes::BUSY) + {} +}; + +class Encoding : public Error +{ +public: + Encoding() + : Error("networking error: encoding", codes::ENCODING) + {} +}; + +class Decoding : public Error +{ +public: + Decoding() + : Error("networking error: decoding", codes::DECODING) + {} +}; + +} +} + +#endif //NETWORKINGLIB_EXCEPTION_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Frame.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Frame.h new file mode 100644 index 0000000000000000000000000000000000000000..380ed36415f99f78bad52973e9745fae2e985a8b --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Frame.h @@ -0,0 +1,57 @@ +// +// Created by philipp on 17.01.18. +// + +#ifndef NETWORKINGLIB_FRAME_H +#define NETWORKINGLIB_FRAME_H + +#include <cstdint> +#include <boost/asio/buffer.hpp> +#include "Utils.h" + +namespace networking +{ +namespace internal +{ + +class Frame +{ +public: + static constexpr std::size_t HEADER_SIZE = 4; + + Frame(const std::uint8_t * data, std::uint32_t numDataBytes) + : data(data), numDataBytes(numDataBytes) + { + utils::toBigEndian<4>(header, numDataBytes); + } + + Frame(const Frame &) = delete; + + Frame & operator=(const Frame &) = delete; + + Frame(Frame &&) = delete; + + Frame & operator=(Frame &&) = delete; + + auto getBuffers() const + { + return std::vector<boost::asio::const_buffer>{ + boost::asio::buffer((const void *) header, sizeof(header)), + boost::asio::buffer((const void *) data, numDataBytes)}; + } + + std::size_t getSize() const + { + return sizeof(header) + numDataBytes; + } + +private: + std::uint32_t numDataBytes; + std::uint8_t header[4]; + const std::uint8_t * data; +}; + +} +} + +#endif //NETWORKINGLIB_FRAME_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Message.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Message.h new file mode 100644 index 0000000000000000000000000000000000000000..c4ac879b2798d3cfdf51a3148088878071a4fdfa --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Message.h @@ -0,0 +1,234 @@ +// +// Created by philipp on 01.12.17. +// + +#ifndef PROTOCOL_MESSAGES_H +#define PROTOCOL_MESSAGES_H + +#include <cstdint> +#include <vector> +#include <boost/system/error_code.hpp> +#include <boost/asio/write.hpp> +#include <boost/asio/read.hpp> +#include "Stream.h" +#include "Networking.h" +#include "Socket.h" +#include <boost/algorithm/string/replace.hpp> + +namespace networking +{ +namespace message +{ + +using SendHandler = std::function<void(const error::ErrorCode & code)>; + +template<typename Message> +using ReceiveHandler = std::function<void(const error::ErrorCode & code, Message & message)>; + +using SendToHandler = std::function<void(const error::ErrorCode & code)>; + +template<typename Message> +using ReceiveFromHandler = std::function< + void(const error::ErrorCode & code, + Message & message, + const std::string & senderHost, + std::uint16_t senderPort)>; + +template<typename Message> +struct Encoder; + +template<> +struct Encoder<std::string> +{ + void operator()(const std::string & message, std::string & data) const + { data = message; } +}; + +template<typename Message> +struct Decoder; + +template<> +struct Decoder<std::string> +{ + void operator()(std::string & message, const std::string & data) const + { message = data; } +}; + +namespace internal +{ + +template<typename Message> +bool encode(const Message & message, std::string & data) +{ + try + { + Encoder<Message>{}(message, data); + return true; + } + catch (...) + { + return false; + } +} + +template<typename Message> +bool decode(const std::string & data, Message & message) +{ + try + { + Decoder<Message>{}(message, data); + return true; + } + catch (...) + { + return false; + } +} + +} + +template<typename Message, typename SyncWriteStream> +void send(Networking & net, + SyncWriteStream & stream, + const Message & message, + const time::Duration & timeout) +{ + std::string data; + if (!internal::encode(message, data)) + throw error::Encoding{}; + networking::stream::write(net, stream, data, timeout); +}; + +template<typename Message, typename SyncWriteStream> +void asyncSend(Networking & net, + SyncWriteStream & stream, + const Message & message, + const time::Duration & timeout, + const SendHandler & handler) +{ + auto data = std::make_shared<std::string>(); + if (!internal::encode(message, *data)) + { + net.callLater( + [handler] + { handler(error::codes::ENCODING); }); + return; + } + + networking::stream::asyncWrite( + net, stream, *data, timeout, + [handler, data](const auto & errorCode) + { handler(errorCode); }); +}; + +template<typename Message, typename SyncReadStream> +void receive(Networking & net, + SyncReadStream & stream, + boost::asio::streambuf & buffer, + Message & message, + const time::Duration & timeout) +{ + auto data = networking::stream::read(net, stream, buffer, timeout); + if (!internal::decode(data, message)) + throw error::Decoding{}; +}; + +template<typename Message, typename SyncReadStream> +void asyncReceive(Networking & net, + SyncReadStream & stream, + boost::asio::streambuf & buffer, + const time::Duration & timeout, + const ReceiveHandler<Message> & handler) +{ + networking::stream::asyncRead( + net, stream, buffer, timeout, + [handler](const auto & errorCode, auto & data) + { + Message message; + if (!internal::decode(data, message)) + { + handler(error::codes::DECODING, message); + return; + } + handler(errorCode, message); + }); +}; + +template<typename Message, typename DatagramSocket> +void sendDatagram(Networking & net, + DatagramSocket & socket, + const Message & message, + const std::string & host, + std::uint16_t port, + const time::Duration & timeout) +{ + std::string data{}; + if (!internal::encode(message, data)) + throw error::Encoding{}; + networking::socket::sendTo(net, socket, data, host, port, timeout); +} + +template<typename Message, typename DatagramSocket> +void asyncSendDatagram(Networking & net, + DatagramSocket & socket, + const Message & message, + const std::string & host, + std::uint16_t port, + const time::Duration & timeout, + const SendToHandler & handler) +{ + auto data = std::make_shared<std::string>(); + if (!internal::encode(message, *data)) + { + net.callLater( + [handler] + { handler(error::codes::ENCODING); }); + return; + } + + networking::socket::asyncSendTo( + net, socket, *data, host, port, timeout, + [handler, data](const auto & error) + { handler(error); }); +} + +template<typename Message, typename DatagramSocket> +void receiveDatagram(Networking & net, + DatagramSocket & socket, + std::vector<char> & buffer, + Message & message, + std::string & host, + std::uint16_t & port, + const time::Duration & timeout) +{ + auto data = networking::socket::receiveFrom(net, socket, buffer, host, port, timeout); + if (!internal::decode(data, message)) + throw error::Decoding{}; +} + +template<typename Message, typename DatagramSocket> +void asyncReceiveDatagram(Networking & net, + DatagramSocket & socket, + std::vector<char> & buffer, + const time::Duration & timeout, + const ReceiveFromHandler<Message> & handler) +{ + networking::socket::asyncReceiveFrom( + net, socket, buffer, timeout, + [handler](auto error, auto & data, const auto & senderHost, auto senderPort) + { + Message message; + if (!internal::decode(data, message)) + { + handler(error::codes::DECODING, message, senderHost, senderPort); + return; + } + handler(error, message, senderHost, senderPort); + }); +} + +} +} + + +#endif //PROTOCOL_MESSAGES_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Networking.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Networking.h new file mode 100644 index 0000000000000000000000000000000000000000..b1e8c66c564102f7269ca72929cc288ab6a0ebd2 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Networking.h @@ -0,0 +1,47 @@ +// +// Created by philipp on 06.12.17. +// + +#ifndef PROTOCOL_NETWORKING_H +#define PROTOCOL_NETWORKING_H + +#include <boost/asio/io_service.hpp> +#include <thread> + +namespace networking +{ + +class Networking +{ +public: + using Condition = std::function<bool()>; + using Handler = std::function<void()>; + + Networking(); + + ~Networking(); + + Networking(const Networking & other) = delete; + + Networking & operator=(const Networking & other) = delete; + + Networking(Networking && other) = delete; + + Networking & operator=(Networking && other) = delete; + + void waitUntil(Condition condition); + + void callLater(const Handler & handler); + + boost::asio::io_service & getIoService() noexcept + { return ioService; } + +private: + boost::asio::io_service ioService; + std::unique_ptr<boost::asio::io_service::work> work; + std::thread thread; +}; + +} + +#endif //PROTOCOL_NETWORKING_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Resolver.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Resolver.h new file mode 100644 index 0000000000000000000000000000000000000000..b918e65670c9820e99415622d7c882d3395718e2 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Resolver.h @@ -0,0 +1,198 @@ +// +// Created by philipp on 12.01.18. +// + +#ifndef NETWORKINGLIB_RESOLVER_H +#define NETWORKINGLIB_RESOLVER_H + +#include <memory> +#include <boost/asio/ip/tcp.hpp> +#include "Networking.h" +#include "Error.h" +#include "Utils.h" +#include "Busyable.h" + +namespace networking +{ + +namespace internal +{ + +// This class is used for internal purposes. Please use the 'Resolver' class. +// The boost::asio resolvers do not feature a close mechanism which we need in order to perform operations with timeouts. +template<typename Protocol> +class CloseableResolver : public Protocol::resolver +{ +public: + using Resolver = typename Protocol::resolver; + using Query = typename Resolver::query; + using Iterator = typename Resolver::iterator; + + using ResolveHandler = std::function<void(const boost::system::error_code & error)>; + + CloseableResolver(boost::asio::io_service & ioService) + : Resolver(ioService) + {} + + void open() + { + opened = true; + } + + bool is_open() const noexcept + { + return opened; + } + + void close(boost::system::error_code &) + { + if (!opened) + return; + + opened = false; + Resolver::cancel(); + } + +private: + std::atomic<bool> opened{true}; +}; + +} + +class Resolver + : public std::enable_shared_from_this<Resolver> + , private Busyable +{ +private: + struct PrivateTag + { + }; + +public: + struct Endpoint + { + Endpoint(const std::string & ip, std::uint16_t port) + : ip(ip), port(port) + {} + + std::string ip; + std::uint16_t port; + }; + + using Ptr = std::shared_ptr<Resolver>; + + using ResolveHandler = std::function<void(const error::ErrorCode & error, const std::vector<Endpoint> & endpoints)>; + + static Ptr create(Networking & net) + { + return std::make_shared<Resolver>(PrivateTag{}, net); + } + + Resolver(PrivateTag, Networking & net) + : net(net) + , resolver(net.getIoService()) + {} + + std::vector<Endpoint> resolve(const std::string & host, + const std::string & service, + const time::Duration & timeout) + { + BusyLock busyLock{*this}; + resolver.open(); + + UnderlyingResolver::Query query{host, service}; + + auto resolveOperation = [this](auto && ... args) + { resolver.async_resolve(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, UnderlyingResolver::Iterator> result; + + closeable::timedOperation( + result, + net, + resolveOperation, + resolver, + timeout, + query); + + auto endpointIterator = std::get<1>(result); + + return endpointsFromIterator(endpointIterator); + } + + void asyncResolve(const std::string & host, + const std::string & service, + const time::Duration & timeout, + const ResolveHandler & handler) + { + auto self = shared_from_this(); + auto state = std::make_shared<AsyncState>(self, handler); + + resolver.open(); + + UnderlyingResolver::Query query{host, service}; + + auto resolveOperation = [this](auto && ... args) + { resolver.async_resolve(std::forward<decltype(args)>(args)...); }; + + closeable::timedAsyncOperation( + net, + resolveOperation, + resolver, + timeout, + [state](const auto & networkingError, const auto & boostError, auto endpointIterator) + { + state->busyLock.unlock(); + state->handler(networkingError, state->self->endpointsFromIterator(endpointIterator)); + }, + query); + } + + void stop() + { + closeable::Closer<UnderlyingResolver>::close(resolver); + } + + bool isResolving() const noexcept + { + return isBusy(); + } + +private: + using Protocol = boost::asio::ip::tcp; + using UnderlyingResolver = internal::CloseableResolver<Protocol>; + + Networking & net; + UnderlyingResolver resolver; + + std::vector<Endpoint> endpointsFromIterator(UnderlyingResolver::Iterator iterator) + { + std::vector<Endpoint> endpoints; + + while (iterator != UnderlyingResolver::Iterator{}) + { + endpoints.emplace_back(iterator->endpoint().address().to_string(), + iterator->endpoint().port()); + iterator++; + } + + return endpoints; + } + + struct AsyncState + { + AsyncState(Ptr self, const ResolveHandler & handler) + : busyLock(*self) + , self(self) + , handler(handler) + {} + + BusyLock busyLock; + Ptr self; + ResolveHandler handler; + }; +}; + +} + +#endif //NETWORKINGLIB_RESOLVER_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/ServiceClient.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/ServiceClient.h new file mode 100644 index 0000000000000000000000000000000000000000..a6af95c6547bad8b32f2b3badfb18fe4be58b1f4 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/ServiceClient.h @@ -0,0 +1,193 @@ +// +// Created by philipp on 01.12.17. +// + +#ifndef PROTOCOL_TCPNETWORKSERVICECLIENT_H +#define PROTOCOL_TCPNETWORKSERVICECLIENT_H + +#include <string> +#include <functional> +#include <boost/asio/io_service.hpp> +#include <boost/asio/ip/tcp.hpp> +#include <boost/asio/connect.hpp> +#include "Message.h" +#include "Networking.h" +#include "Utils.h" +#include "Error.h" +#include "Busyable.h" + +namespace networking +{ +namespace service +{ + +template<typename Service> +class Client + : public std::enable_shared_from_this<Client<Service>> + , private Busyable +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<Client<Service>>; + + using RequestMessage = typename Service::RequestMessage; + using ResponseMessage = typename Service::ResponseMessage; + + using CallHandler = std::function<void(const error::ErrorCode & error, ResponseMessage & response)>; + + static Ptr create(Networking & net, std::size_t maxMessageSize = 512) + { + return std::make_shared<Client<Service>>(PrivateTag{}, net, maxMessageSize); + } + + Client(PrivateTag, Networking & net, std::size_t maxMessageSize = 512) + : net(net) + , socket(net.getIoService()) + , maxMessageSize(maxMessageSize) + {} + + void call(const RequestMessage & request, + ResponseMessage & response, + const std::string & host, + std::uint16_t port, + time::Duration timeout) + { + BusyLock busyLock{*this}; + // Close the socket on leaving. + closeable::Closer<Socket> socketCloser{socket}; + + // We have three places to lose time: connecting, sending and receiving. + // So after each operation we subtract the time spend from our timeout. + auto startTime = time::now(); + newSocket(); + // Connect to server. + networking::socket::connect(net, socket, host, port, timeout); + updateTimeout(timeout, startTime); + // Send the request. + message::send(net, socket, request, timeout); + updateTimeout(timeout, startTime); + // Receive the response. + boost::asio::streambuf buffer{maxMessageSize + internal::Frame::HEADER_SIZE}; + message::receive<ResponseMessage>(net, socket, buffer, response, timeout); + } + + void asyncCall(const RequestMessage & request, + const std::string & host, + std::uint16_t port, + const time::Duration & timeout, + const CallHandler & handler) + { + auto self = this->shared_from_this(); + // Container for our variables which are needed for the subsequent asynchronous calls to connect, receive and send. + // When 'state' goes out of scope, it does cleanup. + auto state = std::make_shared<AsyncState>( + self, handler, timeout, time::now()); + + newSocket(); + + // Connect to server. + networking::socket::asyncConnect( + net, socket, host, port, state->timeout, + [state, request](const auto & error) + { + if (error) + { + ResponseMessage noResponse; + state->handler(error, noResponse); + return; + } + + Client<Service>::updateTimeout(state->timeout, state->startTime); + + // Send the request. + networking::message::asyncSend( + state->self->net, state->self->socket, request, state->timeout, + [state](const auto & error) + { + if (error) + { + ResponseMessage noResponse; + state->handler(error, noResponse); + return; + } + + Client<Service>::updateTimeout(state->timeout, state->startTime); + + // Receive the response. + networking::message::asyncReceive<ResponseMessage>( + state->self->net, state->self->socket, state->buffer, state->timeout, + [state](auto const & error, auto & response) + { + state->handler(error, response); + }); + }); + }); + } + + bool isCalling() const noexcept + { + return isBusy(); + } + + void stop() + { + closeable::Closer<Socket>::close(socket); + } + +private: + using Socket = boost::asio::ip::tcp::socket; + using Frame = networking::internal::Frame; + + networking::Networking & net; + Socket socket; + const std::size_t maxMessageSize; + + static void updateTimeout(time::Duration & timeout, time::TimePoint & startTime) + { + auto nowTime = time::now(); + auto timeSpend = nowTime - startTime; + startTime = nowTime; + timeout -= timeSpend; + } + + void newSocket() + { + if (!socket.is_open()) + socket = Socket(net.getIoService()); + } + + // We must keep track of some variables during the async handler chain. + struct AsyncState + { + AsyncState(Ptr self, + const CallHandler & handler, + time::Duration timeout, + time::TimePoint startTime) + : busyLock(*self) + , self(self) + , handler(handler) + , timeout(timeout) + , startTime(startTime) + , buffer(self->maxMessageSize + Frame::HEADER_SIZE) + , closer(self->socket) + {} + + BusyLock busyLock; + Ptr self; + CallHandler handler; + time::Duration timeout; + time::TimePoint startTime; + boost::asio::streambuf buffer; + closeable::Closer<Socket> closer; + }; +}; + +} +} + + +#endif //PROTOCOL_TCPNETWORKSERVICECLIENT_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/ServiceServer.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/ServiceServer.h new file mode 100644 index 0000000000000000000000000000000000000000..ddc138eb27b3210e3f7d7a367ed162b46089e144 --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/ServiceServer.h @@ -0,0 +1,146 @@ +// +// Created by philipp on 01.12.17. +// + +#ifndef PROTOCOL_ProtocolNETWORKSERVICESERVER_H +#define PROTOCOL_ProtocolNETWORKSERVICESERVER_H + +#include "Message.h" +#include "Networking.h" + +namespace networking +{ +namespace service +{ + +template<typename Service> +class Server : public std::enable_shared_from_this<Server<Service>> +{ +private: + struct PrivateTag + { + }; + +public: + using RequestMessage = typename Service::RequestMessage; + using ResponseMessage = typename Service::ResponseMessage; + + using Ptr = std::shared_ptr<Server<Service>>; + + using Endpoint = Resolver::Endpoint; + + using RequestReceivedHandler = std::function<void(const Endpoint & clientEndpoint, + RequestMessage & requestMessage, + ResponseMessage & response)>; + + static Ptr create(Networking & net, uint16_t bindingPort, std::size_t maxMessageSize = 512) + { + return std::make_shared<Server<Service>>(PrivateTag{}, net, bindingPort, maxMessageSize); + } + + // Should not be used outside. + Server(PrivateTag, + Networking & net, + uint16_t bindingPort, + std::size_t maxMessageSize) + : net(net) + , bindingPort(bindingPort) + , acceptor(net.getIoService()) + , maxMessageSize(maxMessageSize) + {} + + void advertiseService(const RequestReceivedHandler & requestReceivedHandler) + { + if (running) + return; + + running = true; + + accept(requestReceivedHandler); + } + + void stop() + { + running = false; + closeable::Closer<Acceptor>::close(acceptor); + } + +private: + using Tcp = boost::asio::ip::tcp; + using Socket = Tcp::socket; + using Acceptor = Tcp::acceptor; + using Frame = networking::internal::Frame; + + Networking & net; + std::uint16_t bindingPort; + Acceptor acceptor; + std::atomic<bool> running{false}; + const std::size_t maxMessageSize; + + void accept(RequestReceivedHandler handler) + { + if (!acceptor.is_open()) + acceptor = Acceptor(net.getIoService(), Tcp::endpoint{Tcp::v4(), bindingPort}); + + auto self = this->shared_from_this(); + auto state = std::make_shared<AsyncState>(self, handler); + acceptor.async_accept( + state->socket, + [state](const auto & acceptError) + { + if (!state->self->running) + return; + + if (!acceptError) + { + using namespace std::chrono_literals; + + networking::message::asyncReceive<RequestMessage>( + state->self->net, state->socket, state->buffer, 10s, + [state](const auto & errorCode, auto & request) + { + // If a receive has timed out we treat it like we've never + // received any message (and therefor we do not call the handler). + if (errorCode) + return; + + Endpoint clientEndpoint{state->socket.remote_endpoint().address().to_string(), + state->socket.remote_endpoint().port()}; + ResponseMessage response; + state->requestReceivedHandler(clientEndpoint, request, response); + + networking::message::asyncSend( + state->self->net, state->socket, response, 5s, + [state](const auto & errorCode) + { + // We cannot be sure that the message is going to be received at the other side anyway, + // so we don't handle anything sending-wise. + }); + }); + } + + // The next accept event will be put on the event queue. + state->self->accept(state->requestReceivedHandler); + }); + } + + struct AsyncState + { + AsyncState(Ptr self, const RequestReceivedHandler & requestReceivedHandler) + : self(self) + , socket(self->net.getIoService()) + , requestReceivedHandler(requestReceivedHandler) + , buffer(self->maxMessageSize + internal::Frame::HEADER_SIZE) + {} + + Ptr self; + Socket socket; + RequestReceivedHandler requestReceivedHandler; + boost::asio::streambuf buffer; + }; +}; + +} +} + +#endif //PROTOCOL_ProtocolNETWORKSERVICESERVER_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Socket.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Socket.h new file mode 100644 index 0000000000000000000000000000000000000000..c61e01821f180377cb76ada52700836e9580297e --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Socket.h @@ -0,0 +1,244 @@ +// +// Created by philipp on 02.01.18. +// + +#ifndef NETWORKINGLIB_SOCKETOPS_H +#define NETWORKINGLIB_SOCKETOPS_H + +#include "Stream.h" +#include "Resolver.h" +#include "Frame.h" + +namespace networking +{ +namespace socket +{ + +namespace internal +{ + +bool stringFromBuffer(std::string & data, std::vector<char> & buffer, std::size_t numBytesTransferred); + +} + +using ConnectHandler = std::function<void(const error::ErrorCode & error)>; + +using SendHandler = std::function<void(const error::ErrorCode & error)>; + +using ReceiveHandler = std::function<void(const error::ErrorCode & error, + std::string & data, + const std::string & host, + std::uint16_t port)>; + +template<typename SocketService> +void connect(Networking & net, + SocketService & socket, + const std::string & host, + std::uint16_t port, + time::Duration timeout) +{ + using namespace networking::internal; + using Resolver = CloseableResolver<boost::asio::ip::tcp>; + + auto startTime = time::now(); + + // Resolve host. + Resolver resolver{net.getIoService()}; + Resolver::Query query{host, std::to_string(port)}; + + auto resolveOperation = [&resolver](auto && ... args) + { resolver.async_resolve(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, Resolver::Iterator> resolveResult; + closeable::timedOperation( + resolveResult, net, resolveOperation, resolver, timeout, query); + + auto endpointIterator = std::get<1>(resolveResult); + + // Update timeout. + auto timeSpend = time::now() - startTime; + timeout -= timeSpend; + + auto connectOperation = [](auto && ... args) + { boost::asio::async_connect(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, Resolver::Iterator> connectResult; + closeable::timedOperation( + connectResult, net, connectOperation, socket, timeout, socket, endpointIterator); +} + +template<typename SocketService> +void asyncConnect(Networking & net, + SocketService & socket, + const std::string & host, + std::uint16_t port, + const time::Duration & timeout, + const ConnectHandler & handler) +{ + using namespace networking::internal; + using Resolver = CloseableResolver<boost::asio::ip::tcp>; + + auto startTime = time::now(); + + // Resolve host. + auto resolver = std::make_shared<Resolver>(net.getIoService()); + Resolver::Query query{host, std::to_string(port)}; + + auto resolveOperation = [&resolver](auto && ... args) + { resolver->async_resolve(std::forward<decltype(args)>(args)...); }; + + closeable::timedAsyncOperation( + net, resolveOperation, *resolver, timeout, + [&net, &socket, host, port, timeout, handler, resolver, startTime] + (const auto & networkingError, const auto & boostError, auto endpointIterator) + { + if (networkingError) + { + handler(networkingError); + return; + } + + // Update timeout. + auto timeSpend = time::now() - startTime; + auto newTimeout = timeout - timeSpend; + + auto connectOperation = [](auto && ... args) + { boost::asio::async_connect(std::forward<decltype(args)>(args)...); }; + + closeable::timedAsyncOperation( + net, connectOperation, socket, newTimeout, + [handler](const auto & networkingError, const auto & boostError, auto iterator) + { + handler(networkingError); + }, + socket, endpointIterator); + }, + query); +} + +template<typename DatagramSocket> +void sendTo(Networking & net, + DatagramSocket & socket, + const std::string & sendData, + const std::string & host, + std::uint16_t port, + const time::Duration & timeout) +{ + using namespace boost::asio::ip; + udp::endpoint endpoint{address::from_string(host), port}; + + using namespace networking::internal; + Frame buffer{(const std::uint8_t *) sendData.c_str(), sendData.size()}; + + auto asyncOperation = [&socket](auto && ... args) + { socket.async_send_to(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, std::size_t> result; + closeable::timedOperation( + result, net, asyncOperation, socket, timeout, buffer.getBuffers(), endpoint); + + auto numBytesTransferred = std::get<1>(result); + if (numBytesTransferred < buffer.getSize()) + throw error::FailedOperation{}; +}; + +template<typename DatagramSocket> +void asyncSendTo(Networking & net, + DatagramSocket & socket, + const std::string & sendData, + const std::string & host, + std::uint16_t port, + const time::Duration & timeout, + const SendHandler & handler) +{ + using namespace boost::asio::ip; + udp::endpoint endpoint{address::from_string(host), port}; + + using namespace networking::internal; + auto buffer = std::make_shared<Frame>((const std::uint8_t *) sendData.c_str(), sendData.size()); + + auto asyncOperation = [&socket](auto && ... args) + { socket.async_send_to(std::forward<decltype(args)>(args)...); }; + + closeable::timedAsyncOperation( + net, asyncOperation, socket, timeout, + [handler, buffer](const auto & networkingError, + const auto & boostError, + auto numBytesTransferred) + { + if (numBytesTransferred < buffer->getSize()) + { + handler(error::codes::FAILED_OPERATION); + return; + } + + handler(networkingError); + }, + buffer->getBuffers(), endpoint); +}; + +template<typename DatagramSocket> +std::string receiveFrom(Networking & net, + DatagramSocket & socket, + std::vector<char> buffer, + std::string & senderHost, + std::uint16_t & senderPort, + const time::Duration & timeout) +{ + using namespace boost::asio::ip; + udp::endpoint senderEndpoint; + + auto asyncOperation = [&socket](auto && ... args) + { socket.async_receive_from(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, std::size_t> result; + closeable::timedOperation( + result, net, asyncOperation, socket, timeout, boost::asio::buffer(buffer), senderEndpoint); + + senderHost = senderEndpoint.address().to_string(); + senderPort = senderEndpoint.port(); + + std::string receiveData{}; + auto numBytesTransferred = std::get<1>(result); + if (!internal::stringFromBuffer(receiveData, buffer, numBytesTransferred)) + throw error::FailedOperation{}; + return receiveData; +} + +template<typename DatagramSocket> +void asyncReceiveFrom(Networking & net, + DatagramSocket & socket, + std::vector<char> & buffer, + const time::Duration & timeout, + const ReceiveHandler & handler) +{ + using namespace boost::asio::ip; + auto senderEndpoint = std::make_shared<udp::endpoint>(); + + auto asyncOperation = [&socket](auto && ... args) + { socket.async_receive_from(std::forward<decltype(args)>(args)...); }; + + closeable::timedAsyncOperation( + net, asyncOperation, socket, timeout, + [&buffer, handler, senderEndpoint](const auto & networkingError, const auto & boostError, auto numBytesTransferred) + { + std::string receiveData{}; + auto senderHost = senderEndpoint->address().to_string(); + auto senderPort = senderEndpoint->port(); + + if (!internal::stringFromBuffer(receiveData, buffer, numBytesTransferred)) + { + handler(error::codes::FAILED_OPERATION, receiveData, senderHost, senderPort); + return; + } + + handler(networkingError, receiveData, senderHost, senderPort); + }, + boost::asio::buffer(buffer), + *senderEndpoint); +} + +} +} + +#endif //NETWORKINGLIB_SOCKETOPS_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Stream.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Stream.h new file mode 100644 index 0000000000000000000000000000000000000000..2088208bf029e8ab1f335a6c169c0cc65892735d --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Stream.h @@ -0,0 +1,205 @@ +// +// Created by philipp on 02.12.17. +// + +#ifndef PROTOCOL_NETWORKUTILS_H +#define PROTOCOL_NETWORKUTILS_H + +#include <boost/asio/ip/tcp.hpp> +#include <boost/asio.hpp> +#include "Networking.h" +#include "Timer.h" +#include "Error.h" +#include "Closeable.h" +#include "Frame.h" +#include "Utils.h" + +namespace networking +{ +namespace stream +{ + +namespace internal +{ + +std::string stringFromStreambuf(boost::asio::streambuf & streambuf, std::size_t numBytes); + +std::uint32_t numDataBytesFromBuffer(boost::asio::streambuf & streambuf); + +std::size_t getNumRemainingBytes(std::size_t numBytesTransferred, std::uint32_t numDataBytes); + +} + +using WriteHandler = std::function<void(const error::ErrorCode & error)>; + +using ReadHandler = std::function<void(const error::ErrorCode & error, std::string & data)>; + +template<typename SyncWriteStream> +void write(Networking & net, + SyncWriteStream & stream, + const std::string & writeData, + const time::Duration & timeout) +{ + using namespace networking::internal; + Frame frame{(const std::uint8_t *) writeData.c_str(), writeData.size()}; + + auto asyncOperation = [](auto && ... args) + { boost::asio::async_write(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, std::size_t> result; + closeable::timedOperation(result, net, asyncOperation, stream, timeout, stream, frame.getBuffers()); + + auto numBytesTransferred = std::get<1>(result); + if (numBytesTransferred < frame.getSize()) + throw error::FailedOperation{}; +}; + +template<typename SyncWriteStream> +void asyncWrite(Networking & net, + SyncWriteStream & stream, + const std::string & writeData, + const time::Duration & timeout, + const WriteHandler & handler) +{ + using namespace networking::internal; + auto frame = std::make_shared<Frame>((const std::uint8_t *) writeData.c_str(), writeData.size()); + + auto asyncOperation = [](auto && ... args) + { boost::asio::async_write(std::forward<decltype(args)>(args)...); }; + + closeable::timedAsyncOperation( + net, asyncOperation, stream, timeout, + [handler, frame](const auto & networkingError, const auto & boostError, auto numBytesTransferred) + { + if (numBytesTransferred < frame->getSize()) + { + handler(error::codes::FAILED_OPERATION); + return; + } + + handler(networkingError); + }, + stream, frame->getBuffers()); +} + +template<typename SyncReadStream> +std::string read(Networking & net, + SyncReadStream & stream, + boost::asio::streambuf & buffer, + time::Duration timeout) +{ + using networking::internal::Frame; + using namespace networking::stream::internal; + + auto startTime = time::now(); + + auto asyncOperation = [](auto && ... args) + { boost::asio::async_read(std::forward<decltype(args)>(args)...); }; + + std::tuple<boost::system::error_code, std::size_t> result; + + // Receive frame header. + closeable::timedOperation( + result, net, asyncOperation, stream, timeout, stream, buffer, boost::asio::transfer_at_least(Frame::HEADER_SIZE)); + + auto numBytesTransferred = std::get<1>(result); + if (numBytesTransferred < Frame::HEADER_SIZE) + throw error::FailedOperation{}; + + auto numDataBytes = numDataBytesFromBuffer(buffer); + if (numDataBytes == 0) + return std::string{}; + + if (getNumRemainingBytes(numBytesTransferred, numDataBytes) == 0) + return stringFromStreambuf(buffer, numDataBytes); + + timeout -= time::now() - startTime; + + // Receive actual data. + closeable::timedOperation( + result, net, asyncOperation, stream, timeout, stream, buffer, boost::asio::transfer_at_least(numDataBytes)); + + numBytesTransferred = std::get<1>(result); + if (numBytesTransferred < numDataBytes) + throw error::FailedOperation{}; + + return stringFromStreambuf(buffer, numDataBytes); +}; + +template<typename SyncReadStream> +void asyncRead(Networking & net, + SyncReadStream & stream, + boost::asio::streambuf & buffer, + const time::Duration & timeout, + const ReadHandler & handler) +{ + using networking::internal::Frame; + using namespace networking::stream::internal; + + auto startTime = time::now(); + + auto asyncOperation = [](auto && ... args) + { boost::asio::async_read(std::forward<decltype(args)>(args)...); }; + + // Receive frame header. + closeable::timedAsyncOperation( + net, asyncOperation, stream, timeout, + [&net, &stream, &buffer, timeout, handler, startTime, asyncOperation] + (const auto & networkingError, const auto & boostError, auto numBytesTransferred) + { + std::string data{}; + + if (networkingError) + { + handler(networkingError, data); + return; + } + + if (numBytesTransferred < Frame::HEADER_SIZE) + { + handler(error::codes::FAILED_OPERATION, data); + return; + } + + auto numDataBytes = numDataBytesFromBuffer(buffer); + if (numDataBytes == 0) + { + handler(networkingError, data); + return; + } + + if (getNumRemainingBytes(numBytesTransferred, numDataBytes) == 0) + { + data = stringFromStreambuf(buffer, numDataBytes); + handler(networkingError, data); + return; + } + + auto timeSpend = time::now() - startTime; + auto newTimeout = timeout - timeSpend; + + // Receive actual data. + closeable::timedAsyncOperation( + net, asyncOperation, stream, newTimeout, + [&buffer, handler, numDataBytes](const auto & networkingError, const auto & boostError, auto numBytesTransferred) + { + std::string data{}; + + if (numBytesTransferred < numDataBytes) + { + handler(error::codes::FAILED_OPERATION, data); + return; + } + + data = stringFromStreambuf(buffer, numDataBytes); + handler(networkingError, data); + }, + stream, buffer, boost::asio::transfer_at_least(numDataBytes)); + }, + stream, buffer, boost::asio::transfer_at_least(Frame::HEADER_SIZE)); +}; + +} +} + +#endif //PROTOCOL_NETWORKUTILS_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Time.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Time.h new file mode 100644 index 0000000000000000000000000000000000000000..9f87fba46b864ef4d675c8a460ea4620a4c2811f --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Time.h @@ -0,0 +1,24 @@ +// +// Created by philipp on 30.12.17. +// + +#ifndef NETWORKINGLIB_TIME_H +#define NETWORKINGLIB_TIME_H + +#include <chrono> + +namespace networking +{ +namespace time +{ + +using Clock = std::chrono::steady_clock; +using TimePoint = Clock::time_point; +using Duration = Clock::duration; + +TimePoint now() noexcept; + +} +} + +#endif //NETWORKINGLIB_TIME_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Timer.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Timer.h new file mode 100644 index 0000000000000000000000000000000000000000..25eb997876b22a7de9809d12814166e457ee873c --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Timer.h @@ -0,0 +1,63 @@ +// +// Created by philipp on 28.12.17. +// + +#ifndef NETWORKINGLIB_TIMER_H +#define NETWORKINGLIB_TIMER_H + +#include "Networking.h" +#include <boost/asio.hpp> +#include <boost/asio/steady_timer.hpp> +#include "Time.h" +#include "Busyable.h" + +namespace networking +{ +namespace time +{ + +class Timer + : public std::enable_shared_from_this<Timer> + , private Busyable +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<Timer>; + using TimeoutHandler = std::function<void()>; + + // Objects of this class should always be declared as std::shared_ptr. + Timer(PrivateTag, Networking & net); + + static Ptr create(Networking & net); + + void startTimeout(const time::Duration & duration, const TimeoutHandler & handler); + + void startPeriodicTimeout(const time::Duration & interval, const TimeoutHandler & handler); + + void stop(); + +private: + struct AsyncState + { + AsyncState(Ptr self, const TimeoutHandler & handler, const time::Duration & duration); + + BusyLock busyLock; + Ptr self; + TimeoutHandler handler; + time::Duration duration; + }; + + boost::asio::basic_waitable_timer<time::Clock> timer; + std::atomic<bool> enabled{true}; + + void nextPeriod(std::shared_ptr<AsyncState> & state); +}; + +} +} + +#endif //NETWORKINGLIB_TIMER_H diff --git a/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Utils.h b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Utils.h new file mode 100644 index 0000000000000000000000000000000000000000..5635b287d4b6b85aa3511441c7d5614d666a57ca --- /dev/null +++ b/modules/catkin_ws/src/NetworkingLib/include/NetworkingLib/Utils.h @@ -0,0 +1,80 @@ +// +// Created by philipp on 02.01.18. +// + +#ifndef NETWORKINGLIB_UTILS_H +#define NETWORKINGLIB_UTILS_H + +#include <functional> + +namespace networking +{ +namespace utils +{ + +template<std::size_t numBytes, typename Int> +inline void toBigEndian(std::uint8_t * dest, Int src) +{ + std::size_t bitsToShift = numBytes * 8; + for (std::size_t i = 0; i < numBytes; i++) + { + bitsToShift -= 8; + dest[i] = (std::uint8_t) ((src >> bitsToShift) & 0x000000ff); + } +}; + +template<std::size_t numBytes, typename Int> +inline Int fromBigEndian(const std::uint8_t * bytes) +{ + Int result = 0; + std::size_t bitsToShift = numBytes * 8; + for (std::size_t i = 0; i < numBytes; i++) + { + bitsToShift -= 8; + result += ((Int) bytes[i]) << bitsToShift; + } + return result; +} + +// Generic object which calls a callback-function on destruction. +class RAIIObject +{ +public: + using OnDestructionCallback = std::function<void()>; + + RAIIObject(OnDestructionCallback onDestructionCallback) + : onDestructionCallback(onDestructionCallback) + {} + + ~RAIIObject() + { + try + { onDestructionCallback(); } + catch (...) + {} + } + + RAIIObject(const RAIIObject & other) = delete; + + RAIIObject & operator=(const RAIIObject & other) = delete; + + RAIIObject(RAIIObject && other) + : onDestructionCallback(other.onDestructionCallback) + { + other.onDestructionCallback = []{}; + } + + RAIIObject & operator=(RAIIObject && other) + { + onDestructionCallback = other.onDestructionCallback; + other.onDestructionCallback = []{}; + } + +private: + OnDestructionCallback onDestructionCallback; +}; + +} +} + +#endif //NETWORKINGLIB_UTILS_H diff --git a/modules/Communication/NetworkingLib/src/Busyable.cpp b/modules/catkin_ws/src/NetworkingLib/src/Busyable.cpp similarity index 100% rename from modules/Communication/NetworkingLib/src/Busyable.cpp rename to modules/catkin_ws/src/NetworkingLib/src/Busyable.cpp diff --git a/modules/Communication/NetworkingLib/src/Networking.cpp b/modules/catkin_ws/src/NetworkingLib/src/Networking.cpp similarity index 100% rename from modules/Communication/NetworkingLib/src/Networking.cpp rename to modules/catkin_ws/src/NetworkingLib/src/Networking.cpp diff --git a/modules/Communication/NetworkingLib/src/NetworkingLibConfig.h.in b/modules/catkin_ws/src/NetworkingLib/src/NetworkingLibConfig.h.in similarity index 100% rename from modules/Communication/NetworkingLib/src/NetworkingLibConfig.h.in rename to modules/catkin_ws/src/NetworkingLib/src/NetworkingLibConfig.h.in diff --git a/modules/Communication/NetworkingLib/src/Socket.cpp b/modules/catkin_ws/src/NetworkingLib/src/Socket.cpp similarity index 100% rename from modules/Communication/NetworkingLib/src/Socket.cpp rename to modules/catkin_ws/src/NetworkingLib/src/Socket.cpp diff --git a/modules/Communication/NetworkingLib/src/Stream.cpp b/modules/catkin_ws/src/NetworkingLib/src/Stream.cpp similarity index 100% rename from modules/Communication/NetworkingLib/src/Stream.cpp rename to modules/catkin_ws/src/NetworkingLib/src/Stream.cpp diff --git a/modules/Communication/NetworkingLib/src/Time.cpp b/modules/catkin_ws/src/NetworkingLib/src/Time.cpp similarity index 100% rename from modules/Communication/NetworkingLib/src/Time.cpp rename to modules/catkin_ws/src/NetworkingLib/src/Time.cpp diff --git a/modules/Communication/NetworkingLib/src/Timer.cpp b/modules/catkin_ws/src/NetworkingLib/src/Timer.cpp similarity index 100% rename from modules/Communication/NetworkingLib/src/Timer.cpp rename to modules/catkin_ws/src/NetworkingLib/src/Timer.cpp diff --git a/modules/Communication/NetworkingLib/test/Main.cpp b/modules/catkin_ws/src/NetworkingLib/test/Main.cpp similarity index 100% rename from modules/Communication/NetworkingLib/test/Main.cpp rename to modules/catkin_ws/src/NetworkingLib/test/Main.cpp diff --git a/modules/Communication/NetworkingLib/test/PlatoonMessage.h b/modules/catkin_ws/src/NetworkingLib/test/PlatoonMessage.h similarity index 100% rename from modules/Communication/NetworkingLib/test/PlatoonMessage.h rename to modules/catkin_ws/src/NetworkingLib/test/PlatoonMessage.h diff --git a/modules/Communication/NetworkingLib/test/PlatoonService.h b/modules/catkin_ws/src/NetworkingLib/test/PlatoonService.h similarity index 100% rename from modules/Communication/NetworkingLib/test/PlatoonService.h rename to modules/catkin_ws/src/NetworkingLib/test/PlatoonService.h diff --git a/modules/Communication/NetworkingLib/test/Test.cpp b/modules/catkin_ws/src/NetworkingLib/test/Test.cpp similarity index 100% rename from modules/Communication/NetworkingLib/test/Test.cpp rename to modules/catkin_ws/src/NetworkingLib/test/Test.cpp diff --git a/modules/Communication/NetworkingLib/test/Test.h b/modules/catkin_ws/src/NetworkingLib/test/Test.h similarity index 100% rename from modules/Communication/NetworkingLib/test/Test.h rename to modules/catkin_ws/src/NetworkingLib/test/Test.h diff --git a/modules/Communication/NetworkingLib/test/TestUtils.h b/modules/catkin_ws/src/NetworkingLib/test/TestUtils.h similarity index 100% rename from modules/Communication/NetworkingLib/test/TestUtils.h rename to modules/catkin_ws/src/NetworkingLib/test/TestUtils.h diff --git a/modules/Communication/PC2CarLib/.gitignore b/modules/catkin_ws/src/PC2CarLib/.gitignore similarity index 100% rename from modules/Communication/PC2CarLib/.gitignore rename to modules/catkin_ws/src/PC2CarLib/.gitignore diff --git a/modules/Communication/PC2CarLib/CMakeLists.txt b/modules/catkin_ws/src/PC2CarLib/CMakeLists.txt similarity index 84% rename from modules/Communication/PC2CarLib/CMakeLists.txt rename to modules/catkin_ws/src/PC2CarLib/CMakeLists.txt index 0dddfb0b73ae67cf491e84544de347d81c6a5107..db55de136754079712d1171304551f07efdec9d8 100644 --- a/modules/Communication/PC2CarLib/CMakeLists.txt +++ b/modules/catkin_ws/src/PC2CarLib/CMakeLists.txt @@ -18,18 +18,6 @@ include_directories("${PROJECT_BINARY_DIR}") # compiler flags set(CMAKE_CXX_FLAGS -pthread) -set(NETWORKINGLIB_GLOBALLY_INSTALLED FALSE) -if(NETWORKINGLIB_GLOBALLY_INSTALLED) - # import the NetworkingLib - find_package(NetworkingLib REQUIRED) -endif() - -set(PLATOON_PROTOCOL_LIB_GLOBALLY_INSTALLED FALSE) -if(PLATOON_PROTOCOL_LIB_GLOBALLY_INSTALLED) - #import the PlatoonProtocolLib - find_package(PlatoonProtocolLib REQUIRED) -endif() - set(SOURCE_FILES include/PC2CarLib/CommandSender.h include/PC2CarLib/TimedValue.h @@ -56,22 +44,25 @@ add_library(PC2CarLib STATIC ${SOURCE_FILES}) # Specify public header files set_target_properties(PC2CarLib PROPERTIES PUBLIC_HEADER ${PUBLIC_HEADER_FILES_COMBINED}) -set(IS_SUBPROJECT OFF) -if(IS_SUBPROJECT) - target_include_directories(PC2CarLib PUBLIC "${PROJECT_SOURCE_DIR}/include") -else() - find_package(NetworkingLib REQUIRED) - find_package(PlatoonProtocolLib REQUIRED) -endif() - +# NetworkingLib +find_package(NetworkingLib REQUIRED CONFIG PATHS "${CMAKE_CURRENT_LIST_DIR}/../../install") +target_include_directories(PC2CarLib PUBLIC ${NETWORKINGLIB_INCLUDE_DIRS}) target_link_libraries(PC2CarLib NetworkingLib) + +# PlatoonProtocolLib +find_package(PlatoonProtocolLib REQUIRED CONFIG PATHS "${CMAKE_CURRENT_LIST_DIR}/../../install") +target_include_directories(PC2CarLib PUBLIC ${PLATOON_PROTOCOL_LIB_INCLUDE_DIRS}) target_link_libraries(PC2CarLib PlatoonProtocolLib) +find_package(Boost REQUIRED COMPONENTS system regex) +link_libraries(${Boost_LIBRARIES}) + set(INSTALL_PACKAGE ON) if(INSTALL_PACKAGE) ############################# # Specify install directories ############################# + set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/../../install/PC2Car") set(INSTALL_LIB_DIR lib/PC2CarLib) set(INSTALL_INCLUDE_DIR include/PC2CarLib) set(INSTALL_CMAKE_DIR lib/PC2CarLib/CMake) @@ -100,14 +91,14 @@ if(INSTALL_PACKAGE) # Configure *Config.cmake.in for the build tree # Put it inside the binary directory - set(CONF_INCLUDE_DIRS "${PROJECT_BINARY_DIR}") + set(CONF_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include") configure_file(PC2CarLibConfig.cmake.in "${PROJECT_BINARY_DIR}/PC2CarLibConfig.cmake" @ONLY) # Configure *Config.cmake.in for the install tree # Put it inside the cmake-files directory (which is located inside the binary directory) - set(CONF_INCLUDE_DIRS "\${PC2CARLIB_CMAKE_DIR}/${REL_INCLUDE_DIR}") + set(CONF_INCLUDE_DIRS "\${PC2CARLIB_CMAKE_DIR}/${REL_INCLUDE_DIR}/..") configure_file(PC2CarLibConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PC2CarLibConfig.cmake" @ONLY) @@ -142,10 +133,15 @@ endif() ####### # Test ####### -set(TEST_SOURCE_FILES ${SOURCE_FILES} test/Main.cpp) +set(TEST_SOURCE_FILES ${SOURCE_FILES} test/Main.cpp) add_executable(PC2CarTest ${TEST_SOURCE_FILES}) +# NetworkingLib +target_include_directories(PC2CarTest PUBLIC ${NETWORKINGLIB_INCLUDE_DIRS}) target_link_libraries(PC2CarTest NetworkingLib) + +# PlatoonProtocolLib +target_include_directories(PC2CarTest PUBLIC ${PLATOON_PROTOCOL_LIB_INCLUDE_DIRS}) target_link_libraries(PC2CarTest PlatoonProtocolLib) # For debugging diff --git a/modules/Communication/PC2CarLib/PC2CarLibConfig.cmake.in b/modules/catkin_ws/src/PC2CarLib/PC2CarLibConfig.cmake.in similarity index 100% rename from modules/Communication/PC2CarLib/PC2CarLibConfig.cmake.in rename to modules/catkin_ws/src/PC2CarLib/PC2CarLibConfig.cmake.in diff --git a/modules/Communication/PC2CarLib/PC2CarLibConfigVersion.cmake.in b/modules/catkin_ws/src/PC2CarLib/PC2CarLibConfigVersion.cmake.in similarity index 100% rename from modules/Communication/PC2CarLib/PC2CarLibConfigVersion.cmake.in rename to modules/catkin_ws/src/PC2CarLib/PC2CarLibConfigVersion.cmake.in diff --git a/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/CommandReceiver.h b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/CommandReceiver.h new file mode 100644 index 0000000000000000000000000000000000000000..fa56c7a5e07c0ae7e00d162f4df6f1f38f153b1f --- /dev/null +++ b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/CommandReceiver.h @@ -0,0 +1,87 @@ +// +// Created by philipp on 05.02.18. +// + +#ifndef PC2CAR_COMMANDRECEIVER_H +#define PC2CAR_COMMANDRECEIVER_H + +#include "PC2Car.h" +#include "NetworkingLib/DatagramReceiver.h" +#include "PlatoonProtocolLib/Protocol.h" +#include "TimedValue.h" +#include "json.hpp" + +namespace pc2car +{ + +class CommandReceiver : public std::enable_shared_from_this<CommandReceiver> +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<CommandReceiver>; + using DatagramReceiver = networking::message::DatagramReceiver<std::string>; + using OnCommandReceivedCallback = std::function<void(CommandCode)>; + + static Ptr create( + networking::Networking & net, + bool defaultLoggingEnabled = false, + bool defaultPlatoonEnabled = false, + bool defaultRCModeEnabled = false, + float defaultPlatoonSpeed = 0.0f, + float defaultInnerPlatoonDistance = 0.0f, + float defaultSpeed = 0.0f); + + CommandReceiver(PrivateTag, + networking::Networking & net, + bool defaultLoggingEnabled, + bool defaultPlatoonEnabled, + bool defaultRCModeEnabled, + float defaultPlatoonSpeed, + float defaultInnerPlatoonDistance, + float defaultSpeed); + + void receiveCommands(const OnCommandReceivedCallback & handler); + + void stop(); + + TimedValue<bool> isLoggingEnabled() + { return loggingEnabled.getNonAtomicCopy(); } + + TimedValue<bool> isPlatoonEnabled() + { return platoonEnabled.getNonAtomicCopy(); } + + TimedValue<bool> isRcModeEnabled() + { return rcModeEnabled.getNonAtomicCopy(); } + + TimedValue<platoonProtocol::PlatoonSpeed> getPlatoonSpeed() + { return platoonSpeed.getNonAtomicCopy(); } + + TimedValue<platoonProtocol::InnerPlatoonDistance> getInnerPlatoonDistance() + { return innerPlatoonDistance.getNonAtomicCopy(); } + + TimedValue<float> getSpeed() + { return speed.getNonAtomicCopy(); } + +private: + DatagramReceiver::Ptr receiver; + OnCommandReceivedCallback handler; + + TimedAtomicValue<bool> loggingEnabled{false}; + TimedAtomicValue<bool> platoonEnabled{false}; + TimedAtomicValue<bool> rcModeEnabled{false}; + TimedAtomicValue<platoonProtocol::PlatoonSpeed> platoonSpeed{false}; + TimedAtomicValue<platoonProtocol::InnerPlatoonDistance> innerPlatoonDistance{false}; + TimedAtomicValue<float> speed{false}; + + void receiveCommand(); + + void setValue(CommandCode code, nlohmann::json & j); +}; + +} + +#endif //PC2CAR_COMMANDRECEIVER_H diff --git a/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/CommandSender.h b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/CommandSender.h new file mode 100644 index 0000000000000000000000000000000000000000..5be0cabd09abb9133b9087f43f702f7d9953da15 --- /dev/null +++ b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/CommandSender.h @@ -0,0 +1,73 @@ +// +// Created by philipp on 22.01.18. +// + +#ifndef PC2CAR_COMMAND_SENDER_H +#define PC2CAR_COMMAND_SENDER_H + +class Client; + +#include "PC2Car.h" +#include "NetworkingLib/Networking.h" +#include "NetworkingLib/DatagramSender.h" +#include "NetworkingLib/Error.h" +#include "PlatoonProtocolLib/Protocol.h" +#include "json.hpp" + +namespace pc2car +{ + +class CommandSender +{ +public: + using DatagramSender = networking::message::DatagramSender<std::string>; + + CommandSender(networking::Networking & net, const std::string & host) + : host(host) + , sender(DatagramSender::create(net)) + {} + + CommandSender(const CommandSender &) = delete; + + CommandSender & operator=(const CommandSender &) = delete; + + void setHost(const std::string & host) + { this->host = host; } + + void enableLogging(bool value) + { send(commandCodes::ENABLE_LOGGING, value); } + + void enablePlatoon(bool value) + { send(commandCodes::ENABLE_PLATOON, value); } + + void enableRCMode(bool value) + { send(commandCodes::ENABLE_RC_MODE, value); } + + void setPlatoonSpeed(platoonProtocol::PlatoonSpeed value) + { send(commandCodes::SET_PS, value); } + + void setInnerPlatoonDistance(platoonProtocol::InnerPlatoonDistance value) + { send(commandCodes::SET_IPD, value); } + + void setSpeed(float value) + { send(commandCodes::SET_SPEED, value); } + +private: + std::string host; + DatagramSender::Ptr sender; + + template<typename T> + void send(CommandCode code, T value) + { + using json = nlohmann::json; + using namespace jsonNames; + auto j = json{{COMMAND, code}, + {VALUE, value}}; + + sender->send(j.dump(), host, PORT, TIMEOUT); + } +}; + +} + +#endif // PC2CAR_COMMAND_SENDER_H diff --git a/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/PC2Car.h b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/PC2Car.h new file mode 100644 index 0000000000000000000000000000000000000000..b71bcaa96538e74337ab844a007f9550209a6e9d --- /dev/null +++ b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/PC2Car.h @@ -0,0 +1,40 @@ +// +// Created by philipp on 05.02.18. +// + +#ifndef PC2CAR_PC2CAR_H +#define PC2CAR_PC2CAR_H + +#include <NetworkingLib/Time.h> + +namespace pc2car +{ + +constexpr std::uint16_t PORT = 10100; +constexpr networking::time::Duration TIMEOUT = std::chrono::seconds(3); + +using CommandCode = std::uint32_t; + +namespace commandCodes +{ + +constexpr CommandCode ENABLE_LOGGING = 0x00000001; +constexpr CommandCode ENABLE_PLATOON = 0x00000002; +constexpr CommandCode ENABLE_RC_MODE = 0x00000003; +constexpr CommandCode SET_PS = 0x00000004; +constexpr CommandCode SET_IPD = 0x00000005; +constexpr CommandCode SET_SPEED = 0x00000006; + +} + +namespace jsonNames +{ + +constexpr char COMMAND[] = "command"; +constexpr char VALUE[] = "value"; + +} + +} + +#endif //PC2CAR_PC2CAR_H diff --git a/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/TimedValue.h b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/TimedValue.h new file mode 100644 index 0000000000000000000000000000000000000000..3650c19d37773788fdf9eb1d4667fb3130376e3d --- /dev/null +++ b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/TimedValue.h @@ -0,0 +1,105 @@ +// +// Created by philipp on 05.02.18. +// + +#ifndef PC2CAR_TIMEDVALUE_H +#define PC2CAR_TIMEDVALUE_H + +#include <NetworkingLib/Time.h> + +namespace pc2car +{ + +template<typename T> +class TimedValue +{ +public: + using Timestamp = networking::time::TimePoint; + + TimedValue() + : timestamp(Timestamp::min()) + {} + + TimedValue(const T & val) + { set(val); } + + TimedValue(const T & val, const Timestamp & timestamp) + : val(val), timestamp(timestamp) + {} + + T get() const + { return val; } + + void set(const T & val) + { + this->val = val; + timestamp = networking::time::now(); + } + + Timestamp getTimestamp() const + { return timestamp; } + + TimedValue & operator=(const T & val) + { set(val); } + + explicit operator T() const + { return get(); } + +private: + T val; + Timestamp timestamp; +}; + +template<typename T> +class TimedAtomicValue +{ +public: + using Timestamp = networking::time::TimePoint; + + TimedAtomicValue() + : timestamp(Timestamp::min()) + {} + + TimedAtomicValue(const T & val) + { set(val); } + + T get() + { + std::lock_guard<std::mutex> lock{mutex}; + return val; + } + + void set(const T & val) + { + std::lock_guard<std::mutex> lock{mutex}; + this->val = val; + timestamp = networking::time::now(); + } + + Timestamp getTimestamp() + { + std::lock_guard<std::mutex> lock{mutex}; + return timestamp; + } + + TimedAtomicValue & operator=(const T & val) + { set(val); } + + explicit operator T() + { return get(); } + + TimedValue<T> getNonAtomicCopy() + { + std::lock_guard<std::mutex> lock{mutex}; + return TimedValue<T>{val, timestamp}; + } + +private: + T val; + Timestamp timestamp; + std::mutex mutex; +}; + +} + +#endif //PC2CAR_TIMEDVALUE_H diff --git a/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/json.hpp b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/json.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5b0b0ea5b3018dd2562e1ac7df6d76b3b8e2cde6 --- /dev/null +++ b/modules/catkin_ws/src/PC2CarLib/include/PC2CarLib/json.hpp @@ -0,0 +1,14874 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.0.1 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License <http://opensource.org/licenses/MIT>. +Copyright (c) 2013-2017 Niels Lohmann <http://nlohmann.me>. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef NLOHMANN_JSON_HPP +#define NLOHMANN_JSON_HPP + +#include <algorithm> // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform +#include <array> // array +#include <cassert> // assert +#include <ciso646> // and, not, or +#include <clocale> // lconv, localeconv +#include <cmath> // isfinite, labs, ldexp, signbit +#include <cstddef> // nullptr_t, ptrdiff_t, size_t +#include <cstdint> // int64_t, uint64_t +#include <cstdlib> // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull +#include <cstring> // memcpy, strlen +#include <forward_list> // forward_list +#include <functional> // function, hash, less +#include <initializer_list> // initializer_list +#include <iomanip> // hex +#include <iosfwd> // istream, ostream +#include <iterator> // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator +#include <limits> // numeric_limits +#include <locale> // locale +#include <map> // map +#include <memory> // addressof, allocator, allocator_traits, unique_ptr +#include <numeric> // accumulate +#include <sstream> // stringstream +#include <string> // getline, stoi, string, to_string +#include <type_traits> // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type +#include <utility> // declval, forward, make_pair, move, pair, swap +#include <valarray> // valarray +#include <vector> // vector + +// exclude unsupported compilers +#if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif +#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow for portable deprecation warnings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define JSON_DEPRECATED __declspec(deprecated) +#else + #define JSON_DEPRECATED +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) +#else + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(!!(x), 1) + #define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +template<typename = void, typename = void> +struct adl_serializer; + +// forward declaration of basic_json (required to split the class) +template<template<typename, typename, typename...> class ObjectType = std::map, + template<typename, typename...> class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template<typename> class AllocatorType = std::allocator, + template<typename, typename = void> class JSONSerializer = adl_serializer> +class basic_json; + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template<template<typename, typename, typename...> class ObjectType, \ + template<typename, typename...> class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template<typename> class AllocatorType, \ + template<typename, typename = void> class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json<ObjectType, ArrayType, StringType, BooleanType, \ + NumberIntegerType, NumberUnsignedType, NumberFloatType, \ + AllocatorType, JSONSerializer> + + +/*! +@brief unnamed namespace with internal helper functions + +This namespace collects some functions that could not be defined inside the +@ref basic_json class. + +@since version 2.1.0 +*/ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] byte_ the byte index where the error occurred (or 0 if the + position cannot be determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t&. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + + + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + discarded ///< discarded by the the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string +- furthermore, each type is not smaller than itself +- discarded values are not comparable + +@since version 1.0.0 +*/ +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + static constexpr std::array<uint8_t, 8> order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */ + } + }; + + const auto l_index = static_cast<std::size_t>(lhs); + const auto r_index = static_cast<std::size_t>(rhs); + return l_index < order.size() and r_index < order.size() and order[l_index] < order[r_index]; +} + + +///////////// +// helpers // +///////////// + +template<typename> struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {}; + +// alias templates to reduce boilerplate +template<bool B, typename T = void> +using enable_if_t = typename std::enable_if<B, T>::type; + +template<typename T> +using uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template<std::size_t... Ints> +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template<class Sequence1, class Sequence2> +struct merge_and_renumber; + +template<std::size_t... I1, std::size_t... I2> +struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template<std::size_t N> +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template<typename... Ts> +using index_sequence_for = make_index_sequence<sizeof...(Ts)>; + +/* +Implementation of two C++17 constructs: conjunction, negation. This is needed +to avoid evaluating all the traits in a condition + +For example: not std::is_same<void, T>::value and has_value_type<T>::value +will not compile when T = void (on MSVC at least). Whereas +conjunction<negation<std::is_same<void, T>>, has_value_type<T>>::value will +stop evaluating if negation<...>::value == false + +Please note that those constructs must be used with caution, since symbols can +become very long quickly (which can slow down compilation and cause MSVC +internal compiler errors). Only use it when you have to (see example ahead). +*/ +template<class...> struct conjunction : std::true_type {}; +template<class B1> struct conjunction<B1> : B1 {}; +template<class B1, class... Bn> +struct conjunction<B1, Bn...> : std::conditional<bool(B1::value), conjunction<Bn...>, B1>::type {}; + +template<class B> struct negation : std::integral_constant<bool, not B::value> {}; + +// dispatch utility (taken from ranges-v3) +template<unsigned N> struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + + +////////////////// +// constructors // +////////////////// + +template<value_t> struct external_constructor; + +template<> +struct external_constructor<value_t::boolean> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_type = value_t::boolean; + j.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::string> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_type = value_t::string; + j.m_value = s; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_type = value_t::string; + j.m_value = std::move(s); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_float> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_type = value_t::number_float; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_unsigned> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_type = value_t::number_unsigned; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_integer> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_type = value_t::number_integer; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::array> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_type = value_t::array; + j.m_value = arr; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_type = value_t::array; + j.m_value = std::move(arr); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<not std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + j.m_type = value_t::array; + j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const std::vector<bool>& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_value.array->push_back(x); + } + j.assert_invariant(); + } + + template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray<T>& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->resize(arr.size()); + std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::object> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_type = value_t::object; + j.m_value = obj; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_type = value_t::object; + j.m_value = std::move(obj); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<not std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int> = 0> + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_type = value_t::object; + j.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj)); + j.assert_invariant(); + } +}; + + +//////////////////////// +// has_/is_ functions // +//////////////////////// + +/*! +@brief Helper to determine whether there's a key_type for T. + +This helper is used to tell associative containers apart from other containers +such as sequence containers. For instance, `std::map` passes the test as it +contains a `mapped_type`, whereas `std::vector` fails the test. + +@sa http://stackoverflow.com/a/7728728/266378 +@since version 1.0.0, overworked in version 2.0.6 +*/ +#define NLOHMANN_JSON_HAS_HELPER(type) \ + template<typename T> struct has_##type { \ + private: \ + template<typename U, typename = typename U::type> \ + static int detect(U &&); \ + static void detect(...); \ + public: \ + static constexpr bool value = \ + std::is_integral<decltype(detect(std::declval<T>()))>::value; \ + } + +NLOHMANN_JSON_HAS_HELPER(mapped_type); +NLOHMANN_JSON_HAS_HELPER(key_type); +NLOHMANN_JSON_HAS_HELPER(value_type); +NLOHMANN_JSON_HAS_HELPER(iterator); + +#undef NLOHMANN_JSON_HAS_HELPER + + +template<bool B, class RealType, class CompatibleObjectType> +struct is_compatible_object_type_impl : std::false_type {}; + +template<class RealType, class CompatibleObjectType> +struct is_compatible_object_type_impl<true, RealType, CompatibleObjectType> +{ + static constexpr auto value = + std::is_constructible<typename RealType::key_type, typename CompatibleObjectType::key_type>::value and + std::is_constructible<typename RealType::mapped_type, typename CompatibleObjectType::mapped_type>::value; +}; + +template<class BasicJsonType, class CompatibleObjectType> +struct is_compatible_object_type +{ + static auto constexpr value = is_compatible_object_type_impl < + conjunction<negation<std::is_same<void, CompatibleObjectType>>, + has_mapped_type<CompatibleObjectType>, + has_key_type<CompatibleObjectType>>::value, + typename BasicJsonType::object_t, CompatibleObjectType >::value; +}; + +template<typename BasicJsonType, typename T> +struct is_basic_json_nested_type +{ + static auto constexpr value = std::is_same<T, typename BasicJsonType::iterator>::value or + std::is_same<T, typename BasicJsonType::const_iterator>::value or + std::is_same<T, typename BasicJsonType::reverse_iterator>::value or + std::is_same<T, typename BasicJsonType::const_reverse_iterator>::value; +}; + +template<class BasicJsonType, class CompatibleArrayType> +struct is_compatible_array_type +{ + static auto constexpr value = + conjunction<negation<std::is_same<void, CompatibleArrayType>>, + negation<is_compatible_object_type< + BasicJsonType, CompatibleArrayType>>, + negation<std::is_constructible<typename BasicJsonType::string_t, + CompatibleArrayType>>, + negation<is_basic_json_nested_type<BasicJsonType, CompatibleArrayType>>, + has_value_type<CompatibleArrayType>, + has_iterator<CompatibleArrayType>>::value; +}; + +template<bool, typename, typename> +struct is_compatible_integer_type_impl : std::false_type {}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type_impl<true, RealIntegerType, CompatibleNumberIntegerType> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits<RealIntegerType>; + using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>; + + static constexpr auto value = + std::is_constructible<RealIntegerType, CompatibleNumberIntegerType>::value and + CompatibleLimits::is_integer and + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type +{ + static constexpr auto value = + is_compatible_integer_type_impl < + std::is_integral<CompatibleNumberIntegerType>::value and + not std::is_same<bool, CompatibleNumberIntegerType>::value, + RealIntegerType, CompatibleNumberIntegerType >::value; +}; + + +// trait checking if JSONSerializer<T>::from_json(json const&, udt&) exists +template<typename BasicJsonType, typename T> +struct has_from_json +{ + private: + // also check the return type of from_json + template<typename U, typename = enable_if_t<std::is_same<void, decltype(uncvref_t<U>::from_json( + std::declval<BasicJsonType>(), std::declval<T&>()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral<decltype( + detect(std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value; +}; + +// This trait checks if JSONSerializer<T>::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template<typename BasicJsonType, typename T> +struct has_non_default_from_json +{ + private: + template<typename U, typename = + enable_if_t<std::is_same<T, decltype(uncvref_t<U>::from_json(std::declval<BasicJsonType>()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral<decltype(detect( + std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value; +}; + +// This trait checks if BasicJsonType::json_serializer<T>::to_json exists +template<typename BasicJsonType, typename T> +struct has_to_json +{ + private: + template<typename U, typename = decltype(uncvref_t<U>::to_json( + std::declval<BasicJsonType&>(), std::declval<T>()))> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral<decltype(detect( + std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value; +}; + + +///////////// +// to_json // +///////////// + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor<value_t::boolean>::construct(j, b); +} + +template<typename BasicJsonType, typename CompatibleString, + enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor<value_t::string>::construct(j, s); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor<value_t::string>::construct(j, std::move(s)); +} + +template<typename BasicJsonType, typename FloatType, + enable_if_t<std::is_floating_point<FloatType>::value, int> = 0> +void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberUnsignedType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberIntegerType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val)); +} + +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type<EnumType>::type; + external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e)); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, const std::vector<bool>& e) +{ + external_constructor<value_t::array>::construct(j, e); +} + +template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value or + std::is_same<typename BasicJsonType::array_t, CompatibleArrayType>::value, + int> = 0> +void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> +void to_json(BasicJsonType& j, std::valarray<T> arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor<value_t::object>::construct(j, obj); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor<value_t::object>::construct(j, std::move(obj)); +} + +template<typename BasicJsonType, typename T, std::size_t N, + enable_if_t<not std::is_constructible<typename BasicJsonType::string_t, T (&)[N]>::value, int> = 0> +void to_json(BasicJsonType& j, T (&arr)[N]) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType, typename... Args> +void to_json(BasicJsonType& j, const std::pair<Args...>& p) +{ + j = {p.first, p.second}; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...>) +{ + j = {std::get<Idx>(t)...}; +} + +template<typename BasicJsonType, typename... Args> +void to_json(BasicJsonType& j, const std::tuple<Args...>& t) +{ + to_json_tuple_impl(j, t, index_sequence_for<Args...> {}); +} + +/////////////// +// from_json // +/////////////// + +// overloads for basic_json template parameters +template<typename BasicJsonType, typename ArithmeticType, + enable_if_t<std::is_arithmetic<ArithmeticType>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int> = 0> +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_UNLIKELY(not j.is_boolean())) + { + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()))); + } + b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type<EnumType>::type val; + get_arithmetic_value(j, val); + e = static_cast<EnumType>(val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::array_t& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + arr = *j.template get_ptr<const typename BasicJsonType::array_t*>(); +} + +// forward_list doesn't have an insert method +template<typename BasicJsonType, typename T, typename Allocator, + enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0> +void from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get<T>(); + }); +} + +// valarray doesn't have an insert method +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0> +void from_json(const BasicJsonType& j, std::valarray<T>& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + l.resize(j.size()); + std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l)); +} + +template<typename BasicJsonType, typename CompatibleArrayType> +void from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<0> /*unused*/) +{ + using std::end; + + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename CompatibleArrayType::value_type>(); + }); +} + +template<typename BasicJsonType, typename CompatibleArrayType> +auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval<typename CompatibleArrayType::size_type>()), + void()) +{ + using std::end; + + arr.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename CompatibleArrayType::value_type>(); + }); +} + +template<typename BasicJsonType, typename T, std::size_t N> +void from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr, priority_tag<2> /*unused*/) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get<T>(); + } +} + +template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value and + std::is_convertible<BasicJsonType, typename CompatibleArrayType::value_type>::value and + not std::is_same<typename BasicJsonType::array_t, CompatibleArrayType>::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleArrayType& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + + from_json_array_impl(j, arr, priority_tag<2> {}); +} + +template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleObjectType& obj) +{ + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(302, "type must be object, but is " + std::string(j.type_name()))); + } + + auto inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>(); + using value_type = typename CompatibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(obj, obj.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get<typename CompatibleObjectType::mapped_type>()); + }); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template<typename BasicJsonType, typename ArithmeticType, + enable_if_t < + std::is_arithmetic<ArithmeticType>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int> = 0> +void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + case value_t::boolean: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template<typename BasicJsonType, typename A1, typename A2> +void from_json(const BasicJsonType& j, std::pair<A1, A2>& p) +{ + p = {j.at(0).template get<A1>(), j.at(1).template get<A2>()}; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence<Idx...>) +{ + t = std::make_tuple(j.at(Idx).template get<typename std::tuple_element<Idx, Tuple>::type>()...); +} + +template<typename BasicJsonType, typename... Args> +void from_json(const BasicJsonType& j, std::tuple<Args...>& t) +{ + from_json_tuple_impl(j, t, index_sequence_for<Args...> {}); +} + +struct to_json_fn +{ + private: + template<typename BasicJsonType, typename T> + auto call(BasicJsonType& j, T&& val, priority_tag<1> /*unused*/) const noexcept(noexcept(to_json(j, std::forward<T>(val)))) + -> decltype(to_json(j, std::forward<T>(val)), void()) + { + return to_json(j, std::forward<T>(val)); + } + + template<typename BasicJsonType, typename T> + void call(BasicJsonType& /*unused*/, T&& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find to_json() method in T's namespace"); + +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t<T>; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template<typename BasicJsonType, typename T> + void operator()(BasicJsonType& j, T&& val) const + noexcept(noexcept(std::declval<to_json_fn>().call(j, std::forward<T>(val), priority_tag<1> {}))) + { + return call(j, std::forward<T>(val), priority_tag<1> {}); + } +}; + +struct from_json_fn +{ + private: + template<typename BasicJsonType, typename T> + auto call(const BasicJsonType& j, T& val, priority_tag<1> /*unused*/) const + noexcept(noexcept(from_json(j, val))) + -> decltype(from_json(j, val), void()) + { + return from_json(j, val); + } + + template<typename BasicJsonType, typename T> + void call(const BasicJsonType& /*unused*/, T& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find from_json() method in T's namespace"); +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t<T>; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template<typename BasicJsonType, typename T> + void operator()(const BasicJsonType& j, T& val) const + noexcept(noexcept(std::declval<from_json_fn>().call(j, val, priority_tag<1> {}))) + { + return call(j, val, priority_tag<1> {}); + } +}; + +// taken from ranges-v3 +template<typename T> +struct static_const +{ + static constexpr T value{}; +}; + +template<typename T> +constexpr T static_const<T>::value; + +//////////////////// +// input adapters // +//////////////////// + +/*! +@brief abstract input adapter interface + +Produces a stream of std::char_traits<char>::int_type characters from a +std::istream, a buffer, or some other input type. Accepts the return of exactly +one non-EOF character for future input. The int_type characters returned +consist of all valid char values as positive values (typically unsigned char), +plus an EOF value outside that range, specified by the value of the function +std::char_traits<char>::eof(). This value is typically -1, but could be any +arbitrary value which is not a valid char value. +*/ +struct input_adapter_protocol +{ + /// get a character [0,255] or std::char_traits<char>::eof(). + virtual std::char_traits<char>::int_type get_character() = 0; + /// restore the last non-eof() character to input + virtual void unget_character() = 0; + virtual ~input_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +using input_adapter_t = std::shared_ptr<input_adapter_protocol>; + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter : public input_adapter_protocol +{ + public: + ~input_stream_adapter() override + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags + is.clear(); + } + + explicit input_stream_adapter(std::istream& i) + : is(i), sb(*i.rdbuf()) + { + // skip byte order mark + std::char_traits<char>::int_type c; + if ((c = get_character()) == 0xEF) + { + if ((c = get_character()) == 0xBB) + { + if ((c = get_character()) == 0xBF) + { + return; // Ignore BOM + } + else if (c != std::char_traits<char>::eof()) + { + is.unget(); + } + is.putback('\xBB'); + } + else if (c != std::char_traits<char>::eof()) + { + is.unget(); + } + is.putback('\xEF'); + } + else if (c != std::char_traits<char>::eof()) + { + is.unget(); // no byte order mark; process as usual + } + } + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + + // std::istream/std::streambuf use std::char_traits<char>::to_int_type, to + // ensure that std::char_traits<char>::eof() and the character 0xFF do not + // end up as the same value, eg. 0xFFFFFFFF. + std::char_traits<char>::int_type get_character() override + { + return sb.sbumpc(); + } + + void unget_character() override + { + sb.sungetc(); // is.unget() avoided for performance + } + + private: + /// the associated input stream + std::istream& is; + std::streambuf& sb; +}; + +/// input adapter for buffer input +class input_buffer_adapter : public input_adapter_protocol +{ + public: + input_buffer_adapter(const char* b, const std::size_t l) + : cursor(b), limit(b + l), start(b) + { + // skip byte order mark + if (l >= 3 and b[0] == '\xEF' and b[1] == '\xBB' and b[2] == '\xBF') + { + cursor += 3; + } + } + + // delete because of pointer members + input_buffer_adapter(const input_buffer_adapter&) = delete; + input_buffer_adapter& operator=(input_buffer_adapter&) = delete; + + std::char_traits<char>::int_type get_character() noexcept override + { + if (JSON_LIKELY(cursor < limit)) + { + return std::char_traits<char>::to_int_type(*(cursor++)); + } + + return std::char_traits<char>::eof(); + } + + void unget_character() noexcept override + { + if (JSON_LIKELY(cursor > start)) + { + --cursor; + } + } + + private: + /// pointer to the current character + const char* cursor; + /// pointer past the last character + const char* limit; + /// pointer to the first character + const char* start; +}; + +class input_adapter +{ + public: + // native support + + /// input adapter for input stream + input_adapter(std::istream& i) + : ia(std::make_shared<input_stream_adapter>(i)) {} + + /// input adapter for input stream + input_adapter(std::istream&& i) + : ia(std::make_shared<input_stream_adapter>(i)) {} + + /// input adapter for buffer + template<typename CharT, + typename std::enable_if< + std::is_pointer<CharT>::value and + std::is_integral<typename std::remove_pointer<CharT>::type>::value and + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int>::type = 0> + input_adapter(CharT b, std::size_t l) + : ia(std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(b), l)) {} + + // derived support + + /// input adapter for string literal + template<typename CharT, + typename std::enable_if< + std::is_pointer<CharT>::value and + std::is_integral<typename std::remove_pointer<CharT>::type>::value and + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int>::type = 0> + input_adapter(CharT b) + : input_adapter(reinterpret_cast<const char*>(b), + std::strlen(reinterpret_cast<const char*>(b))) {} + + /// input adapter for iterator range with contiguous storage + template<class IteratorType, + typename std::enable_if< + std::is_same<typename std::iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + input_adapter(IteratorType first, IteratorType last) + { + // assertion to check that the iterator range is indeed contiguous, + // see http://stackoverflow.com/a/35008842/266378 for more discussion + assert(std::accumulate( + first, last, std::pair<bool, int>(true, 0), + [&first](std::pair<bool, int> res, decltype(*first) val) + { + res.first &= (val == *(std::next(std::addressof(*first), res.second++))); + return res; + }).first); + + // assertion to check that each element is 1 byte long + static_assert( + sizeof(typename std::iterator_traits<IteratorType>::value_type) == 1, + "each element in the iterator range must have the size of 1 byte"); + + const auto len = static_cast<size_t>(std::distance(first, last)); + if (JSON_LIKELY(len > 0)) + { + // there is at least one element: use the address of first + ia = std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(&(*first)), len); + } + else + { + // the address of first cannot be used: use nullptr + ia = std::make_shared<input_buffer_adapter>(nullptr, len); + } + } + + /// input adapter for array + template<class T, std::size_t N> + input_adapter(T (&array)[N]) + : input_adapter(std::begin(array), std::end(array)) {} + + /// input adapter for contiguous container + template<class ContiguousContainer, typename + std::enable_if<not std::is_pointer<ContiguousContainer>::value and + std::is_base_of<std::random_access_iterator_tag, typename std::iterator_traits<decltype(std::begin(std::declval<ContiguousContainer const>()))>::iterator_category>::value, + int>::type = 0> + input_adapter(const ContiguousContainer& c) + : input_adapter(std::begin(c), std::end(c)) {} + + operator input_adapter_t() + { + return ia; + } + + private: + /// the actual adapter + input_adapter_t ia = nullptr; +}; + +////////////////////// +// lexer and parser // +////////////////////// + +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template<typename BasicJsonType> +class lexer +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return "<uninitialized>"; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case lexer::token_type::value_unsigned: + case lexer::token_type::value_integer: + case lexer::token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return "<parse error>"; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + default: // catch non-enum values + return "unknown token"; // LCOV_EXCL_LINE + } + } + + explicit lexer(detail::input_adapter_t adapter) + : ia(std::move(adapter)), decimal_point_char(get_decimal_point()) {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer& operator=(lexer&) = delete; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + static char get_decimal_point() noexcept + { + const auto loc = localeconv(); + assert(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + assert(current == 'u'); + int codepoint = 0; + + const auto factors = { 12, 8, 4, 0 }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' and current <= '9') + { + codepoint += ((current - 0x30) << factor); + } + else if (current >= 'A' and current <= 'F') + { + codepoint += ((current - 0x37) << factor); + } + else if (current >= 'a' and current <= 'f') + { + codepoint += ((current - 0x57) << factor); + } + else + { + return -1; + } + } + + assert(0x0000 <= codepoint and codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list<int> ranges) + { + assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_LIKELY(*range <= current and current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 7159. While + scanning, bytes are escaped and copied into buffer yytext. Then the function + returns successfully, yytext is *not* null-terminated (as it may contain \0 + bytes), and yytext.size() is the number of bytes in the string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset yytext (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + assert(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits<char>::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_LIKELY(get() == '\\' and get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = + // high surrogate occupies the most significant 22 bits + (codepoint1 << 10) + // low surrogate occupies the least significant 15 bits + + codepoint2 + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00; + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(codepoint); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(0xC0 | (codepoint >> 6)); + add(0x80 | (codepoint & 0x3F)); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(0xE0 | (codepoint >> 12)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(0xF0 | (codepoint >> 18)); + add(0x80 | ((codepoint >> 12) & 0x3F)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + error_message = "invalid string: control character must be escaped"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_UNLIKELY(not next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 7159. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 7159. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | [error] | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in yytext. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() + { + // reset yytext to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + // all other characters are rejected outside scan_number() + assert(false); // LCOV_EXCL_LINE + } + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(yytext.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + if (errno == 0) + { + value_unsigned = static_cast<number_unsigned_t>(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(yytext.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + if (errno == 0) + { + value_integer = static_cast<number_integer_t>(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, yytext.data(), &endptr); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + token_type scan_literal(const char* literal_text, const std::size_t length, + token_type return_type) + { + assert(current == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_UNLIKELY(get() != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset yytext; current character is beginning of token + void reset() noexcept + { + yytext.clear(); + token_string.clear(); + token_string.push_back(std::char_traits<char>::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits<char>::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + std::char_traits<char>::int_type get() + { + ++chars_read; + current = ia->get_character(); + if (JSON_LIKELY(current != std::char_traits<char>::eof())) + { + token_string.push_back(std::char_traits<char>::to_char_type(current)); + } + return current; + } + + /// unget current character (return it again on next get) + void unget() + { + --chars_read; + if (JSON_LIKELY(current != std::char_traits<char>::eof())) + { + ia->unget_character(); + assert(token_string.size() != 0); + token_string.pop_back(); + } + } + + /// add a character to yytext + void add(int c) + { + yytext.push_back(std::char_traits<char>::to_char_type(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + std::string move_string() + { + return std::move(yytext); + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr std::size_t get_position() const noexcept + { + return chars_read; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if ('\x00' <= c and c <= '\x1F') + { + // escape control characters + std::stringstream ss; + ss << "<U+" << std::setw(4) << std::uppercase << std::setfill('0') + << std::hex << static_cast<int>(c) << ">"; + result += ss.str(); + } + else + { + // add character as is + result.push_back(c); + } + } + + return result; + } + + /// return syntax error message + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + token_type scan() + { + // read next character and ignore whitespace + do + { + get(); + } + while (current == ' ' or current == '\t' or current == '\n' or current == '\r'); + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + return scan_literal("true", 4, token_type::literal_true); + case 'f': + return scan_literal("false", 5, token_type::literal_false); + case 'n': + return scan_literal("null", 4, token_type::literal_null); + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits<char>::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + detail::input_adapter_t ia = nullptr; + + /// the current character + std::char_traits<char>::int_type current = std::char_traits<char>::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// raw input token string (for error messages) + std::vector<char> token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + std::string yytext {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char decimal_point_char = '.'; +}; + +/*! +@brief syntax analysis + +This class implements a recursive decent parser. +*/ +template<typename BasicJsonType> +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using lexer_t = lexer<BasicJsonType>; + using token_type = typename lexer_t::token_type; + + public: + enum class parse_event_t : uint8_t + { + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value + }; + + using parser_callback_t = + std::function<bool(int depth, parse_event_t event, BasicJsonType& parsed)>; + + /// a parser reading from an input adapter + explicit parser(detail::input_adapter_t adapter, + const parser_callback_t cb = nullptr, + const bool allow_exceptions_ = true) + : callback(cb), m_lexer(adapter), allow_exceptions(allow_exceptions_) + {} + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + // read first token + get_token(); + + parse_internal(true, result); + result.assert_invariant(); + + // in strict mode, input must be completely read + if (strict) + { + get_token(); + expect(token_type::end_of_input); + } + + // in case of an error, return discarded value + if (errored) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + // read first token + get_token(); + + if (not accept_internal()) + { + return false; + } + + // strict => last token must be EOF + return not strict or (get_token() == token_type::end_of_input); + } + + private: + /*! + @brief the actual parser + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse_internal(bool keep, BasicJsonType& result) + { + // never parse after a parse error was detected + assert(not errored); + + // start with a discarded value + if (not result.is_discarded()) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + + switch (last_token) + { + case token_type::begin_object: + { + if (keep) + { + if (callback) + { + keep = callback(depth++, parse_event_t::object_start, result); + } + + if (not callback or keep) + { + // explicitly set result to object to cope with {} + result.m_type = value_t::object; + result.m_value = value_t::object; + } + } + + // read next token + get_token(); + + // closing } -> we are done + if (last_token == token_type::end_object) + { + if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + // parse values + std::string key; + BasicJsonType value; + while (true) + { + // store key + if (not expect(token_type::value_string)) + { + return; + } + key = m_lexer.move_string(); + + bool keep_tag = false; + if (keep) + { + if (callback) + { + BasicJsonType k(key); + keep_tag = callback(depth, parse_event_t::key, k); + } + else + { + keep_tag = true; + } + } + + // parse separator (:) + get_token(); + if (not expect(token_type::name_separator)) + { + return; + } + + // parse and add value + get_token(); + value.m_value.destroy(value.m_type); + value.m_type = value_t::discarded; + parse_internal(keep, value); + + if (JSON_UNLIKELY(errored)) + { + return; + } + + if (keep and keep_tag and not value.is_discarded()) + { + result.m_value.object->emplace(std::move(key), std::move(value)); + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing } + if (not expect(token_type::end_object)) + { + return; + } + break; + } + + if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + case token_type::begin_array: + { + if (keep) + { + if (callback) + { + keep = callback(depth++, parse_event_t::array_start, result); + } + + if (not callback or keep) + { + // explicitly set result to array to cope with [] + result.m_type = value_t::array; + result.m_value = value_t::array; + } + } + + // read next token + get_token(); + + // closing ] -> we are done + if (last_token == token_type::end_array) + { + if (callback and not callback(--depth, parse_event_t::array_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + // parse values + BasicJsonType value; + while (true) + { + // parse value + value.m_value.destroy(value.m_type); + value.m_type = value_t::discarded; + parse_internal(keep, value); + + if (JSON_UNLIKELY(errored)) + { + return; + } + + if (keep and not value.is_discarded()) + { + result.m_value.array->push_back(std::move(value)); + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing ] + if (not expect(token_type::end_array)) + { + return; + } + break; + } + + if (keep and callback and not callback(--depth, parse_event_t::array_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + case token_type::literal_null: + { + result.m_type = value_t::null; + break; + } + + case token_type::value_string: + { + result.m_type = value_t::string; + result.m_value = m_lexer.move_string(); + break; + } + + case token_type::literal_true: + { + result.m_type = value_t::boolean; + result.m_value = true; + break; + } + + case token_type::literal_false: + { + result.m_type = value_t::boolean; + result.m_value = false; + break; + } + + case token_type::value_unsigned: + { + result.m_type = value_t::number_unsigned; + result.m_value = m_lexer.get_number_unsigned(); + break; + } + + case token_type::value_integer: + { + result.m_type = value_t::number_integer; + result.m_value = m_lexer.get_number_integer(); + break; + } + + case token_type::value_float: + { + result.m_type = value_t::number_float; + result.m_value = m_lexer.get_number_float(); + + // throw in case of infinity or NAN + if (JSON_UNLIKELY(not std::isfinite(result.m_value.number_float))) + { + if (allow_exceptions) + { + JSON_THROW(out_of_range::create(406, "number overflow parsing '" + + m_lexer.get_token_string() + "'")); + } + expect(token_type::uninitialized); + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + if (not expect(token_type::uninitialized)) + { + return; + } + break; // LCOV_EXCL_LINE + } + + default: + { + // the last token was unexpected; we expected a value + if (not expect(token_type::literal_or_value)) + { + return; + } + break; // LCOV_EXCL_LINE + } + } + + if (keep and callback and not callback(depth, parse_event_t::value, result)) + { + result.m_type = value_t::discarded; + } + } + + /*! + @brief the actual acceptor + + @invariant 1. The last token is not yet processed. Therefore, the caller + of this function must make sure a token has been read. + 2. When this function returns, the last token is processed. + That is, the last read character was already considered. + + This invariant makes sure that no token needs to be "unput". + */ + bool accept_internal() + { + switch (last_token) + { + case token_type::begin_object: + { + // read next token + get_token(); + + // closing } -> we are done + if (last_token == token_type::end_object) + { + return true; + } + + // parse values + while (true) + { + // parse key + if (last_token != token_type::value_string) + { + return false; + } + + // parse separator (:) + get_token(); + if (last_token != token_type::name_separator) + { + return false; + } + + // parse value + get_token(); + if (not accept_internal()) + { + return false; + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing } + return (last_token == token_type::end_object); + } + } + + case token_type::begin_array: + { + // read next token + get_token(); + + // closing ] -> we are done + if (last_token == token_type::end_array) + { + return true; + } + + // parse values + while (true) + { + // parse value + if (not accept_internal()) + { + return false; + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing ] + return (last_token == token_type::end_array); + } + } + + case token_type::value_float: + { + // reject infinity or NAN + return std::isfinite(m_lexer.get_number_float()); + } + + case token_type::literal_false: + case token_type::literal_null: + case token_type::literal_true: + case token_type::value_integer: + case token_type::value_string: + case token_type::value_unsigned: + return true; + + default: // the last token was unexpected + return false; + } + } + + /// get next token from lexer + token_type get_token() + { + return (last_token = m_lexer.scan()); + } + + /*! + @throw parse_error.101 if expected token did not occur + */ + bool expect(token_type t) + { + if (JSON_UNLIKELY(t != last_token)) + { + errored = true; + expected = t; + if (allow_exceptions) + { + throw_exception(); + } + else + { + return false; + } + } + + return true; + } + + [[noreturn]] void throw_exception() const + { + std::string error_msg = "syntax error - "; + if (last_token == token_type::parse_error) + { + error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" + + m_lexer.get_token_string() + "'"; + } + else + { + error_msg += "unexpected " + std::string(lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += "; expected " + std::string(lexer_t::token_type_name(expected)); + } + + JSON_THROW(parse_error::create(101, m_lexer.get_position(), error_msg)); + } + + private: + /// current level of recursion + int depth = 0; + /// callback function + const parser_callback_t callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether a syntax error occurred + bool errored = false; + /// possible reason for the syntax error + token_type expected = token_type::uninitialized; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +/////////////// +// iterators // +/////////////// + +/*! +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + public: + using difference_type = std::ptrdiff_t; + + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type i) + { + auto result = *this; + result += i; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + friend std::ostream& operator<<(std::ostream& os, primitive_iterator_t it) + { + return os << it.m_it; + } + + primitive_iterator_t& operator++() + { + ++m_it; + return *this; + } + + primitive_iterator_t const operator++(int) + { + auto result = *this; + m_it++; + return result; + } + + primitive_iterator_t& operator--() + { + --m_it; + return *this; + } + + primitive_iterator_t const operator--(int) + { + auto result = *this; + m_it--; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) + { + m_it -= n; + return *this; + } + + private: + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); +}; + +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template<typename BasicJsonType> struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; + +template<typename IteratorType> class iteration_proxy; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class + +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. + +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](http://en.cppreference.com/w/cpp/concept/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). + +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template<typename BasicJsonType> +class iter_impl +{ + /// allow basic_json to access private members + friend iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>; + friend BasicJsonType; + friend iteration_proxy<iter_impl>; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value, + "iter_impl only accepts (const) basic_json"); + + public: + + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + /// default constructor + iter_impl() = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) {} + + /*! + @brief converting assignment + @param[in,out] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + private: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->end(); + break; + } + + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return &*m_it.array_iterator; + } + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator++(int) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator--(int) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator==(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator!=(const iter_impl& other) const + { + return not operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators")); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return not other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return not operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return not operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators")); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + typename object_t::key_type key() const + { + assert(m_object != nullptr); + + if (JSON_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators")); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + private: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it = {}; +}; + +/// proxy class for the iterator_wrapper functions +template<typename IteratorType> class iteration_proxy +{ + private: + /// helper class for iteration + class iteration_proxy_internal + { + private: + /// the iterator + IteratorType anchor; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + + public: + explicit iteration_proxy_internal(IteratorType it) noexcept : anchor(it) {} + + /// dereference operator (needed for range-based for) + iteration_proxy_internal& operator*() + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_internal& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_internal& o) const noexcept + { + return anchor != o.anchor; + } + + /// return key of the iterator + std::string key() const + { + assert(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + return std::to_string(array_index); + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + default: + return ""; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } + }; + + /// the container to iterate + typename IteratorType::reference container; + + public: + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) + : container(cont) {} + + /// return iterator begin (needed for range-based for) + iteration_proxy_internal begin() noexcept + { + return iteration_proxy_internal(container.begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_internal end() noexcept + { + return iteration_proxy_internal(container.end()); + } +}; + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](http://en.cppreference.com/w/cpp/concept/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](http://en.cppreference.com/w/cpp/concept/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template<typename Base> +class json_reverse_iterator : public std::reverse_iterator<Base> +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator<Base>; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator const operator++(int) + { + return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator const operator--(int) + { + return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval<Base>().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; + +///////////////////// +// output adapters // +///////////////////// + +/// abstract output adapter interface +template<typename CharType> struct output_adapter_protocol +{ + virtual void write_character(CharType c) = 0; + virtual void write_characters(const CharType* s, std::size_t length) = 0; + virtual ~output_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +template<typename CharType> +using output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>; + +/// output adapter for byte vectors +template<typename CharType> +class output_vector_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_vector_adapter(std::vector<CharType>& vec) : v(vec) {} + + void write_character(CharType c) override + { + v.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + std::copy(s, s + length, std::back_inserter(v)); + } + + private: + std::vector<CharType>& v; +}; + +/// output adapter for output streams +template<typename CharType> +class output_stream_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_stream_adapter(std::basic_ostream<CharType>& s) : stream(s) {} + + void write_character(CharType c) override + { + stream.put(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + stream.write(s, static_cast<std::streamsize>(length)); + } + + private: + std::basic_ostream<CharType>& stream; +}; + +/// output adapter for basic_string +template<typename CharType> +class output_string_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_string_adapter(std::basic_string<CharType>& s) : str(s) {} + + void write_character(CharType c) override + { + str.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + str.append(s, length); + } + + private: + std::basic_string<CharType>& str; +}; + +template<typename CharType> +class output_adapter +{ + public: + output_adapter(std::vector<CharType>& vec) + : oa(std::make_shared<output_vector_adapter<CharType>>(vec)) {} + + output_adapter(std::basic_ostream<CharType>& s) + : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {} + + output_adapter(std::basic_string<CharType>& s) + : oa(std::make_shared<output_string_adapter<CharType>>(s)) {} + + operator output_adapter_t<CharType>() + { + return oa; + } + + private: + output_adapter_t<CharType> oa = nullptr; +}; + +////////////////////////////// +// binary reader and writer // +////////////////////////////// + +/*! +@brief deserialization of CBOR and MessagePack values +*/ +template<typename BasicJsonType> +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(input_adapter_t adapter) : ia(std::move(adapter)) + { + assert(ia); + } + + /*! + @brief create a JSON value from CBOR input + + @param[in] strict whether to expect the input to be consumed completed + @return JSON value created from CBOR input + + @throw parse_error.110 if input ended unexpectedly or the end of file was + not reached when @a strict was set to true + @throw parse_error.112 if unsupported byte was read + */ + BasicJsonType parse_cbor(const bool strict) + { + const auto res = parse_cbor_internal(); + if (strict) + { + get(); + check_eof(true); + } + return res; + } + + /*! + @brief create a JSON value from MessagePack input + + @param[in] strict whether to expect the input to be consumed completed + @return JSON value created from MessagePack input + + @throw parse_error.110 if input ended unexpectedly or the end of file was + not reached when @a strict was set to true + @throw parse_error.112 if unsupported byte was read + */ + BasicJsonType parse_msgpack(const bool strict) + { + const auto res = parse_msgpack_internal(); + if (strict) + { + get(); + check_eof(true); + } + return res; + } + + /*! + @brief determine system byte order + + @return true if and only if system's byte order is little endian + + @note from http://stackoverflow.com/a/1001328/266378 + */ + static constexpr bool little_endianess(int num = 1) noexcept + { + return (*reinterpret_cast<char*>(&num) == 1); + } + + private: + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + */ + BasicJsonType parse_cbor_internal(const bool get_char = true) + { + switch (get_char ? get() : current) + { + // EOF + case std::char_traits<char>::eof(): + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return static_cast<number_unsigned_t>(current); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + return get_number<uint8_t>(); + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + return get_number<uint16_t>(); + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + return get_number<uint32_t>(); + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + return get_number<uint64_t>(); + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return static_cast<int8_t>(0x20 - 1 - current); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + // must be uint8_t ! + return static_cast<number_integer_t>(-1) - get_number<uint8_t>(); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + return static_cast<number_integer_t>(-1) - get_number<uint16_t>(); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + return static_cast<number_integer_t>(-1) - get_number<uint32_t>(); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + return static_cast<number_integer_t>(-1) - + static_cast<number_integer_t>(get_number<uint64_t>()); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + return get_cbor_string(); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + { + return get_cbor_array(current & 0x1F); + } + + case 0x98: // array (one-byte uint8_t for n follows) + { + return get_cbor_array(get_number<uint8_t>()); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + return get_cbor_array(get_number<uint16_t>()); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + return get_cbor_array(get_number<uint32_t>()); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + return get_cbor_array(get_number<uint64_t>()); + } + + case 0x9F: // array (indefinite length) + { + BasicJsonType result = value_t::array; + while (get() != 0xFF) + { + result.push_back(parse_cbor_internal(false)); + } + return result; + } + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + { + return get_cbor_object(current & 0x1F); + } + + case 0xB8: // map (one-byte uint8_t for n follows) + { + return get_cbor_object(get_number<uint8_t>()); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + return get_cbor_object(get_number<uint16_t>()); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + return get_cbor_object(get_number<uint32_t>()); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + return get_cbor_object(get_number<uint64_t>()); + } + + case 0xBF: // map (indefinite length) + { + BasicJsonType result = value_t::object; + while (get() != 0xFF) + { + auto key = get_cbor_string(); + result[key] = parse_cbor_internal(); + } + return result; + } + + case 0xF4: // false + { + return false; + } + + case 0xF5: // true + { + return true; + } + + case 0xF6: // null + { + return value_t::null; + } + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const int byte1 = get(); + check_eof(); + const int byte2 = get(); + check_eof(); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const int half = (byte1 << 8) + byte2; + const int exp = (half >> 10) & 0x1F; + const int mant = half & 0x3FF; + double val; + if (exp == 0) + { + val = std::ldexp(mant, -24); + } + else if (exp != 31) + { + val = std::ldexp(mant + 1024, exp - 25); + } + else + { + val = (mant == 0) ? std::numeric_limits<double>::infinity() + : std::numeric_limits<double>::quiet_NaN(); + } + return (half & 0x8000) != 0 ? -val : val; + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + return get_number<float>(); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + return get_number<double>(); + } + + default: // anything else (0xFF is handled inside the other types) + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(112, chars_read, "error reading CBOR; last byte: 0x" + ss.str())); + } + } + } + + BasicJsonType parse_msgpack_internal() + { + switch (get()) + { + // EOF + case std::char_traits<char>::eof(): + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return static_cast<number_unsigned_t>(current); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + { + return get_msgpack_object(current & 0x0F); + } + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + { + return get_msgpack_array(current & 0x0F); + } + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + return get_msgpack_string(); + + case 0xC0: // nil + return value_t::null; + + case 0xC2: // false + return false; + + case 0xC3: // true + return true; + + case 0xCA: // float 32 + return get_number<float>(); + + case 0xCB: // float 64 + return get_number<double>(); + + case 0xCC: // uint 8 + return get_number<uint8_t>(); + + case 0xCD: // uint 16 + return get_number<uint16_t>(); + + case 0xCE: // uint 32 + return get_number<uint32_t>(); + + case 0xCF: // uint 64 + return get_number<uint64_t>(); + + case 0xD0: // int 8 + return get_number<int8_t>(); + + case 0xD1: // int 16 + return get_number<int16_t>(); + + case 0xD2: // int 32 + return get_number<int32_t>(); + + case 0xD3: // int 64 + return get_number<int64_t>(); + + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + return get_msgpack_string(); + + case 0xDC: // array 16 + { + return get_msgpack_array(get_number<uint16_t>()); + } + + case 0xDD: // array 32 + { + return get_msgpack_array(get_number<uint32_t>()); + } + + case 0xDE: // map 16 + { + return get_msgpack_object(get_number<uint16_t>()); + } + + case 0xDF: // map 32 + { + return get_msgpack_object(get_number<uint32_t>()); + } + + // positive fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return static_cast<int8_t>(current); + + default: // anything else + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(112, chars_read, + "error reading MessagePack; last byte: 0x" + ss.str())); + } + } + } + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `std::char_traits<char>::eof()` in that case. + + @return character read from the input + */ + int get() + { + ++chars_read; + return (current = ia->get_character()); + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + + @return number of type @a NumberType + + @note This function needs to respect the system's endianess, because + bytes in CBOR and MessagePack are stored in network order (big + endian) and therefore need reordering on little endian systems. + + @throw parse_error.110 if input has less than `sizeof(NumberType)` bytes + */ + template<typename NumberType> NumberType get_number() + { + // step 1: read input into array with system's byte order + std::array<uint8_t, sizeof(NumberType)> vec; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + check_eof(); + + // reverse byte order prior to conversion if necessary + if (is_little_endian) + { + vec[sizeof(NumberType) - i - 1] = static_cast<uint8_t>(current); + } + else + { + vec[i] = static_cast<uint8_t>(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + NumberType result; + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return result; + } + + /*! + @brief create a string by reading characters from the input + + @param[in] len number of bytes to read + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref check_eof() detects the end of + the input before we run out of string memory. + + @return string created by reading @a len bytes + + @throw parse_error.110 if input has less than @a len bytes + */ + template<typename NumberType> + std::string get_string(const NumberType len) + { + std::string result; + std::generate_n(std::back_inserter(result), len, [this]() + { + get(); + check_eof(); + return static_cast<char>(current); + }); + return result; + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @return string + + @throw parse_error.110 if input ended + @throw parse_error.113 if an unexpected byte is read + */ + std::string get_cbor_string() + { + check_eof(); + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(current & 0x1F); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + return get_string(get_number<uint8_t>()); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + return get_string(get_number<uint16_t>()); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + return get_string(get_number<uint32_t>()); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + return get_string(get_number<uint64_t>()); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + std::string result; + while (get() != 0xFF) + { + check_eof(); + result.push_back(static_cast<char>(current)); + } + return result; + } + + default: + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(113, chars_read, "expected a CBOR string; last byte: 0x" + ss.str())); + } + } + } + + template<typename NumberType> + BasicJsonType get_cbor_array(const NumberType len) + { + BasicJsonType result = value_t::array; + std::generate_n(std::back_inserter(*result.m_value.array), len, [this]() + { + return parse_cbor_internal(); + }); + return result; + } + + template<typename NumberType> + BasicJsonType get_cbor_object(const NumberType len) + { + BasicJsonType result = value_t::object; + std::generate_n(std::inserter(*result.m_value.object, + result.m_value.object->end()), + len, [this]() + { + get(); + auto key = get_cbor_string(); + auto val = parse_cbor_internal(); + return std::make_pair(std::move(key), std::move(val)); + }); + return result; + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @return string + + @throw parse_error.110 if input ended + @throw parse_error.113 if an unexpected byte is read + */ + std::string get_msgpack_string() + { + check_eof(); + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(current & 0x1F); + } + + case 0xD9: // str 8 + { + return get_string(get_number<uint8_t>()); + } + + case 0xDA: // str 16 + { + return get_string(get_number<uint16_t>()); + } + + case 0xDB: // str 32 + { + return get_string(get_number<uint32_t>()); + } + + default: + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(113, chars_read, + "expected a MessagePack string; last byte: 0x" + ss.str())); + } + } + } + + template<typename NumberType> + BasicJsonType get_msgpack_array(const NumberType len) + { + BasicJsonType result = value_t::array; + std::generate_n(std::back_inserter(*result.m_value.array), len, [this]() + { + return parse_msgpack_internal(); + }); + return result; + } + + template<typename NumberType> + BasicJsonType get_msgpack_object(const NumberType len) + { + BasicJsonType result = value_t::object; + std::generate_n(std::inserter(*result.m_value.object, + result.m_value.object->end()), + len, [this]() + { + get(); + auto key = get_msgpack_string(); + auto val = parse_msgpack_internal(); + return std::make_pair(std::move(key), std::move(val)); + }); + return result; + } + + /*! + @brief check if input ended + @throw parse_error.110 if input ended + */ + void check_eof(const bool expect_eof = false) const + { + if (expect_eof) + { + if (JSON_UNLIKELY(current != std::char_traits<char>::eof())) + { + JSON_THROW(parse_error::create(110, chars_read, "expected end of input")); + } + } + else + { + if (JSON_UNLIKELY(current == std::char_traits<char>::eof())) + { + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + } + } + } + + private: + /// input adapter + input_adapter_t ia = nullptr; + + /// the current character + int current = std::char_traits<char>::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianess + const bool is_little_endian = little_endianess(); +}; + +/*! +@brief serialization to CBOR and MessagePack values +*/ +template<typename BasicJsonType, typename CharType> +class binary_writer +{ + public: + /*! + @brief create a binary writer + + @param[in] adapter output adapter to write to + */ + explicit binary_writer(output_adapter_t<CharType> adapter) : oa(adapter) + { + assert(oa); + } + + /*! + @brief[in] j JSON value to serialize + */ + void write_cbor(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: + { + oa->write_character(static_cast<CharType>(0xF6)); + break; + } + + case value_t::boolean: + { + oa->write_character(j.m_value.boolean + ? static_cast<CharType>(0xF5) + : static_cast<CharType>(0xF4)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // CBOR does not differentiate between positive signed + // integers and unsigned integers. Therefore, we used the + // code from the value_t::number_unsigned case here. + if (j.m_value.number_integer <= 0x17) + { + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<uint8_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x18)); + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<uint16_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x19)); + write_number(static_cast<uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<uint32_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x1A)); + write_number(static_cast<uint32_t>(j.m_value.number_integer)); + } + else + { + oa->write_character(static_cast<CharType>(0x1B)); + write_number(static_cast<uint64_t>(j.m_value.number_integer)); + } + } + else + { + // The conversions below encode the sign in the first + // byte, and the value is converted to a positive number. + const auto positive_number = -1 - j.m_value.number_integer; + if (j.m_value.number_integer >= -24) + { + write_number(static_cast<uint8_t>(0x20 + positive_number)); + } + else if (positive_number <= (std::numeric_limits<uint8_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x38)); + write_number(static_cast<uint8_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<uint16_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x39)); + write_number(static_cast<uint16_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<uint32_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x3A)); + write_number(static_cast<uint32_t>(positive_number)); + } + else + { + oa->write_character(static_cast<CharType>(0x3B)); + write_number(static_cast<uint64_t>(positive_number)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= 0x17) + { + write_number(static_cast<uint8_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x18)); + write_number(static_cast<uint8_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint16_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x19)); + write_number(static_cast<uint16_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint32_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x1A)); + write_number(static_cast<uint32_t>(j.m_value.number_unsigned)); + } + else + { + oa->write_character(static_cast<CharType>(0x1B)); + write_number(static_cast<uint64_t>(j.m_value.number_unsigned)); + } + break; + } + + case value_t::number_float: // Double-Precision Float + { + oa->write_character(static_cast<CharType>(0xFB)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 0x17) + { + write_number(static_cast<uint8_t>(0x60 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast<CharType>(0x78)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast<CharType>(0x79)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x7A)); + write_number(static_cast<uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x7B)); + write_number(static_cast<uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 0x17) + { + write_number(static_cast<uint8_t>(0x80 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast<CharType>(0x98)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast<CharType>(0x99)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x9A)); + write_number(static_cast<uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x9B)); + write_number(static_cast<uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_cbor(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 0x17) + { + write_number(static_cast<uint8_t>(0xA0 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast<CharType>(0xB8)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast<CharType>(0xB9)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0xBA)); + write_number(static_cast<uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0xBB)); + write_number(static_cast<uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_cbor(el.first); + write_cbor(el.second); + } + break; + } + + default: + break; + } + } + + /*! + @brief[in] j JSON value to serialize + */ + void write_msgpack(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: // nil + { + oa->write_character(static_cast<CharType>(0xC0)); + break; + } + + case value_t::boolean: // true and false + { + oa->write_character(j.m_value.boolean + ? static_cast<CharType>(0xC3) + : static_cast<CharType>(0xC2)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // MessagePack does not differentiate between positive + // signed integers and unsigned integers. Therefore, we used + // the code from the value_t::number_unsigned case here. + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)()) + { + // uint 8 + oa->write_character(static_cast<CharType>(0xCC)); + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint16_t>::max)()) + { + // uint 16 + oa->write_character(static_cast<CharType>(0xCD)); + write_number(static_cast<uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint32_t>::max)()) + { + // uint 32 + oa->write_character(static_cast<CharType>(0xCE)); + write_number(static_cast<uint32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint64_t>::max)()) + { + // uint 64 + oa->write_character(static_cast<CharType>(0xCF)); + write_number(static_cast<uint64_t>(j.m_value.number_integer)); + } + } + else + { + if (j.m_value.number_integer >= -32) + { + // negative fixnum + write_number(static_cast<int8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int8_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int8_t>::max)()) + { + // int 8 + oa->write_character(static_cast<CharType>(0xD0)); + write_number(static_cast<int8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int16_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int16_t>::max)()) + { + // int 16 + oa->write_character(static_cast<CharType>(0xD1)); + write_number(static_cast<int16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int32_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int32_t>::max)()) + { + // int 32 + oa->write_character(static_cast<CharType>(0xD2)); + write_number(static_cast<int32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int64_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int64_t>::max)()) + { + // int 64 + oa->write_character(static_cast<CharType>(0xD3)); + write_number(static_cast<int64_t>(j.m_value.number_integer)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)()) + { + // uint 8 + oa->write_character(static_cast<CharType>(0xCC)); + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint16_t>::max)()) + { + // uint 16 + oa->write_character(static_cast<CharType>(0xCD)); + write_number(static_cast<uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint32_t>::max)()) + { + // uint 32 + oa->write_character(static_cast<CharType>(0xCE)); + write_number(static_cast<uint32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint64_t>::max)()) + { + // uint 64 + oa->write_character(static_cast<CharType>(0xCF)); + write_number(static_cast<uint64_t>(j.m_value.number_integer)); + } + break; + } + + case value_t::number_float: // float 64 + { + oa->write_character(static_cast<CharType>(0xCB)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 31) + { + // fixstr + write_number(static_cast<uint8_t>(0xA0 | N)); + } + else if (N <= 255) + { + // str 8 + oa->write_character(static_cast<CharType>(0xD9)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 65535) + { + // str 16 + oa->write_character(static_cast<CharType>(0xDA)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 4294967295) + { + // str 32 + oa->write_character(static_cast<CharType>(0xDB)); + write_number(static_cast<uint32_t>(N)); + } + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 15) + { + // fixarray + write_number(static_cast<uint8_t>(0x90 | N)); + } + else if (N <= 0xFFFF) + { + // array 16 + oa->write_character(static_cast<CharType>(0xDC)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + // array 32 + oa->write_character(static_cast<CharType>(0xDD)); + write_number(static_cast<uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_msgpack(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 15) + { + // fixmap + write_number(static_cast<uint8_t>(0x80 | (N & 0xF))); + } + else if (N <= 65535) + { + // map 16 + oa->write_character(static_cast<CharType>(0xDE)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 4294967295) + { + // map 32 + oa->write_character(static_cast<CharType>(0xDF)); + write_number(static_cast<uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_msgpack(el.first); + write_msgpack(el.second); + } + break; + } + + default: + break; + } + } + + private: + /* + @brief write a number to output input + + @param[in] n number of type @a NumberType + @tparam NumberType the type of the number + + @note This function needs to respect the system's endianess, because bytes + in CBOR and MessagePack are stored in network order (big endian) and + therefore need reordering on little endian systems. + */ + template<typename NumberType> void write_number(NumberType n) + { + // step 1: write number to array of length NumberType + std::array<CharType, sizeof(NumberType)> vec; + std::memcpy(vec.data(), &n, sizeof(NumberType)); + + // step 2: write array to output (with possible reordering) + if (is_little_endian) + { + // reverse byte order prior to conversion if necessary + std::reverse(vec.begin(), vec.end()); + } + + oa->write_characters(vec.data(), sizeof(NumberType)); + } + + private: + /// whether we can assume little endianess + const bool is_little_endian = binary_reader<BasicJsonType>::little_endianess(); + + /// the output + output_adapter_t<CharType> oa = nullptr; +}; + +/////////////////// +// serialization // +/////////////////// + +template<typename BasicJsonType> +class serializer +{ + using string_t = typename BasicJsonType::string_t; + using number_float_t = typename BasicJsonType::number_float_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + public: + /*! + @param[in] s output stream to serialize to + @param[in] ichar indentation character to use + */ + serializer(output_adapter_t<char> s, const char ichar) + : o(std::move(s)), loc(std::localeconv()), + thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep)), + decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point)), + indent_char(ichar), indent_string(512, indent_char) {} + + // delete because of pointer members + serializer(const serializer&) = delete; + serializer& operator=(const serializer&) = delete; + + /*! + @brief internal implementation of the serialization function + + This function is called by the public member function dump and organizes + the serialization internally. The indentation level is propagated as + additional parameter. In case of arrays and objects, the function is + called recursively. + + - strings and object keys are escaped using `escape_string()` + - integer numbers are converted implicitly via `operator<<` + - floating-point numbers are converted to a string using `"%g"` format + + @param[in] val value to serialize + @param[in] pretty_print whether the output shall be pretty-printed + @param[in] indent_step the indent level + @param[in] current_indent the current indent level (only used internally) + */ + void dump(const BasicJsonType& val, const bool pretty_print, + const bool ensure_ascii, + const unsigned int indent_step, + const unsigned int current_indent = 0) + { + switch (val.m_type) + { + case value_t::object: + { + if (val.m_value.object->empty()) + { + o->write_characters("{}", 2); + return; + } + + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_character('{'); + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + + o->write_character('}'); + } + + return; + } + + case value_t::array: + { + if (val.m_value.array->empty()) + { + o->write_characters("[]", 2); + return; + } + + if (pretty_print) + { + o->write_characters("[\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + dump(*i, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(not val.m_value.array->empty()); + o->write_characters(indent_string.c_str(), new_indent); + dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character(']'); + } + else + { + o->write_character('['); + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + dump(*i, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(not val.m_value.array->empty()); + dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); + + o->write_character(']'); + } + + return; + } + + case value_t::string: + { + o->write_character('\"'); + dump_escaped(*val.m_value.string, ensure_ascii); + o->write_character('\"'); + return; + } + + case value_t::boolean: + { + if (val.m_value.boolean) + { + o->write_characters("true", 4); + } + else + { + o->write_characters("false", 5); + } + return; + } + + case value_t::number_integer: + { + dump_integer(val.m_value.number_integer); + return; + } + + case value_t::number_unsigned: + { + dump_integer(val.m_value.number_unsigned); + return; + } + + case value_t::number_float: + { + dump_float(val.m_value.number_float); + return; + } + + case value_t::discarded: + { + o->write_characters("<discarded>", 11); + return; + } + + case value_t::null: + { + o->write_characters("null", 4); + return; + } + } + } + + private: + /*! + @brief returns the number of expected bytes following in UTF-8 string + + @param[in] u the first byte of a UTF-8 string + @return the number of expected bytes following + */ + static constexpr std::size_t bytes_following(const uint8_t u) + { + return ((u <= 127) ? 0 + : ((192 <= u and u <= 223) ? 1 + : ((224 <= u and u <= 239) ? 2 + : ((240 <= u and u <= 247) ? 3 : std::string::npos)))); + } + + /*! + @brief calculates the extra space to escape a JSON string + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + @return the number of characters required to escape string @a s + + @complexity Linear in the length of string @a s. + */ + static std::size_t extra_space(const string_t& s, + const bool ensure_ascii) noexcept + { + std::size_t res = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + switch (s[i]) + { + // control characters that can be escaped with a backslash + case '"': + case '\\': + case '\b': + case '\f': + case '\n': + case '\r': + case '\t': + { + // from c (1 byte) to \x (2 bytes) + res += 1; + break; + } + + // control characters that need \uxxxx escaping + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x0B: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + // from c (1 byte) to \uxxxx (6 bytes) + res += 5; + break; + } + + default: + { + if (ensure_ascii and (s[i] & 0x80 or s[i] == 0x7F)) + { + const auto bytes = bytes_following(static_cast<uint8_t>(s[i])); + // invalid characters will be detected by throw_if_invalid_utf8 + assert (bytes != std::string::npos); + + if (bytes == 3) + { + // codepoints that need 4 bytes (i.e., 3 additional + // bytes) in UTF-8 need a surrogate pair when \u + // escaping is used: from 4 bytes to \uxxxx\uxxxx + // (12 bytes) + res += (12 - bytes - 1); + } + else + { + // from x bytes to \uxxxx (6 bytes) + res += (6 - bytes - 1); + } + + // skip the additional bytes + i += bytes; + } + break; + } + } + } + + return res; + } + + static void escape_codepoint(int codepoint, string_t& result, std::size_t& pos) + { + // expecting a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // the last written character was the backslash before the 'u' + assert(result[pos] == '\\'); + + // write the 'u' + result[++pos] = 'u'; + + // convert a number 0..15 to its hex representation (0..f) + static const std::array<char, 16> hexify = + { + { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' + } + }; + + if (codepoint < 0x10000) + { + // codepoints U+0000..U+FFFF can be represented as \uxxxx. + result[++pos] = hexify[(codepoint >> 12) & 0x0F]; + result[++pos] = hexify[(codepoint >> 8) & 0x0F]; + result[++pos] = hexify[(codepoint >> 4) & 0x0F]; + result[++pos] = hexify[codepoint & 0x0F]; + } + else + { + // codepoints U+10000..U+10FFFF need a surrogate pair to be + // represented as \uxxxx\uxxxx. + // http://www.unicode.org/faq/utf_bom.html#utf16-4 + codepoint -= 0x10000; + const int high_surrogate = 0xD800 | ((codepoint >> 10) & 0x3FF); + const int low_surrogate = 0xDC00 | (codepoint & 0x3FF); + result[++pos] = hexify[(high_surrogate >> 12) & 0x0F]; + result[++pos] = hexify[(high_surrogate >> 8) & 0x0F]; + result[++pos] = hexify[(high_surrogate >> 4) & 0x0F]; + result[++pos] = hexify[high_surrogate & 0x0F]; + ++pos; // backslash is already in output + result[++pos] = 'u'; + result[++pos] = hexify[(low_surrogate >> 12) & 0x0F]; + result[++pos] = hexify[(low_surrogate >> 8) & 0x0F]; + result[++pos] = hexify[(low_surrogate >> 4) & 0x0F]; + result[++pos] = hexify[low_surrogate & 0x0F]; + } + + ++pos; + } + + /*! + @brief dump escaped string + + Escape a string by replacing certain special characters by a sequence of an + escape character (backslash) and another character and other control + characters by a sequence of "\u" followed by a four-digit hex + representation. The escaped string is written to output stream @a o. + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + + @complexity Linear in the length of string @a s. + */ + void dump_escaped(const string_t& s, const bool ensure_ascii) const + { + throw_if_invalid_utf8(s); + + const auto space = extra_space(s, ensure_ascii); + if (space == 0) + { + o->write_characters(s.c_str(), s.size()); + return; + } + + // create a result string of necessary size + string_t result(s.size() + space, '\\'); + std::size_t pos = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + switch (s[i]) + { + case '"': // quotation mark (0x22) + { + result[pos + 1] = '"'; + pos += 2; + break; + } + + case '\\': // reverse solidus (0x5C) + { + // nothing to change + pos += 2; + break; + } + + case '\b': // backspace (0x08) + { + result[pos + 1] = 'b'; + pos += 2; + break; + } + + case '\f': // formfeed (0x0C) + { + result[pos + 1] = 'f'; + pos += 2; + break; + } + + case '\n': // newline (0x0A) + { + result[pos + 1] = 'n'; + pos += 2; + break; + } + + case '\r': // carriage return (0x0D) + { + result[pos + 1] = 'r'; + pos += 2; + break; + } + + case '\t': // horizontal tab (0x09) + { + result[pos + 1] = 't'; + pos += 2; + break; + } + + default: + { + // escape control characters (0x00..0x1F) or, if + // ensure_ascii parameter is used, non-ASCII characters + if ((0x00 <= s[i] and s[i] <= 0x1F) or + (ensure_ascii and (s[i] & 0x80 or s[i] == 0x7F))) + { + const auto bytes = bytes_following(static_cast<uint8_t>(s[i])); + // invalid characters will be detected by throw_if_invalid_utf8 + assert (bytes != std::string::npos); + + // check that the additional bytes are present + assert(i + bytes < s.size()); + + // to use \uxxxx escaping, we first need to calculate + // the codepoint from the UTF-8 bytes + int codepoint = 0; + + // bytes is unsigned type: + assert(bytes <= 3); + switch (bytes) + { + case 0: + { + codepoint = s[i] & 0xFF; + break; + } + + case 1: + { + codepoint = ((s[i] & 0x3F) << 6) + + (s[i + 1] & 0x7F); + break; + } + + case 2: + { + codepoint = ((s[i] & 0x1F) << 12) + + ((s[i + 1] & 0x7F) << 6) + + (s[i + 2] & 0x7F); + break; + } + + case 3: + { + codepoint = ((s[i] & 0xF) << 18) + + ((s[i + 1] & 0x7F) << 12) + + ((s[i + 2] & 0x7F) << 6) + + (s[i + 3] & 0x7F); + break; + } + + default: + break; // LCOV_EXCL_LINE + } + + escape_codepoint(codepoint, result, pos); + i += bytes; + } + else + { + // all other characters are added as-is + result[pos++] = s[i]; + } + break; + } + } + } + + assert(pos == result.size()); + o->write_characters(result.c_str(), result.size()); + } + + /*! + @brief dump an integer + + Dump a given integer to output stream @a o. Works internally with + @a number_buffer. + + @param[in] x integer number (signed or unsigned) to dump + @tparam NumberType either @a number_integer_t or @a number_unsigned_t + */ + template<typename NumberType, detail::enable_if_t< + std::is_same<NumberType, number_unsigned_t>::value or + std::is_same<NumberType, number_integer_t>::value, + int> = 0> + void dump_integer(NumberType x) + { + // special case for "0" + if (x == 0) + { + o->write_character('0'); + return; + } + + const bool is_negative = (x <= 0) and (x != 0); // see issue #755 + std::size_t i = 0; + + while (x != 0) + { + // spare 1 byte for '\0' + assert(i < number_buffer.size() - 1); + + const auto digit = std::labs(static_cast<long>(x % 10)); + number_buffer[i++] = static_cast<char>('0' + digit); + x /= 10; + } + + if (is_negative) + { + // make sure there is capacity for the '-' + assert(i < number_buffer.size() - 2); + number_buffer[i++] = '-'; + } + + std::reverse(number_buffer.begin(), number_buffer.begin() + i); + o->write_characters(number_buffer.data(), i); + } + + /*! + @brief dump a floating-point number + + Dump a given floating-point number to output stream @a o. Works internally + with @a number_buffer. + + @param[in] x floating-point number to dump + */ + void dump_float(number_float_t x) + { + // NaN / inf + if (not std::isfinite(x) or std::isnan(x)) + { + o->write_characters("null", 4); + return; + } + + // get number of digits for a text -> float -> text round-trip + static constexpr auto d = std::numeric_limits<number_float_t>::digits10; + + // the actual conversion + std::ptrdiff_t len = snprintf(number_buffer.data(), number_buffer.size(), "%.*g", d, x); + + // negative value indicates an error + assert(len > 0); + // check if buffer was large enough + assert(static_cast<std::size_t>(len) < number_buffer.size()); + + // erase thousands separator + if (thousands_sep != '\0') + { + const auto end = std::remove(number_buffer.begin(), + number_buffer.begin() + len, thousands_sep); + std::fill(end, number_buffer.end(), '\0'); + assert((end - number_buffer.begin()) <= len); + len = (end - number_buffer.begin()); + } + + // convert decimal point to '.' + if (decimal_point != '\0' and decimal_point != '.') + { + const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); + if (dec_pos != number_buffer.end()) + { + *dec_pos = '.'; + } + } + + o->write_characters(number_buffer.data(), static_cast<std::size_t>(len)); + + // determine if need to append ".0" + const bool value_is_int_like = + std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, + [](char c) + { + return (c == '.' or c == 'e'); + }); + + if (value_is_int_like) + { + o->write_characters(".0", 2); + } + } + + /*! + @brief check whether a string is UTF-8 encoded + + The function checks each byte of a string whether it is UTF-8 encoded. The + result of the check is stored in the @a state parameter. The function must + be called initially with state 0 (accept). State 1 means the string must + be rejected, because the current byte is not allowed. If the string is + completely processed, but the state is non-zero, the string ended + prematurely; that is, the last byte indicated more bytes should have + followed. + + @param[in,out] state the state of the decoding + @param[in] byte next byte to decode + + @note The function has been edited: a std::array is used and the code + point is not calculated. + + @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> + @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + */ + static void decode(uint8_t& state, const uint8_t byte) + { + static const std::array<uint8_t, 400> utf8d = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF + 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF + 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF + 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF + 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 + 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 + } + }; + + const uint8_t type = utf8d[byte]; + state = utf8d[256u + state * 16u + type]; + } + + /*! + @brief throw an exception if a string is not UTF-8 encoded + + @param[in] str UTF-8 string to check + @throw type_error.316 if passed string is not UTF-8 encoded + + @since version 3.0.0 + */ + static void throw_if_invalid_utf8(const std::string& str) + { + // start with state 0 (= accept) + uint8_t state = 0; + + for (size_t i = 0; i < str.size(); ++i) + { + const auto byte = static_cast<uint8_t>(str[i]); + decode(state, byte); + if (state == 1) + { + // state 1 means reject + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast<int>(byte); + JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str())); + } + } + + if (state != 0) + { + // we finish reading, but do not accept: string was incomplete + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast<int>(static_cast<uint8_t>(str.back())); + JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str())); + } + } + + private: + /// the output of the serializer + output_adapter_t<char> o = nullptr; + + /// a (hopefully) large enough character buffer + std::array<char, 64> number_buffer{{}}; + + /// the locale + const std::lconv* loc = nullptr; + /// the locale's thousand separator character + const char thousands_sep = '\0'; + /// the locale's decimal point character + const char decimal_point = '\0'; + + /// the indentation character + const char indent_char; + + /// the indentation string + string_t indent_string; +}; + +template<typename BasicJsonType> +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true) + {} + + json_ref(const value_type& value) + : value_ref(const_cast<value_type*>(&value)), is_rvalue(false) + {} + + json_ref(std::initializer_list<json_ref> init) + : owned_value(init), value_ref(&owned_value), is_rvalue(true) + {} + + template<class... Args> + json_ref(Args&& ... args) + : owned_value(std::forward<Args>(args)...), value_ref(&owned_value), is_rvalue(true) + {} + + // class should be movable only + json_ref(json_ref&&) = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + + value_type moved_or_copied() const + { + if (is_rvalue) + { + return std::move(*value_ref); + } + return *value_ref; + } + + value_type const& operator*() const + { + return *static_cast<value_type const*>(value_ref); + } + + value_type const* operator->() const + { + return static_cast<value_type const*>(value_ref); + } + + private: + mutable value_type owned_value = nullptr; + value_type* value_ref = nullptr; + const bool is_rvalue; +}; + +} // namespace detail + +/// namespace to hold default `to_json` / `from_json` functions +namespace +{ +constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value; +constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::value; +} + + +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template<typename, typename> +struct adl_serializer +{ + /*! + @brief convert a JSON value to any value type + + This function is usually called by the `get()` function of the + @ref basic_json class (either explicit or via conversion operators). + + @param[in] j JSON value to read from + @param[in,out] val value to write to + */ + template<typename BasicJsonType, typename ValueType> + static void from_json(BasicJsonType&& j, ValueType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) + { + ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); + } + + /*! + @brief convert any value type to a JSON value + + This function is usually called by the constructors of the @ref basic_json + class. + + @param[in,out] j JSON value to write to + @param[in] val value to read from + */ + template<typename BasicJsonType, typename ValueType> + static void to_json(BasicJsonType& j, ValueType&& val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward<ValueType>(val)))) + { + ::nlohmann::to_json(j, std::forward<ValueType>(val)); + } +}; + +/*! +@brief JSON Pointer + +A JSON pointer defines a string syntax for identifying a specific value +within a JSON document. It can be used with functions `at` and +`operator[]`. Furthermore, JSON pointers are the base for JSON patches. + +@sa [RFC 6901](https://tools.ietf.org/html/rfc6901) + +@since version 2.0.0 +*/ +class json_pointer +{ + /// allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + public: + /*! + @brief create JSON pointer + + Create a JSON pointer according to the syntax described in + [Section 3 of RFC6901](https://tools.ietf.org/html/rfc6901#section-3). + + @param[in] s string representing the JSON pointer; if omitted, the empty + string is assumed which references the whole JSON value + + @throw parse_error.107 if the given JSON pointer @a s is nonempty and + does not begin with a slash (`/`); see example below + + @throw parse_error.108 if a tilde (`~`) in the given JSON pointer @a s + is not followed by `0` (representing `~`) or `1` (representing `/`); + see example below + + @liveexample{The example shows the construction several valid JSON + pointers as well as the exceptional behavior.,json_pointer} + + @since version 2.0.0 + */ + explicit json_pointer(const std::string& s = "") : reference_tokens(split(s)) {} + + /*! + @brief return a string representation of the JSON pointer + + @invariant For each JSON pointer `ptr`, it holds: + @code {.cpp} + ptr == json_pointer(ptr.to_string()); + @endcode + + @return a string representation of the JSON pointer + + @liveexample{The example shows the result of `to_string`., + json_pointer__to_string} + + @since version 2.0.0 + */ + std::string to_string() const noexcept + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + std::string{}, + [](const std::string & a, const std::string & b) + { + return a + "/" + escape(b); + }); + } + + /// @copydoc to_string() + operator std::string() const + { + return to_string(); + } + + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw out_of_range.404 if string @a s could not be converted to an integer + */ + static int array_index(const std::string& s) + { + size_t processed_chars = 0; + const int res = std::stoi(s, &processed_chars); + + // check if the string was completely read + if (JSON_UNLIKELY(processed_chars != s.size())) + { + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'")); + } + + return res; + } + + private: + /*! + @brief remove and return last reference pointer + @throw out_of_range.405 if JSON pointer has no parent + */ + std::string pop_back() + { + if (JSON_UNLIKELY(is_root())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + auto last = reference_tokens.back(); + reference_tokens.pop_back(); + return last; + } + + /// return whether pointer points to the root document + bool is_root() const + { + return reference_tokens.empty(); + } + + json_pointer top() const + { + if (JSON_UNLIKELY(is_root())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_and_create(NLOHMANN_BASIC_JSON_TPL& j) const; + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_unchecked(NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_checked(NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + const NLOHMANN_BASIC_JSON_TPL& get_unchecked(const NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + const NLOHMANN_BASIC_JSON_TPL& get_checked(const NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector<std::string> split(const std::string& reference_string) + { + std::vector<std::string> result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, + "JSON pointer must be empty or begin with '/' - was: '" + + reference_string + "'")); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == string::npos+1 = 0 + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == std::string::npos) + start = slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != std::string::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + assert(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_UNLIKELY(pos == reference_token.size() - 1 or + (reference_token[pos + 1] != '0' and + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'")); + } + } + + // finally, store the reference token + unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + /*! + @brief replace all occurrences of a substring by another string + + @param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t + @param[in] f the substring to replace with @a t + @param[in] t the string to replace @a f + + @pre The search string @a f must not be empty. **This precondition is + enforced with an assertion.** + + @since version 2.0.0 + */ + static void replace_substring(std::string& s, const std::string& f, + const std::string& t) + { + assert(not f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != std::string::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} + } + + /// escape "~"" to "~0" and "/" to "~1" + static std::string escape(std::string s) + { + replace_substring(s, "~", "~0"); + replace_substring(s, "/", "~1"); + return s; + } + + /// unescape "~1" to tilde and "~0" to slash (order is important!) + static void unescape(std::string& s) + { + replace_substring(s, "~1", "/"); + replace_substring(s, "~0", "~"); + } + + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + static void flatten(const std::string& reference_string, + const NLOHMANN_BASIC_JSON_TPL& value, + NLOHMANN_BASIC_JSON_TPL& result); + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + static NLOHMANN_BASIC_JSON_TPL + unflatten(const NLOHMANN_BASIC_JSON_TPL& value); + + friend bool operator==(json_pointer const& lhs, + json_pointer const& rhs) noexcept; + + friend bool operator!=(json_pointer const& lhs, + json_pointer const& rhs) noexcept; + + /// the reference tokens + std::vector<std::string> reference_tokens; +}; + +/*! +@brief a class to store JSON values + +@tparam ObjectType type for JSON objects (`std::map` by default; will be used +in @ref object_t) +@tparam ArrayType type for JSON arrays (`std::vector` by default; will be used +in @ref array_t) +@tparam StringType type for JSON strings and object keys (`std::string` by +default; will be used in @ref string_t) +@tparam BooleanType type for JSON booleans (`bool` by default; will be used +in @ref boolean_t) +@tparam NumberIntegerType type for JSON integer numbers (`int64_t` by +default; will be used in @ref number_integer_t) +@tparam NumberUnsignedType type for JSON unsigned integer numbers (@c +`uint64_t` by default; will be used in @ref number_unsigned_t) +@tparam NumberFloatType type for JSON floating-point numbers (`double` by +default; will be used in @ref number_float_t) +@tparam AllocatorType type of the allocator to use (`std::allocator` by +default) +@tparam JSONSerializer the serializer to resolve internal calls to `to_json()` +and `from_json()` (@ref adl_serializer by default) + +@requirement The class satisfies the following concept requirements: +- Basic + - [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible): + JSON values can be default constructed. The result will be a JSON null + value. + - [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible): + A JSON value can be constructed from an rvalue argument. + - [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible): + A JSON value can be copy-constructed from an lvalue expression. + - [MoveAssignable](http://en.cppreference.com/w/cpp/concept/MoveAssignable): + A JSON value van be assigned from an rvalue argument. + - [CopyAssignable](http://en.cppreference.com/w/cpp/concept/CopyAssignable): + A JSON value can be copy-assigned from an lvalue expression. + - [Destructible](http://en.cppreference.com/w/cpp/concept/Destructible): + JSON values can be destructed. +- Layout + - [StandardLayoutType](http://en.cppreference.com/w/cpp/concept/StandardLayoutType): + JSON values have + [standard layout](http://en.cppreference.com/w/cpp/language/data_members#Standard_layout): + All non-static data members are private and standard layout types, the + class has no virtual functions or (virtual) base classes. +- Library-wide + - [EqualityComparable](http://en.cppreference.com/w/cpp/concept/EqualityComparable): + JSON values can be compared with `==`, see @ref + operator==(const_reference,const_reference). + - [LessThanComparable](http://en.cppreference.com/w/cpp/concept/LessThanComparable): + JSON values can be compared with `<`, see @ref + operator<(const_reference,const_reference). + - [Swappable](http://en.cppreference.com/w/cpp/concept/Swappable): + Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of + other compatible types, using unqualified function call @ref swap(). + - [NullablePointer](http://en.cppreference.com/w/cpp/concept/NullablePointer): + JSON values can be compared against `std::nullptr_t` objects which are used + to model the `null` value. +- Container + - [Container](http://en.cppreference.com/w/cpp/concept/Container): + JSON values can be used like STL containers and provide iterator access. + - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer); + JSON values can be used like STL containers and provide reverse iterator + access. + +@invariant The member variables @a m_value and @a m_type have the following +relationship: +- If `m_type == value_t::object`, then `m_value.object != nullptr`. +- If `m_type == value_t::array`, then `m_value.array != nullptr`. +- If `m_type == value_t::string`, then `m_value.string != nullptr`. +The invariants are checked by member function assert_invariant(). + +@internal +@note ObjectType trick from http://stackoverflow.com/a/9860911 +@endinternal + +@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange +Format](http://rfc7159.net/rfc7159) + +@since version 1.0.0 + +@nosubgrouping +*/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +class basic_json +{ + private: + template<detail::value_t> friend struct detail::external_constructor; + friend ::nlohmann::json_pointer; + friend ::nlohmann::detail::parser<basic_json>; + friend ::nlohmann::detail::serializer<basic_json>; + template<typename BasicJsonType> + friend class ::nlohmann::detail::iter_impl; + template<typename BasicJsonType, typename CharType> + friend class ::nlohmann::detail::binary_writer; + template<typename BasicJsonType> + friend class ::nlohmann::detail::binary_reader; + + /// workaround type for MSVC + using basic_json_t = NLOHMANN_BASIC_JSON_TPL; + + // convenience aliases for types residing in namespace detail; + using lexer = ::nlohmann::detail::lexer<basic_json>; + using parser = ::nlohmann::detail::parser<basic_json>; + + using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; + template<typename BasicJsonType> + using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>; + template<typename BasicJsonType> + using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>; + template<typename Iterator> + using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>; + template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>; + + template<typename CharType> + using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>; + + using binary_reader = ::nlohmann::detail::binary_reader<basic_json>; + template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>; + + using serializer = ::nlohmann::detail::serializer<basic_json>; + + public: + using value_t = detail::value_t; + /// @copydoc nlohmann::json_pointer + using json_pointer = ::nlohmann::json_pointer; + template<typename T, typename SFINAE> + using json_serializer = JSONSerializer<T, SFINAE>; + /// helper type for initializer lists of basic_json values + using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>; + + //////////////// + // exceptions // + //////////////// + + /// @name exceptions + /// Classes to implement user-defined exceptions. + /// @{ + + /// @copydoc detail::exception + using exception = detail::exception; + /// @copydoc detail::parse_error + using parse_error = detail::parse_error; + /// @copydoc detail::invalid_iterator + using invalid_iterator = detail::invalid_iterator; + /// @copydoc detail::type_error + using type_error = detail::type_error; + /// @copydoc detail::out_of_range + using out_of_range = detail::out_of_range; + /// @copydoc detail::other_error + using other_error = detail::other_error; + + /// @} + + + ///////////////////// + // container types // + ///////////////////// + + /// @name container types + /// The canonic container types to use @ref basic_json like any other STL + /// container. + /// @{ + + /// the type of elements in a basic_json container + using value_type = basic_json; + + /// the type of an element reference + using reference = value_type&; + /// the type of an element const reference + using const_reference = const value_type&; + + /// a type to represent differences between iterators + using difference_type = std::ptrdiff_t; + /// a type to represent container sizes + using size_type = std::size_t; + + /// the allocator type + using allocator_type = AllocatorType<basic_json>; + + /// the type of an element pointer + using pointer = typename std::allocator_traits<allocator_type>::pointer; + /// the type of an element const pointer + using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer; + + /// an iterator for a basic_json container + using iterator = iter_impl<basic_json>; + /// a const iterator for a basic_json container + using const_iterator = iter_impl<const basic_json>; + /// a reverse iterator for a basic_json container + using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>; + /// a const reverse iterator for a basic_json container + using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>; + + /// @} + + + /*! + @brief returns the allocator associated with the container + */ + static allocator_type get_allocator() + { + return allocator_type(); + } + + /*! + @brief returns version information on the library + + This function returns a JSON object with information about the library, + including the version number and information on the platform and compiler. + + @return JSON object holding version information + key | description + ----------- | --------------- + `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). + `copyright` | The copyright line for the library as string. + `name` | The name of the library as string. + `platform` | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`. + `url` | The URL of the project as string. + `version` | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string). + + @liveexample{The following code shows an example output of the `meta()` + function.,meta} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @complexity Constant. + + @since 2.1.0 + */ + static basic_json meta() + { + basic_json result; + + result["copyright"] = "(C) 2013-2017 Niels Lohmann"; + result["name"] = "JSON for Modern C++"; + result["url"] = "https://github.com/nlohmann/json"; + result["version"] = + { + {"string", "3.0.1"}, {"major", 3}, {"minor", 0}, {"patch", 1} + }; + +#ifdef _WIN32 + result["platform"] = "win32"; +#elif defined __linux__ + result["platform"] = "linux"; +#elif defined __APPLE__ + result["platform"] = "apple"; +#elif defined __unix__ + result["platform"] = "unix"; +#else + result["platform"] = "unknown"; +#endif + +#if defined(__ICC) || defined(__INTEL_COMPILER) + result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}}; +#elif defined(__clang__) + result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}}; +#elif defined(__GNUC__) || defined(__GNUG__) + result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__) + "." + std::to_string(__GNUC_PATCHLEVEL__)}}; +#elif defined(__HP_cc) || defined(__HP_aCC) + result["compiler"] = "hp" +#elif defined(__IBMCPP__) + result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}}; +#elif defined(_MSC_VER) + result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}}; +#elif defined(__PGI) + result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}}; +#elif defined(__SUNPRO_CC) + result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}}; +#else + result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}}; +#endif + +#ifdef __cplusplus + result["compiler"]["c++"] = std::to_string(__cplusplus); +#else + result["compiler"]["c++"] = "unknown"; +#endif + return result; + } + + + /////////////////////////// + // JSON value data types // + /////////////////////////// + + /// @name JSON value data types + /// The data types to store a JSON value. These types are derived from + /// the template arguments passed to class @ref basic_json. + /// @{ + +#if defined(JSON_HAS_CPP_14) + // Use transparent comparator if possible, combined with perfect forwarding + // on find() and count() calls prevents unnecessary string construction. + using object_comparator_t = std::less<>; +#else + using object_comparator_t = std::less<StringType>; +#endif + + /*! + @brief a type for an object + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: + > An object is an unordered collection of zero or more name/value pairs, + > where a name is a string and a value is a string, number, boolean, null, + > object, or array. + + To store objects in C++, a type is defined by the template parameters + described below. + + @tparam ObjectType the container to store objects (e.g., `std::map` or + `std::unordered_map`) + @tparam StringType the type of the keys or names (e.g., `std::string`). + The comparison function `std::less<StringType>` is used to order elements + inside the container. + @tparam AllocatorType the allocator to use for objects (e.g., + `std::allocator`) + + #### Default type + + With the default values for @a ObjectType (`std::map`), @a StringType + (`std::string`), and @a AllocatorType (`std::allocator`), the default + value for @a object_t is: + + @code {.cpp} + std::map< + std::string, // key_type + basic_json, // value_type + std::less<std::string>, // key_compare + std::allocator<std::pair<const std::string, basic_json>> // allocator_type + > + @endcode + + #### Behavior + + The choice of @a object_t influences the behavior of the JSON class. With + the default type, objects have the following behavior: + + - When all names are unique, objects will be interoperable in the sense + that all software implementations receiving that object will agree on + the name-value mappings. + - When the names within an object are not unique, later stored name/value + pairs overwrite previously stored name/value pairs, leaving the used + names unique. For instance, `{"key": 1}` and `{"key": 2, "key": 1}` will + be treated as equal and both stored as `{"key": 1}`. + - Internally, name/value pairs are stored in lexicographical order of the + names. Objects will also be serialized (see @ref dump) in this order. + For instance, `{"b": 1, "a": 2}` and `{"a": 2, "b": 1}` will be stored + and serialized as `{"a": 2, "b": 1}`. + - When comparing objects, the order of the name/value pairs is irrelevant. + This makes objects interoperable in the sense that they will not be + affected by these differences. For instance, `{"b": 1, "a": 2}` and + `{"a": 2, "b": 1}` will be treated as equal. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the object's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON object. + + #### Storage + + Objects are stored as pointers in a @ref basic_json type. That is, for any + access to object values, a pointer of type `object_t*` must be + dereferenced. + + @sa @ref array_t -- type for an array value + + @since version 1.0.0 + + @note The order name/value pairs are added to the object is *not* + preserved by the library. Therefore, iterating an object may return + name/value pairs in a different order than they were originally stored. In + fact, keys will be traversed in alphabetical order as `std::map` with + `std::less` is used by default. Please note this behavior conforms to [RFC + 7159](http://rfc7159.net/rfc7159), because any order implements the + specified "unordered" nature of JSON objects. + */ + using object_t = ObjectType<StringType, + basic_json, + object_comparator_t, + AllocatorType<std::pair<const StringType, + basic_json>>>; + + /*! + @brief a type for an array + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: + > An array is an ordered sequence of zero or more values. + + To store objects in C++, a type is defined by the template parameters + explained below. + + @tparam ArrayType container type to store arrays (e.g., `std::vector` or + `std::list`) + @tparam AllocatorType allocator to use for arrays (e.g., `std::allocator`) + + #### Default type + + With the default values for @a ArrayType (`std::vector`) and @a + AllocatorType (`std::allocator`), the default value for @a array_t is: + + @code {.cpp} + std::vector< + basic_json, // value_type + std::allocator<basic_json> // allocator_type + > + @endcode + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the array's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON array. + + #### Storage + + Arrays are stored as pointers in a @ref basic_json type. That is, for any + access to array values, a pointer of type `array_t*` must be dereferenced. + + @sa @ref object_t -- type for an object value + + @since version 1.0.0 + */ + using array_t = ArrayType<basic_json, AllocatorType<basic_json>>; + + /*! + @brief a type for a string + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: + > A string is a sequence of zero or more Unicode characters. + + To store objects in C++, a type is defined by the template parameter + described below. Unicode values are split by the JSON class into + byte-sized characters during deserialization. + + @tparam StringType the container to store strings (e.g., `std::string`). + Note this container is used for keys/names in objects, see @ref object_t. + + #### Default type + + With the default values for @a StringType (`std::string`), the default + value for @a string_t is: + + @code {.cpp} + std::string + @endcode + + #### Encoding + + Strings are stored in UTF-8 encoding. Therefore, functions like + `std::string::size()` or `std::string::length()` return the number of + bytes in the string rather than the number of characters or glyphs. + + #### String comparison + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > Software implementations are typically required to test names of object + > members for equality. Implementations that transform the textual + > representation into sequences of Unicode code units and then perform the + > comparison numerically, code unit by code unit, are interoperable in the + > sense that implementations will agree in all cases on equality or + > inequality of two strings. For example, implementations that compare + > strings with escaped characters unconverted may incorrectly find that + > `"a\\b"` and `"a\u005Cb"` are not equal. + + This implementation is interoperable as it does compare strings code unit + by code unit. + + #### Storage + + String values are stored as pointers in a @ref basic_json type. That is, + for any access to string values, a pointer of type `string_t*` must be + dereferenced. + + @since version 1.0.0 + */ + using string_t = StringType; + + /*! + @brief a type for a boolean + + [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a + type which differentiates the two literals `true` and `false`. + + To store objects in C++, a type is defined by the template parameter @a + BooleanType which chooses the type to use. + + #### Default type + + With the default values for @a BooleanType (`bool`), the default value for + @a boolean_t is: + + @code {.cpp} + bool + @endcode + + #### Storage + + Boolean values are stored directly inside a @ref basic_json type. + + @since version 1.0.0 + */ + using boolean_t = BooleanType; + + /*! + @brief a type for a number (integer) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store integer numbers in C++, a type is defined by the template + parameter @a NumberIntegerType which chooses the type to use. + + #### Default type + + With the default values for @a NumberIntegerType (`int64_t`), the default + value for @a number_integer_t is: + + @code {.cpp} + int64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `9223372036854775807` (INT64_MAX) and the minimal integer number + that can be stored is `-9223372036854775808` (INT64_MIN). Integer numbers + that are out of range will yield over/underflow when used in a + constructor. During deserialization, too large or small integer numbers + will be automatically be stored as @ref number_unsigned_t or @ref + number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange of the exactly supported range [INT64_MIN, + INT64_MAX], this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_integer_t = NumberIntegerType; + + /*! + @brief a type for a number (unsigned) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store unsigned integer numbers in C++, a type is defined by the + template parameter @a NumberUnsignedType which chooses the type to use. + + #### Default type + + With the default values for @a NumberUnsignedType (`uint64_t`), the + default value for @a number_unsigned_t is: + + @code {.cpp} + uint64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `18446744073709551615` (UINT64_MAX) and the minimal integer + number that can be stored is `0`. Integer numbers that are out of range + will yield over/underflow when used in a constructor. During + deserialization, too large or small integer numbers will be automatically + be stored as @ref number_integer_t or @ref number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange (when considered in conjunction with the + number_integer_t type) of the exactly supported range [0, UINT64_MAX], + this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + @sa @ref number_integer_t -- type for number values (integer) + + @since version 2.0.0 + */ + using number_unsigned_t = NumberUnsignedType; + + /*! + @brief a type for a number (floating-point) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store floating-point numbers in C++, a type is defined by the template + parameter @a NumberFloatType which chooses the type to use. + + #### Default type + + With the default values for @a NumberFloatType (`double`), the default + value for @a number_float_t is: + + @code {.cpp} + double + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in floating-point literals will be ignored. Internally, + the value will be stored as decimal number. For instance, the C++ + floating-point literal `01.2` will be serialized to `1.2`. During + deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > This specification allows implementations to set limits on the range and + > precision of numbers accepted. Since software that implements IEEE + > 754-2008 binary64 (double precision) numbers is generally available and + > widely used, good interoperability can be achieved by implementations + > that expect no more precision or range than these provide, in the sense + > that implementations will approximate JSON numbers within the expected + > precision. + + This implementation does exactly follow this approach, as it uses double + precision floating-point numbers. Note values smaller than + `-1.79769313486232e+308` and values greater than `1.79769313486232e+308` + will be stored as NaN internally and be serialized to `null`. + + #### Storage + + Floating-point number values are stored directly inside a @ref basic_json + type. + + @sa @ref number_integer_t -- type for number values (integer) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_float_t = NumberFloatType; + + /// @} + + private: + + /// helper for exception-safe object creation + template<typename T, typename... Args> + static T* create(Args&& ... args) + { + AllocatorType<T> alloc; + using AllocatorTraits = std::allocator_traits<AllocatorType<T>>; + + auto deleter = [&](T * object) + { + AllocatorTraits::deallocate(alloc, object, 1); + }; + std::unique_ptr<T, decltype(deleter)> object(AllocatorTraits::allocate(alloc, 1), deleter); + AllocatorTraits::construct(alloc, object.get(), std::forward<Args>(args)...); + assert(object != nullptr); + return object.release(); + } + + //////////////////////// + // JSON value storage // + //////////////////////// + + /*! + @brief a JSON value + + The actual storage for a JSON value of the @ref basic_json class. This + union combines the different storage types for the JSON value types + defined in @ref value_t. + + JSON type | value_t type | used type + --------- | --------------- | ------------------------ + object | object | pointer to @ref object_t + array | array | pointer to @ref array_t + string | string | pointer to @ref string_t + boolean | boolean | @ref boolean_t + number | number_integer | @ref number_integer_t + number | number_unsigned | @ref number_unsigned_t + number | number_float | @ref number_float_t + null | null | *no value is stored* + + @note Variable-length types (objects, arrays, and strings) are stored as + pointers. The size of the union should not exceed 64 bits if the default + value types are used. + + @since version 1.0.0 + */ + union json_value + { + /// object (stored with pointer to save storage) + object_t* object; + /// array (stored with pointer to save storage) + array_t* array; + /// string (stored with pointer to save storage) + string_t* string; + /// boolean + boolean_t boolean; + /// number (integer) + number_integer_t number_integer; + /// number (unsigned integer) + number_unsigned_t number_unsigned; + /// number (floating-point) + number_float_t number_float; + + /// default constructor (for null values) + json_value() = default; + /// constructor for booleans + json_value(boolean_t v) noexcept : boolean(v) {} + /// constructor for numbers (integer) + json_value(number_integer_t v) noexcept : number_integer(v) {} + /// constructor for numbers (unsigned) + json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} + /// constructor for numbers (floating-point) + json_value(number_float_t v) noexcept : number_float(v) {} + /// constructor for empty values of a given type + json_value(value_t t) + { + switch (t) + { + case value_t::object: + { + object = create<object_t>(); + break; + } + + case value_t::array: + { + array = create<array_t>(); + break; + } + + case value_t::string: + { + string = create<string_t>(""); + break; + } + + case value_t::boolean: + { + boolean = boolean_t(false); + break; + } + + case value_t::number_integer: + { + number_integer = number_integer_t(0); + break; + } + + case value_t::number_unsigned: + { + number_unsigned = number_unsigned_t(0); + break; + } + + case value_t::number_float: + { + number_float = number_float_t(0.0); + break; + } + + case value_t::null: + { + object = nullptr; // silence warning, see #821 + break; + } + + default: + { + object = nullptr; // silence warning, see #821 + if (JSON_UNLIKELY(t == value_t::null)) + { + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.0.1")); // LCOV_EXCL_LINE + } + break; + } + } + } + + /// constructor for strings + json_value(const string_t& value) + { + string = create<string_t>(value); + } + + /// constructor for rvalue strings + json_value(string_t&& value) + { + string = create<string_t>(std::move(value)); + } + + /// constructor for objects + json_value(const object_t& value) + { + object = create<object_t>(value); + } + + /// constructor for rvalue objects + json_value(object_t&& value) + { + object = create<object_t>(std::move(value)); + } + + /// constructor for arrays + json_value(const array_t& value) + { + array = create<array_t>(value); + } + + /// constructor for rvalue arrays + json_value(array_t&& value) + { + array = create<array_t>(std::move(value)); + } + + void destroy(value_t t) + { + switch (t) + { + case value_t::object: + { + AllocatorType<object_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, object); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); + break; + } + + case value_t::array: + { + AllocatorType<array_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, array); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); + break; + } + + case value_t::string: + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); + break; + } + + default: + { + break; + } + } + } + }; + + /*! + @brief checks the class invariants + + This function asserts the class invariants. It needs to be called at the + end of every constructor to make sure that created objects respect the + invariant. Furthermore, it has to be called each time the type of a JSON + value is changed, because the invariant expresses a relationship between + @a m_type and @a m_value. + */ + void assert_invariant() const + { + assert(m_type != value_t::object or m_value.object != nullptr); + assert(m_type != value_t::array or m_value.array != nullptr); + assert(m_type != value_t::string or m_value.string != nullptr); + } + + public: + ////////////////////////// + // JSON parser callback // + ////////////////////////// + + /*! + @brief parser event types + + The parser callback distinguishes the following events: + - `object_start`: the parser read `{` and started to process a JSON object + - `key`: the parser read a key of a value in an object + - `object_end`: the parser read `}` and finished processing a JSON object + - `array_start`: the parser read `[` and started to process a JSON array + - `array_end`: the parser read `]` and finished processing a JSON array + - `value`: the parser finished reading a JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + @sa @ref parser_callback_t for more information and examples + */ + using parse_event_t = typename parser::parse_event_t; + + /*! + @brief per-element parser callback type + + With a parser callback function, the result of parsing a JSON text can be + influenced. When passed to @ref parse, it is called on certain events + (passed as @ref parse_event_t via parameter @a event) with a set recursion + depth @a depth and context JSON value @a parsed. The return value of the + callback function is a boolean indicating whether the element that emitted + the callback shall be kept or not. + + We distinguish six scenarios (determined by the event type) in which the + callback function can be called. The following table describes the values + of the parameters @a depth, @a event, and @a parsed. + + parameter @a event | description | parameter @a depth | parameter @a parsed + ------------------ | ----------- | ------------------ | ------------------- + parse_event_t::object_start | the parser read `{` and started to process a JSON object | depth of the parent of the JSON object | a JSON value with type discarded + parse_event_t::key | the parser read a key of a value in an object | depth of the currently parsed JSON object | a JSON string containing the key + parse_event_t::object_end | the parser read `}` and finished processing a JSON object | depth of the parent of the JSON object | the parsed JSON object + parse_event_t::array_start | the parser read `[` and started to process a JSON array | depth of the parent of the JSON array | a JSON value with type discarded + parse_event_t::array_end | the parser read `]` and finished processing a JSON array | depth of the parent of the JSON array | the parsed JSON array + parse_event_t::value | the parser finished reading a JSON value | depth of the value | the parsed JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + Discarding a value (i.e., returning `false`) has different effects + depending on the context in which function was called: + + - Discarded values in structured types are skipped. That is, the parser + will behave as if the discarded value was never read. + - In case a value outside a structured type is skipped, it is replaced + with `null`. This case happens if the top-level element is skipped. + + @param[in] depth the depth of the recursion during parsing + + @param[in] event an event of type parse_event_t indicating the context in + the callback function has been called + + @param[in,out] parsed the current intermediate parse result; note that + writing to this value has no effect for parse_event_t::key events + + @return Whether the JSON value which called the function during parsing + should be kept (`true`) or not (`false`). In the latter case, it is either + skipped completely or replaced by an empty discarded object. + + @sa @ref parse for examples + + @since version 1.0.0 + */ + using parser_callback_t = typename parser::parser_callback_t; + + + ////////////////// + // constructors // + ////////////////// + + /// @name constructors and destructors + /// Constructors of class @ref basic_json, copy/move constructor, copy + /// assignment, static functions creating objects, and the destructor. + /// @{ + + /*! + @brief create an empty value with a given type + + Create an empty JSON value with a given type. The value will be default + initialized with an empty value which depends on the type: + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @param[in] v the type of the value to create + + @complexity Constant. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows the constructor for different @ref + value_t values,basic_json__value_t} + + @sa @ref clear() -- restores the postcondition of this constructor + + @since version 1.0.0 + */ + basic_json(const value_t v) + : m_type(v), m_value(v) + { + assert_invariant(); + } + + /*! + @brief create a null object + + Create a `null` JSON value. It either takes a null pointer as parameter + (explicitly creating `null`) or no parameter (implicitly creating `null`). + The passed null pointer itself is not read -- it is only used to choose + the right constructor. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @liveexample{The following code shows the constructor with and without a + null pointer parameter.,basic_json__nullptr_t} + + @since version 1.0.0 + */ + basic_json(std::nullptr_t = nullptr) noexcept + : basic_json(value_t::null) + { + assert_invariant(); + } + + /*! + @brief create a JSON value + + This is a "catch all" constructor for all compatible JSON types; that is, + types for which a `to_json()` method exists. The constructor forwards the + parameter @a val to that method (to `json_serializer<U>::to_json` method + with `U = uncvref_t<CompatibleType>`, to be exact). + + Template type @a CompatibleType includes, but is not limited to, the + following types: + - **arrays**: @ref array_t and all kinds of compatible containers such as + `std::vector`, `std::deque`, `std::list`, `std::forward_list`, + `std::array`, `std::valarray`, `std::set`, `std::unordered_set`, + `std::multiset`, and `std::unordered_multiset` with a `value_type` from + which a @ref basic_json value can be constructed. + - **objects**: @ref object_t and all kinds of compatible associative + containers such as `std::map`, `std::unordered_map`, `std::multimap`, + and `std::unordered_multimap` with a `key_type` compatible to + @ref string_t and a `value_type` from which a @ref basic_json value can + be constructed. + - **strings**: @ref string_t, string literals, and all compatible string + containers can be used. + - **numbers**: @ref number_integer_t, @ref number_unsigned_t, + @ref number_float_t, and all convertible number types such as `int`, + `size_t`, `int64_t`, `float` or `double` can be used. + - **boolean**: @ref boolean_t / `bool` can be used. + + See the examples below. + + @tparam CompatibleType a type such that: + - @a CompatibleType is not derived from `std::istream`, + - @a CompatibleType is not @ref basic_json (to avoid hijacking copy/move + constructors), + - @a CompatibleType is not a @ref basic_json nested type (e.g., + @ref json_pointer, @ref iterator, etc ...) + - @ref @ref json_serializer<U> has a + `to_json(basic_json_t&, CompatibleType&&)` method + + @tparam U = `uncvref_t<CompatibleType>` + + @param[in] val the value to be forwarded to the respective constructor + + @complexity Usually linear in the size of the passed @a val, also + depending on the implementation of the called `to_json()` + method. + + @exceptionsafety Depends on the called constructor. For types directly + supported by the library (i.e., all types for which no `to_json()` function + was provided), strong guarantee holds: if an exception is thrown, there are + no changes to any JSON value. + + @liveexample{The following code shows the constructor with several + compatible types.,basic_json__CompatibleType} + + @since version 2.1.0 + */ + template<typename CompatibleType, typename U = detail::uncvref_t<CompatibleType>, + detail::enable_if_t<not std::is_base_of<std::istream, U>::value and + not std::is_same<U, basic_json_t>::value and + not detail::is_basic_json_nested_type< + basic_json_t, U>::value and + detail::has_to_json<basic_json, U>::value, + int> = 0> + basic_json(CompatibleType && val) noexcept(noexcept(JSONSerializer<U>::to_json( + std::declval<basic_json_t&>(), std::forward<CompatibleType>(val)))) + { + JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); + assert_invariant(); + } + + /*! + @brief create a container (array or object) from an initializer list + + Creates a JSON value of type array or object from the passed initializer + list @a init. In case @a type_deduction is `true` (default), the type of + the JSON value to be created is deducted from the initializer list @a init + according to the following rules: + + 1. If the list is empty, an empty JSON object value `{}` is created. + 2. If the list consists of pairs whose first element is a string, a JSON + object value is created where the first elements of the pairs are + treated as keys and the second elements are as values. + 3. In all other cases, an array is created. + + The rules aim to create the best fit between a C++ initializer list and + JSON values. The rationale is as follows: + + 1. The empty initializer list is written as `{}` which is exactly an empty + JSON object. + 2. C++ has no way of describing mapped types other than to list a list of + pairs. As JSON requires that keys must be of type string, rule 2 is the + weakest constraint one can pose on initializer lists to interpret them + as an object. + 3. In all other cases, the initializer list could not be interpreted as + JSON object type, so interpreting it as JSON array type is safe. + + With the rules described above, the following JSON values cannot be + expressed by an initializer list: + + - the empty array (`[]`): use @ref array(initializer_list_t) + with an empty initializer list in this case + - arrays whose elements satisfy rule 2: use @ref + array(initializer_list_t) with the same initializer list + in this case + + @note When used without parentheses around an empty initializer list, @ref + basic_json() is called instead of this function, yielding the JSON null + value. + + @param[in] init initializer list with JSON values + + @param[in] type_deduction internal parameter; when set to `true`, the type + of the JSON value is deducted from the initializer list @a init; when set + to `false`, the type provided via @a manual_type is forced. This mode is + used by the functions @ref array(initializer_list_t) and + @ref object(initializer_list_t). + + @param[in] manual_type internal parameter; when @a type_deduction is set + to `false`, the created JSON value will use the provided type (only @ref + value_t::array and @ref value_t::object are valid); when @a type_deduction + is set to `true`, this parameter has no effect + + @throw type_error.301 if @a type_deduction is `false`, @a manual_type is + `value_t::object`, but @a init contains an element which is not a pair + whose first element is a string. In this case, the constructor could not + create an object. If @a type_deduction would have be `true`, an array + would have been created. See @ref object(initializer_list_t) + for an example. + + @complexity Linear in the size of the initializer list @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows how JSON values are created from + initializer lists.,basic_json__list_init_t} + + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + basic_json(initializer_list_t init, + bool type_deduction = true, + value_t manual_type = value_t::array) + { + // check if each element is an array with two elements whose first + // element is a string + bool is_an_object = std::all_of(init.begin(), init.end(), + [](const detail::json_ref<basic_json>& element_ref) + { + return (element_ref->is_array() and element_ref->size() == 2 and (*element_ref)[0].is_string()); + }); + + // adjust type if type deduction is not wanted + if (not type_deduction) + { + // if array is wanted, do not create an object though possible + if (manual_type == value_t::array) + { + is_an_object = false; + } + + // if object is wanted but impossible, throw an exception + if (JSON_UNLIKELY(manual_type == value_t::object and not is_an_object)) + { + JSON_THROW(type_error::create(301, "cannot create object from initializer list")); + } + } + + if (is_an_object) + { + // the initializer list is a list of pairs -> create object + m_type = value_t::object; + m_value = value_t::object; + + std::for_each(init.begin(), init.end(), [this](const detail::json_ref<basic_json>& element_ref) + { + auto element = element_ref.moved_or_copied(); + m_value.object->emplace( + std::move(*((*element.m_value.array)[0].m_value.string)), + std::move((*element.m_value.array)[1])); + }); + } + else + { + // the initializer list describes an array -> create array + m_type = value_t::array; + m_value.array = create<array_t>(init.begin(), init.end()); + } + + assert_invariant(); + } + + /*! + @brief explicitly create an array from an initializer list + + Creates a JSON array value from a given initializer list. That is, given a + list of values `a, b, c`, creates the JSON value `[a, b, c]`. If the + initializer list is empty, the empty array `[]` is created. + + @note This function is only needed to express two edge cases that cannot + be realized with the initializer list constructor (@ref + basic_json(initializer_list_t, bool, value_t)). These cases + are: + 1. creating an array whose elements are all pairs whose first element is a + string -- in this case, the initializer list constructor would create an + object, taking the first elements as keys + 2. creating an empty array -- passing the empty initializer list to the + initializer list constructor yields an empty object + + @param[in] init initializer list with JSON values to create an array from + (optional) + + @return JSON array value + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `array` + function.,array} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + static basic_json array(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::array); + } + + /*! + @brief explicitly create an object from an initializer list + + Creates a JSON object value from a given initializer list. The initializer + lists elements must be pairs, and their first elements must be strings. If + the initializer list is empty, the empty object `{}` is created. + + @note This function is only added for symmetry reasons. In contrast to the + related function @ref array(initializer_list_t), there are + no cases which can only be expressed by this function. That is, any + initializer list @a init can also be passed to the initializer list + constructor @ref basic_json(initializer_list_t, bool, value_t). + + @param[in] init initializer list to create an object from (optional) + + @return JSON object value + + @throw type_error.301 if @a init is not a list of pairs whose first + elements are strings. In this case, no object can be created. When such a + value is passed to @ref basic_json(initializer_list_t, bool, value_t), + an array would have been created from the passed initializer list @a init. + See example below. + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `object` + function.,object} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + + @since version 1.0.0 + */ + static basic_json object(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::object); + } + + /*! + @brief construct an array with count copies of given value + + Constructs a JSON array value by creating @a cnt copies of a passed value. + In case @a cnt is `0`, an empty array is created. + + @param[in] cnt the number of JSON copies of @a val to create + @param[in] val the JSON value to copy + + @post `std::distance(begin(),end()) == cnt` holds. + + @complexity Linear in @a cnt. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows examples for the @ref + basic_json(size_type\, const basic_json&) + constructor.,basic_json__size_type_basic_json} + + @since version 1.0.0 + */ + basic_json(size_type cnt, const basic_json& val) + : m_type(value_t::array) + { + m_value.array = create<array_t>(cnt, val); + assert_invariant(); + } + + /*! + @brief construct a JSON container given an iterator range + + Constructs the JSON value with the contents of the range `[first, last)`. + The semantics depends on the different types a JSON value can have: + - In case of a null type, invalid_iterator.206 is thrown. + - In case of other primitive types (number, boolean, or string), @a first + must be `begin()` and @a last must be `end()`. In this case, the value is + copied. Otherwise, invalid_iterator.204 is thrown. + - In case of structured types (array, object), the constructor behaves as + similar versions for `std::vector` or `std::map`; that is, a JSON array + or object is constructed from the values in the range. + + @tparam InputIT an input iterator type (@ref iterator or @ref + const_iterator) + + @param[in] first begin of the range to copy from (included) + @param[in] last end of the range to copy from (excluded) + + @pre Iterators @a first and @a last must be initialized. **This + precondition is enforced with an assertion (see warning).** If + assertions are switched off, a violation of this precondition yields + undefined behavior. + + @pre Range `[first, last)` is valid. Usually, this precondition cannot be + checked efficiently. Only certain edge cases are detected; see the + description of the exceptions below. A violation of this precondition + yields undefined behavior. + + @warning A precondition is enforced with a runtime assertion that will + result in calling `std::abort` if this precondition is not met. + Assertions can be disabled by defining `NDEBUG` at compile time. + See http://en.cppreference.com/w/cpp/error/assert for more + information. + + @throw invalid_iterator.201 if iterators @a first and @a last are not + compatible (i.e., do not belong to the same JSON value). In this case, + the range `[first, last)` is undefined. + @throw invalid_iterator.204 if iterators @a first and @a last belong to a + primitive type (number, boolean, or string), but @a first does not point + to the first element any more. In this case, the range `[first, last)` is + undefined. See example code below. + @throw invalid_iterator.206 if iterators @a first and @a last belong to a + null value. In this case, the range `[first, last)` is undefined. + + @complexity Linear in distance between @a first and @a last. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows several ways to create JSON values by + specifying a subrange with iterators.,basic_json__InputIt_InputIt} + + @since version 1.0.0 + */ + template<class InputIT, typename std::enable_if< + std::is_same<InputIT, typename basic_json_t::iterator>::value or + std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int>::type = 0> + basic_json(InputIT first, InputIT last) + { + assert(first.m_object != nullptr); + assert(last.m_object != nullptr); + + // make sure iterator fits the current value + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(201, "iterators are not compatible")); + } + + // copy type from first iterator + m_type = first.m_object->m_type; + + // check if iterator range is complete for primitive values + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + break; + } + + default: + break; + } + + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = first.m_object->m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = first.m_object->m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value.number_float = first.m_object->m_value.number_float; + break; + } + + case value_t::boolean: + { + m_value.boolean = first.m_object->m_value.boolean; + break; + } + + case value_t::string: + { + m_value = *first.m_object->m_value.string; + break; + } + + case value_t::object: + { + m_value.object = create<object_t>(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + m_value.array = create<array_t>(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(invalid_iterator::create(206, "cannot construct with iterators from " + + std::string(first.m_object->type_name()))); + } + + assert_invariant(); + } + + + /////////////////////////////////////// + // other constructors and destructor // + /////////////////////////////////////// + + /// @private + basic_json(const detail::json_ref<basic_json>& ref) + : basic_json(ref.moved_or_copied()) + {} + + /*! + @brief copy constructor + + Creates a copy of a given JSON value. + + @param[in] other the JSON value to copy + + @post `*this == other` + + @complexity Linear in the size of @a other. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + - As postcondition, it holds: `other == basic_json(other)`. + + @liveexample{The following code shows an example for the copy + constructor.,basic_json__basic_json} + + @since version 1.0.0 + */ + basic_json(const basic_json& other) + : m_type(other.m_type) + { + // check of passed value is valid + other.assert_invariant(); + + switch (m_type) + { + case value_t::object: + { + m_value = *other.m_value.object; + break; + } + + case value_t::array: + { + m_value = *other.m_value.array; + break; + } + + case value_t::string: + { + m_value = *other.m_value.string; + break; + } + + case value_t::boolean: + { + m_value = other.m_value.boolean; + break; + } + + case value_t::number_integer: + { + m_value = other.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value = other.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value = other.m_value.number_float; + break; + } + + default: + break; + } + + assert_invariant(); + } + + /*! + @brief move constructor + + Move constructor. Constructs a JSON value with the contents of the given + value @a other using move semantics. It "steals" the resources from @a + other and leaves it as JSON null value. + + @param[in,out] other value to move to this object + + @post `*this` has the same value as @a other before the call. + @post @a other is a JSON null value. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @requirement This function helps `basic_json` satisfying the + [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible) + requirements. + + @liveexample{The code below shows the move constructor explicitly called + via std::move.,basic_json__moveconstructor} + + @since version 1.0.0 + */ + basic_json(basic_json&& other) noexcept + : m_type(std::move(other.m_type)), + m_value(std::move(other.m_value)) + { + // check that passed value is valid + other.assert_invariant(); + + // invalidate payload + other.m_type = value_t::null; + other.m_value = {}; + + assert_invariant(); + } + + /*! + @brief copy assignment + + Copy assignment operator. Copies a JSON value via the "copy and swap" + strategy: It is expressed in terms of the copy constructor, destructor, + and the `swap()` member function. + + @param[in] other value to copy from + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + + @liveexample{The code below shows and example for the copy assignment. It + creates a copy of value `a` which is then swapped with `b`. Finally\, the + copy of `a` (which is the null value after the swap) is + destroyed.,basic_json__copyassignment} + + @since version 1.0.0 + */ + reference& operator=(basic_json other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value and + std::is_nothrow_move_assignable<value_t>::value and + std::is_nothrow_move_constructible<json_value>::value and + std::is_nothrow_move_assignable<json_value>::value + ) + { + // check that passed value is valid + other.assert_invariant(); + + using std::swap; + swap(m_type, other.m_type); + swap(m_value, other.m_value); + + assert_invariant(); + return *this; + } + + /*! + @brief destructor + + Destroys the JSON value and frees all allocated memory. + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + - All stored elements are destroyed and all memory is freed. + + @since version 1.0.0 + */ + ~basic_json() + { + assert_invariant(); + m_value.destroy(m_type); + } + + /// @} + + public: + /////////////////////// + // object inspection // + /////////////////////// + + /// @name object inspection + /// Functions to inspect the type of a JSON value. + /// @{ + + /*! + @brief serialization + + Serialization function for JSON values. The function tries to mimic + Python's `json.dumps()` function, and currently supports its @a indent + and @a ensure_ascii parameters. + + @param[in] indent If indent is nonnegative, then array elements and object + members will be pretty-printed with that indent level. An indent level of + `0` will only insert newlines. `-1` (the default) selects the most compact + representation. + @param[in] indent_char The character to use for indentation if @a indent is + greater than `0`. The default is ` ` (space). + @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters + in the output are escaped with `\uXXXX` sequences, and the result consists + of ASCII characters only. + + @return string containing the serialization of the JSON value + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @liveexample{The following example shows the effect of different @a indent\, + @a indent_char\, and @a ensure_ascii parameters to the result of the + serialization.,dump} + + @see https://docs.python.org/2/library/json.html#json.dump + + @since version 1.0.0; indentation character @a indent_char, option + @a ensure_ascii and exceptions added in version 3.0.0 + */ + string_t dump(const int indent = -1, const char indent_char = ' ', + const bool ensure_ascii = false) const + { + string_t result; + serializer s(detail::output_adapter<char>(result), indent_char); + + if (indent >= 0) + { + s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent)); + } + else + { + s.dump(*this, false, ensure_ascii, 0); + } + + return result; + } + + /*! + @brief return the type of the JSON value (explicit) + + Return the type of the JSON value as a value from the @ref value_t + enumeration. + + @return the type of the JSON value + Value type | return value + ------------------------- | ------------------------- + null | value_t::null + boolean | value_t::boolean + string | value_t::string + number (integer) | value_t::number_integer + number (unsigned integer) | value_t::number_unsigned + number (floating-point) | value_t::number_float + object | value_t::object + array | value_t::array + discarded | value_t::discarded + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `type()` for all JSON + types.,type} + + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr value_t type() const noexcept + { + return m_type; + } + + /*! + @brief return whether type is primitive + + This function returns true if and only if the JSON type is primitive + (string, number, boolean, or null). + + @return `true` if type is primitive (string, number, boolean, or null), + `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_primitive()` for all JSON + types.,is_primitive} + + @sa @ref is_structured() -- returns whether JSON value is structured + @sa @ref is_null() -- returns whether JSON value is `null` + @sa @ref is_string() -- returns whether JSON value is a string + @sa @ref is_boolean() -- returns whether JSON value is a boolean + @sa @ref is_number() -- returns whether JSON value is a number + + @since version 1.0.0 + */ + constexpr bool is_primitive() const noexcept + { + return is_null() or is_string() or is_boolean() or is_number(); + } + + /*! + @brief return whether type is structured + + This function returns true if and only if the JSON type is structured + (array or object). + + @return `true` if type is structured (array or object), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_structured()` for all JSON + types.,is_structured} + + @sa @ref is_primitive() -- returns whether value is primitive + @sa @ref is_array() -- returns whether value is an array + @sa @ref is_object() -- returns whether value is an object + + @since version 1.0.0 + */ + constexpr bool is_structured() const noexcept + { + return is_array() or is_object(); + } + + /*! + @brief return whether value is null + + This function returns true if and only if the JSON value is null. + + @return `true` if type is null, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_null()` for all JSON + types.,is_null} + + @since version 1.0.0 + */ + constexpr bool is_null() const noexcept + { + return (m_type == value_t::null); + } + + /*! + @brief return whether value is a boolean + + This function returns true if and only if the JSON value is a boolean. + + @return `true` if type is boolean, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_boolean()` for all JSON + types.,is_boolean} + + @since version 1.0.0 + */ + constexpr bool is_boolean() const noexcept + { + return (m_type == value_t::boolean); + } + + /*! + @brief return whether value is a number + + This function returns true if and only if the JSON value is a number. This + includes both integer (signed and unsigned) and floating-point values. + + @return `true` if type is number (regardless whether integer, unsigned + integer or floating-type), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number()` for all JSON + types.,is_number} + + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number() const noexcept + { + return is_number_integer() or is_number_float(); + } + + /*! + @brief return whether value is an integer number + + This function returns true if and only if the JSON value is a signed or + unsigned integer number. This excludes floating-point values. + + @return `true` if type is an integer or unsigned integer number, `false` + otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_integer()` for all + JSON types.,is_number_integer} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number_integer() const noexcept + { + return (m_type == value_t::number_integer or m_type == value_t::number_unsigned); + } + + /*! + @brief return whether value is an unsigned integer number + + This function returns true if and only if the JSON value is an unsigned + integer number. This excludes floating-point and signed integer values. + + @return `true` if type is an unsigned integer number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_unsigned()` for all + JSON types.,is_number_unsigned} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 2.0.0 + */ + constexpr bool is_number_unsigned() const noexcept + { + return (m_type == value_t::number_unsigned); + } + + /*! + @brief return whether value is a floating-point number + + This function returns true if and only if the JSON value is a + floating-point number. This excludes signed and unsigned integer values. + + @return `true` if type is a floating-point number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_float()` for all + JSON types.,is_number_float} + + @sa @ref is_number() -- check if value is number + @sa @ref is_number_integer() -- check if value is an integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + + @since version 1.0.0 + */ + constexpr bool is_number_float() const noexcept + { + return (m_type == value_t::number_float); + } + + /*! + @brief return whether value is an object + + This function returns true if and only if the JSON value is an object. + + @return `true` if type is object, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_object()` for all JSON + types.,is_object} + + @since version 1.0.0 + */ + constexpr bool is_object() const noexcept + { + return (m_type == value_t::object); + } + + /*! + @brief return whether value is an array + + This function returns true if and only if the JSON value is an array. + + @return `true` if type is array, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_array()` for all JSON + types.,is_array} + + @since version 1.0.0 + */ + constexpr bool is_array() const noexcept + { + return (m_type == value_t::array); + } + + /*! + @brief return whether value is a string + + This function returns true if and only if the JSON value is a string. + + @return `true` if type is string, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_string()` for all JSON + types.,is_string} + + @since version 1.0.0 + */ + constexpr bool is_string() const noexcept + { + return (m_type == value_t::string); + } + + /*! + @brief return whether value is discarded + + This function returns true if and only if the JSON value was discarded + during parsing with a callback function (see @ref parser_callback_t). + + @note This function will always be `false` for JSON values after parsing. + That is, discarded values can only occur during parsing, but will be + removed when inside a structured value or replaced by null in other cases. + + @return `true` if type is discarded, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_discarded()` for all JSON + types.,is_discarded} + + @since version 1.0.0 + */ + constexpr bool is_discarded() const noexcept + { + return (m_type == value_t::discarded); + } + + /*! + @brief return the type of the JSON value (implicit) + + Implicitly return the type of the JSON value as a value from the @ref + value_t enumeration. + + @return the type of the JSON value + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies the @ref value_t operator for + all JSON types.,operator__value_t} + + @sa @ref type() -- return the type of the JSON value (explicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr operator value_t() const noexcept + { + return m_type; + } + + /// @} + + private: + ////////////////// + // value access // + ////////////////// + + /// get a boolean (explicit) + boolean_t get_impl(boolean_t* /*unused*/) const + { + if (JSON_LIKELY(is_boolean())) + { + return m_value.boolean; + } + + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(type_name()))); + } + + /// get a pointer to the value (object) + object_t* get_impl_ptr(object_t* /*unused*/) noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (object) + constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (array) + array_t* get_impl_ptr(array_t* /*unused*/) noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (array) + constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (string) + string_t* get_impl_ptr(string_t* /*unused*/) noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (string) + constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (boolean) + boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (boolean) + constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (integer number) + number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (integer number) + constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (unsigned number) + number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (unsigned number) + constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (floating-point number) + number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /// get a pointer to the value (floating-point number) + constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /*! + @brief helper function to implement get_ref() + + This function helps to implement get_ref() without code duplication for + const and non-const overloads + + @tparam ThisType will be deduced as `basic_json` or `const basic_json` + + @throw type_error.303 if ReferenceType does not match underlying value + type of the current JSON + */ + template<typename ReferenceType, typename ThisType> + static ReferenceType get_ref_impl(ThisType& obj) + { + // delegate the call to get_ptr<>() + auto ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); + + if (JSON_LIKELY(ptr != nullptr)) + { + return *ptr; + } + + JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name()))); + } + + public: + /// @name value access + /// Direct access to the stored value of a JSON value. + /// @{ + + /*! + @brief get special-case overload + + This overloads avoids a lot of template boilerplate, it can be seen as the + identity method + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this + + @complexity Constant. + + @since version 2.1.0 + */ + template<typename BasicJsonType, detail::enable_if_t< + std::is_same<typename std::remove_const<BasicJsonType>::type, basic_json_t>::value, + int> = 0> + basic_json get() const + { + return *this; + } + + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value + which is [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) + and [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + - @ref json_serializer<ValueType> does not have a `from_json()` method of + the form `ValueType from_json(const basic_json&)` + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,get__ValueType_const} + + @since version 2.1.0 + */ + template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>, + detail::enable_if_t < + not std::is_same<basic_json_t, ValueType>::value and + detail::has_from_json<basic_json_t, ValueType>::value and + not detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>()))) + { + // we cannot static_assert on ValueTypeCV being non-const, because + // there is support for get<const basic_json_t>(), which is why we + // still need the uncvref + static_assert(not std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + static_assert(std::is_default_constructible<ValueType>::value, + "types must be DefaultConstructible when used with get()"); + + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + } + + /*! + @brief get a value (explicit); special case + + Explicit type conversion between the JSON value and a compatible value + which is **not** [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) + and **not** [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + return JSONSerializer<ValueTypeCV>::from_json(*this); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json and + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `ValueType from_json(const basic_json&)` + + @note If @ref json_serializer<ValueType> has both overloads of + `from_json()`, this one is chosen. + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @since version 2.1.0 + */ + template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>, + detail::enable_if_t<not std::is_same<basic_json_t, ValueType>::value and + detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer<ValueTypeCV>::from_json(std::declval<const basic_json_t&>()))) + { + static_assert(not std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + return JSONSerializer<ValueTypeCV>::from_json(*this); + } + + /*! + @brief get a pointer value (explicit) + + Explicit pointer access to the internally stored JSON value. No copies are + made. + + @warning The pointer becomes invalid if the underlying JSON object + changes. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get__PointerType} + + @sa @ref get_ptr() for explicit pointer-member access + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + PointerType get() noexcept + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /*! + @brief get a pointer value (explicit) + @copydoc get() + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + constexpr const PointerType get() const noexcept + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /*! + @brief get a pointer value (implicit) + + Implicit pointer access to the internally stored JSON value. No copies are + made. + + @warning Writing data to the pointee of the result yields an undefined + state. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. Enforced by a static + assertion. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get_ptr} + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + PointerType get_ptr() noexcept + { + // get the type of the PointerType (remove pointer and const) + using pointee_t = typename std::remove_const<typename + std::remove_pointer<typename + std::remove_const<PointerType>::type>::type>::type; + // make sure the type matches the allowed types + static_assert( + std::is_same<object_t, pointee_t>::value + or std::is_same<array_t, pointee_t>::value + or std::is_same<string_t, pointee_t>::value + or std::is_same<boolean_t, pointee_t>::value + or std::is_same<number_integer_t, pointee_t>::value + or std::is_same<number_unsigned_t, pointee_t>::value + or std::is_same<number_float_t, pointee_t>::value + , "incompatible pointer type"); + + // delegate the call to get_impl_ptr<>() + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /*! + @brief get a pointer value (implicit) + @copydoc get_ptr() + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value and + std::is_const<typename std::remove_pointer<PointerType>::type>::value, int>::type = 0> + constexpr const PointerType get_ptr() const noexcept + { + // get the type of the PointerType (remove pointer and const) + using pointee_t = typename std::remove_const<typename + std::remove_pointer<typename + std::remove_const<PointerType>::type>::type>::type; + // make sure the type matches the allowed types + static_assert( + std::is_same<object_t, pointee_t>::value + or std::is_same<array_t, pointee_t>::value + or std::is_same<string_t, pointee_t>::value + or std::is_same<boolean_t, pointee_t>::value + or std::is_same<number_integer_t, pointee_t>::value + or std::is_same<number_unsigned_t, pointee_t>::value + or std::is_same<number_float_t, pointee_t>::value + , "incompatible pointer type"); + + // delegate the call to get_impl_ptr<>() const + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /*! + @brief get a reference value (implicit) + + Implicit reference access to the internally stored JSON value. No copies + are made. + + @warning Writing data to the referee of the result yields an undefined + state. + + @tparam ReferenceType reference type; must be a reference to @ref array_t, + @ref object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, or + @ref number_float_t. Enforced by static assertion. + + @return reference to the internally stored JSON value if the requested + reference type @a ReferenceType fits to the JSON value; throws + type_error.303 otherwise + + @throw type_error.303 in case passed type @a ReferenceType is incompatible + with the stored JSON value; see example below + + @complexity Constant. + + @liveexample{The example shows several calls to `get_ref()`.,get_ref} + + @since version 1.1.0 + */ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value, int>::type = 0> + ReferenceType get_ref() + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a reference value (implicit) + @copydoc get_ref() + */ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value and + std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int>::type = 0> + ReferenceType get_ref() const + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a value (implicit) + + Implicit type conversion between the JSON value and a compatible value. + The call is realized by calling @ref get() const. + + @tparam ValueType non-pointer type compatible to the JSON value, for + instance `int` for JSON integer numbers, `bool` for JSON booleans, or + `std::vector` types for JSON arrays. The character type of @ref string_t + as well as an initializer list of this type is excluded to avoid + ambiguities as these types implicitly convert to `std::string`. + + @return copy of the JSON value, converted to type @a ValueType + + @throw type_error.302 in case passed type @a ValueType is incompatible + to the JSON value type (e.g., the JSON value is of type boolean, but a + string is requested); see example below + + @complexity Linear in the size of the JSON value. + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,operator__ValueType} + + @since version 1.0.0 + */ + template < typename ValueType, typename std::enable_if < + not std::is_pointer<ValueType>::value and + not std::is_same<ValueType, detail::json_ref<basic_json>>::value and + not std::is_same<ValueType, typename string_t::value_type>::value +#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 + and not std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>::value +#endif +#if defined(JSON_HAS_CPP_17) + and not std::is_same<ValueType, typename std::string_view>::value +#endif + , int >::type = 0 > + operator ValueType() const + { + // delegate the call to get<>() const + return get<ValueType>(); + } + + /// @} + + + //////////////////// + // element access // + //////////////////// + + /// @name element access + /// Access to the JSON value. + /// @{ + + /*! + @brief access specified array element with bounds checking + + Returns a reference to the element at specified location @a idx, with + bounds checking. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__size_type} + */ + reference at(size_type idx) + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element with bounds checking + + Returns a const reference to the element at specified location @a idx, + with bounds checking. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__size_type_const} + */ + const_reference at(size_type idx) const + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a reference to the element at with specified key @a key, with + bounds checking. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__object_t_key_type} + */ + reference at(const typename object_t::key_type& key) + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a const reference to the element at with specified key @a key, + with bounds checking. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__object_t_key_type_const} + */ + const_reference at(const typename object_t::key_type& key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element + + Returns a reference to the element at specified location @a idx. + + @note If @a idx is beyond the range of the array (i.e., `idx >= size()`), + then the array is silently filled up with `null` values to make `idx` a + valid reference to the last stored element. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array or null; in that + cases, using the [] operator with an index makes no sense. + + @complexity Constant if @a idx is in the range of the array. Otherwise + linear in `idx - size()`. + + @liveexample{The example below shows how array elements can be read and + written using `[]` operator. Note the addition of `null` + values.,operatorarray__size_type} + + @since version 1.0.0 + */ + reference operator[](size_type idx) + { + // implicitly convert null value to an empty array + if (is_null()) + { + m_type = value_t::array; + m_value.array = create<array_t>(); + assert_invariant(); + } + + // operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + // fill up array with null values if given idx is outside range + if (idx >= m_value.array->size()) + { + m_value.array->insert(m_value.array->end(), + idx - m_value.array->size() + 1, + basic_json()); + } + + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified array element + + Returns a const reference to the element at specified location @a idx. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array; in that case, + using the [] operator with an index makes no sense. + + @complexity Constant. + + @liveexample{The example below shows how array elements can be read using + the `[]` operator.,operatorarray__size_type_const} + + @since version 1.0.0 + */ + const_reference operator[](size_type idx) const + { + // const operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + reference operator[](const typename object_t::key_type& key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + const_reference operator[](const typename object_t::key_type& key) const + { + // const operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template<typename T> + reference operator[](T* key) + { + // implicitly convert null to object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // at only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template<typename T> + const_reference operator[](T* key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(key); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const typename object_t::key_type&), this function + does not throw if the given key @a key was not found. + + @note Unlike @ref operator[](const typename object_t::key_type& key), this + function does not implicitly add an element to the position defined by @a + key. This function is furthermore also applicable to const objects. + + @param[in] key key of the element to access + @param[in] default_value the value to return if @a key is not found + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an object; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + + @since version 1.0.0 + */ + template<class ValueType, typename std::enable_if< + std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return *it; + } + + return default_value; + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const typename object_t::key_type&, ValueType) const + */ + string_t value(const typename object_t::key_type& key, const char* default_value) const + { + return value(key, string_t(default_value)); + } + + /*! + @brief access specified object element via JSON Pointer with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(ptr); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const json_pointer&), this function does not throw + if the given key @a key was not found. + + @param[in] ptr a JSON pointer to the element to access + @param[in] default_value the value to return if @a ptr found no value + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an objec; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value_ptr} + + @sa @ref operator[](const json_pointer&) for unchecked access by reference + + @since version 2.0.2 + */ + template<class ValueType, typename std::enable_if< + std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> + ValueType value(const json_pointer& ptr, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this); + } + JSON_CATCH (out_of_range&) + { + return default_value; + } + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const json_pointer&, ValueType) const + */ + string_t value(const json_pointer& ptr, const char* default_value) const + { + return value(ptr, string_t(default_value)); + } + + /*! + @brief access the first element + + Returns a reference to the first element in the container. For a JSON + container `c`, the expression `c.front()` is equivalent to `*c.begin()`. + + @return In case of a structured type (array or object), a reference to the + first element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on `null` value + + @liveexample{The following code shows an example for `front()`.,front} + + @sa @ref back() -- access the last element + + @since version 1.0.0 + */ + reference front() + { + return *begin(); + } + + /*! + @copydoc basic_json::front() + */ + const_reference front() const + { + return *cbegin(); + } + + /*! + @brief access the last element + + Returns a reference to the last element in the container. For a JSON + container `c`, the expression `c.back()` is equivalent to + @code {.cpp} + auto tmp = c.end(); + --tmp; + return *tmp; + @endcode + + @return In case of a structured type (array or object), a reference to the + last element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on a `null` value. See example + below. + + @liveexample{The following code shows an example for `back()`.,back} + + @sa @ref front() -- access the first element + + @since version 1.0.0 + */ + reference back() + { + auto tmp = end(); + --tmp; + return *tmp; + } + + /*! + @copydoc basic_json::back() + */ + const_reference back() const + { + auto tmp = cend(); + --tmp; + return *tmp; + } + + /*! + @brief remove element given an iterator + + Removes the element specified by iterator @a pos. The iterator @a pos must + be valid and dereferenceable. Thus the `end()` iterator (which is valid, + but is not dereferenceable) cannot be used as a value for @a pos. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] pos iterator to the element to remove + @return Iterator following the last removed element. If the iterator @a + pos refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.202 if called on an iterator which does not belong + to the current JSON value; example: `"iterator does not fit current + value"` + @throw invalid_iterator.205 if called on a primitive type with invalid + iterator (i.e., any iterator which is not `begin()`); example: `"iterator + out of range"` + + @complexity The complexity depends on the type: + - objects: amortized constant + - arrays: linear in distance between @a pos and the end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType} + + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template<class IteratorType, typename std::enable_if< + std::is_same<IteratorType, typename basic_json_t::iterator>::value or + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type + = 0> + IteratorType erase(IteratorType pos) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != pos.m_object)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not pos.m_it.primitive_iterator.is_begin())) + { + JSON_THROW(invalid_iterator::create(205, "iterator out of range")); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove elements given an iterator range + + Removes the element specified by the range `[first; last)`. The iterator + @a first does not need to be dereferenceable if `first == last`: erasing + an empty range is a no-op. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] first iterator to the beginning of the range to remove + @param[in] last iterator past the end of the range to remove + @return Iterator following the last removed element. If the iterator @a + second refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.203 if called on iterators which does not belong + to the current JSON value; example: `"iterators do not fit current value"` + @throw invalid_iterator.204 if called on a primitive type with invalid + iterators (i.e., if `first != begin()` and `last != end()`); example: + `"iterators out of range"` + + @complexity The complexity depends on the type: + - objects: `log(size()) + std::distance(first, last)` + - arrays: linear in the distance between @a first and @a last, plus linear + in the distance between @a last and end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType_IteratorType} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template<class IteratorType, typename std::enable_if< + std::is_same<IteratorType, typename basic_json_t::iterator>::value or + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type + = 0> + IteratorType erase(IteratorType first, IteratorType last) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != first.m_object or this != last.m_object)) + { + JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_LIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove element from a JSON object given a key + + Removes elements from a JSON object with the key value @a key. + + @param[in] key value of the elements to remove + + @return Number of elements removed. If @a ObjectType is the default + `std::map` type, the return value will always be `0` (@a key was not + found) or `1` (@a key was found). + + @post References and iterators to the erased elements are invalidated. + Other references and iterators are not affected. + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + + @complexity `log(size()) + count(key)` + + @liveexample{The example shows the effect of `erase()`.,erase__key_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + size_type erase(const typename object_t::key_type& key) + { + // this erase only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->erase(key); + } + + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + /*! + @brief remove element from a JSON array given an index + + Removes element from a JSON array at the index @a idx. + + @param[in] idx index of the element to remove + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + @throw out_of_range.401 when `idx >= size()`; example: `"array index 17 + is out of range"` + + @complexity Linear in distance between @a idx and the end of the container. + + @liveexample{The example shows the effect of `erase()`.,erase__size_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + + @since version 1.0.0 + */ + void erase(const size_type idx) + { + // this erase only works for arrays + if (JSON_LIKELY(is_array())) + { + if (JSON_UNLIKELY(idx >= size())) + { + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + + m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx)); + } + else + { + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + } + + /// @} + + + //////////// + // lookup // + //////////// + + /// @name lookup + /// @{ + + /*! + @brief find an element in a JSON object + + Finds an element in a JSON object with key equivalent to @a key. If the + element is not found or the JSON value is not an object, end() is + returned. + + @note This method always returns @ref end() when executed on a JSON type + that is not an object. + + @param[in] key key value of the element to search for. + + @return Iterator to an element with key equivalent to @a key. If no such + element is found or the JSON value is not an object, past-the-end (see + @ref end()) iterator is returned. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `find()` is used.,find__key_type} + + @since version 1.0.0 + */ + template<typename KeyT> + iterator find(KeyT&& key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key)); + } + + return result; + } + + /*! + @brief find an element in a JSON object + @copydoc find(KeyT&&) + */ + template<typename KeyT> + const_iterator find(KeyT&& key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key)); + } + + return result; + } + + /*! + @brief returns the number of occurrences of a key in a JSON object + + Returns the number of elements with key @a key. If ObjectType is the + default `std::map` type, the return value will always be `0` (@a key was + not found) or `1` (@a key was found). + + @note This method always returns `0` when executed on a JSON type that is + not an object. + + @param[in] key key value of the element to count + + @return Number of elements with key @a key. If the JSON value is not an + object, the return value will be `0`. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `count()` is used.,count} + + @since version 1.0.0 + */ + template<typename KeyT> + size_type count(KeyT&& key) const + { + // return 0 for all nonobject types + return is_object() ? m_value.object->count(std::forward<KeyT>(key)) : 0; + } + + /// @} + + + /////////////// + // iterators // + /////////////// + + /// @name iterators + /// @{ + + /*! + @brief returns an iterator to the first element + + Returns an iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `begin()`.,begin} + + @sa @ref cbegin() -- returns a const iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + iterator begin() noexcept + { + iterator result(this); + result.set_begin(); + return result; + } + + /*! + @copydoc basic_json::cbegin() + */ + const_iterator begin() const noexcept + { + return cbegin(); + } + + /*! + @brief returns a const iterator to the first element + + Returns a const iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).begin()`. + + @liveexample{The following code shows an example for `cbegin()`.,cbegin} + + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + const_iterator cbegin() const noexcept + { + const_iterator result(this); + result.set_begin(); + return result; + } + + /*! + @brief returns an iterator to one past the last element + + Returns an iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `end()`.,end} + + @sa @ref cend() -- returns a const iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + iterator end() noexcept + { + iterator result(this); + result.set_end(); + return result; + } + + /*! + @copydoc basic_json::cend() + */ + const_iterator end() const noexcept + { + return cend(); + } + + /*! + @brief returns a const iterator to one past the last element + + Returns a const iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).end()`. + + @liveexample{The following code shows an example for `cend()`.,cend} + + @sa @ref end() -- returns an iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + const_iterator cend() const noexcept + { + const_iterator result(this); + result.set_end(); + return result; + } + + /*! + @brief returns an iterator to the reverse-beginning + + Returns an iterator to the reverse-beginning; that is, the last element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(end())`. + + @liveexample{The following code shows an example for `rbegin()`.,rbegin} + + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + /*! + @copydoc basic_json::crbegin() + */ + const_reverse_iterator rbegin() const noexcept + { + return crbegin(); + } + + /*! + @brief returns an iterator to the reverse-end + + Returns an iterator to the reverse-end; that is, one before the first + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(begin())`. + + @liveexample{The following code shows an example for `rend()`.,rend} + + @sa @ref crend() -- returns a const reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + /*! + @copydoc basic_json::crend() + */ + const_reverse_iterator rend() const noexcept + { + return crend(); + } + + /*! + @brief returns a const reverse iterator to the last element + + Returns a const iterator to the reverse-beginning; that is, the last + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).rbegin()`. + + @liveexample{The following code shows an example for `crbegin()`.,crbegin} + + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(cend()); + } + + /*! + @brief returns a const reverse iterator to one before the first + + Returns a const reverse iterator to the reverse-end; that is, one before + the first element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).rend()`. + + @liveexample{The following code shows an example for `crend()`.,crend} + + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(cbegin()); + } + + public: + /*! + @brief wrapper to access iterator member functions in range-based for + + This function allows to access @ref iterator::key() and @ref + iterator::value() during range-based for loops. In these loops, a + reference to the JSON values is returned, so there is no access to the + underlying iterator. + + For loop without iterator_wrapper: + + @code{cpp} + for (auto it = j_object.begin(); it != j_object.end(); ++it) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + Range-based for loop without iterator proxy: + + @code{cpp} + for (auto it : j_object) + { + // "it" is of type json::reference and has no key() member + std::cout << "value: " << it << '\n'; + } + @endcode + + Range-based for loop with iterator proxy: + + @code{cpp} + for (auto it : json::iterator_wrapper(j_object)) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + @note When iterating over an array, `key()` will return the index of the + element as string (see example). + + @param[in] ref reference to a JSON value + @return iteration proxy object wrapping @a ref with an interface to use in + range-based for loops + + @liveexample{The following code shows how the wrapper is used,iterator_wrapper} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @note The name of this function is not yet final and may change in the + future. + */ + static iteration_proxy<iterator> iterator_wrapper(reference ref) + { + return iteration_proxy<iterator>(ref); + } + + /*! + @copydoc iterator_wrapper(reference) + */ + static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) + { + return iteration_proxy<const_iterator>(ref); + } + + /// @} + + + ////////////// + // capacity // + ////////////// + + /// @name capacity + /// @{ + + /*! + @brief checks whether the container is empty. + + Checks if a JSON value has no elements (i.e. whether its @ref size is `0`). + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `true` + boolean | `false` + string | `false` + number | `false` + object | result of function `object_t::empty()` + array | result of function `array_t::empty()` + + @liveexample{The following code uses `empty()` to check if a JSON + object contains any elements.,empty} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `empty()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return whether a string stored as JSON value + is empty - it returns whether the JSON container itself is empty which is + false in the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `begin() == end()`. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + bool empty() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return true; + } + + case value_t::array: + { + // delegate call to array_t::empty() + return m_value.array->empty(); + } + + case value_t::object: + { + // delegate call to object_t::empty() + return m_value.object->empty(); + } + + default: + { + // all other types are nonempty + return false; + } + } + } + + /*! + @brief returns the number of elements + + Returns the number of elements in a JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` + boolean | `1` + string | `1` + number | `1` + object | result of function object_t::size() + array | result of function array_t::size() + + @liveexample{The following code calls `size()` on the different value + types.,size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their size() functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return the length of a string stored as JSON + value - it returns the number of elements in the JSON value which is 1 in + the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `std::distance(begin(), end())`. + + @sa @ref empty() -- checks whether the container is empty + @sa @ref max_size() -- returns the maximal number of elements + + @since version 1.0.0 + */ + size_type size() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return 0; + } + + case value_t::array: + { + // delegate call to array_t::size() + return m_value.array->size(); + } + + case value_t::object: + { + // delegate call to object_t::size() + return m_value.object->size(); + } + + default: + { + // all other types have size 1 + return 1; + } + } + } + + /*! + @brief returns the maximum possible number of elements + + Returns the maximum number of elements a JSON value is able to hold due to + system or library implementation limitations, i.e. `std::distance(begin(), + end())` for the JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` (same as `size()`) + boolean | `1` (same as `size()`) + string | `1` (same as `size()`) + number | `1` (same as `size()`) + object | result of function `object_t::max_size()` + array | result of function `array_t::max_size()` + + @liveexample{The following code calls `max_size()` on the different value + types. Note the output is implementation specific.,max_size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `max_size()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of returning `b.size()` where `b` is the largest + possible JSON value. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + size_type max_size() const noexcept + { + switch (m_type) + { + case value_t::array: + { + // delegate call to array_t::max_size() + return m_value.array->max_size(); + } + + case value_t::object: + { + // delegate call to object_t::max_size() + return m_value.object->max_size(); + } + + default: + { + // all other types have max_size() == size() + return size(); + } + } + } + + /// @} + + + /////////////// + // modifiers // + /////////////// + + /// @name modifiers + /// @{ + + /*! + @brief clears the contents + + Clears the content of a JSON value and resets it to the default value as + if @ref basic_json(value_t) would have been called with the current value + type from @ref type(): + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @post Has the same effect as calling + @code {.cpp} + *this = basic_json(type()); + @endcode + + @liveexample{The example below shows the effect of `clear()` to different + JSON types.,clear} + + @complexity Linear in the size of the JSON value. + + @iterators All iterators, pointers and references related to this container + are invalidated. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @sa @ref basic_json(value_t) -- constructor that creates an object with the + same value than calling `clear()` + + @since version 1.0.0 + */ + void clear() noexcept + { + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = 0; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = 0; + break; + } + + case value_t::number_float: + { + m_value.number_float = 0.0; + break; + } + + case value_t::boolean: + { + m_value.boolean = false; + break; + } + + case value_t::string: + { + m_value.string->clear(); + break; + } + + case value_t::array: + { + m_value.array->clear(); + break; + } + + case value_t::object: + { + m_value.object->clear(); + break; + } + + default: + break; + } + } + + /*! + @brief add an object to an array + + Appends the given element @a val to the end of the JSON value. If the + function is called on a JSON null value, an empty array is created before + appending @a val. + + @param[in] val the value to add to the JSON array + + @throw type_error.308 when called on a type other than JSON array or + null; example: `"cannot use push_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON array. Note how the `null` value was silently + converted to a JSON array.,push_back} + + @since version 1.0.0 + */ + void push_back(basic_json&& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (move semantics) + m_value.array->push_back(std::move(val)); + // invalidate object + val.m_type = value_t::null; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(basic_json&& val) + { + push_back(std::move(val)); + return *this; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + void push_back(const basic_json& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array + m_value.array->push_back(val); + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(const basic_json& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + Inserts the given element @a val to the JSON object. If the function is + called on a JSON null value, an empty object is created before inserting + @a val. + + @param[in] val the value to add to the JSON object + + @throw type_error.308 when called on a type other than JSON object or + null; example: `"cannot use push_back() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON object. Note how the `null` value was silently + converted to a JSON object.,push_back__object_t__value} + + @since version 1.0.0 + */ + void push_back(const typename object_t::value_type& val) + { + // push_back only works for null objects or objects + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array + m_value.object->insert(val); + } + + /*! + @brief add an object to an object + @copydoc push_back(const typename object_t::value_type&) + */ + reference operator+=(const typename object_t::value_type& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + This function allows to use `push_back` with an initializer list. In case + + 1. the current value is an object, + 2. the initializer list @a init contains only two elements, and + 3. the first element of @a init is a string, + + @a init is converted into an object element and added using + @ref push_back(const typename object_t::value_type&). Otherwise, @a init + is converted to a JSON value and added using @ref push_back(basic_json&&). + + @param[in] init an initializer list + + @complexity Linear in the size of the initializer list @a init. + + @note This function is required to resolve an ambiguous overload error, + because pairs like `{"key", "value"}` can be both interpreted as + `object_t::value_type` or `std::initializer_list<basic_json>`, see + https://github.com/nlohmann/json/issues/235 for more information. + + @liveexample{The example shows how initializer lists are treated as + objects when possible.,push_back__initializer_list} + */ + void push_back(initializer_list_t init) + { + if (is_object() and init.size() == 2 and (*init.begin())->is_string()) + { + basic_json&& key = init.begin()->moved_or_copied(); + push_back(typename object_t::value_type( + std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied())); + } + else + { + push_back(basic_json(init)); + } + } + + /*! + @brief add an object to an object + @copydoc push_back(initializer_list_t) + */ + reference operator+=(initializer_list_t init) + { + push_back(init); + return *this; + } + + /*! + @brief add an object to an array + + Creates a JSON value from the passed parameters @a args to the end of the + JSON value. If the function is called on a JSON null value, an empty array + is created before appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @throw type_error.311 when called on a type other than JSON array or + null; example: `"cannot use emplace_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` can be used to add + elements to a JSON array. Note how the `null` value was silently converted + to a JSON array.,emplace_back} + + @since version 2.0.8 + */ + template<class... Args> + void emplace_back(Args&& ... args) + { + // emplace_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (perfect forwarding) + m_value.array->emplace_back(std::forward<Args>(args)...); + } + + /*! + @brief add an object to an object if key does not exist + + Inserts a new element into a JSON object constructed in-place with the + given @a args if there is no element with the key in the container. If the + function is called on a JSON null value, an empty object is created before + appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @return a pair consisting of an iterator to the inserted element, or the + already-existing element if no insertion happened, and a bool + denoting whether the insertion took place. + + @throw type_error.311 when called on a type other than JSON object or + null; example: `"cannot use emplace() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `emplace()` can be used to add elements + to a JSON object. Note how the `null` value was silently converted to a + JSON object. Further note how no value is added if there was already one + value stored with the same key.,emplace} + + @since version 2.0.8 + */ + template<class... Args> + std::pair<iterator, bool> emplace(Args&& ... args) + { + // emplace only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array (perfect forwarding) + auto res = m_value.object->emplace(std::forward<Args>(args)...); + // create result iterator and set iterator to the result of emplace + auto it = begin(); + it.m_it.object_iterator = res.first; + + // return pair of iterator and boolean + return {it, res.second}; + } + + /*! + @brief inserts element + + Inserts element @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] val element to insert + @return iterator pointing to the inserted @a val. + + @throw type_error.309 if called on JSON values other than arrays; + example: `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Constant plus linear in the distance between @a pos and end of + the container. + + @liveexample{The example shows how `insert()` is used.,insert} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val); + return result; + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts element + @copydoc insert(const_iterator, const basic_json&) + */ + iterator insert(const_iterator pos, basic_json&& val) + { + return insert(pos, val); + } + + /*! + @brief inserts elements + + Inserts @a cnt copies of @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] cnt number of copies of @a val to insert + @param[in] val element to insert + @return iterator pointing to the first element inserted, or @a pos if + `cnt==0` + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Linear in @a cnt plus linear in the distance between @a pos + and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__count} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val); + return result; + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)` before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + @throw invalid_iterator.211 if @a first or @a last are iterators into + container for which insert is called; example: `"passed iterators may not + belong to container"` + + @return iterator pointing to the first element inserted, or @a pos if + `first==last` + + @complexity Linear in `std::distance(first, last)` plus linear in the + distance between @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__range} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const_iterator first, const_iterator last) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + if (JSON_UNLIKELY(first.m_object == this)) + { + JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert( + pos.m_it.array_iterator, + first.m_it.array_iterator, + last.m_it.array_iterator); + return result; + } + + /*! + @brief inserts elements + + Inserts elements from initializer list @a ilist before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] ilist initializer list to insert the values from + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @return iterator pointing to the first element inserted, or @a pos if + `ilist` is empty + + @complexity Linear in `ilist.size()` plus linear in the distance between + @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__ilist} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, initializer_list_t ilist) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist.begin(), ilist.end()); + return result; + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)`. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than objects; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity Logarithmic: `O(N*log(size() + N))`, where `N` is the number + of elements to insert. + + @liveexample{The example shows how `insert()` is used.,insert__range_object} + + @since version 3.0.0 + */ + void insert(const_iterator first, const_iterator last) + { + // insert only works for objects + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from JSON object @a j and overwrites existing keys. + + @param[in] j JSON object to read values from + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_reference j) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(j.type_name()))); + } + + for (auto it = j.cbegin(); it != j.cend(); ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from from range `[first, last)` and overwrites existing + keys. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used__range.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_iterator first, const_iterator last) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object() + or not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + for (auto it = first; it != last; ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of the JSON value with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other JSON value to exchange the contents with + + @complexity Constant. + + @liveexample{The example below shows how JSON values can be swapped with + `swap()`.,swap__reference} + + @since version 1.0.0 + */ + void swap(reference other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value and + std::is_nothrow_move_assignable<value_t>::value and + std::is_nothrow_move_constructible<json_value>::value and + std::is_nothrow_move_assignable<json_value>::value + ) + { + std::swap(m_type, other.m_type); + std::swap(m_value, other.m_value); + assert_invariant(); + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON array with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other array to exchange the contents with + + @throw type_error.310 when JSON value is not an array; example: `"cannot + use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how arrays can be swapped with + `swap()`.,swap__array_t} + + @since version 1.0.0 + */ + void swap(array_t& other) + { + // swap only works for arrays + if (JSON_LIKELY(is_array())) + { + std::swap(*(m_value.array), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON object with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other object to exchange the contents with + + @throw type_error.310 when JSON value is not an object; example: + `"cannot use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how objects can be swapped with + `swap()`.,swap__object_t} + + @since version 1.0.0 + */ + void swap(object_t& other) + { + // swap only works for objects + if (JSON_LIKELY(is_object())) + { + std::swap(*(m_value.object), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON string with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other string to exchange the contents with + + @throw type_error.310 when JSON value is not a string; example: `"cannot + use swap() with boolean"` + + @complexity Constant. + + @liveexample{The example below shows how strings can be swapped with + `swap()`.,swap__string_t} + + @since version 1.0.0 + */ + void swap(string_t& other) + { + // swap only works for strings + if (JSON_LIKELY(is_string())) + { + std::swap(*(m_value.string), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /// @} + + public: + ////////////////////////////////////////// + // lexicographical comparison operators // + ////////////////////////////////////////// + + /// @name lexicographical comparison operators + /// @{ + + /*! + @brief comparison: equal + + Compares two JSON values for equality according to the following rules: + - Two JSON values are equal if (1) they are from the same type and (2) + their stored values are the same according to their respective + `operator==`. + - Integer and floating-point numbers are automatically converted before + comparison. Note than two NaN values are always treated as unequal. + - Two JSON null values are equal. + + @note Floating-point inside JSON values numbers are compared with + `json::number_float_t::operator==` which is `double::operator==` by + default. To compare floating-point while respecting an epsilon, an alternative + [comparison function](https://github.com/mariokonrad/marnav/blob/master/src/marnav/math/floatingpoint.hpp#L34-#L39) + could be used, for instance + @code {.cpp} + template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value, T>::type> + inline bool is_same(T a, T b, T epsilon = std::numeric_limits<T>::epsilon()) noexcept + { + return std::abs(a - b) <= epsilon; + } + @endcode + + @note NaN values never compare equal to themselves or to other NaN values. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are equal + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Linear. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__equal} + + @since version 1.0.0 + */ + friend bool operator==(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return (*lhs.m_value.array == *rhs.m_value.array); + + case value_t::object: + return (*lhs.m_value.object == *rhs.m_value.object); + + case value_t::null: + return true; + + case value_t::string: + return (*lhs.m_value.string == *rhs.m_value.string); + + case value_t::boolean: + return (lhs.m_value.boolean == rhs.m_value.boolean); + + case value_t::number_integer: + return (lhs.m_value.number_integer == rhs.m_value.number_integer); + + case value_t::number_unsigned: + return (lhs.m_value.number_unsigned == rhs.m_value.number_unsigned); + + case value_t::number_float: + return (lhs.m_value.number_float == rhs.m_value.number_float); + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return (static_cast<number_float_t>(lhs.m_value.number_integer) == rhs.m_value.number_float); + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return (lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_integer)); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return (static_cast<number_float_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_float); + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return (lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_unsigned)); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return (static_cast<number_integer_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return (lhs.m_value.number_integer == static_cast<number_integer_t>(rhs.m_value.number_unsigned)); + } + + return false; + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs == basic_json(rhs)); + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) == rhs); + } + + /*! + @brief comparison: not equal + + Compares two JSON values for inequality by calculating `not (lhs == rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are not equal + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__notequal} + + @since version 1.0.0 + */ + friend bool operator!=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs == rhs); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs != basic_json(rhs)); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) != rhs); + } + + /*! + @brief comparison: less than + + Compares whether one JSON value @a lhs is less than another JSON value @a + rhs according to the following rules: + - If @a lhs and @a rhs have the same type, the values are compared using + the default `<` operator. + - Integer and floating-point numbers are automatically converted before + comparison + - In case @a lhs and @a rhs have different types, the values are ignored + and the order of the types is considered, see + @ref operator<(const value_t, const value_t). + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__less} + + @since version 1.0.0 + */ + friend bool operator<(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return (*lhs.m_value.array) < (*rhs.m_value.array); + + case value_t::object: + return *lhs.m_value.object < *rhs.m_value.object; + + case value_t::null: + return false; + + case value_t::string: + return *lhs.m_value.string < *rhs.m_value.string; + + case value_t::boolean: + return lhs.m_value.boolean < rhs.m_value.boolean; + + case value_t::number_integer: + return lhs.m_value.number_integer < rhs.m_value.number_integer; + + case value_t::number_unsigned: + return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned; + + case value_t::number_float: + return lhs.m_value.number_float < rhs.m_value.number_float; + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_integer) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer < static_cast<number_integer_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return static_cast<number_integer_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; + } + + // We only reach this line if we cannot compare values. In that case, + // we compare types. Note we have to call the operator explicitly, + // because MSVC has problems otherwise. + return operator<(lhs_type, rhs_type); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs < basic_json(rhs)); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) < rhs); + } + + /*! + @brief comparison: less than or equal + + Compares whether one JSON value @a lhs is less than or equal to another + JSON value by calculating `not (rhs < lhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greater} + + @since version 1.0.0 + */ + friend bool operator<=(const_reference lhs, const_reference rhs) noexcept + { + return not (rhs < lhs); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs <= basic_json(rhs)); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) <= rhs); + } + + /*! + @brief comparison: greater than + + Compares whether one JSON value @a lhs is greater than another + JSON value by calculating `not (lhs <= rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__lessequal} + + @since version 1.0.0 + */ + friend bool operator>(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs <= rhs); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs > basic_json(rhs)); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) > rhs); + } + + /*! + @brief comparison: greater than or equal + + Compares whether one JSON value @a lhs is greater than or equal to another + JSON value by calculating `not (lhs < rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greaterequal} + + @since version 1.0.0 + */ + friend bool operator>=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs < rhs); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs >= basic_json(rhs)); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) >= rhs); + } + + /// @} + + /////////////////// + // serialization // + /////////////////// + + /// @name serialization + /// @{ + + /*! + @brief serialize to stream + + Serialize the given JSON value @a j to the output stream @a o. The JSON + value will be serialized using the @ref dump member function. + + - The indentation of the output can be controlled with the member variable + `width` of the output stream @a o. For instance, using the manipulator + `std::setw(4)` on @a o sets the indentation level to `4` and the + serialization result is the same as calling `dump(4)`. + + - The indentation character can be controlled with the member variable + `fill` of the output stream @a o. For instance, the manipulator + `std::setfill('\\t')` sets indentation to use a tab character rather than + the default space character. + + @param[in,out] o stream to serialize to + @param[in] j JSON value to serialize + + @return the stream @a o + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @liveexample{The example below shows the serialization with different + parameters to `width` to adjust the indentation level.,operator_serialize} + + @since version 1.0.0; indentation character added in version 3.0.0 + */ + friend std::ostream& operator<<(std::ostream& o, const basic_json& j) + { + // read width member and use it as indentation parameter if nonzero + const bool pretty_print = (o.width() > 0); + const auto indentation = (pretty_print ? o.width() : 0); + + // reset width to 0 for subsequent calls to this stream + o.width(0); + + // do the actual serialization + serializer s(detail::output_adapter<char>(o), o.fill()); + s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation)); + return o; + } + + /*! + @brief serialize to stream + @deprecated This stream operator is deprecated and will be removed in a + future version of the library. Please use + @ref operator<<(std::ostream&, const basic_json&) + instead; that is, replace calls like `j >> o;` with `o << j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::ostream& operator>>(const basic_json& j, std::ostream& o) + { + return o << j; + } + + /// @} + + + ///////////////////// + // deserialization // + ///////////////////// + + /// @name deserialization + /// @{ + + /*! + @brief deserialize from a compatible input + + This function reads from a compatible input. Examples are: + - an array of 1-byte values + - strings with character/literal type with size of 1 byte + - input streams + - container with contiguous storage of 1-byte values. Compatible container + types include `std::vector`, `std::string`, `std::array`, + `std::valarray`, and `std::initializer_list`. Furthermore, C-style + arrays can be used with `std::begin()`/`std::end()`. User-defined + containers can be used as long as they implement random-access iterators + and a contiguous storage. + + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @pre The container storage is contiguous. Violating this precondition + yields undefined behavior. **This precondition is enforced with an + assertion.** + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with a noncompliant container and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @param[in] i input to read from + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + + @return result of the deserialization + + @throw parse_error.101 if a parse error occurs; example: `""unexpected end + of input; expected string literal""` + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an array.,parse__array__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__string__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__istream__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function reading + from a contiguous container.,parse__contiguouscontainer__parser_callback_t} + + @since version 2.0.3 (contiguous containers) + */ + static basic_json parse(detail::input_adapter i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + /*! + @copydoc basic_json parse(detail::input_adapter, const parser_callback_t) + */ + static basic_json parse(detail::input_adapter& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + static bool accept(detail::input_adapter i) + { + return parser(i).accept(true); + } + + static bool accept(detail::input_adapter& i) + { + return parser(i).accept(true); + } + + /*! + @brief deserialize from an iterator range with contiguous storage + + This function reads from an iterator range of a container with contiguous + storage of 1-byte values. Compatible container types include + `std::vector`, `std::string`, `std::array`, `std::valarray`, and + `std::initializer_list`. Furthermore, C-style arrays can be used with + `std::begin()`/`std::end()`. User-defined containers can be used as long + as they implement random-access iterators and a contiguous storage. + + @pre The iterator range is contiguous. Violating this precondition yields + undefined behavior. **This precondition is enforced with an assertion.** + @pre Each element in the range has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with noncompliant iterators and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @tparam IteratorType iterator of container with contiguous storage + @param[in] first begin of the range to parse (included) + @param[in] last end of the range to parse (excluded) + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return result of the deserialization + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an iterator range.,parse__iteratortype__parser_callback_t} + + @since version 2.0.3 + */ + template<class IteratorType, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static basic_json parse(IteratorType first, IteratorType last, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(detail::input_adapter(first, last), cb, allow_exceptions).parse(true, result); + return result; + } + + template<class IteratorType, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static bool accept(IteratorType first, IteratorType last) + { + return parser(detail::input_adapter(first, last)).accept(true); + } + + /*! + @brief deserialize from stream + @deprecated This stream operator is deprecated and will be removed in a + future version of the library. Please use + @ref operator>>(std::istream&, basic_json&) + instead; that is, replace calls like `j << i;` with `i >> j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::istream& operator<<(basic_json& j, std::istream& i) + { + return operator>>(i, j); + } + + /*! + @brief deserialize from stream + + Deserializes an input stream to a JSON value. + + @param[in,out] i input stream to read a serialized JSON value from + @param[in,out] j JSON value to write the deserialized input to + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below shows how a JSON value is constructed by + reading a serialization from a stream.,operator_deserialize} + + @sa parse(std::istream&, const parser_callback_t) for a variant with a + parser callback function to filter values while parsing + + @since version 1.0.0 + */ + friend std::istream& operator>>(std::istream& i, basic_json& j) + { + parser(detail::input_adapter(i)).parse(false, j); + return i; + } + + /// @} + + /////////////////////////// + // convenience functions // + /////////////////////////// + + /*! + @brief return the type as string + + Returns the type name as string to be used in error messages - usually to + indicate that a function was called on a wrong JSON type. + + @return a string representation of a the @a m_type member: + Value type | return value + ----------- | ------------- + null | `"null"` + boolean | `"boolean"` + string | `"string"` + number | `"number"` (for all number types) + object | `"object"` + array | `"array"` + discarded | `"discarded"` + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Constant. + + @liveexample{The following code exemplifies `type_name()` for all JSON + types.,type_name} + + @sa @ref type() -- return the type of the JSON value + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + + @since version 1.0.0, public since 2.1.0, `const char*` and `noexcept` + since 3.0.0 + */ + const char* type_name() const noexcept + { + { + switch (m_type) + { + case value_t::null: + return "null"; + case value_t::object: + return "object"; + case value_t::array: + return "array"; + case value_t::string: + return "string"; + case value_t::boolean: + return "boolean"; + case value_t::discarded: + return "discarded"; + default: + return "number"; + } + } + } + + + private: + ////////////////////// + // member variables // + ////////////////////// + + /// the type of the current element + value_t m_type = value_t::null; + + /// the value of the current element + json_value m_value = {}; + + ////////////////////////////////////////// + // binary serialization/deserialization // + ////////////////////////////////////////// + + /// @name binary serialization/deserialization support + /// @{ + + public: + /*! + @brief create a CBOR serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the CBOR (Concise + Binary Object Representation) serialization format. CBOR is a binary + serialization format which aims to be more compact than JSON itself, yet + more efficient to parse. + + The library uses the following mapping from JSON values types to + CBOR types according to the CBOR specification (RFC 7049): + + JSON value type | value/range | CBOR type | first byte + --------------- | ------------------------------------------ | ---------------------------------- | --------------- + null | `null` | Null | 0xF6 + boolean | `true` | True | 0xF5 + boolean | `false` | False | 0xF4 + number_integer | -9223372036854775808..-2147483649 | Negative integer (8 bytes follow) | 0x3B + number_integer | -2147483648..-32769 | Negative integer (4 bytes follow) | 0x3A + number_integer | -32768..-129 | Negative integer (2 bytes follow) | 0x39 + number_integer | -128..-25 | Negative integer (1 byte follow) | 0x38 + number_integer | -24..-1 | Negative integer | 0x20..0x37 + number_integer | 0..23 | Integer | 0x00..0x17 + number_integer | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_integer | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_integer | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_integer | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_unsigned | 0..23 | Integer | 0x00..0x17 + number_unsigned | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_unsigned | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_unsigned | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_unsigned | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_float | *any value* | Double-Precision Float | 0xFB + string | *length*: 0..23 | UTF-8 string | 0x60..0x77 + string | *length*: 23..255 | UTF-8 string (1 byte follow) | 0x78 + string | *length*: 256..65535 | UTF-8 string (2 bytes follow) | 0x79 + string | *length*: 65536..4294967295 | UTF-8 string (4 bytes follow) | 0x7A + string | *length*: 4294967296..18446744073709551615 | UTF-8 string (8 bytes follow) | 0x7B + array | *size*: 0..23 | array | 0x80..0x97 + array | *size*: 23..255 | array (1 byte follow) | 0x98 + array | *size*: 256..65535 | array (2 bytes follow) | 0x99 + array | *size*: 65536..4294967295 | array (4 bytes follow) | 0x9A + array | *size*: 4294967296..18446744073709551615 | array (8 bytes follow) | 0x9B + object | *size*: 0..23 | map | 0xA0..0xB7 + object | *size*: 23..255 | map (1 byte follow) | 0xB8 + object | *size*: 256..65535 | map (2 bytes follow) | 0xB9 + object | *size*: 65536..4294967295 | map (4 bytes follow) | 0xBA + object | *size*: 4294967296..18446744073709551615 | map (8 bytes follow) | 0xBB + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a CBOR value. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @note The following CBOR types are not used in the conversion: + - byte strings (0x40..0x5F) + - UTF-8 strings terminated by "break" (0x7F) + - arrays terminated by "break" (0x9F) + - maps terminated by "break" (0xBF) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + - half and single-precision floats (0xF9-0xFA) + - break (0xFF) + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in CBOR format.,to_cbor} + + @sa http://cbor.io + @sa @ref from_cbor(const std::vector<uint8_t>&, const size_t) for the + analogous deserialization + @sa @ref to_msgpack(const basic_json&) for the related MessagePack format + + @since version 2.0.9 + */ + static std::vector<uint8_t> to_cbor(const basic_json& j) + { + std::vector<uint8_t> result; + to_cbor(j, result); + return result; + } + + static void to_cbor(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_cbor(j); + } + + static void to_cbor(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_cbor(j); + } + + /*! + @brief create a MessagePack serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the MessagePack + serialization format. MessagePack is a binary serialization format which + aims to be more compact than JSON itself, yet more efficient to parse. + + The library uses the following mapping from JSON values types to + MessagePack types according to the MessagePack specification: + + JSON value type | value/range | MessagePack type | first byte + --------------- | --------------------------------- | ---------------- | ---------- + null | `null` | nil | 0xC0 + boolean | `true` | true | 0xC3 + boolean | `false` | false | 0xC2 + number_integer | -9223372036854775808..-2147483649 | int64 | 0xD3 + number_integer | -2147483648..-32769 | int32 | 0xD2 + number_integer | -32768..-129 | int16 | 0xD1 + number_integer | -128..-33 | int8 | 0xD0 + number_integer | -32..-1 | negative fixint | 0xE0..0xFF + number_integer | 0..127 | positive fixint | 0x00..0x7F + number_integer | 128..255 | uint 8 | 0xCC + number_integer | 256..65535 | uint 16 | 0xCD + number_integer | 65536..4294967295 | uint 32 | 0xCE + number_integer | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_unsigned | 0..127 | positive fixint | 0x00..0x7F + number_unsigned | 128..255 | uint 8 | 0xCC + number_unsigned | 256..65535 | uint 16 | 0xCD + number_unsigned | 65536..4294967295 | uint 32 | 0xCE + number_unsigned | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_float | *any value* | float 64 | 0xCB + string | *length*: 0..31 | fixstr | 0xA0..0xBF + string | *length*: 32..255 | str 8 | 0xD9 + string | *length*: 256..65535 | str 16 | 0xDA + string | *length*: 65536..4294967295 | str 32 | 0xDB + array | *size*: 0..15 | fixarray | 0x90..0x9F + array | *size*: 16..65535 | array 16 | 0xDC + array | *size*: 65536..4294967295 | array 32 | 0xDD + object | *size*: 0..15 | fix map | 0x80..0x8F + object | *size*: 16..65535 | map 16 | 0xDE + object | *size*: 65536..4294967295 | map 32 | 0xDF + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a MessagePack value. + + @note The following values can **not** be converted to a MessagePack value: + - strings with more than 4294967295 bytes + - arrays with more than 4294967295 elements + - objects with more than 4294967295 elements + + @note The following MessagePack types are not used in the conversion: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - float 32 (0xCA) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in MessagePack format.,to_msgpack} + + @sa http://msgpack.org + @sa @ref from_msgpack(const std::vector<uint8_t>&, const size_t) for the + analogous deserialization + @sa @ref to_cbor(const basic_json& for the related CBOR format + + @since version 2.0.9 + */ + static std::vector<uint8_t> to_msgpack(const basic_json& j) + { + std::vector<uint8_t> result; + to_msgpack(j, result); + return result; + } + + static void to_msgpack(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_msgpack(j); + } + + static void to_msgpack(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_msgpack(j); + } + + /*! + @brief create a JSON value from an input in CBOR format + + Deserializes a given input @a i to a JSON value using the CBOR (Concise + Binary Object Representation) serialization format. + + The library maps CBOR types to JSON value types as follows: + + CBOR type | JSON value type | first byte + ---------------------- | --------------- | ---------- + Integer | number_unsigned | 0x00..0x17 + Unsigned integer | number_unsigned | 0x18 + Unsigned integer | number_unsigned | 0x19 + Unsigned integer | number_unsigned | 0x1A + Unsigned integer | number_unsigned | 0x1B + Negative integer | number_integer | 0x20..0x37 + Negative integer | number_integer | 0x38 + Negative integer | number_integer | 0x39 + Negative integer | number_integer | 0x3A + Negative integer | number_integer | 0x3B + Negative integer | number_integer | 0x40..0x57 + UTF-8 string | string | 0x60..0x77 + UTF-8 string | string | 0x78 + UTF-8 string | string | 0x79 + UTF-8 string | string | 0x7A + UTF-8 string | string | 0x7B + UTF-8 string | string | 0x7F + array | array | 0x80..0x97 + array | array | 0x98 + array | array | 0x99 + array | array | 0x9A + array | array | 0x9B + array | array | 0x9F + map | object | 0xA0..0xB7 + map | object | 0xB8 + map | object | 0xB9 + map | object | 0xBA + map | object | 0xBB + map | object | 0xBF + False | `false` | 0xF4 + True | `true` | 0xF5 + Nill | `null` | 0xF6 + Half-Precision Float | number_float | 0xF9 + Single-Precision Float | number_float | 0xFA + Double-Precision Float | number_float | 0xFB + + @warning The mapping is **incomplete** in the sense that not all CBOR + types can be converted to a JSON value. The following CBOR types + are not supported and will yield parse errors (parse_error.112): + - byte strings (0x40..0x5F) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + + @warning CBOR allows map keys of any type, whereas JSON only allows + strings as keys in object values. Therefore, CBOR maps with keys + other than UTF-8 strings are rejected (parse_error.113). + + @note Any CBOR output created @ref to_cbor can be successfully parsed by + @ref from_cbor. + + @param[in] i an input in CBOR format convertible to an input adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @return deserialized JSON value + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from CBOR were + used in the given input @a v or if the input is not valid CBOR + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in CBOR + format to a JSON value.,from_cbor} + + @sa http://cbor.io + @sa @ref to_cbor(const basic_json&) for the analogous serialization + @sa @ref from_msgpack(detail::input_adapter, const bool) for the + related MessagePack format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0 + */ + static basic_json from_cbor(detail::input_adapter i, + const bool strict = true) + { + return binary_reader(i).parse_cbor(strict); + } + + /*! + @copydoc from_cbor(detail::input_adapter, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + static basic_json from_cbor(A1 && a1, A2 && a2, const bool strict = true) + { + return binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).parse_cbor(strict); + } + + /*! + @brief create a JSON value from an input in MessagePack format + + Deserializes a given input @a i to a JSON value using the MessagePack + serialization format. + + The library maps MessagePack types to JSON value types as follows: + + MessagePack type | JSON value type | first byte + ---------------- | --------------- | ---------- + positive fixint | number_unsigned | 0x00..0x7F + fixmap | object | 0x80..0x8F + fixarray | array | 0x90..0x9F + fixstr | string | 0xA0..0xBF + nil | `null` | 0xC0 + false | `false` | 0xC2 + true | `true` | 0xC3 + float 32 | number_float | 0xCA + float 64 | number_float | 0xCB + uint 8 | number_unsigned | 0xCC + uint 16 | number_unsigned | 0xCD + uint 32 | number_unsigned | 0xCE + uint 64 | number_unsigned | 0xCF + int 8 | number_integer | 0xD0 + int 16 | number_integer | 0xD1 + int 32 | number_integer | 0xD2 + int 64 | number_integer | 0xD3 + str 8 | string | 0xD9 + str 16 | string | 0xDA + str 32 | string | 0xDB + array 16 | array | 0xDC + array 32 | array | 0xDD + map 16 | object | 0xDE + map 32 | object | 0xDF + negative fixint | number_integer | 0xE0-0xFF + + @warning The mapping is **incomplete** in the sense that not all + MessagePack types can be converted to a JSON value. The following + MessagePack types are not supported and will yield parse errors: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @param[in] i an input in MessagePack format convertible to an input + adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from MessagePack were + used in the given input @a i or if the input is not valid MessagePack + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in + MessagePack format to a JSON value.,from_msgpack} + + @sa http://msgpack.org + @sa @ref to_msgpack(const basic_json&) for the analogous serialization + @sa @ref from_cbor(detail::input_adapter, const bool) for the related CBOR + format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0 + */ + static basic_json from_msgpack(detail::input_adapter i, + const bool strict = true) + { + return binary_reader(i).parse_msgpack(strict); + } + + /*! + @copydoc from_msgpack(detail::input_adapter, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + static basic_json from_msgpack(A1 && a1, A2 && a2, const bool strict = true) + { + return binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).parse_msgpack(strict); + } + + /// @} + + ////////////////////////// + // JSON Pointer support // + ////////////////////////// + + /// @name JSON Pointer functions + /// @{ + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. Similar to @ref operator[](const typename + object_t::key_type&), `null` values are created in arrays and objects if + necessary. + + In particular: + - If the JSON pointer points to an object key that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. + - If the JSON pointer points to an array index that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. All indices between the current maximum and the given + index are also filled with `null`. + - The special value `-` is treated as a synonym for the index past the + end. + + @param[in] ptr a JSON pointer + + @return reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer} + + @since version 2.0.0 + */ + reference operator[](const json_pointer& ptr) + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. The function does not change the JSON + value; no `null` values are created. In particular, the the special value + `-` yields an exception. + + @param[in] ptr JSON pointer to the desired element + + @return const reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer_const} + + @since version 2.0.0 + */ + const_reference operator[](const json_pointer& ptr) const + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a reference to the element at with specified JSON pointer @a ptr, + with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer} + */ + reference at(const json_pointer& ptr) + { + return ptr.get_checked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a const reference to the element at with specified JSON pointer @a + ptr, with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer_const} + */ + const_reference at(const json_pointer& ptr) const + { + return ptr.get_checked(this); + } + + /*! + @brief return flattened JSON value + + The function creates a JSON object whose keys are JSON pointers (see [RFC + 6901](https://tools.ietf.org/html/rfc6901)) and whose values are all + primitive. The original JSON value can be restored using the @ref + unflatten() function. + + @return an object that maps JSON pointers to primitive values + + @note Empty objects and arrays are flattened to `null` and will not be + reconstructed correctly by the @ref unflatten() function. + + @complexity Linear in the size the JSON value. + + @liveexample{The following code shows how a JSON object is flattened to an + object whose keys consist of JSON pointers.,flatten} + + @sa @ref unflatten() for the reverse function + + @since version 2.0.0 + */ + basic_json flatten() const + { + basic_json result(value_t::object); + json_pointer::flatten("", *this, result); + return result; + } + + /*! + @brief unflatten a previously flattened JSON value + + The function restores the arbitrary nesting of a JSON value that has been + flattened before using the @ref flatten() function. The JSON value must + meet certain constraints: + 1. The value must be an object. + 2. The keys must be JSON pointers (see + [RFC 6901](https://tools.ietf.org/html/rfc6901)) + 3. The mapped values must be primitive JSON types. + + @return the original JSON from a flattened version + + @note Empty objects and arrays are flattened by @ref flatten() to `null` + values and can not unflattened to their original type. Apart from + this example, for a JSON value `j`, the following is always true: + `j == j.flatten().unflatten()`. + + @complexity Linear in the size the JSON value. + + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + + @liveexample{The following code shows how a flattened JSON object is + unflattened into the original nested JSON object.,unflatten} + + @sa @ref flatten() for the reverse function + + @since version 2.0.0 + */ + basic_json unflatten() const + { + return json_pointer::unflatten(*this); + } + + /// @} + + ////////////////////////// + // JSON Patch functions // + ////////////////////////// + + /// @name JSON Patch functions + /// @{ + + /*! + @brief applies a JSON patch + + [JSON Patch](http://jsonpatch.com) defines a JSON document structure for + expressing a sequence of operations to apply to a JSON) document. With + this function, a JSON Patch is applied to the current JSON value by + executing all operations from the patch. + + @param[in] json_patch JSON patch document + @return patched document + + @note The application of a patch is atomic: Either all operations succeed + and the patched document is returned or an exception is thrown. In + any case, the original value is not changed: the patch is applied + to a copy of the value. + + @throw parse_error.104 if the JSON patch does not consist of an array of + objects + + @throw parse_error.105 if the JSON patch is malformed (e.g., mandatory + attributes are missing); example: `"operation add must have member path"` + + @throw out_of_range.401 if an array index is out of range. + + @throw out_of_range.403 if a JSON pointer inside the patch could not be + resolved successfully in the current JSON value; example: `"key baz not + found"` + + @throw out_of_range.405 if JSON pointer has no parent ("add", "remove", + "move") + + @throw other_error.501 if "test" operation was unsuccessful + + @complexity Linear in the size of the JSON value and the length of the + JSON patch. As usually only a fraction of the JSON value is affected by + the patch, the complexity can usually be neglected. + + @liveexample{The following code shows how a JSON patch is applied to a + value.,patch} + + @sa @ref diff -- create a JSON patch by comparing two JSON values + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + @sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901) + + @since version 2.0.0 + */ + basic_json patch(const basic_json& json_patch) const + { + // make a working copy to apply the patch to + basic_json result = *this; + + // the valid JSON Patch operations + enum class patch_operations {add, remove, replace, move, copy, test, invalid}; + + const auto get_op = [](const std::string & op) + { + if (op == "add") + { + return patch_operations::add; + } + if (op == "remove") + { + return patch_operations::remove; + } + if (op == "replace") + { + return patch_operations::replace; + } + if (op == "move") + { + return patch_operations::move; + } + if (op == "copy") + { + return patch_operations::copy; + } + if (op == "test") + { + return patch_operations::test; + } + + return patch_operations::invalid; + }; + + // wrapper for "add" operation; add value at ptr + const auto operation_add = [&result](json_pointer & ptr, basic_json val) + { + // adding to the root of the target document means replacing it + if (ptr.is_root()) + { + result = val; + } + else + { + // make sure the top element of the pointer exists + json_pointer top_pointer = ptr.top(); + if (top_pointer != ptr) + { + result.at(top_pointer); + } + + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.pop_back(); + basic_json& parent = result[ptr]; + + switch (parent.m_type) + { + case value_t::null: + case value_t::object: + { + // use operator[] to add value + parent[last_path] = val; + break; + } + + case value_t::array: + { + if (last_path == "-") + { + // special case: append to back + parent.push_back(val); + } + else + { + const auto idx = json_pointer::array_index(last_path); + if (JSON_UNLIKELY(static_cast<size_type>(idx) > parent.size())) + { + // avoid undefined behavior + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + else + { + // default case: insert add offset + parent.insert(parent.begin() + static_cast<difference_type>(idx), val); + } + } + break; + } + + default: + { + // if there exists a parent it cannot be primitive + assert(false); // LCOV_EXCL_LINE + } + } + } + }; + + // wrapper for "remove" operation; remove value at ptr + const auto operation_remove = [&result](json_pointer & ptr) + { + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.pop_back(); + basic_json& parent = result.at(ptr); + + // remove child + if (parent.is_object()) + { + // perform range check + auto it = parent.find(last_path); + if (JSON_LIKELY(it != parent.end())) + { + parent.erase(it); + } + else + { + JSON_THROW(out_of_range::create(403, "key '" + last_path + "' not found")); + } + } + else if (parent.is_array()) + { + // note erase performs range check + parent.erase(static_cast<size_type>(json_pointer::array_index(last_path))); + } + }; + + // type check: top level value must be an array + if (JSON_UNLIKELY(not json_patch.is_array())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // iterate and apply the operations + for (const auto& val : json_patch) + { + // wrapper to get a value for an operation + const auto get_value = [&val](const std::string & op, + const std::string & member, + bool string_type) -> basic_json& + { + // find value + auto it = val.m_value.object->find(member); + + // context-sensitive error message + const auto error_msg = (op == "op") ? "operation" : "operation '" + op + "'"; + + // check if desired value is present + if (JSON_UNLIKELY(it == val.m_value.object->end())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have member '" + member + "'")); + } + + // check if result is of type string + if (JSON_UNLIKELY(string_type and not it->second.is_string())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have string member '" + member + "'")); + } + + // no error: return value + return it->second; + }; + + // type check: every element of the array must be an object + if (JSON_UNLIKELY(not val.is_object())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // collect mandatory members + const std::string op = get_value("op", "op", true); + const std::string path = get_value(op, "path", true); + json_pointer ptr(path); + + switch (get_op(op)) + { + case patch_operations::add: + { + operation_add(ptr, get_value("add", "value", false)); + break; + } + + case patch_operations::remove: + { + operation_remove(ptr); + break; + } + + case patch_operations::replace: + { + // the "path" location must exist - use at() + result.at(ptr) = get_value("replace", "value", false); + break; + } + + case patch_operations::move: + { + const std::string from_path = get_value("move", "from", true); + json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The move operation is functionally identical to a + // "remove" operation on the "from" location, followed + // immediately by an "add" operation at the target + // location with the value that was just removed. + operation_remove(from_ptr); + operation_add(ptr, v); + break; + } + + case patch_operations::copy: + { + const std::string from_path = get_value("copy", "from", true); + const json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The copy is functionally identical to an "add" + // operation at the target location using the value + // specified in the "from" member. + operation_add(ptr, v); + break; + } + + case patch_operations::test: + { + bool success = false; + JSON_TRY + { + // check if "value" matches the one at "path" + // the "path" location must exist - use at() + success = (result.at(ptr) == get_value("test", "value", false)); + } + JSON_CATCH (out_of_range&) + { + // ignore out of range errors: success remains false + } + + // throw an exception if test fails + if (JSON_UNLIKELY(not success)) + { + JSON_THROW(other_error::create(501, "unsuccessful: " + val.dump())); + } + + break; + } + + case patch_operations::invalid: + { + // op must be "add", "remove", "replace", "move", "copy", or + // "test" + JSON_THROW(parse_error::create(105, 0, "operation value '" + op + "' is invalid")); + } + } + } + + return result; + } + + /*! + @brief creates a diff as a JSON patch + + Creates a [JSON Patch](http://jsonpatch.com) so that value @a source can + be changed into the value @a target by calling @ref patch function. + + @invariant For two JSON values @a source and @a target, the following code + yields always `true`: + @code {.cpp} + source.patch(diff(source, target)) == target; + @endcode + + @note Currently, only `remove`, `add`, and `replace` operations are + generated. + + @param[in] source JSON value to compare from + @param[in] target JSON value to compare against + @param[in] path helper value to create JSON pointers + + @return a JSON patch to convert the @a source to @a target + + @complexity Linear in the lengths of @a source and @a target. + + @liveexample{The following code shows how a JSON patch is created as a + diff for two JSON values.,diff} + + @sa @ref patch -- apply a JSON patch + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + + @since version 2.0.0 + */ + static basic_json diff(const basic_json& source, const basic_json& target, + const std::string& path = "") + { + // the patch + basic_json result(value_t::array); + + // if the values are the same, return empty patch + if (source == target) + { + return result; + } + + if (source.type() != target.type()) + { + // different types: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + } + else + { + switch (source.type()) + { + case value_t::array: + { + // first pass: traverse common elements + std::size_t i = 0; + while (i < source.size() and i < target.size()) + { + // recursive call to compare array values at index i + auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + ++i; + } + + // i now reached the end of at least one array + // in a second pass, traverse the remaining elements + + // remove my remaining elements + const auto end_index = static_cast<difference_type>(result.size()); + while (i < source.size()) + { + // add operations in reverse order to avoid invalid + // indices + result.insert(result.begin() + end_index, object( + { + {"op", "remove"}, + {"path", path + "/" + std::to_string(i)} + })); + ++i; + } + + // add other remaining elements + while (i < target.size()) + { + result.push_back( + { + {"op", "add"}, + {"path", path + "/" + std::to_string(i)}, + {"value", target[i]} + }); + ++i; + } + + break; + } + + case value_t::object: + { + // first pass: traverse this object's elements + for (auto it = source.cbegin(); it != source.cend(); ++it) + { + // escape the key name to be used in a JSON patch + const auto key = json_pointer::escape(it.key()); + + if (target.find(it.key()) != target.end()) + { + // recursive call to compare object values at key it + auto temp_diff = diff(it.value(), target[it.key()], path + "/" + key); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + } + else + { + // found a key that is not in o -> remove it + result.push_back(object( + { + {"op", "remove"}, {"path", path + "/" + key} + })); + } + } + + // second pass: traverse other object's elements + for (auto it = target.cbegin(); it != target.cend(); ++it) + { + if (source.find(it.key()) == source.end()) + { + // found a key that is not in this -> add it + const auto key = json_pointer::escape(it.key()); + result.push_back( + { + {"op", "add"}, {"path", path + "/" + key}, + {"value", it.value()} + }); + } + } + + break; + } + + default: + { + // both primitive type: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + break; + } + } + } + + return result; + } + + /// @} +}; + +///////////// +// presets // +///////////// + +/*! +@brief default JSON class + +This type is the default specialization of the @ref basic_json class which +uses the standard template types. + +@since version 1.0.0 +*/ +using json = basic_json<>; + +////////////////// +// json_pointer // +////////////////// + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_and_create(NLOHMANN_BASIC_JSON_TPL& j) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + auto result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->m_type) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + JSON_TRY + { + result = &result->operator[](static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten")); + } + } + + return *result; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_unchecked(NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->m_type == detail::value_t::null) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const char x) + { + return (x >= '0' and x <= '9'); + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums or reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_checked(NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +const NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_unchecked(const NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // use unchecked array access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +const NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_checked(const NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +void json_pointer::flatten(const std::string& reference_string, + const NLOHMANN_BASIC_JSON_TPL& value, + NLOHMANN_BASIC_JSON_TPL& result) +{ + switch (value.m_type) + { + case detail::value_t::array: + { + if (value.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_value.array->size(); ++i) + { + flatten(reference_string + "/" + std::to_string(i), + value.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_value.object) + { + flatten(reference_string + "/" + escape(element.first), element.second, result); + } + } + break; + } + + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL +json_pointer::unflatten(const NLOHMANN_BASIC_JSON_TPL& value) +{ + if (JSON_UNLIKELY(not value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened")); + } + + NLOHMANN_BASIC_JSON_TPL result; + + // iterate the JSON object values + for (const auto& element : *value.m_value.object) + { + if (JSON_UNLIKELY(not element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive")); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; +} + +inline bool operator==(json_pointer const& lhs, json_pointer const& rhs) noexcept +{ + return (lhs.reference_tokens == rhs.reference_tokens); +} + +inline bool operator!=(json_pointer const& lhs, json_pointer const& rhs) noexcept +{ + return not (lhs == rhs); +} +} // namespace nlohmann + + +/////////////////////// +// nonmember support // +/////////////////////// + +// specialization of std::swap, and std::hash +namespace std +{ +/*! +@brief exchanges the values of two JSON objects + +@since version 1.0.0 +*/ +template<> +inline void swap(nlohmann::json& j1, + nlohmann::json& j2) noexcept( + is_nothrow_move_constructible<nlohmann::json>::value and + is_nothrow_move_assignable<nlohmann::json>::value + ) +{ + j1.swap(j2); +} + +/// hash value for JSON objects +template<> +struct hash<nlohmann::json> +{ + /*! + @brief return a hash value for a JSON object + + @since version 1.0.0 + */ + std::size_t operator()(const nlohmann::json& j) const + { + // a naive hashing via the string representation + const auto& h = hash<nlohmann::json::string_t>(); + return h(j.dump()); + } +}; + +/// specialization for std::less<value_t> +/// @note: do not remove the space after '<', +/// see https://github.com/nlohmann/json/pull/679 +template<> +struct less< ::nlohmann::detail::value_t> +{ + /*! + @brief compare two value_t enum values + @since version 3.0.0 + */ + bool operator()(nlohmann::detail::value_t lhs, + nlohmann::detail::value_t rhs) const noexcept + { + return nlohmann::detail::operator<(lhs, rhs); + } +}; + +} // namespace std + +/*! +@brief user-defined string literal for JSON values + +This operator implements a user-defined string literal for JSON objects. It +can be used by adding `"_json"` to a string literal and returns a JSON object +if no parse error occurred. + +@param[in] s a string representation of a JSON object +@param[in] n the length of string @a s +@return a JSON object + +@since version 1.0.0 +*/ +inline nlohmann::json operator "" _json(const char* s, std::size_t n) +{ + return nlohmann::json::parse(s, s + n); +} + +/*! +@brief user-defined string literal for JSON pointer + +This operator implements a user-defined string literal for JSON Pointers. It +can be used by adding `"_json_pointer"` to a string literal and returns a JSON pointer +object if no parse error occurred. + +@param[in] s a string representation of a JSON Pointer +@param[in] n the length of string @a s +@return a JSON pointer object + +@since version 2.0.0 +*/ +inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +{ + return nlohmann::json::json_pointer(std::string(s, n)); +} + +// restore GCC/clang diagnostic settings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic pop +#endif +#if defined(__clang__) + #pragma GCC diagnostic pop +#endif + +// clean up +#undef JSON_CATCH +#undef JSON_THROW +#undef JSON_TRY +#undef JSON_LIKELY +#undef JSON_UNLIKELY +#undef JSON_DEPRECATED +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL + +#endif diff --git a/modules/Communication/PC2CarLib/src/CommandReceiver.cpp b/modules/catkin_ws/src/PC2CarLib/src/CommandReceiver.cpp similarity index 100% rename from modules/Communication/PC2CarLib/src/CommandReceiver.cpp rename to modules/catkin_ws/src/PC2CarLib/src/CommandReceiver.cpp diff --git a/modules/Communication/PC2CarLib/src/PC2CarLibConfig.h.in b/modules/catkin_ws/src/PC2CarLib/src/PC2CarLibConfig.h.in similarity index 100% rename from modules/Communication/PC2CarLib/src/PC2CarLibConfig.h.in rename to modules/catkin_ws/src/PC2CarLib/src/PC2CarLibConfig.h.in diff --git a/modules/Communication/PC2CarLib/test/Main.cpp b/modules/catkin_ws/src/PC2CarLib/test/Main.cpp similarity index 100% rename from modules/Communication/PC2CarLib/test/Main.cpp rename to modules/catkin_ws/src/PC2CarLib/test/Main.cpp diff --git a/modules/Communication/PlatoonProtocolLib/.gitignore b/modules/catkin_ws/src/PlatoonProtocolLib/.gitignore similarity index 100% rename from modules/Communication/PlatoonProtocolLib/.gitignore rename to modules/catkin_ws/src/PlatoonProtocolLib/.gitignore diff --git a/modules/Communication/PlatoonProtocolLib/CMakeLists.txt b/modules/catkin_ws/src/PlatoonProtocolLib/CMakeLists.txt similarity index 90% rename from modules/Communication/PlatoonProtocolLib/CMakeLists.txt rename to modules/catkin_ws/src/PlatoonProtocolLib/CMakeLists.txt index ac22f18a22e836f35aba9e2462602766d813cbae..7e917acea3d71f415ae9f11fb7fa5ec6529c39d2 100644 --- a/modules/Communication/PlatoonProtocolLib/CMakeLists.txt +++ b/modules/catkin_ws/src/PlatoonProtocolLib/CMakeLists.txt @@ -18,12 +18,6 @@ include_directories("${PROJECT_BINARY_DIR}") # compiler flags set(CMAKE_CXX_FLAGS -pthread) -set(NETWORKINGLIB_GLOBALLY_INSTALLED FALSE) -if(NETWORKINGLIB_GLOBALLY_INSTALLED) - # import the NetworkingLib - find_package(NetworkingLib) -endif() - ####################################### # PlatoonPlatoonProtocol Library Target ####################################### @@ -68,18 +62,16 @@ endforeach() # Specify public header files set_target_properties(PlatoonProtocolLib PROPERTIES PUBLIC_HEADER ${PUBLIC_HEADER_FILES_COMBINED}) -set(IS_SUBPORJECT) -if(IS_SUBPROJECT) - target_include_directories(PlatoonProtocolLib PUBLIC "${PROJECT_SOURCE_DIR}/include") -else() - find_package(NetworkingLib REQUIRED) -endif() +find_package(NetworkingLib REQUIRED CONFIG PATHS "${CMAKE_CURRENT_LIST_DIR}/../../install") +target_include_directories(PlatoonProtocolLib PUBLIC ${NETWORKINGLIB_INCLUDE_DIRS}) +target_link_libraries(PlatoonProtocolLib NetworkingLib) set(INSTALL_PACKAGE ON) if(${INSTALL_PACKAGE}) ############################# # Specify install directories ############################# + set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../install/PlatoonProtocol") set(INSTALL_LIB_DIR lib/PlatoonProtocolLib) set(INSTALL_INCLUDE_DIR include/PlatoonProtocolLib) set(INSTALL_CMAKE_DIR lib/PlatoonProtocolLib/CMake) @@ -97,7 +89,7 @@ if(${INSTALL_PACKAGE}) #################################################### # Add all targets to the build-tree export set export(TARGETS PlatoonProtocolLib - FILE "${PROJECT_BINARY_DIR}/PlatoonProtocolTargets.cmake") + FILE "${PROJECT_BINARY_DIR}/PlatoonProtocolLibTargets.cmake") # Export the package for use from the build-tree # (this registers the build-tree with a global CMake-registry) @@ -108,14 +100,14 @@ if(${INSTALL_PACKAGE}) # Configure *Config.cmake.in for the build tree # Put it inside the binary directory - set(CONF_INCLUDE_DIRS "${PROJECT_BINARY_DIR}") + set(CONF_INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include") configure_file(PlatoonProtocolLibConfig.cmake.in "${PROJECT_BINARY_DIR}/PlatoonProtocolLibConfig.cmake" @ONLY) # Configure *Config.cmake.in for the install tree # Put it inside the cmake-files directory (which is located inside the binary directory) - set(CONF_INCLUDE_DIRS "\${PLATOON_PROTOCOL_LIB_CMAKE_DIR}/${REL_INCLUDE_DIR}") + set(CONF_INCLUDE_DIRS "\${PLATOON_PROTOCOL_LIB_CMAKE_DIR}/${REL_INCLUDE_DIR}/..") configure_file(PlatoonProtocolLibConfig.cmake.in "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/PlatoonProtocolLibConfig.cmake" @ONLY) @@ -154,6 +146,7 @@ set(TEST_SOURCE_FILES ${SOURCE_FILES} test/ProtocolTest.h test/ProtocolTest.cpp add_executable(PlatoonProtocolTest ${TEST_SOURCE_FILES}) target_link_libraries(PlatoonProtocolTest NetworkingLib) +target_include_directories(PlatoonProtocolTest PUBLIC ${NETWORKINGLIB_INCLUDE_DIRS}) # For debugging target_compile_options(PlatoonProtocolTest PUBLIC -fopenmp -fPIC -O0 -g3 -ggdb) \ No newline at end of file diff --git a/modules/Communication/PlatoonProtocolLib/PlatoonProtocolLibConfig.cmake.in b/modules/catkin_ws/src/PlatoonProtocolLib/PlatoonProtocolLibConfig.cmake.in similarity index 100% rename from modules/Communication/PlatoonProtocolLib/PlatoonProtocolLibConfig.cmake.in rename to modules/catkin_ws/src/PlatoonProtocolLib/PlatoonProtocolLibConfig.cmake.in diff --git a/modules/Communication/PlatoonProtocolLib/PlatoonProtocolLibConfigVersion.cmake.in b/modules/catkin_ws/src/PlatoonProtocolLib/PlatoonProtocolLibConfigVersion.cmake.in similarity index 100% rename from modules/Communication/PlatoonProtocolLib/PlatoonProtocolLibConfigVersion.cmake.in rename to modules/catkin_ws/src/PlatoonProtocolLib/PlatoonProtocolLibConfigVersion.cmake.in diff --git a/modules/Communication/PlatoonProtocolLib/README.md b/modules/catkin_ws/src/PlatoonProtocolLib/README.md similarity index 100% rename from modules/Communication/PlatoonProtocolLib/README.md rename to modules/catkin_ws/src/PlatoonProtocolLib/README.md diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Definitions.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Definitions.h new file mode 100644 index 0000000000000000000000000000000000000000..8b39bc249ebc0cb712ef5fd058f03be492ae551e --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Definitions.h @@ -0,0 +1,24 @@ +// +// Created by philipp on 20.01.18. +// + +#ifndef PLATOONPROTOCOL_DEFINITIONS_H +#define PLATOONPROTOCOL_DEFINITIONS_H + +// +// User definitions. +// ----------------- +// + +// Enable logging by defining PLATOON_PROTOCOL_ENABLE_LOGGING. +#define PLATOON_PROTOCOL_ENABLE_LOGGING + +// Define the stream for logging. +#define PLATOON_PROTOCOL_LOGGING_STREAM std::cout + +// Enable local testing by making the port numbers depend on the vehicle-ID. +// ATTENTION: This should ONLY be used to test your code! +// Don't define this in real usage! +#define PLATOON_PROTOCOL_ENABLE_LOCAL_TESTING + +#endif //PLATOONPROTOCOL_DEFINITIONS_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/FollowerVehicle.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/FollowerVehicle.h new file mode 100644 index 0000000000000000000000000000000000000000..8ffc94144bf38566db5d17b09ba9af6924bdd2d5 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/FollowerVehicle.h @@ -0,0 +1,87 @@ +// +// Created by philipp on 30.11.17. +// + +#ifndef PROTOCOL_FOLLOWERVEHICLE_H +#define PROTOCOL_FOLLOWERVEHICLE_H + + +#include <mutex> +#include "NetworkingLib/DatagramReceiver.h" +#include "NetworkingLib/DatagramSender.h" +#include "Vehicle.h" +#include "VehicleEndpoint.h" +#include "PlatoonMessage.h" +#include "Utils.h" + +namespace platoonProtocol +{ + +class FollowerVehicle : public Vehicle +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<FollowerVehicle>; + + static Ptr create(networking::Networking & net, VehicleId ownVehicleId); + + // This should not be used outside. + FollowerVehicle(PrivateTag, networking::Networking & net, VehicleId ownVehicleId); + + void stop() override; + + PlatoonConfig getPlatoonConfig() const noexcept; + + void setOnPlatoonConfigUpdatedCallback(Callback callback) + { onPlatoonConfigUpdatedCallback = callback; } + +protected: + void doCreatePlatoon() override; + + void doRunPlatoon() override; + + void doLeavePlatoon() override; + + void makePlatoonCreateRequest(const VehicleEndpoint & vehicleEndpoint) override; + + void makePlatoonCreateResponse(const networking::Resolver::Endpoint & clientEndpoint, + const PlatoonMessage & request, + PlatoonMessage & response) override; + + Ptr shared_from_this(); + +private: + static constexpr networking::time::Duration HEARTBEAT_INTERVAL = std::chrono::milliseconds(50); + static constexpr networking::time::Duration BROADCAST_TIMEOUT = std::chrono::milliseconds(500); + + VehicleEndpoint leader; + networking::message::DatagramReceiver<PlatoonMessage>::Ptr broadcastReceiver; + // We need to track of the timestamp when the last broadcast message arrived. + // One could think that the timeout-functionality of the networking::message::DatagramReceiver + // would suffice but we also have to consider non-heartbeat-messages or invalid messages which + // we could potentially receive as well. + networking::time::TimePoint lastBroadcastTimestamp; + networking::message::DatagramSender<PlatoonMessage>::Ptr heartbeatSender; + networking::time::Timer::Ptr heartbeatTimer; + Callback onPlatoonConfigUpdatedCallback; + + void startHeartbeat(); + + void stopHeartbeat(); + + void startReceiveBroadcast(); + + void receiveBroadcast(); + + void stopReceiveBroadcast(); + + void sendLeavePlatoonMessage(); +}; + +} + +#endif //PROTOCOL_FOLLOWERVEHICLE_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/LeaderVehicle.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/LeaderVehicle.h new file mode 100644 index 0000000000000000000000000000000000000000..ade7f9acd14c32776df0cbf388652eb4c9510824 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/LeaderVehicle.h @@ -0,0 +1,99 @@ +// +// Created by philipp on 30.11.17. +// + +#ifndef PROTOCOL_LEADERVEHICLE_H +#define PROTOCOL_LEADERVEHICLE_H + + +#include <mutex> +#include <unordered_map> +#include <bits/unordered_map.h> +#include "Vehicle.h" +#include "PlatoonService.h" +#include "Utils.h" +#include "NetworkingLib/DatagramSender.h" +#include "NetworkingLib/DatagramReceiver.h" + +namespace platoonProtocol +{ + +class LeaderVehicle : public Vehicle +{ +private: + struct PrivateTag + { + }; + +public: + using Ptr = std::shared_ptr<LeaderVehicle>; + + static Ptr create(networking::Networking & net, VehicleId ownVehicleId); + + // This should not be used outside. + LeaderVehicle(PrivateTag, networking::Networking & net, VehicleId ownVehicleId); + + void stop() override; + + std::size_t getNumFollowers(); + + void setPlatoonConfig(const PlatoonConfig & platoonConfig); + +protected: + void doCreatePlatoon() override; + + void doRunPlatoon() override; + + void doLeavePlatoon() override; + + void makePlatoonCreateRequest(const VehicleEndpoint & vehicleEndpoint) override; + + void makePlatoonCreateResponse(const networking::Resolver::Endpoint & clientEndpoint, + const PlatoonMessage & request, + PlatoonMessage & response) override; + + Ptr shared_from_this(); + +private: + static constexpr networking::time::Duration HEARTBEAT_TIMEOUT = std::chrono::milliseconds(1000); + static constexpr networking::time::Duration BROADCAST_INTERVAL = std::chrono::milliseconds(10); + + struct Follower + { + VehicleEndpoint endpoint; + networking::time::Timer::Ptr heartbeatTimer; + networking::message::DatagramSender<PlatoonMessage>::Ptr broadcastSender; + }; + + std::unordered_map<VehicleId, Follower> followers{2}; + std::mutex followersMutex; + networking::time::Timer::Ptr broadcastTimer; + networking::message::DatagramReceiver<PlatoonMessage>::Ptr heartbeatReceiver; + + bool findFollower(VehicleId id); + + void addFollower(const VehicleEndpoint & endpoint); + + void removeFollower(Follower & follower); + + void startHeartbeatTimer(Follower & follower); + + void stopHeartbeatTimer(Follower & follower); + + void startReceiveHeartbeats(); + + void receiveHeartbeat(); + + void stopReceiveHeartbeats(); + + void startBroadcasting(); + + void stopBroadcasting(); + + void removeAllFollowers(); +}; + +} + + +#endif //PROTOCOL_LEADERVEHICLE_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonMessage.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonMessage.h new file mode 100644 index 0000000000000000000000000000000000000000..4d6a62c59561ff92bb5f0ad75598cd7c6596f3f7 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonMessage.h @@ -0,0 +1,180 @@ +// +// Created by philipp on 01.12.17. +// + +#ifndef PROTOCOL_PLATOONCREATEMESSAGE_H +#define PROTOCOL_PLATOONCREATEMESSAGE_H + +#include <cstdint> +#include <vector> +#include "Protocol.h" +#include "json.hpp" +#include "NetworkingLib/Message.h" +#include <unordered_set> + +namespace platoonProtocol +{ + +namespace messageTypes +{ + +constexpr MessageType LV_BROADCAST = 0x00000001; +constexpr MessageType FV_HEARTBEAT = 0x00000002; +constexpr MessageType LV_REQUEST = 0x00000004; +constexpr MessageType FV_REQUEST = 0x00000008; +constexpr MessageType ACCEPT_RESPONSE = 0x00000010; +constexpr MessageType REJECT_RESPONSE = 0x00000020; +constexpr MessageType LEAVE_PLATOON = 0x00000040; + +const std::unordered_set<MessageType> standardMessageTypes{ + LV_BROADCAST, FV_HEARTBEAT, LV_REQUEST, FV_REQUEST, ACCEPT_RESPONSE, REJECT_RESPONSE, LEAVE_PLATOON}; + +inline bool isStandardMessageType(MessageType messageType) +{ + return messageTypes::standardMessageTypes.find(messageType) != messageTypes::standardMessageTypes.end(); +} + +} + +namespace jsonNames +{ + +constexpr char VEHICLE_ID[] = "vehicle_id"; +constexpr char PLATOON_ID[] = "platoon_id"; +constexpr char PLATOON_SPEED[] = "ps"; +constexpr char INNER_PLATOON_DISTANCE[] = "ips"; + +} + +struct PlatoonMessage +{ + static constexpr std::size_t MAX_SIZE = 256; + + PlatoonMessage() + {} + + PlatoonMessage( + VehicleId vehicleId, + MessageType messageType, + PlatoonId platoonId, + PlatoonSpeed platoonSpeed, + InnerPlatoonDistance innerPlatoonDistance) + : vehicleId(vehicleId) + , messageType(messageType) + , platoonId(platoonId) + , platoonSpeed(platoonSpeed) + , innerPlatoonDistance(innerPlatoonDistance) + {} + + static PlatoonMessage followerRequest(VehicleId vehicleId) + { return PlatoonMessage(vehicleId, messageTypes::FV_REQUEST, 0, 0, 0); } + + static PlatoonMessage leaderRequest(VehicleId vehicleId, PlatoonId platoonId) + { return PlatoonMessage(vehicleId, messageTypes::LV_REQUEST, platoonId, 0, 0); } + + static PlatoonMessage rejectResponse(VehicleId vehicleId) + { return PlatoonMessage(vehicleId, messageTypes::REJECT_RESPONSE, 0, 0, 0); } + + static PlatoonMessage acceptResponse(VehicleId vehicleId, PlatoonId platoonId) + { return PlatoonMessage(vehicleId, messageTypes::ACCEPT_RESPONSE, platoonId, 0, 0); } + + static PlatoonMessage broadcastMessage(VehicleId vehicleId, + PlatoonId platoonId, + PlatoonSpeed platoonSpeed, + InnerPlatoonDistance innerPlatoonDistance) + { return PlatoonMessage(vehicleId, messageTypes::LV_BROADCAST, platoonId, platoonSpeed, innerPlatoonDistance); } + + static PlatoonMessage heartbeatMessage(VehicleId vehicleId, PlatoonId platoonId) + { return PlatoonMessage(vehicleId, messageTypes::FV_HEARTBEAT, platoonId, 0, 0); } + + static PlatoonMessage leaveMessage(VehicleId vehicleId, PlatoonId platoonId) + { return PlatoonMessage(vehicleId, messageTypes::LEAVE_PLATOON, platoonId, 0, 0); } + + VehicleId vehicleId; + MessageType messageType; + PlatoonId platoonId; + PlatoonSpeed platoonSpeed; + InnerPlatoonDistance innerPlatoonDistance; +}; + +} + +namespace networking +{ +namespace message +{ + +template<> +struct Encoder<platoonProtocol::PlatoonMessage> +{ + void operator()(const platoonProtocol::PlatoonMessage & message, std::string & data) const + { + using namespace platoonProtocol; + + auto messageType = message.messageType; + + if (!messageTypes::isStandardMessageType(messageType)) + throw 0; // Throw something to signal a failed encoding. + + // 4 bytes for message type + data = std::string(4, '\0'); + + std::uint8_t numDataBytes[sizeof(MessageType)]; + networking::utils::toBigEndian<4>(numDataBytes, messageType); + + for (std::size_t i = 0; i < sizeof(MessageType); i++) + data[i] = numDataBytes[i]; + + using json = nlohmann::json; + using namespace jsonNames; + auto j = json{{VEHICLE_ID, message.vehicleId}, + {PLATOON_ID, message.platoonId}}; + + if (messageType == messageTypes::LV_BROADCAST) + { + j[PLATOON_SPEED] = message.platoonSpeed; + j[INNER_PLATOON_DISTANCE] = message.innerPlatoonDistance; + } + + data.append(j.dump()); + } +}; + +template<> +struct Decoder<platoonProtocol::PlatoonMessage> +{ + void operator()(platoonProtocol::PlatoonMessage & message, const std::string & data) const + { + using namespace platoonProtocol; + + if (data.size() < sizeof(MessageType)) + throw 0; // Throw something to inform that we failed to decode the message. + + using json = nlohmann::json; + auto j = json::parse(data.begin() + sizeof(MessageType), data.end()); + + auto messageType = networking::utils::fromBigEndian<sizeof(MessageType), MessageType>( + (const std::uint8_t *) data.c_str()); + + // We only know message types conforming to the standard protocol specification. + if (!messageTypes::isStandardMessageType(messageType)) + throw 0; + + message.messageType = messageType; + + using namespace jsonNames; + message.vehicleId = j.at(VEHICLE_ID).get<VehicleId>(); + message.platoonId = j.at(PLATOON_ID).get<PlatoonId>(); + + if (messageType == messageTypes::LV_BROADCAST) + { + message.platoonSpeed = j.at(PLATOON_SPEED).get<PlatoonSpeed>(); + message.innerPlatoonDistance = j.at(INNER_PLATOON_DISTANCE).get<InnerPlatoonDistance>(); + } + }; +}; + +} +} + +#endif //PROTOCOL_PLATOONCREATEMESSAGE_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonService.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonService.h new file mode 100644 index 0000000000000000000000000000000000000000..9facf4831faac6486dce19720a894d1145e0c146 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/PlatoonService.h @@ -0,0 +1,21 @@ +// +// Created by philipp on 01.12.17. +// + +#ifndef PROTOCOL_NETWORKSERVICES_H +#define PROTOCOL_NETWORKSERVICES_H + +#include "PlatoonMessage.h" + +namespace platoonProtocol +{ + +struct PlatoonService +{ + using RequestMessage = PlatoonMessage; + using ResponseMessage = PlatoonMessage; +}; + +} + +#endif //PROTOCOL_NETWORKSERVICES_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Protocol.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Protocol.h new file mode 100644 index 0000000000000000000000000000000000000000..5a72146142b1c66771251cdb1aec2cbcbf702074 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Protocol.h @@ -0,0 +1,46 @@ +// +// Created by philipp on 29.11.17. +// + +#ifndef PROTOCOL_PLATOONINGPROTOCOL_H +#define PROTOCOL_PLATOONINGPROTOCOL_H + +#include "Definitions.h" + +#include <cstdint> +#include <string> +#include <iostream> +#include <mutex> + +namespace platoonProtocol +{ +using VehicleId = std::uint32_t; +using MessageType = std::uint32_t; +using PlatoonId = std::uint32_t; +using PlatoonSpeed = float; +using InnerPlatoonDistance = float; + +struct PlatoonConfig +{ + PlatoonSpeed platoonSpeed; + InnerPlatoonDistance innerPlatoonDistance; +}; + +bool operator==(const PlatoonConfig & lhs, const PlatoonConfig & rhs) noexcept; + +bool operator!=(const PlatoonConfig & lhs, const PlatoonConfig & rhs) noexcept; + +template<typename... Ts> +inline void log(const Ts &... args) +{ +#ifdef PLATOON_PROTOCOL_ENABLE_LOGGING + static std::mutex logMutex; + std::lock_guard<std::mutex> lock(logMutex); + auto l = {(PLATOON_PROTOCOL_LOGGING_STREAM << args, true)...}; + std::cout.flush(); +#endif +}; + +} + +#endif //PROTOCOL_PLATOONINGPROTOCOL_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Utils.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Utils.h new file mode 100644 index 0000000000000000000000000000000000000000..6f9a35170f100a0c361e1b132e657a64b0d19819 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Utils.h @@ -0,0 +1,56 @@ +// +// Created by philipp on 30.11.17. +// + +#ifndef PROTOCOL_UTILS_H +#define PROTOCOL_UTILS_H + +#include <iterator> + +using boost::asio::ip::tcp; + +namespace platoonProtocol +{ +namespace utils +{ + +/** + * Sets the iterator to the next element. + * If the iterator is at container.end() it moves to back to container.begin() + * @tparam ForwardIterator + * @tparam Container + * @param iter + * @param container + */ +template<typename ForwardIterator, typename Container> +void cycle(ForwardIterator & iter, Container & container) +{ + if (std::next(iter) == container.end()) + iter = container.begin(); + else + iter++; +} + +/** + * Safe way to iterate over the elements in a map and delete elements from it + * which you cannot do with the standard range based for loop. + * @tparam Map + * @tparam LoopBody + * @param map + * @param body + */ +template<typename Map, typename LoopBody> +void foreachInMap(Map & map, LoopBody body) +{ + std::vector<typename Map::key_type> keys; + for (auto && pair : map) + keys.emplace_back(pair.first); + + for (auto && key : keys) + body(map[key]); +} + +} +} + +#endif //PROTOCOL_UTILS_H \ No newline at end of file diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Vehicle.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Vehicle.h new file mode 100644 index 0000000000000000000000000000000000000000..7a76a2b941975a8b6f3ed47a926e7fb188bbf4d9 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/Vehicle.h @@ -0,0 +1,112 @@ +// +// Created by philipp on 30.11.17. +// + +#ifndef PROTOCOL_VEHICLE_H +#define PROTOCOL_VEHICLE_H + +#include <thread> +#include "VehicleEndpoint.h" +#include "PlatoonService.h" +#include "NetworkingLib/Networking.h" +#include "NetworkingLib/ServiceServer.h" +#include "NetworkingLib/ServiceClient.h" +#include "NetworkingLib/Resolver.h" + +namespace platoonProtocol +{ +class Vehicle : public std::enable_shared_from_this<Vehicle> +{ +public: + using Ptr = std::shared_ptr<Vehicle>; + + using Callback = std::function<void()>; + + static constexpr std::uint16_t UDP_PORT = 10000; + static constexpr std::uint16_t TCP_PORT = 10000; + + enum class Role + { + LEADER, FOLLOWER + }; + + virtual ~Vehicle() + {} + + bool isIdle(); + + bool isPlatoonRunning(); + + void createPlatoon(); + + void leavePlatoon(); + + virtual void stop(); + + void addVehicleEndpoint(VehicleId vehicleId, const std::string & host); + + VehicleEndpoint getOwnEndpoint() const + { return ownEndpoint; } + + Role getRole() const noexcept + { return role; } + + void setOnRunningPlatoonCallback(const Callback & callback) + { onRunningPlatoonCallback = callback; } + + void setOnLeavingPlatoonCallback(const Callback & callback) + { onLeavingPlatoonCallback = callback; } + +protected: + Vehicle( + networking::Networking & net, + VehicleId ownVehicleId, + Role role); + + enum class State + { + IDLE, + CREATING_PLATOON, + RUNNING_PLATOON + }; + + static constexpr PlatoonConfig DEFAULT_PLATOON_CONFIG{0.0f, 0.0f}; + + const VehicleEndpoint ownEndpoint; + PlatoonId platoonId; + std::atomic<PlatoonConfig> platoonConfig{DEFAULT_PLATOON_CONFIG}; + State state{State::IDLE}; + std::mutex stateMutex; + networking::Networking & net; + networking::service::Server<PlatoonService>::Ptr platoonCreateServiceServer; + networking::service::Client<PlatoonService>::Ptr platoonCreateServiceClient; + std::vector<VehicleEndpoint> vehicleEndpoints; + std::vector<VehicleEndpoint>::iterator vehicleEndpointsIter; + Callback onRunningPlatoonCallback; + Callback onLeavingPlatoonCallback; + + virtual void doCreatePlatoon(); + + virtual void doRunPlatoon() = 0; + + virtual void doLeavePlatoon() = 0; + + virtual void makePlatoonCreateRequest(const VehicleEndpoint & vehicleEndpoint) = 0; + + virtual void makePlatoonCreateResponse(const networking::Resolver::Endpoint & clientEndpoint, + const PlatoonMessage & request, + PlatoonMessage & response) = 0; + + void makePlatoonCreateRequestToNextEndpoint(); + + void setState(State newState); + + VehicleEndpoint createVehicleEndpoint(VehicleId vehicleId, const std::string & host); + +private: + Role role; +}; +} + + +#endif //PROTOCOL_VEHICLE_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/VehicleEndpoint.h b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/VehicleEndpoint.h new file mode 100644 index 0000000000000000000000000000000000000000..0ee6d88a28abd1e3aa0ef5b5f3aafeb506779552 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/VehicleEndpoint.h @@ -0,0 +1,61 @@ +// +// Created by philipp on 29.11.17. +// + +#ifndef PROTOCOL_ENPOINTINFO_H +#define PROTOCOL_ENPOINTINFO_H + +#include <string> +#include <boost/asio/ip/tcp.hpp> +#include "Protocol.h" + +using boost::asio::ip::tcp; + +namespace platoonProtocol +{ +class VehicleEndpoint +{ +public: + friend bool operator==(const VehicleEndpoint & lhs, const VehicleEndpoint & rhs); + + VehicleEndpoint() + : vehicleId(0) + , host("") + , tcpPort(0) + , udpPort(0) + {} + + VehicleEndpoint(VehicleId vehicleId, const std::string & host, std::uint16_t tcpPort, std::uint16_t udpPort) + : vehicleId(vehicleId) + , host(host) + , tcpPort(tcpPort) + , udpPort(udpPort) + {} + + VehicleId getVehicleId() const noexcept + { return vehicleId; } + + std::string getHost() const noexcept + { return host; } + + std::uint16_t getTcpPort() const noexcept + { return tcpPort; } + + std::uint16_t getUdpPort() const noexcept + { return udpPort; } + + explicit operator bool() const noexcept + { return vehicleId != 0; } + +private: + VehicleId vehicleId; + std::string host; + std::uint16_t tcpPort; + std::uint16_t udpPort; +}; + +bool operator==(const VehicleEndpoint & lhs, const VehicleEndpoint & rhs); + +} + +#endif //PROTOCOL_ENPOINTINFO_H diff --git a/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/json.hpp b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/json.hpp new file mode 100644 index 0000000000000000000000000000000000000000..5b0b0ea5b3018dd2562e1ac7df6d76b3b8e2cde6 --- /dev/null +++ b/modules/catkin_ws/src/PlatoonProtocolLib/include/PlatoonProtocolLib/json.hpp @@ -0,0 +1,14874 @@ +/* + __ _____ _____ _____ + __| | __| | | | JSON for Modern C++ +| | |__ | | | | | | version 3.0.1 +|_____|_____|_____|_|___| https://github.com/nlohmann/json + +Licensed under the MIT License <http://opensource.org/licenses/MIT>. +Copyright (c) 2013-2017 Niels Lohmann <http://nlohmann.me>. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#ifndef NLOHMANN_JSON_HPP +#define NLOHMANN_JSON_HPP + +#include <algorithm> // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform +#include <array> // array +#include <cassert> // assert +#include <ciso646> // and, not, or +#include <clocale> // lconv, localeconv +#include <cmath> // isfinite, labs, ldexp, signbit +#include <cstddef> // nullptr_t, ptrdiff_t, size_t +#include <cstdint> // int64_t, uint64_t +#include <cstdlib> // abort, strtod, strtof, strtold, strtoul, strtoll, strtoull +#include <cstring> // memcpy, strlen +#include <forward_list> // forward_list +#include <functional> // function, hash, less +#include <initializer_list> // initializer_list +#include <iomanip> // hex +#include <iosfwd> // istream, ostream +#include <iterator> // advance, begin, back_inserter, bidirectional_iterator_tag, distance, end, inserter, iterator, iterator_traits, next, random_access_iterator_tag, reverse_iterator +#include <limits> // numeric_limits +#include <locale> // locale +#include <map> // map +#include <memory> // addressof, allocator, allocator_traits, unique_ptr +#include <numeric> // accumulate +#include <sstream> // stringstream +#include <string> // getline, stoi, string, to_string +#include <type_traits> // add_pointer, conditional, decay, enable_if, false_type, integral_constant, is_arithmetic, is_base_of, is_const, is_constructible, is_convertible, is_default_constructible, is_enum, is_floating_point, is_integral, is_nothrow_move_assignable, is_nothrow_move_constructible, is_pointer, is_reference, is_same, is_scalar, is_signed, remove_const, remove_cv, remove_pointer, remove_reference, true_type, underlying_type +#include <utility> // declval, forward, make_pair, move, pair, swap +#include <valarray> // valarray +#include <vector> // vector + +// exclude unsupported compilers +#if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif +#elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif +#endif + +// disable float-equal warnings on GCC/clang +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wfloat-equal" +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wdocumentation" +#endif + +// allow for portable deprecation warnings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) + #define JSON_DEPRECATED __declspec(deprecated) +#else + #define JSON_DEPRECATED +#endif + +// allow to disable exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && not defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) +#else + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) +#endif + +// manual branch prediction +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #define JSON_LIKELY(x) __builtin_expect(!!(x), 1) + #define JSON_UNLIKELY(x) __builtin_expect(!!(x), 0) +#else + #define JSON_LIKELY(x) x + #define JSON_UNLIKELY(x) x +#endif + +// C++ language standard detection +#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 +#elif (defined(__cplusplus) && __cplusplus >= 201402L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 +#endif + +/*! +@brief namespace for Niels Lohmann +@see https://github.com/nlohmann +@since version 1.0.0 +*/ +namespace nlohmann +{ +template<typename = void, typename = void> +struct adl_serializer; + +// forward declaration of basic_json (required to split the class) +template<template<typename, typename, typename...> class ObjectType = std::map, + template<typename, typename...> class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template<typename> class AllocatorType = std::allocator, + template<typename, typename = void> class JSONSerializer = adl_serializer> +class basic_json; + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template<template<typename, typename, typename...> class ObjectType, \ + template<typename, typename...> class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template<typename> class AllocatorType, \ + template<typename, typename = void> class JSONSerializer> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json<ObjectType, ArrayType, StringType, BooleanType, \ + NumberIntegerType, NumberUnsignedType, NumberFloatType, \ + AllocatorType, JSONSerializer> + + +/*! +@brief unnamed namespace with internal helper functions + +This namespace collects some functions that could not be defined inside the +@ref basic_json class. + +@since version 2.1.0 +*/ +namespace detail +{ +//////////////// +// exceptions // +//////////////// + +/*! +@brief general exception of the @ref basic_json class + +This class is an extension of `std::exception` objects with a member @a id for +exception ids. It is used as the base class for all exceptions thrown by the +@ref basic_json class. This class can hence be used as "wildcard" to catch +exceptions. + +Subclasses: +- @ref parse_error for exceptions indicating a parse error +- @ref invalid_iterator for exceptions indicating errors with iterators +- @ref type_error for exceptions indicating executing a member function with + a wrong type +- @ref out_of_range for exceptions indicating access out of the defined range +- @ref other_error for exceptions indicating other library errors + +@internal +@note To have nothrow-copy-constructible exceptions, we internally use + `std::runtime_error` which can cope with arbitrary-length error messages. + Intermediate strings are built with static functions and then passed to + the actual constructor. +@endinternal + +@liveexample{The following code shows how arbitrary library exceptions can be +caught.,exception} + +@since version 3.0.0 +*/ +class exception : public std::exception +{ + public: + /// returns the explanatory string + const char* what() const noexcept override + { + return m.what(); + } + + /// the id of the exception + const int id; + + protected: + exception(int id_, const char* what_arg) : id(id_), m(what_arg) {} + + static std::string name(const std::string& ename, int id_) + { + return "[json.exception." + ename + "." + std::to_string(id_) + "] "; + } + + private: + /// an exception object as storage for error messages + std::runtime_error m; +}; + +/*! +@brief exception indicating a parse error + +This exception is thrown by the library when a parse error occurs. Parse errors +can occur during the deserialization of JSON text, CBOR, MessagePack, as well +as when using JSON Patch. + +Member @a byte holds the byte index of the last read character in the input +file. + +Exceptions have ids 1xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.parse_error.101 | parse error at 2: unexpected end of input; expected string literal | This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member @a byte indicates the error position. +json.exception.parse_error.102 | parse error at 14: missing or wrong low surrogate | JSON uses the `\uxxxx` format to describe Unicode characters. Code points above above 0xFFFF are split into two `\uxxxx` entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. +json.exception.parse_error.103 | parse error: code points above 0x10FFFF are invalid | Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. +json.exception.parse_error.104 | parse error: JSON patch must be an array of objects | [RFC 6902](https://tools.ietf.org/html/rfc6902) requires a JSON Patch document to be a JSON document that represents an array of objects. +json.exception.parse_error.105 | parse error: operation must have string member 'op' | An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. +json.exception.parse_error.106 | parse error: array index '01' must not begin with '0' | An array index in a JSON Pointer ([RFC 6901](https://tools.ietf.org/html/rfc6901)) may be `0` or any number without a leading `0`. +json.exception.parse_error.107 | parse error: JSON pointer must be empty or begin with '/' - was: 'foo' | A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a `/` character. +json.exception.parse_error.108 | parse error: escape character '~' must be followed with '0' or '1' | In a JSON Pointer, only `~0` and `~1` are valid escape sequences. +json.exception.parse_error.109 | parse error: array index 'one' is not a number | A JSON Pointer array index must be a number. +json.exception.parse_error.110 | parse error at 1: cannot read 2 bytes from vector | When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. +json.exception.parse_error.112 | parse error at 1: error reading CBOR; last byte: 0xF8 | Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. +json.exception.parse_error.113 | parse error at 2: expected a CBOR string; last byte: 0x98 | While parsing a map key, a value that is not a string has been read. + +@note For an input with n bytes, 1 is the index of the first character and n+1 + is the index of the terminating null byte or the end of file. This also + holds true when reading a byte vector (CBOR or MessagePack). + +@liveexample{The following code shows how a `parse_error` exception can be +caught.,parse_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class parse_error : public exception +{ + public: + /*! + @brief create a parse error exception + @param[in] id_ the id of the exception + @param[in] byte_ the byte index where the error occurred (or 0 if the + position cannot be determined) + @param[in] what_arg the explanatory string + @return parse_error object + */ + static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) + { + std::string w = exception::name("parse_error", id_) + "parse error" + + (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") + + ": " + what_arg; + return parse_error(id_, byte_, w.c_str()); + } + + /*! + @brief byte index of the parse error + + The byte index of the last read character in the input file. + + @note For an input with n bytes, 1 is the index of the first character and + n+1 is the index of the terminating null byte or the end of file. + This also holds true when reading a byte vector (CBOR or MessagePack). + */ + const std::size_t byte; + + private: + parse_error(int id_, std::size_t byte_, const char* what_arg) + : exception(id_, what_arg), byte(byte_) {} +}; + +/*! +@brief exception indicating errors with iterators + +This exception is thrown if iterators passed to a library function do not match +the expected semantics. + +Exceptions have ids 2xx. + +name / id | example message | description +----------------------------------- | --------------- | ------------------------- +json.exception.invalid_iterator.201 | iterators are not compatible | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.202 | iterator does not fit current value | In an erase or insert function, the passed iterator @a pos does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. +json.exception.invalid_iterator.203 | iterators do not fit current value | Either iterator passed to function @ref erase(IteratorType first, IteratorType last) does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. +json.exception.invalid_iterator.204 | iterators out of range | When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (@ref begin(), @ref end()), because this is the only way the single stored value is expressed. All other ranges are invalid. +json.exception.invalid_iterator.205 | iterator out of range | When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the @ref begin() iterator, because it is the only way to address the stored value. All other iterators are invalid. +json.exception.invalid_iterator.206 | cannot construct with iterators from null | The iterators passed to constructor @ref basic_json(InputIT first, InputIT last) belong to a JSON null value and hence to not define a valid range. +json.exception.invalid_iterator.207 | cannot use key() for non-object iterators | The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. +json.exception.invalid_iterator.208 | cannot use operator[] for object iterators | The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.209 | cannot use offsets with object iterators | The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. +json.exception.invalid_iterator.210 | iterators do not fit | The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (@a first, @a last) is invalid. +json.exception.invalid_iterator.211 | passed iterators may not belong to container | The iterator range passed to the insert function must not be a subrange of the container to insert to. +json.exception.invalid_iterator.212 | cannot compare iterators of different containers | When two iterators are compared, they must belong to the same container. +json.exception.invalid_iterator.213 | cannot compare order of object iterators | The order of object iterators cannot be compared, because JSON objects are unordered. +json.exception.invalid_iterator.214 | cannot get value | Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to @ref begin(). + +@liveexample{The following code shows how an `invalid_iterator` exception can be +caught.,invalid_iterator} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class invalid_iterator : public exception +{ + public: + static invalid_iterator create(int id_, const std::string& what_arg) + { + std::string w = exception::name("invalid_iterator", id_) + what_arg; + return invalid_iterator(id_, w.c_str()); + } + + private: + invalid_iterator(int id_, const char* what_arg) + : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating executing a member function with a wrong type + +This exception is thrown in case of a type error; that is, a library function is +executed on a JSON value whose type does not match the expected semantics. + +Exceptions have ids 3xx. + +name / id | example message | description +----------------------------- | --------------- | ------------------------- +json.exception.type_error.301 | cannot create object from initializer list | To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. +json.exception.type_error.302 | type must be object, but is array | During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. +json.exception.type_error.303 | incompatible ReferenceType for get_ref, actual type is object | To retrieve a reference to a value stored in a @ref basic_json object with @ref get_ref, the type of the reference must match the value type. For instance, for a JSON array, the @a ReferenceType must be @ref array_t&. +json.exception.type_error.304 | cannot use at() with string | The @ref at() member functions can only be executed for certain JSON types. +json.exception.type_error.305 | cannot use operator[] with string | The @ref operator[] member functions can only be executed for certain JSON types. +json.exception.type_error.306 | cannot use value() with string | The @ref value() member functions can only be executed for certain JSON types. +json.exception.type_error.307 | cannot use erase() with string | The @ref erase() member functions can only be executed for certain JSON types. +json.exception.type_error.308 | cannot use push_back() with string | The @ref push_back() and @ref operator+= member functions can only be executed for certain JSON types. +json.exception.type_error.309 | cannot use insert() with | The @ref insert() member functions can only be executed for certain JSON types. +json.exception.type_error.310 | cannot use swap() with number | The @ref swap() member functions can only be executed for certain JSON types. +json.exception.type_error.311 | cannot use emplace_back() with string | The @ref emplace_back() member function can only be executed for certain JSON types. +json.exception.type_error.312 | cannot use update() with string | The @ref update() member functions can only be executed for certain JSON types. +json.exception.type_error.313 | invalid value to unflatten | The @ref unflatten function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. +json.exception.type_error.314 | only objects can be unflattened | The @ref unflatten function only works for an object whose keys are JSON Pointers. +json.exception.type_error.315 | values in object must be primitive | The @ref unflatten function only works for an object whose keys are JSON Pointers and whose values are primitive. +json.exception.type_error.316 | invalid UTF-8 byte at index 10: 0x7E | The @ref dump function only works with UTF-8 encoded strings; that is, if you assign a `std::string` to a JSON value, make sure it is UTF-8 encoded. | + +@liveexample{The following code shows how a `type_error` exception can be +caught.,type_error} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref out_of_range for exceptions indicating access out of the defined range +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class type_error : public exception +{ + public: + static type_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("type_error", id_) + what_arg; + return type_error(id_, w.c_str()); + } + + private: + type_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating access out of the defined range + +This exception is thrown in case a library function is called on an input +parameter that exceeds the expected range, for instance in case of array +indices or nonexisting object keys. + +Exceptions have ids 4xx. + +name / id | example message | description +------------------------------- | --------------- | ------------------------- +json.exception.out_of_range.401 | array index 3 is out of range | The provided array index @a i is larger than @a size-1. +json.exception.out_of_range.402 | array index '-' (3) is out of range | The special array index `-` in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. +json.exception.out_of_range.403 | key 'foo' not found | The provided key was not found in the JSON object. +json.exception.out_of_range.404 | unresolved reference token 'foo' | A reference token in a JSON Pointer could not be resolved. +json.exception.out_of_range.405 | JSON pointer has no parent | The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. +json.exception.out_of_range.406 | number overflow parsing '10E1000' | A parsed number could not be stored as without changing it to NaN or INF. + +@liveexample{The following code shows how an `out_of_range` exception can be +caught.,out_of_range} + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref other_error for exceptions indicating other library errors + +@since version 3.0.0 +*/ +class out_of_range : public exception +{ + public: + static out_of_range create(int id_, const std::string& what_arg) + { + std::string w = exception::name("out_of_range", id_) + what_arg; + return out_of_range(id_, w.c_str()); + } + + private: + out_of_range(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + +/*! +@brief exception indicating other library errors + +This exception is thrown in case of errors that cannot be classified with the +other exception types. + +Exceptions have ids 5xx. + +name / id | example message | description +------------------------------ | --------------- | ------------------------- +json.exception.other_error.501 | unsuccessful: {"op":"test","path":"/baz", "value":"bar"} | A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. + +@sa @ref exception for the base class of the library exceptions +@sa @ref parse_error for exceptions indicating a parse error +@sa @ref invalid_iterator for exceptions indicating errors with iterators +@sa @ref type_error for exceptions indicating executing a member function with + a wrong type +@sa @ref out_of_range for exceptions indicating access out of the defined range + +@liveexample{The following code shows how an `other_error` exception can be +caught.,other_error} + +@since version 3.0.0 +*/ +class other_error : public exception +{ + public: + static other_error create(int id_, const std::string& what_arg) + { + std::string w = exception::name("other_error", id_) + what_arg; + return other_error(id_, w.c_str()); + } + + private: + other_error(int id_, const char* what_arg) : exception(id_, what_arg) {} +}; + + + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + discarded ///< discarded by the the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string +- furthermore, each type is not smaller than itself +- discarded values are not comparable + +@since version 1.0.0 +*/ +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + static constexpr std::array<uint8_t, 8> order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */ + } + }; + + const auto l_index = static_cast<std::size_t>(lhs); + const auto r_index = static_cast<std::size_t>(rhs); + return l_index < order.size() and r_index < order.size() and order[l_index] < order[r_index]; +} + + +///////////// +// helpers // +///////////// + +template<typename> struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {}; + +// alias templates to reduce boilerplate +template<bool B, typename T = void> +using enable_if_t = typename std::enable_if<B, T>::type; + +template<typename T> +using uncvref_t = typename std::remove_cv<typename std::remove_reference<T>::type>::type; + +// implementation of C++14 index_sequence and affiliates +// source: https://stackoverflow.com/a/32223343 +template<std::size_t... Ints> +struct index_sequence +{ + using type = index_sequence; + using value_type = std::size_t; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +template<class Sequence1, class Sequence2> +struct merge_and_renumber; + +template<std::size_t... I1, std::size_t... I2> +struct merge_and_renumber<index_sequence<I1...>, index_sequence<I2...>> + : index_sequence < I1..., (sizeof...(I1) + I2)... > {}; + +template<std::size_t N> +struct make_index_sequence + : merge_and_renumber < typename make_index_sequence < N / 2 >::type, + typename make_index_sequence < N - N / 2 >::type > {}; + +template<> struct make_index_sequence<0> : index_sequence<> {}; +template<> struct make_index_sequence<1> : index_sequence<0> {}; + +template<typename... Ts> +using index_sequence_for = make_index_sequence<sizeof...(Ts)>; + +/* +Implementation of two C++17 constructs: conjunction, negation. This is needed +to avoid evaluating all the traits in a condition + +For example: not std::is_same<void, T>::value and has_value_type<T>::value +will not compile when T = void (on MSVC at least). Whereas +conjunction<negation<std::is_same<void, T>>, has_value_type<T>>::value will +stop evaluating if negation<...>::value == false + +Please note that those constructs must be used with caution, since symbols can +become very long quickly (which can slow down compilation and cause MSVC +internal compiler errors). Only use it when you have to (see example ahead). +*/ +template<class...> struct conjunction : std::true_type {}; +template<class B1> struct conjunction<B1> : B1 {}; +template<class B1, class... Bn> +struct conjunction<B1, Bn...> : std::conditional<bool(B1::value), conjunction<Bn...>, B1>::type {}; + +template<class B> struct negation : std::integral_constant<bool, not B::value> {}; + +// dispatch utility (taken from ranges-v3) +template<unsigned N> struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + + +////////////////// +// constructors // +////////////////// + +template<value_t> struct external_constructor; + +template<> +struct external_constructor<value_t::boolean> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::boolean_t b) noexcept + { + j.m_type = value_t::boolean; + j.m_value = b; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::string> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::string_t& s) + { + j.m_type = value_t::string; + j.m_value = s; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::string_t&& s) + { + j.m_type = value_t::string; + j.m_value = std::move(s); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_float> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_float_t val) noexcept + { + j.m_type = value_t::number_float; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_unsigned> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_unsigned_t val) noexcept + { + j.m_type = value_t::number_unsigned; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::number_integer> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::number_integer_t val) noexcept + { + j.m_type = value_t::number_integer; + j.m_value = val; + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::array> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::array_t& arr) + { + j.m_type = value_t::array; + j.m_value = arr; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) + { + j.m_type = value_t::array; + j.m_value = std::move(arr); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<not std::is_same<CompatibleArrayType, typename BasicJsonType::array_t>::value, + int> = 0> + static void construct(BasicJsonType& j, const CompatibleArrayType& arr) + { + using std::begin; + using std::end; + j.m_type = value_t::array; + j.m_value.array = j.template create<typename BasicJsonType::array_t>(begin(arr), end(arr)); + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const std::vector<bool>& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->reserve(arr.size()); + for (const bool x : arr) + { + j.m_value.array->push_back(x); + } + j.assert_invariant(); + } + + template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> + static void construct(BasicJsonType& j, const std::valarray<T>& arr) + { + j.m_type = value_t::array; + j.m_value = value_t::array; + j.m_value.array->resize(arr.size()); + std::copy(std::begin(arr), std::end(arr), j.m_value.array->begin()); + j.assert_invariant(); + } +}; + +template<> +struct external_constructor<value_t::object> +{ + template<typename BasicJsonType> + static void construct(BasicJsonType& j, const typename BasicJsonType::object_t& obj) + { + j.m_type = value_t::object; + j.m_value = obj; + j.assert_invariant(); + } + + template<typename BasicJsonType> + static void construct(BasicJsonType& j, typename BasicJsonType::object_t&& obj) + { + j.m_type = value_t::object; + j.m_value = std::move(obj); + j.assert_invariant(); + } + + template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<not std::is_same<CompatibleObjectType, typename BasicJsonType::object_t>::value, int> = 0> + static void construct(BasicJsonType& j, const CompatibleObjectType& obj) + { + using std::begin; + using std::end; + + j.m_type = value_t::object; + j.m_value.object = j.template create<typename BasicJsonType::object_t>(begin(obj), end(obj)); + j.assert_invariant(); + } +}; + + +//////////////////////// +// has_/is_ functions // +//////////////////////// + +/*! +@brief Helper to determine whether there's a key_type for T. + +This helper is used to tell associative containers apart from other containers +such as sequence containers. For instance, `std::map` passes the test as it +contains a `mapped_type`, whereas `std::vector` fails the test. + +@sa http://stackoverflow.com/a/7728728/266378 +@since version 1.0.0, overworked in version 2.0.6 +*/ +#define NLOHMANN_JSON_HAS_HELPER(type) \ + template<typename T> struct has_##type { \ + private: \ + template<typename U, typename = typename U::type> \ + static int detect(U &&); \ + static void detect(...); \ + public: \ + static constexpr bool value = \ + std::is_integral<decltype(detect(std::declval<T>()))>::value; \ + } + +NLOHMANN_JSON_HAS_HELPER(mapped_type); +NLOHMANN_JSON_HAS_HELPER(key_type); +NLOHMANN_JSON_HAS_HELPER(value_type); +NLOHMANN_JSON_HAS_HELPER(iterator); + +#undef NLOHMANN_JSON_HAS_HELPER + + +template<bool B, class RealType, class CompatibleObjectType> +struct is_compatible_object_type_impl : std::false_type {}; + +template<class RealType, class CompatibleObjectType> +struct is_compatible_object_type_impl<true, RealType, CompatibleObjectType> +{ + static constexpr auto value = + std::is_constructible<typename RealType::key_type, typename CompatibleObjectType::key_type>::value and + std::is_constructible<typename RealType::mapped_type, typename CompatibleObjectType::mapped_type>::value; +}; + +template<class BasicJsonType, class CompatibleObjectType> +struct is_compatible_object_type +{ + static auto constexpr value = is_compatible_object_type_impl < + conjunction<negation<std::is_same<void, CompatibleObjectType>>, + has_mapped_type<CompatibleObjectType>, + has_key_type<CompatibleObjectType>>::value, + typename BasicJsonType::object_t, CompatibleObjectType >::value; +}; + +template<typename BasicJsonType, typename T> +struct is_basic_json_nested_type +{ + static auto constexpr value = std::is_same<T, typename BasicJsonType::iterator>::value or + std::is_same<T, typename BasicJsonType::const_iterator>::value or + std::is_same<T, typename BasicJsonType::reverse_iterator>::value or + std::is_same<T, typename BasicJsonType::const_reverse_iterator>::value; +}; + +template<class BasicJsonType, class CompatibleArrayType> +struct is_compatible_array_type +{ + static auto constexpr value = + conjunction<negation<std::is_same<void, CompatibleArrayType>>, + negation<is_compatible_object_type< + BasicJsonType, CompatibleArrayType>>, + negation<std::is_constructible<typename BasicJsonType::string_t, + CompatibleArrayType>>, + negation<is_basic_json_nested_type<BasicJsonType, CompatibleArrayType>>, + has_value_type<CompatibleArrayType>, + has_iterator<CompatibleArrayType>>::value; +}; + +template<bool, typename, typename> +struct is_compatible_integer_type_impl : std::false_type {}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type_impl<true, RealIntegerType, CompatibleNumberIntegerType> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits<RealIntegerType>; + using CompatibleLimits = std::numeric_limits<CompatibleNumberIntegerType>; + + static constexpr auto value = + std::is_constructible<RealIntegerType, CompatibleNumberIntegerType>::value and + CompatibleLimits::is_integer and + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template<typename RealIntegerType, typename CompatibleNumberIntegerType> +struct is_compatible_integer_type +{ + static constexpr auto value = + is_compatible_integer_type_impl < + std::is_integral<CompatibleNumberIntegerType>::value and + not std::is_same<bool, CompatibleNumberIntegerType>::value, + RealIntegerType, CompatibleNumberIntegerType >::value; +}; + + +// trait checking if JSONSerializer<T>::from_json(json const&, udt&) exists +template<typename BasicJsonType, typename T> +struct has_from_json +{ + private: + // also check the return type of from_json + template<typename U, typename = enable_if_t<std::is_same<void, decltype(uncvref_t<U>::from_json( + std::declval<BasicJsonType>(), std::declval<T&>()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral<decltype( + detect(std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value; +}; + +// This trait checks if JSONSerializer<T>::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template<typename BasicJsonType, typename T> +struct has_non_default_from_json +{ + private: + template<typename U, typename = + enable_if_t<std::is_same<T, decltype(uncvref_t<U>::from_json(std::declval<BasicJsonType>()))>::value>> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral<decltype(detect( + std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value; +}; + +// This trait checks if BasicJsonType::json_serializer<T>::to_json exists +template<typename BasicJsonType, typename T> +struct has_to_json +{ + private: + template<typename U, typename = decltype(uncvref_t<U>::to_json( + std::declval<BasicJsonType&>(), std::declval<T>()))> + static int detect(U&&); + static void detect(...); + + public: + static constexpr bool value = std::is_integral<decltype(detect( + std::declval<typename BasicJsonType::template json_serializer<T, void>>()))>::value; +}; + + +///////////// +// to_json // +///////////// + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_same<T, typename BasicJsonType::boolean_t>::value, int> = 0> +void to_json(BasicJsonType& j, T b) noexcept +{ + external_constructor<value_t::boolean>::construct(j, b); +} + +template<typename BasicJsonType, typename CompatibleString, + enable_if_t<std::is_constructible<typename BasicJsonType::string_t, CompatibleString>::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleString& s) +{ + external_constructor<value_t::string>::construct(j, s); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::string_t&& s) +{ + external_constructor<value_t::string>::construct(j, std::move(s)); +} + +template<typename BasicJsonType, typename FloatType, + enable_if_t<std::is_floating_point<FloatType>::value, int> = 0> +void to_json(BasicJsonType& j, FloatType val) noexcept +{ + external_constructor<value_t::number_float>::construct(j, static_cast<typename BasicJsonType::number_float_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberUnsignedType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_unsigned_t, CompatibleNumberUnsignedType>::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberUnsignedType val) noexcept +{ + external_constructor<value_t::number_unsigned>::construct(j, static_cast<typename BasicJsonType::number_unsigned_t>(val)); +} + +template<typename BasicJsonType, typename CompatibleNumberIntegerType, + enable_if_t<is_compatible_integer_type<typename BasicJsonType::number_integer_t, CompatibleNumberIntegerType>::value, int> = 0> +void to_json(BasicJsonType& j, CompatibleNumberIntegerType val) noexcept +{ + external_constructor<value_t::number_integer>::construct(j, static_cast<typename BasicJsonType::number_integer_t>(val)); +} + +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +void to_json(BasicJsonType& j, EnumType e) noexcept +{ + using underlying_type = typename std::underlying_type<EnumType>::type; + external_constructor<value_t::number_integer>::construct(j, static_cast<underlying_type>(e)); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, const std::vector<bool>& e) +{ + external_constructor<value_t::array>::construct(j, e); +} + +template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value or + std::is_same<typename BasicJsonType::array_t, CompatibleArrayType>::value, + int> = 0> +void to_json(BasicJsonType& j, const CompatibleArrayType& arr) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<T, BasicJsonType>::value, int> = 0> +void to_json(BasicJsonType& j, std::valarray<T> arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::array_t&& arr) +{ + external_constructor<value_t::array>::construct(j, std::move(arr)); +} + +template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value, int> = 0> +void to_json(BasicJsonType& j, const CompatibleObjectType& obj) +{ + external_constructor<value_t::object>::construct(j, obj); +} + +template<typename BasicJsonType> +void to_json(BasicJsonType& j, typename BasicJsonType::object_t&& obj) +{ + external_constructor<value_t::object>::construct(j, std::move(obj)); +} + +template<typename BasicJsonType, typename T, std::size_t N, + enable_if_t<not std::is_constructible<typename BasicJsonType::string_t, T (&)[N]>::value, int> = 0> +void to_json(BasicJsonType& j, T (&arr)[N]) +{ + external_constructor<value_t::array>::construct(j, arr); +} + +template<typename BasicJsonType, typename... Args> +void to_json(BasicJsonType& j, const std::pair<Args...>& p) +{ + j = {p.first, p.second}; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +void to_json_tuple_impl(BasicJsonType& j, const Tuple& t, index_sequence<Idx...>) +{ + j = {std::get<Idx>(t)...}; +} + +template<typename BasicJsonType, typename... Args> +void to_json(BasicJsonType& j, const std::tuple<Args...>& t) +{ + to_json_tuple_impl(j, t, index_sequence_for<Args...> {}); +} + +/////////////// +// from_json // +/////////////// + +// overloads for basic_json template parameters +template<typename BasicJsonType, typename ArithmeticType, + enable_if_t<std::is_arithmetic<ArithmeticType>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int> = 0> +void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::boolean_t& b) +{ + if (JSON_UNLIKELY(not j.is_boolean())) + { + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(j.type_name()))); + } + b = *j.template get_ptr<const typename BasicJsonType::boolean_t*>(); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) +{ + if (JSON_UNLIKELY(not j.is_string())) + { + JSON_THROW(type_error::create(302, "type must be string, but is " + std::string(j.type_name()))); + } + s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_float_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_unsigned_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::number_integer_t& val) +{ + get_arithmetic_value(j, val); +} + +template<typename BasicJsonType, typename EnumType, + enable_if_t<std::is_enum<EnumType>::value, int> = 0> +void from_json(const BasicJsonType& j, EnumType& e) +{ + typename std::underlying_type<EnumType>::type val; + get_arithmetic_value(j, val); + e = static_cast<EnumType>(val); +} + +template<typename BasicJsonType> +void from_json(const BasicJsonType& j, typename BasicJsonType::array_t& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + arr = *j.template get_ptr<const typename BasicJsonType::array_t*>(); +} + +// forward_list doesn't have an insert method +template<typename BasicJsonType, typename T, typename Allocator, + enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0> +void from_json(const BasicJsonType& j, std::forward_list<T, Allocator>& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + std::transform(j.rbegin(), j.rend(), + std::front_inserter(l), [](const BasicJsonType & i) + { + return i.template get<T>(); + }); +} + +// valarray doesn't have an insert method +template<typename BasicJsonType, typename T, + enable_if_t<std::is_convertible<BasicJsonType, T>::value, int> = 0> +void from_json(const BasicJsonType& j, std::valarray<T>& l) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + l.resize(j.size()); + std::copy(j.m_value.array->begin(), j.m_value.array->end(), std::begin(l)); +} + +template<typename BasicJsonType, typename CompatibleArrayType> +void from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<0> /*unused*/) +{ + using std::end; + + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename CompatibleArrayType::value_type>(); + }); +} + +template<typename BasicJsonType, typename CompatibleArrayType> +auto from_json_array_impl(const BasicJsonType& j, CompatibleArrayType& arr, priority_tag<1> /*unused*/) +-> decltype( + arr.reserve(std::declval<typename CompatibleArrayType::size_type>()), + void()) +{ + using std::end; + + arr.reserve(j.size()); + std::transform(j.begin(), j.end(), + std::inserter(arr, end(arr)), [](const BasicJsonType & i) + { + // get<BasicJsonType>() returns *this, this won't call a from_json + // method when value_type is BasicJsonType + return i.template get<typename CompatibleArrayType::value_type>(); + }); +} + +template<typename BasicJsonType, typename T, std::size_t N> +void from_json_array_impl(const BasicJsonType& j, std::array<T, N>& arr, priority_tag<2> /*unused*/) +{ + for (std::size_t i = 0; i < N; ++i) + { + arr[i] = j.at(i).template get<T>(); + } +} + +template<typename BasicJsonType, typename CompatibleArrayType, + enable_if_t<is_compatible_array_type<BasicJsonType, CompatibleArrayType>::value and + std::is_convertible<BasicJsonType, typename CompatibleArrayType::value_type>::value and + not std::is_same<typename BasicJsonType::array_t, CompatibleArrayType>::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleArrayType& arr) +{ + if (JSON_UNLIKELY(not j.is_array())) + { + JSON_THROW(type_error::create(302, "type must be array, but is " + std::string(j.type_name()))); + } + + from_json_array_impl(j, arr, priority_tag<2> {}); +} + +template<typename BasicJsonType, typename CompatibleObjectType, + enable_if_t<is_compatible_object_type<BasicJsonType, CompatibleObjectType>::value, int> = 0> +void from_json(const BasicJsonType& j, CompatibleObjectType& obj) +{ + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(302, "type must be object, but is " + std::string(j.type_name()))); + } + + auto inner_object = j.template get_ptr<const typename BasicJsonType::object_t*>(); + using value_type = typename CompatibleObjectType::value_type; + std::transform( + inner_object->begin(), inner_object->end(), + std::inserter(obj, obj.begin()), + [](typename BasicJsonType::object_t::value_type const & p) + { + return value_type(p.first, p.second.template get<typename CompatibleObjectType::mapped_type>()); + }); +} + +// overload for arithmetic types, not chosen for basic_json template arguments +// (BooleanType, etc..); note: Is it really necessary to provide explicit +// overloads for boolean_t etc. in case of a custom BooleanType which is not +// an arithmetic type? +template<typename BasicJsonType, typename ArithmeticType, + enable_if_t < + std::is_arithmetic<ArithmeticType>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_unsigned_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_integer_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::number_float_t>::value and + not std::is_same<ArithmeticType, typename BasicJsonType::boolean_t>::value, + int> = 0> +void from_json(const BasicJsonType& j, ArithmeticType& val) +{ + switch (static_cast<value_t>(j)) + { + case value_t::number_unsigned: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); + break; + } + case value_t::number_integer: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); + break; + } + case value_t::number_float: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); + break; + } + case value_t::boolean: + { + val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::boolean_t*>()); + break; + } + + default: + JSON_THROW(type_error::create(302, "type must be number, but is " + std::string(j.type_name()))); + } +} + +template<typename BasicJsonType, typename A1, typename A2> +void from_json(const BasicJsonType& j, std::pair<A1, A2>& p) +{ + p = {j.at(0).template get<A1>(), j.at(1).template get<A2>()}; +} + +template<typename BasicJsonType, typename Tuple, std::size_t... Idx> +void from_json_tuple_impl(const BasicJsonType& j, Tuple& t, index_sequence<Idx...>) +{ + t = std::make_tuple(j.at(Idx).template get<typename std::tuple_element<Idx, Tuple>::type>()...); +} + +template<typename BasicJsonType, typename... Args> +void from_json(const BasicJsonType& j, std::tuple<Args...>& t) +{ + from_json_tuple_impl(j, t, index_sequence_for<Args...> {}); +} + +struct to_json_fn +{ + private: + template<typename BasicJsonType, typename T> + auto call(BasicJsonType& j, T&& val, priority_tag<1> /*unused*/) const noexcept(noexcept(to_json(j, std::forward<T>(val)))) + -> decltype(to_json(j, std::forward<T>(val)), void()) + { + return to_json(j, std::forward<T>(val)); + } + + template<typename BasicJsonType, typename T> + void call(BasicJsonType& /*unused*/, T&& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find to_json() method in T's namespace"); + +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t<T>; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template<typename BasicJsonType, typename T> + void operator()(BasicJsonType& j, T&& val) const + noexcept(noexcept(std::declval<to_json_fn>().call(j, std::forward<T>(val), priority_tag<1> {}))) + { + return call(j, std::forward<T>(val), priority_tag<1> {}); + } +}; + +struct from_json_fn +{ + private: + template<typename BasicJsonType, typename T> + auto call(const BasicJsonType& j, T& val, priority_tag<1> /*unused*/) const + noexcept(noexcept(from_json(j, val))) + -> decltype(from_json(j, val), void()) + { + return from_json(j, val); + } + + template<typename BasicJsonType, typename T> + void call(const BasicJsonType& /*unused*/, T& /*unused*/, priority_tag<0> /*unused*/) const noexcept + { + static_assert(sizeof(BasicJsonType) == 0, + "could not find from_json() method in T's namespace"); +#ifdef _MSC_VER + // MSVC does not show a stacktrace for the above assert + using decayed = uncvref_t<T>; + static_assert(sizeof(typename decayed::force_msvc_stacktrace) == 0, + "forcing MSVC stacktrace to show which T we're talking about."); +#endif + } + + public: + template<typename BasicJsonType, typename T> + void operator()(const BasicJsonType& j, T& val) const + noexcept(noexcept(std::declval<from_json_fn>().call(j, val, priority_tag<1> {}))) + { + return call(j, val, priority_tag<1> {}); + } +}; + +// taken from ranges-v3 +template<typename T> +struct static_const +{ + static constexpr T value{}; +}; + +template<typename T> +constexpr T static_const<T>::value; + +//////////////////// +// input adapters // +//////////////////// + +/*! +@brief abstract input adapter interface + +Produces a stream of std::char_traits<char>::int_type characters from a +std::istream, a buffer, or some other input type. Accepts the return of exactly +one non-EOF character for future input. The int_type characters returned +consist of all valid char values as positive values (typically unsigned char), +plus an EOF value outside that range, specified by the value of the function +std::char_traits<char>::eof(). This value is typically -1, but could be any +arbitrary value which is not a valid char value. +*/ +struct input_adapter_protocol +{ + /// get a character [0,255] or std::char_traits<char>::eof(). + virtual std::char_traits<char>::int_type get_character() = 0; + /// restore the last non-eof() character to input + virtual void unget_character() = 0; + virtual ~input_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +using input_adapter_t = std::shared_ptr<input_adapter_protocol>; + +/*! +Input adapter for a (caching) istream. Ignores a UFT Byte Order Mark at +beginning of input. Does not support changing the underlying std::streambuf +in mid-input. Maintains underlying std::istream and std::streambuf to support +subsequent use of standard std::istream operations to process any input +characters following those used in parsing the JSON input. Clears the +std::istream flags; any input errors (e.g., EOF) will be detected by the first +subsequent call for input from the std::istream. +*/ +class input_stream_adapter : public input_adapter_protocol +{ + public: + ~input_stream_adapter() override + { + // clear stream flags; we use underlying streambuf I/O, do not + // maintain ifstream flags + is.clear(); + } + + explicit input_stream_adapter(std::istream& i) + : is(i), sb(*i.rdbuf()) + { + // skip byte order mark + std::char_traits<char>::int_type c; + if ((c = get_character()) == 0xEF) + { + if ((c = get_character()) == 0xBB) + { + if ((c = get_character()) == 0xBF) + { + return; // Ignore BOM + } + else if (c != std::char_traits<char>::eof()) + { + is.unget(); + } + is.putback('\xBB'); + } + else if (c != std::char_traits<char>::eof()) + { + is.unget(); + } + is.putback('\xEF'); + } + else if (c != std::char_traits<char>::eof()) + { + is.unget(); // no byte order mark; process as usual + } + } + + // delete because of pointer members + input_stream_adapter(const input_stream_adapter&) = delete; + input_stream_adapter& operator=(input_stream_adapter&) = delete; + + // std::istream/std::streambuf use std::char_traits<char>::to_int_type, to + // ensure that std::char_traits<char>::eof() and the character 0xFF do not + // end up as the same value, eg. 0xFFFFFFFF. + std::char_traits<char>::int_type get_character() override + { + return sb.sbumpc(); + } + + void unget_character() override + { + sb.sungetc(); // is.unget() avoided for performance + } + + private: + /// the associated input stream + std::istream& is; + std::streambuf& sb; +}; + +/// input adapter for buffer input +class input_buffer_adapter : public input_adapter_protocol +{ + public: + input_buffer_adapter(const char* b, const std::size_t l) + : cursor(b), limit(b + l), start(b) + { + // skip byte order mark + if (l >= 3 and b[0] == '\xEF' and b[1] == '\xBB' and b[2] == '\xBF') + { + cursor += 3; + } + } + + // delete because of pointer members + input_buffer_adapter(const input_buffer_adapter&) = delete; + input_buffer_adapter& operator=(input_buffer_adapter&) = delete; + + std::char_traits<char>::int_type get_character() noexcept override + { + if (JSON_LIKELY(cursor < limit)) + { + return std::char_traits<char>::to_int_type(*(cursor++)); + } + + return std::char_traits<char>::eof(); + } + + void unget_character() noexcept override + { + if (JSON_LIKELY(cursor > start)) + { + --cursor; + } + } + + private: + /// pointer to the current character + const char* cursor; + /// pointer past the last character + const char* limit; + /// pointer to the first character + const char* start; +}; + +class input_adapter +{ + public: + // native support + + /// input adapter for input stream + input_adapter(std::istream& i) + : ia(std::make_shared<input_stream_adapter>(i)) {} + + /// input adapter for input stream + input_adapter(std::istream&& i) + : ia(std::make_shared<input_stream_adapter>(i)) {} + + /// input adapter for buffer + template<typename CharT, + typename std::enable_if< + std::is_pointer<CharT>::value and + std::is_integral<typename std::remove_pointer<CharT>::type>::value and + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int>::type = 0> + input_adapter(CharT b, std::size_t l) + : ia(std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(b), l)) {} + + // derived support + + /// input adapter for string literal + template<typename CharT, + typename std::enable_if< + std::is_pointer<CharT>::value and + std::is_integral<typename std::remove_pointer<CharT>::type>::value and + sizeof(typename std::remove_pointer<CharT>::type) == 1, + int>::type = 0> + input_adapter(CharT b) + : input_adapter(reinterpret_cast<const char*>(b), + std::strlen(reinterpret_cast<const char*>(b))) {} + + /// input adapter for iterator range with contiguous storage + template<class IteratorType, + typename std::enable_if< + std::is_same<typename std::iterator_traits<IteratorType>::iterator_category, std::random_access_iterator_tag>::value, + int>::type = 0> + input_adapter(IteratorType first, IteratorType last) + { + // assertion to check that the iterator range is indeed contiguous, + // see http://stackoverflow.com/a/35008842/266378 for more discussion + assert(std::accumulate( + first, last, std::pair<bool, int>(true, 0), + [&first](std::pair<bool, int> res, decltype(*first) val) + { + res.first &= (val == *(std::next(std::addressof(*first), res.second++))); + return res; + }).first); + + // assertion to check that each element is 1 byte long + static_assert( + sizeof(typename std::iterator_traits<IteratorType>::value_type) == 1, + "each element in the iterator range must have the size of 1 byte"); + + const auto len = static_cast<size_t>(std::distance(first, last)); + if (JSON_LIKELY(len > 0)) + { + // there is at least one element: use the address of first + ia = std::make_shared<input_buffer_adapter>(reinterpret_cast<const char*>(&(*first)), len); + } + else + { + // the address of first cannot be used: use nullptr + ia = std::make_shared<input_buffer_adapter>(nullptr, len); + } + } + + /// input adapter for array + template<class T, std::size_t N> + input_adapter(T (&array)[N]) + : input_adapter(std::begin(array), std::end(array)) {} + + /// input adapter for contiguous container + template<class ContiguousContainer, typename + std::enable_if<not std::is_pointer<ContiguousContainer>::value and + std::is_base_of<std::random_access_iterator_tag, typename std::iterator_traits<decltype(std::begin(std::declval<ContiguousContainer const>()))>::iterator_category>::value, + int>::type = 0> + input_adapter(const ContiguousContainer& c) + : input_adapter(std::begin(c), std::end(c)) {} + + operator input_adapter_t() + { + return ia; + } + + private: + /// the actual adapter + input_adapter_t ia = nullptr; +}; + +////////////////////// +// lexer and parser // +////////////////////// + +/*! +@brief lexical analysis + +This class organizes the lexical analysis during JSON deserialization. +*/ +template<typename BasicJsonType> +class lexer +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + + public: + /// token types for the parser + enum class token_type + { + uninitialized, ///< indicating the scanner is uninitialized + literal_true, ///< the `true` literal + literal_false, ///< the `false` literal + literal_null, ///< the `null` literal + value_string, ///< a string -- use get_string() for actual value + value_unsigned, ///< an unsigned integer -- use get_number_unsigned() for actual value + value_integer, ///< a signed integer -- use get_number_integer() for actual value + value_float, ///< an floating point number -- use get_number_float() for actual value + begin_array, ///< the character for array begin `[` + begin_object, ///< the character for object begin `{` + end_array, ///< the character for array end `]` + end_object, ///< the character for object end `}` + name_separator, ///< the name separator `:` + value_separator, ///< the value separator `,` + parse_error, ///< indicating a parse error + end_of_input, ///< indicating the end of the input buffer + literal_or_value ///< a literal or the begin of a value (only for diagnostics) + }; + + /// return name of values of type token_type (only used for errors) + static const char* token_type_name(const token_type t) noexcept + { + switch (t) + { + case token_type::uninitialized: + return "<uninitialized>"; + case token_type::literal_true: + return "true literal"; + case token_type::literal_false: + return "false literal"; + case token_type::literal_null: + return "null literal"; + case token_type::value_string: + return "string literal"; + case lexer::token_type::value_unsigned: + case lexer::token_type::value_integer: + case lexer::token_type::value_float: + return "number literal"; + case token_type::begin_array: + return "'['"; + case token_type::begin_object: + return "'{'"; + case token_type::end_array: + return "']'"; + case token_type::end_object: + return "'}'"; + case token_type::name_separator: + return "':'"; + case token_type::value_separator: + return "','"; + case token_type::parse_error: + return "<parse error>"; + case token_type::end_of_input: + return "end of input"; + case token_type::literal_or_value: + return "'[', '{', or a literal"; + default: // catch non-enum values + return "unknown token"; // LCOV_EXCL_LINE + } + } + + explicit lexer(detail::input_adapter_t adapter) + : ia(std::move(adapter)), decimal_point_char(get_decimal_point()) {} + + // delete because of pointer members + lexer(const lexer&) = delete; + lexer& operator=(lexer&) = delete; + + private: + ///////////////////// + // locales + ///////////////////// + + /// return the locale-dependent decimal point + static char get_decimal_point() noexcept + { + const auto loc = localeconv(); + assert(loc != nullptr); + return (loc->decimal_point == nullptr) ? '.' : *(loc->decimal_point); + } + + ///////////////////// + // scan functions + ///////////////////// + + /*! + @brief get codepoint from 4 hex characters following `\u` + + For input "\u c1 c2 c3 c4" the codepoint is: + (c1 * 0x1000) + (c2 * 0x0100) + (c3 * 0x0010) + c4 + = (c1 << 12) + (c2 << 8) + (c3 << 4) + (c4 << 0) + + Furthermore, the possible characters '0'..'9', 'A'..'F', and 'a'..'f' + must be converted to the integers 0x0..0x9, 0xA..0xF, 0xA..0xF, resp. The + conversion is done by subtracting the offset (0x30, 0x37, and 0x57) + between the ASCII value of the character and the desired integer value. + + @return codepoint (0x0000..0xFFFF) or -1 in case of an error (e.g. EOF or + non-hex character) + */ + int get_codepoint() + { + // this function only makes sense after reading `\u` + assert(current == 'u'); + int codepoint = 0; + + const auto factors = { 12, 8, 4, 0 }; + for (const auto factor : factors) + { + get(); + + if (current >= '0' and current <= '9') + { + codepoint += ((current - 0x30) << factor); + } + else if (current >= 'A' and current <= 'F') + { + codepoint += ((current - 0x37) << factor); + } + else if (current >= 'a' and current <= 'f') + { + codepoint += ((current - 0x57) << factor); + } + else + { + return -1; + } + } + + assert(0x0000 <= codepoint and codepoint <= 0xFFFF); + return codepoint; + } + + /*! + @brief check if the next byte(s) are inside a given range + + Adds the current byte and, for each passed range, reads a new byte and + checks if it is inside the range. If a violation was detected, set up an + error message and return false. Otherwise, return true. + + @param[in] ranges list of integers; interpreted as list of pairs of + inclusive lower and upper bound, respectively + + @pre The passed list @a ranges must have 2, 4, or 6 elements; that is, + 1, 2, or 3 pairs. This precondition is enforced by an assertion. + + @return true if and only if no range violation was detected + */ + bool next_byte_in_range(std::initializer_list<int> ranges) + { + assert(ranges.size() == 2 or ranges.size() == 4 or ranges.size() == 6); + add(current); + + for (auto range = ranges.begin(); range != ranges.end(); ++range) + { + get(); + if (JSON_LIKELY(*range <= current and current <= *(++range))) + { + add(current); + } + else + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return false; + } + } + + return true; + } + + /*! + @brief scan a string literal + + This function scans a string according to Sect. 7 of RFC 7159. While + scanning, bytes are escaped and copied into buffer yytext. Then the function + returns successfully, yytext is *not* null-terminated (as it may contain \0 + bytes), and yytext.size() is the number of bytes in the string. + + @return token_type::value_string if string could be successfully scanned, + token_type::parse_error otherwise + + @note In case of errors, variable error_message contains a textual + description. + */ + token_type scan_string() + { + // reset yytext (ignore opening quote) + reset(); + + // we entered the function by reading an open quote + assert(current == '\"'); + + while (true) + { + // get next character + switch (get()) + { + // end of file while parsing string + case std::char_traits<char>::eof(): + { + error_message = "invalid string: missing closing quote"; + return token_type::parse_error; + } + + // closing quote + case '\"': + { + return token_type::value_string; + } + + // escapes + case '\\': + { + switch (get()) + { + // quotation mark + case '\"': + add('\"'); + break; + // reverse solidus + case '\\': + add('\\'); + break; + // solidus + case '/': + add('/'); + break; + // backspace + case 'b': + add('\b'); + break; + // form feed + case 'f': + add('\f'); + break; + // line feed + case 'n': + add('\n'); + break; + // carriage return + case 'r': + add('\r'); + break; + // tab + case 't': + add('\t'); + break; + + // unicode escapes + case 'u': + { + const int codepoint1 = get_codepoint(); + int codepoint = codepoint1; // start with codepoint1 + + if (JSON_UNLIKELY(codepoint1 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if code point is a high surrogate + if (0xD800 <= codepoint1 and codepoint1 <= 0xDBFF) + { + // expect next \uxxxx entry + if (JSON_LIKELY(get() == '\\' and get() == 'u')) + { + const int codepoint2 = get_codepoint(); + + if (JSON_UNLIKELY(codepoint2 == -1)) + { + error_message = "invalid string: '\\u' must be followed by 4 hex digits"; + return token_type::parse_error; + } + + // check if codepoint2 is a low surrogate + if (JSON_LIKELY(0xDC00 <= codepoint2 and codepoint2 <= 0xDFFF)) + { + // overwrite codepoint + codepoint = + // high surrogate occupies the most significant 22 bits + (codepoint1 << 10) + // low surrogate occupies the least significant 15 bits + + codepoint2 + // there is still the 0xD800, 0xDC00 and 0x10000 noise + // in the result so we have to subtract with: + // (0xD800 << 10) + DC00 - 0x10000 = 0x35FDC00 + - 0x35FDC00; + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must be followed by U+DC00..U+DFFF"; + return token_type::parse_error; + } + } + else + { + if (JSON_UNLIKELY(0xDC00 <= codepoint1 and codepoint1 <= 0xDFFF)) + { + error_message = "invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF"; + return token_type::parse_error; + } + } + + // result of the above calculation yields a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // translate codepoint into bytes + if (codepoint < 0x80) + { + // 1-byte characters: 0xxxxxxx (ASCII) + add(codepoint); + } + else if (codepoint <= 0x7FF) + { + // 2-byte characters: 110xxxxx 10xxxxxx + add(0xC0 | (codepoint >> 6)); + add(0x80 | (codepoint & 0x3F)); + } + else if (codepoint <= 0xFFFF) + { + // 3-byte characters: 1110xxxx 10xxxxxx 10xxxxxx + add(0xE0 | (codepoint >> 12)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + else + { + // 4-byte characters: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + add(0xF0 | (codepoint >> 18)); + add(0x80 | ((codepoint >> 12) & 0x3F)); + add(0x80 | ((codepoint >> 6) & 0x3F)); + add(0x80 | (codepoint & 0x3F)); + } + + break; + } + + // other characters after escape + default: + error_message = "invalid string: forbidden character after backslash"; + return token_type::parse_error; + } + + break; + } + + // invalid control characters + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + error_message = "invalid string: control character must be escaped"; + return token_type::parse_error; + } + + // U+0020..U+007F (except U+0022 (quote) and U+005C (backspace)) + case 0x20: + case 0x21: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + { + add(current); + break; + } + + // U+0080..U+07FF: bytes C2..DF 80..BF + case 0xC2: + case 0xC3: + case 0xC4: + case 0xC5: + case 0xC6: + case 0xC7: + case 0xC8: + case 0xC9: + case 0xCA: + case 0xCB: + case 0xCC: + case 0xCD: + case 0xCE: + case 0xCF: + case 0xD0: + case 0xD1: + case 0xD2: + case 0xD3: + case 0xD4: + case 0xD5: + case 0xD6: + case 0xD7: + case 0xD8: + case 0xD9: + case 0xDA: + case 0xDB: + case 0xDC: + case 0xDD: + case 0xDE: + case 0xDF: + { + if (JSON_UNLIKELY(not next_byte_in_range({0x80, 0xBF}))) + { + return token_type::parse_error; + } + break; + } + + // U+0800..U+0FFF: bytes E0 A0..BF 80..BF + case 0xE0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0xA0, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+1000..U+CFFF: bytes E1..EC 80..BF 80..BF + // U+E000..U+FFFF: bytes EE..EF 80..BF 80..BF + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xEE: + case 0xEF: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+D000..U+D7FF: bytes ED 80..9F 80..BF + case 0xED: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x9F, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+10000..U+3FFFF F0 90..BF 80..BF 80..BF + case 0xF0: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x90, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+40000..U+FFFFF F1..F3 80..BF 80..BF 80..BF + case 0xF1: + case 0xF2: + case 0xF3: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0xBF, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // U+100000..U+10FFFF F4 80..8F 80..BF 80..BF + case 0xF4: + { + if (JSON_UNLIKELY(not (next_byte_in_range({0x80, 0x8F, 0x80, 0xBF, 0x80, 0xBF})))) + { + return token_type::parse_error; + } + break; + } + + // remaining bytes (80..C1 and F5..FF) are ill-formed + default: + { + error_message = "invalid string: ill-formed UTF-8 byte"; + return token_type::parse_error; + } + } + } + } + + static void strtof(float& f, const char* str, char** endptr) noexcept + { + f = std::strtof(str, endptr); + } + + static void strtof(double& f, const char* str, char** endptr) noexcept + { + f = std::strtod(str, endptr); + } + + static void strtof(long double& f, const char* str, char** endptr) noexcept + { + f = std::strtold(str, endptr); + } + + /*! + @brief scan a number literal + + This function scans a string according to Sect. 6 of RFC 7159. + + The function is realized with a deterministic finite state machine derived + from the grammar described in RFC 7159. Starting in state "init", the + input is read and used to determined the next state. Only state "done" + accepts the number. State "error" is a trap state to model errors. In the + table below, "anything" means any character but the ones listed before. + + state | 0 | 1-9 | e E | + | - | . | anything + ---------|----------|----------|----------|---------|---------|----------|----------- + init | zero | any1 | [error] | [error] | minus | [error] | [error] + minus | zero | any1 | [error] | [error] | [error] | [error] | [error] + zero | done | done | exponent | done | done | decimal1 | done + any1 | any1 | any1 | exponent | done | done | decimal1 | done + decimal1 | decimal2 | [error] | [error] | [error] | [error] | [error] | [error] + decimal2 | decimal2 | decimal2 | exponent | done | done | done | done + exponent | any2 | any2 | [error] | sign | sign | [error] | [error] + sign | any2 | any2 | [error] | [error] | [error] | [error] | [error] + any2 | any2 | any2 | done | done | done | done | done + + The state machine is realized with one label per state (prefixed with + "scan_number_") and `goto` statements between them. The state machine + contains cycles, but any cycle can be left when EOF is read. Therefore, + the function is guaranteed to terminate. + + During scanning, the read bytes are stored in yytext. This string is + then converted to a signed integer, an unsigned integer, or a + floating-point number. + + @return token_type::value_unsigned, token_type::value_integer, or + token_type::value_float if number could be successfully scanned, + token_type::parse_error otherwise + + @note The scanner is independent of the current locale. Internally, the + locale's decimal point is used instead of `.` to work with the + locale-dependent converters. + */ + token_type scan_number() + { + // reset yytext to store the number's bytes + reset(); + + // the type of the parsed number; initially set to unsigned; will be + // changed if minus sign, decimal point or exponent is read + token_type number_type = token_type::value_unsigned; + + // state (init): we just found out we need to scan a number + switch (current) + { + case '-': + { + add(current); + goto scan_number_minus; + } + + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + // all other characters are rejected outside scan_number() + assert(false); // LCOV_EXCL_LINE + } + } + +scan_number_minus: + // state: we just parsed a leading minus sign + number_type = token_type::value_integer; + switch (get()) + { + case '0': + { + add(current); + goto scan_number_zero; + } + + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + default: + { + error_message = "invalid number; expected digit after '-'"; + return token_type::parse_error; + } + } + +scan_number_zero: + // state: we just parse a zero (maybe with a leading minus sign) + switch (get()) + { + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_any1: + // state: we just parsed a number 0-9 (maybe with a leading minus sign) + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any1; + } + + case '.': + { + add(decimal_point_char); + goto scan_number_decimal1; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_decimal1: + // state: we just parsed a decimal point + number_type = token_type::value_float; + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + default: + { + error_message = "invalid number; expected digit after '.'"; + return token_type::parse_error; + } + } + +scan_number_decimal2: + // we just parsed at least one number after a decimal point + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_decimal2; + } + + case 'e': + case 'E': + { + add(current); + goto scan_number_exponent; + } + + default: + goto scan_number_done; + } + +scan_number_exponent: + // we just parsed an exponent + number_type = token_type::value_float; + switch (get()) + { + case '+': + case '-': + { + add(current); + goto scan_number_sign; + } + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = + "invalid number; expected '+', '-', or digit after exponent"; + return token_type::parse_error; + } + } + +scan_number_sign: + // we just parsed an exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + { + error_message = "invalid number; expected digit after exponent sign"; + return token_type::parse_error; + } + } + +scan_number_any2: + // we just parsed a number after the exponent or exponent sign + switch (get()) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + { + add(current); + goto scan_number_any2; + } + + default: + goto scan_number_done; + } + +scan_number_done: + // unget the character after the number (we only read it to know that + // we are done scanning a number) + unget(); + + char* endptr = nullptr; + errno = 0; + + // try to parse integers first and fall back to floats + if (number_type == token_type::value_unsigned) + { + const auto x = std::strtoull(yytext.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + if (errno == 0) + { + value_unsigned = static_cast<number_unsigned_t>(x); + if (value_unsigned == x) + { + return token_type::value_unsigned; + } + } + } + else if (number_type == token_type::value_integer) + { + const auto x = std::strtoll(yytext.data(), &endptr, 10); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + if (errno == 0) + { + value_integer = static_cast<number_integer_t>(x); + if (value_integer == x) + { + return token_type::value_integer; + } + } + } + + // this code is reached if we parse a floating-point number or if an + // integer conversion above failed + strtof(value_float, yytext.data(), &endptr); + + // we checked the number format before + assert(endptr == yytext.data() + yytext.size()); + + return token_type::value_float; + } + + /*! + @param[in] literal_text the literal text to expect + @param[in] length the length of the passed literal text + @param[in] return_type the token type to return on success + */ + token_type scan_literal(const char* literal_text, const std::size_t length, + token_type return_type) + { + assert(current == literal_text[0]); + for (std::size_t i = 1; i < length; ++i) + { + if (JSON_UNLIKELY(get() != literal_text[i])) + { + error_message = "invalid literal"; + return token_type::parse_error; + } + } + return return_type; + } + + ///////////////////// + // input management + ///////////////////// + + /// reset yytext; current character is beginning of token + void reset() noexcept + { + yytext.clear(); + token_string.clear(); + token_string.push_back(std::char_traits<char>::to_char_type(current)); + } + + /* + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a + `std::char_traits<char>::eof()` in that case. Stores the scanned characters + for use in error messages. + + @return character read from the input + */ + std::char_traits<char>::int_type get() + { + ++chars_read; + current = ia->get_character(); + if (JSON_LIKELY(current != std::char_traits<char>::eof())) + { + token_string.push_back(std::char_traits<char>::to_char_type(current)); + } + return current; + } + + /// unget current character (return it again on next get) + void unget() + { + --chars_read; + if (JSON_LIKELY(current != std::char_traits<char>::eof())) + { + ia->unget_character(); + assert(token_string.size() != 0); + token_string.pop_back(); + } + } + + /// add a character to yytext + void add(int c) + { + yytext.push_back(std::char_traits<char>::to_char_type(c)); + } + + public: + ///////////////////// + // value getters + ///////////////////// + + /// return integer value + constexpr number_integer_t get_number_integer() const noexcept + { + return value_integer; + } + + /// return unsigned integer value + constexpr number_unsigned_t get_number_unsigned() const noexcept + { + return value_unsigned; + } + + /// return floating-point value + constexpr number_float_t get_number_float() const noexcept + { + return value_float; + } + + /// return current string value (implicitly resets the token; useful only once) + std::string move_string() + { + return std::move(yytext); + } + + ///////////////////// + // diagnostics + ///////////////////// + + /// return position of last read token + constexpr std::size_t get_position() const noexcept + { + return chars_read; + } + + /// return the last read token (for errors only). Will never contain EOF + /// (an arbitrary value that is not a valid char value, often -1), because + /// 255 may legitimately occur. May contain NUL, which should be escaped. + std::string get_token_string() const + { + // escape control characters + std::string result; + for (const auto c : token_string) + { + if ('\x00' <= c and c <= '\x1F') + { + // escape control characters + std::stringstream ss; + ss << "<U+" << std::setw(4) << std::uppercase << std::setfill('0') + << std::hex << static_cast<int>(c) << ">"; + result += ss.str(); + } + else + { + // add character as is + result.push_back(c); + } + } + + return result; + } + + /// return syntax error message + constexpr const char* get_error_message() const noexcept + { + return error_message; + } + + ///////////////////// + // actual scanner + ///////////////////// + + token_type scan() + { + // read next character and ignore whitespace + do + { + get(); + } + while (current == ' ' or current == '\t' or current == '\n' or current == '\r'); + + switch (current) + { + // structural characters + case '[': + return token_type::begin_array; + case ']': + return token_type::end_array; + case '{': + return token_type::begin_object; + case '}': + return token_type::end_object; + case ':': + return token_type::name_separator; + case ',': + return token_type::value_separator; + + // literals + case 't': + return scan_literal("true", 4, token_type::literal_true); + case 'f': + return scan_literal("false", 5, token_type::literal_false); + case 'n': + return scan_literal("null", 4, token_type::literal_null); + + // string + case '\"': + return scan_string(); + + // number + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return scan_number(); + + // end of input (the null byte is needed when parsing from + // string literals) + case '\0': + case std::char_traits<char>::eof(): + return token_type::end_of_input; + + // error + default: + error_message = "invalid literal"; + return token_type::parse_error; + } + } + + private: + /// input adapter + detail::input_adapter_t ia = nullptr; + + /// the current character + std::char_traits<char>::int_type current = std::char_traits<char>::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// raw input token string (for error messages) + std::vector<char> token_string {}; + + /// buffer for variable-length tokens (numbers, strings) + std::string yytext {}; + + /// a description of occurred lexer errors + const char* error_message = ""; + + // number values + number_integer_t value_integer = 0; + number_unsigned_t value_unsigned = 0; + number_float_t value_float = 0; + + /// the decimal point + const char decimal_point_char = '.'; +}; + +/*! +@brief syntax analysis + +This class implements a recursive decent parser. +*/ +template<typename BasicJsonType> +class parser +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + using number_float_t = typename BasicJsonType::number_float_t; + using lexer_t = lexer<BasicJsonType>; + using token_type = typename lexer_t::token_type; + + public: + enum class parse_event_t : uint8_t + { + /// the parser read `{` and started to process a JSON object + object_start, + /// the parser read `}` and finished processing a JSON object + object_end, + /// the parser read `[` and started to process a JSON array + array_start, + /// the parser read `]` and finished processing a JSON array + array_end, + /// the parser read a key of a value in an object + key, + /// the parser finished reading a JSON value + value + }; + + using parser_callback_t = + std::function<bool(int depth, parse_event_t event, BasicJsonType& parsed)>; + + /// a parser reading from an input adapter + explicit parser(detail::input_adapter_t adapter, + const parser_callback_t cb = nullptr, + const bool allow_exceptions_ = true) + : callback(cb), m_lexer(adapter), allow_exceptions(allow_exceptions_) + {} + + /*! + @brief public parser interface + + @param[in] strict whether to expect the last token to be EOF + @param[in,out] result parsed JSON value + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse(const bool strict, BasicJsonType& result) + { + // read first token + get_token(); + + parse_internal(true, result); + result.assert_invariant(); + + // in strict mode, input must be completely read + if (strict) + { + get_token(); + expect(token_type::end_of_input); + } + + // in case of an error, return discarded value + if (errored) + { + result = value_t::discarded; + return; + } + + // set top-level value to null if it was discarded by the callback + // function + if (result.is_discarded()) + { + result = nullptr; + } + } + + /*! + @brief public accept interface + + @param[in] strict whether to expect the last token to be EOF + @return whether the input is a proper JSON text + */ + bool accept(const bool strict = true) + { + // read first token + get_token(); + + if (not accept_internal()) + { + return false; + } + + // strict => last token must be EOF + return not strict or (get_token() == token_type::end_of_input); + } + + private: + /*! + @brief the actual parser + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + */ + void parse_internal(bool keep, BasicJsonType& result) + { + // never parse after a parse error was detected + assert(not errored); + + // start with a discarded value + if (not result.is_discarded()) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + + switch (last_token) + { + case token_type::begin_object: + { + if (keep) + { + if (callback) + { + keep = callback(depth++, parse_event_t::object_start, result); + } + + if (not callback or keep) + { + // explicitly set result to object to cope with {} + result.m_type = value_t::object; + result.m_value = value_t::object; + } + } + + // read next token + get_token(); + + // closing } -> we are done + if (last_token == token_type::end_object) + { + if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + // parse values + std::string key; + BasicJsonType value; + while (true) + { + // store key + if (not expect(token_type::value_string)) + { + return; + } + key = m_lexer.move_string(); + + bool keep_tag = false; + if (keep) + { + if (callback) + { + BasicJsonType k(key); + keep_tag = callback(depth, parse_event_t::key, k); + } + else + { + keep_tag = true; + } + } + + // parse separator (:) + get_token(); + if (not expect(token_type::name_separator)) + { + return; + } + + // parse and add value + get_token(); + value.m_value.destroy(value.m_type); + value.m_type = value_t::discarded; + parse_internal(keep, value); + + if (JSON_UNLIKELY(errored)) + { + return; + } + + if (keep and keep_tag and not value.is_discarded()) + { + result.m_value.object->emplace(std::move(key), std::move(value)); + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing } + if (not expect(token_type::end_object)) + { + return; + } + break; + } + + if (keep and callback and not callback(--depth, parse_event_t::object_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + case token_type::begin_array: + { + if (keep) + { + if (callback) + { + keep = callback(depth++, parse_event_t::array_start, result); + } + + if (not callback or keep) + { + // explicitly set result to array to cope with [] + result.m_type = value_t::array; + result.m_value = value_t::array; + } + } + + // read next token + get_token(); + + // closing ] -> we are done + if (last_token == token_type::end_array) + { + if (callback and not callback(--depth, parse_event_t::array_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + // parse values + BasicJsonType value; + while (true) + { + // parse value + value.m_value.destroy(value.m_type); + value.m_type = value_t::discarded; + parse_internal(keep, value); + + if (JSON_UNLIKELY(errored)) + { + return; + } + + if (keep and not value.is_discarded()) + { + result.m_value.array->push_back(std::move(value)); + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing ] + if (not expect(token_type::end_array)) + { + return; + } + break; + } + + if (keep and callback and not callback(--depth, parse_event_t::array_end, result)) + { + result.m_value.destroy(result.m_type); + result.m_type = value_t::discarded; + } + break; + } + + case token_type::literal_null: + { + result.m_type = value_t::null; + break; + } + + case token_type::value_string: + { + result.m_type = value_t::string; + result.m_value = m_lexer.move_string(); + break; + } + + case token_type::literal_true: + { + result.m_type = value_t::boolean; + result.m_value = true; + break; + } + + case token_type::literal_false: + { + result.m_type = value_t::boolean; + result.m_value = false; + break; + } + + case token_type::value_unsigned: + { + result.m_type = value_t::number_unsigned; + result.m_value = m_lexer.get_number_unsigned(); + break; + } + + case token_type::value_integer: + { + result.m_type = value_t::number_integer; + result.m_value = m_lexer.get_number_integer(); + break; + } + + case token_type::value_float: + { + result.m_type = value_t::number_float; + result.m_value = m_lexer.get_number_float(); + + // throw in case of infinity or NAN + if (JSON_UNLIKELY(not std::isfinite(result.m_value.number_float))) + { + if (allow_exceptions) + { + JSON_THROW(out_of_range::create(406, "number overflow parsing '" + + m_lexer.get_token_string() + "'")); + } + expect(token_type::uninitialized); + } + break; + } + + case token_type::parse_error: + { + // using "uninitialized" to avoid "expected" message + if (not expect(token_type::uninitialized)) + { + return; + } + break; // LCOV_EXCL_LINE + } + + default: + { + // the last token was unexpected; we expected a value + if (not expect(token_type::literal_or_value)) + { + return; + } + break; // LCOV_EXCL_LINE + } + } + + if (keep and callback and not callback(depth, parse_event_t::value, result)) + { + result.m_type = value_t::discarded; + } + } + + /*! + @brief the actual acceptor + + @invariant 1. The last token is not yet processed. Therefore, the caller + of this function must make sure a token has been read. + 2. When this function returns, the last token is processed. + That is, the last read character was already considered. + + This invariant makes sure that no token needs to be "unput". + */ + bool accept_internal() + { + switch (last_token) + { + case token_type::begin_object: + { + // read next token + get_token(); + + // closing } -> we are done + if (last_token == token_type::end_object) + { + return true; + } + + // parse values + while (true) + { + // parse key + if (last_token != token_type::value_string) + { + return false; + } + + // parse separator (:) + get_token(); + if (last_token != token_type::name_separator) + { + return false; + } + + // parse value + get_token(); + if (not accept_internal()) + { + return false; + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing } + return (last_token == token_type::end_object); + } + } + + case token_type::begin_array: + { + // read next token + get_token(); + + // closing ] -> we are done + if (last_token == token_type::end_array) + { + return true; + } + + // parse values + while (true) + { + // parse value + if (not accept_internal()) + { + return false; + } + + // comma -> next value + get_token(); + if (last_token == token_type::value_separator) + { + get_token(); + continue; + } + + // closing ] + return (last_token == token_type::end_array); + } + } + + case token_type::value_float: + { + // reject infinity or NAN + return std::isfinite(m_lexer.get_number_float()); + } + + case token_type::literal_false: + case token_type::literal_null: + case token_type::literal_true: + case token_type::value_integer: + case token_type::value_string: + case token_type::value_unsigned: + return true; + + default: // the last token was unexpected + return false; + } + } + + /// get next token from lexer + token_type get_token() + { + return (last_token = m_lexer.scan()); + } + + /*! + @throw parse_error.101 if expected token did not occur + */ + bool expect(token_type t) + { + if (JSON_UNLIKELY(t != last_token)) + { + errored = true; + expected = t; + if (allow_exceptions) + { + throw_exception(); + } + else + { + return false; + } + } + + return true; + } + + [[noreturn]] void throw_exception() const + { + std::string error_msg = "syntax error - "; + if (last_token == token_type::parse_error) + { + error_msg += std::string(m_lexer.get_error_message()) + "; last read: '" + + m_lexer.get_token_string() + "'"; + } + else + { + error_msg += "unexpected " + std::string(lexer_t::token_type_name(last_token)); + } + + if (expected != token_type::uninitialized) + { + error_msg += "; expected " + std::string(lexer_t::token_type_name(expected)); + } + + JSON_THROW(parse_error::create(101, m_lexer.get_position(), error_msg)); + } + + private: + /// current level of recursion + int depth = 0; + /// callback function + const parser_callback_t callback = nullptr; + /// the type of the last read token + token_type last_token = token_type::uninitialized; + /// the lexer + lexer_t m_lexer; + /// whether a syntax error occurred + bool errored = false; + /// possible reason for the syntax error + token_type expected = token_type::uninitialized; + /// whether to throw exceptions in case of errors + const bool allow_exceptions = true; +}; + +/////////////// +// iterators // +/////////////// + +/*! +@brief an iterator for primitive JSON types + +This class models an iterator for primitive JSON types (boolean, number, +string). It's only purpose is to allow the iterator/const_iterator classes +to "iterate" over primitive values. Internally, the iterator is modeled by +a `difference_type` variable. Value begin_value (`0`) models the begin, +end_value (`1`) models past the end. +*/ +class primitive_iterator_t +{ + public: + using difference_type = std::ptrdiff_t; + + constexpr difference_type get_value() const noexcept + { + return m_it; + } + + /// set iterator to a defined beginning + void set_begin() noexcept + { + m_it = begin_value; + } + + /// set iterator to a defined past the end + void set_end() noexcept + { + m_it = end_value; + } + + /// return whether the iterator can be dereferenced + constexpr bool is_begin() const noexcept + { + return m_it == begin_value; + } + + /// return whether the iterator is at end + constexpr bool is_end() const noexcept + { + return m_it == end_value; + } + + friend constexpr bool operator==(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it == rhs.m_it; + } + + friend constexpr bool operator<(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it < rhs.m_it; + } + + primitive_iterator_t operator+(difference_type i) + { + auto result = *this; + result += i; + return result; + } + + friend constexpr difference_type operator-(primitive_iterator_t lhs, primitive_iterator_t rhs) noexcept + { + return lhs.m_it - rhs.m_it; + } + + friend std::ostream& operator<<(std::ostream& os, primitive_iterator_t it) + { + return os << it.m_it; + } + + primitive_iterator_t& operator++() + { + ++m_it; + return *this; + } + + primitive_iterator_t const operator++(int) + { + auto result = *this; + m_it++; + return result; + } + + primitive_iterator_t& operator--() + { + --m_it; + return *this; + } + + primitive_iterator_t const operator--(int) + { + auto result = *this; + m_it--; + return result; + } + + primitive_iterator_t& operator+=(difference_type n) + { + m_it += n; + return *this; + } + + primitive_iterator_t& operator-=(difference_type n) + { + m_it -= n; + return *this; + } + + private: + static constexpr difference_type begin_value = 0; + static constexpr difference_type end_value = begin_value + 1; + + /// iterator as signed integer type + difference_type m_it = (std::numeric_limits<std::ptrdiff_t>::min)(); +}; + +/*! +@brief an iterator value + +@note This structure could easily be a union, but MSVC currently does not allow +unions members with complex constructors, see https://github.com/nlohmann/json/pull/105. +*/ +template<typename BasicJsonType> struct internal_iterator +{ + /// iterator for JSON objects + typename BasicJsonType::object_t::iterator object_iterator {}; + /// iterator for JSON arrays + typename BasicJsonType::array_t::iterator array_iterator {}; + /// generic iterator for all other types + primitive_iterator_t primitive_iterator {}; +}; + +template<typename IteratorType> class iteration_proxy; + +/*! +@brief a template for a bidirectional iterator for the @ref basic_json class + +This class implements a both iterators (iterator and const_iterator) for the +@ref basic_json class. + +@note An iterator is called *initialized* when a pointer to a JSON value has + been set (e.g., by a constructor or a copy assignment). If the iterator is + default-constructed, it is *uninitialized* and most methods are undefined. + **The library uses assertions to detect calls on uninitialized iterators.** + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](http://en.cppreference.com/w/cpp/concept/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). + +@since version 1.0.0, simplified in version 2.0.9, change to bidirectional + iterators in version 3.0.0 (see https://github.com/nlohmann/json/issues/593) +*/ +template<typename BasicJsonType> +class iter_impl +{ + /// allow basic_json to access private members + friend iter_impl<typename std::conditional<std::is_const<BasicJsonType>::value, typename std::remove_const<BasicJsonType>::type, const BasicJsonType>::type>; + friend BasicJsonType; + friend iteration_proxy<iter_impl>; + + using object_t = typename BasicJsonType::object_t; + using array_t = typename BasicJsonType::array_t; + // make sure BasicJsonType is basic_json or const basic_json + static_assert(is_basic_json<typename std::remove_const<BasicJsonType>::type>::value, + "iter_impl only accepts (const) basic_json"); + + public: + + /// The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. + /// The C++ Standard has never required user-defined iterators to derive from std::iterator. + /// A user-defined iterator should provide publicly accessible typedefs named + /// iterator_category, value_type, difference_type, pointer, and reference. + /// Note that value_type is required to be non-const, even for constant iterators. + using iterator_category = std::bidirectional_iterator_tag; + + /// the type of the values when the iterator is dereferenced + using value_type = typename BasicJsonType::value_type; + /// a type to represent differences between iterators + using difference_type = typename BasicJsonType::difference_type; + /// defines a pointer to the type iterated over (value_type) + using pointer = typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_pointer, + typename BasicJsonType::pointer>::type; + /// defines a reference to the type iterated over (value_type) + using reference = + typename std::conditional<std::is_const<BasicJsonType>::value, + typename BasicJsonType::const_reference, + typename BasicJsonType::reference>::type; + + /// default constructor + iter_impl() = default; + + /*! + @brief constructor for a given JSON instance + @param[in] object pointer to a JSON object for this iterator + @pre object != nullptr + @post The iterator is initialized; i.e. `m_object != nullptr`. + */ + explicit iter_impl(pointer object) noexcept : m_object(object) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = typename object_t::iterator(); + break; + } + + case value_t::array: + { + m_it.array_iterator = typename array_t::iterator(); + break; + } + + default: + { + m_it.primitive_iterator = primitive_iterator_t(); + break; + } + } + } + + /*! + @note The conventional copy constructor and copy assignment are implicitly + defined. Combined with the following converting constructor and + assignment, they support: (1) copy from iterator to iterator, (2) + copy from const iterator to const iterator, and (3) conversion from + iterator to const iterator. However conversion from const iterator + to iterator is not defined. + */ + + /*! + @brief converting constructor + @param[in] other non-const iterator to copy from + @note It is not checked whether @a other is initialized. + */ + iter_impl(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + : m_object(other.m_object), m_it(other.m_it) {} + + /*! + @brief converting assignment + @param[in,out] other non-const iterator to copy from + @return const/non-const iterator + @note It is not checked whether @a other is initialized. + */ + iter_impl& operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>& other) noexcept + { + m_object = other.m_object; + m_it = other.m_it; + return *this; + } + + private: + /*! + @brief set the iterator to the first value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_begin() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->begin(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->begin(); + break; + } + + case value_t::null: + { + // set to end so begin()==end() is true: null is empty + m_it.primitive_iterator.set_end(); + break; + } + + default: + { + m_it.primitive_iterator.set_begin(); + break; + } + } + } + + /*! + @brief set the iterator past the last value + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + void set_end() noexcept + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + m_it.object_iterator = m_object->m_value.object->end(); + break; + } + + case value_t::array: + { + m_it.array_iterator = m_object->m_value.array->end(); + break; + } + + default: + { + m_it.primitive_iterator.set_end(); + break; + } + } + } + + public: + /*! + @brief return a reference to the value pointed to by the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator*() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return m_it.object_iterator->second; + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return *m_it.array_iterator; + } + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief dereference the iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + pointer operator->() const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + assert(m_it.object_iterator != m_object->m_value.object->end()); + return &(m_it.object_iterator->second); + } + + case value_t::array: + { + assert(m_it.array_iterator != m_object->m_value.array->end()); + return &*m_it.array_iterator; + } + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.is_begin())) + { + return m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief post-increment (it++) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator++(int) + { + auto result = *this; + ++(*this); + return result; + } + + /*! + @brief pre-increment (++it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator++() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, 1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, 1); + break; + } + + default: + { + ++m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief post-decrement (it--) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl const operator--(int) + { + auto result = *this; + --(*this); + return result; + } + + /*! + @brief pre-decrement (--it) + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator--() + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + { + std::advance(m_it.object_iterator, -1); + break; + } + + case value_t::array: + { + std::advance(m_it.array_iterator, -1); + break; + } + + default: + { + --m_it.primitive_iterator; + break; + } + } + + return *this; + } + + /*! + @brief comparison: equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator==(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + return (m_it.object_iterator == other.m_it.object_iterator); + + case value_t::array: + return (m_it.array_iterator == other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator == other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: not equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator!=(const iter_impl& other) const + { + return not operator==(other); + } + + /*! + @brief comparison: smaller + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<(const iter_impl& other) const + { + // if objects are not the same, the comparison is undefined + if (JSON_UNLIKELY(m_object != other.m_object)) + { + JSON_THROW(invalid_iterator::create(212, "cannot compare iterators of different containers")); + } + + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(213, "cannot compare order of object iterators")); + + case value_t::array: + return (m_it.array_iterator < other.m_it.array_iterator); + + default: + return (m_it.primitive_iterator < other.m_it.primitive_iterator); + } + } + + /*! + @brief comparison: less than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator<=(const iter_impl& other) const + { + return not other.operator < (*this); + } + + /*! + @brief comparison: greater than + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>(const iter_impl& other) const + { + return not operator<=(other); + } + + /*! + @brief comparison: greater than or equal + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + bool operator>=(const iter_impl& other) const + { + return not operator<(other); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator+=(difference_type i) + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + { + std::advance(m_it.array_iterator, i); + break; + } + + default: + { + m_it.primitive_iterator += i; + break; + } + } + + return *this; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl& operator-=(difference_type i) + { + return operator+=(-i); + } + + /*! + @brief add to iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator+(difference_type i) const + { + auto result = *this; + result += i; + return result; + } + + /*! + @brief addition of distance and iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + friend iter_impl operator+(difference_type i, const iter_impl& it) + { + auto result = it; + result += i; + return result; + } + + /*! + @brief subtract from iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + iter_impl operator-(difference_type i) const + { + auto result = *this; + result -= i; + return result; + } + + /*! + @brief return difference + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + difference_type operator-(const iter_impl& other) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(209, "cannot use offsets with object iterators")); + + case value_t::array: + return m_it.array_iterator - other.m_it.array_iterator; + + default: + return m_it.primitive_iterator - other.m_it.primitive_iterator; + } + } + + /*! + @brief access to successor + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference operator[](difference_type n) const + { + assert(m_object != nullptr); + + switch (m_object->m_type) + { + case value_t::object: + JSON_THROW(invalid_iterator::create(208, "cannot use operator[] for object iterators")); + + case value_t::array: + return *std::next(m_it.array_iterator, n); + + case value_t::null: + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + + default: + { + if (JSON_LIKELY(m_it.primitive_iterator.get_value() == -n)) + { + return *m_object; + } + + JSON_THROW(invalid_iterator::create(214, "cannot get value")); + } + } + } + + /*! + @brief return the key of an object iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + typename object_t::key_type key() const + { + assert(m_object != nullptr); + + if (JSON_LIKELY(m_object->is_object())) + { + return m_it.object_iterator->first; + } + + JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators")); + } + + /*! + @brief return the value of an iterator + @pre The iterator is initialized; i.e. `m_object != nullptr`. + */ + reference value() const + { + return operator*(); + } + + private: + /// associated JSON instance + pointer m_object = nullptr; + /// the actual iterator of the associated instance + internal_iterator<typename std::remove_const<BasicJsonType>::type> m_it = {}; +}; + +/// proxy class for the iterator_wrapper functions +template<typename IteratorType> class iteration_proxy +{ + private: + /// helper class for iteration + class iteration_proxy_internal + { + private: + /// the iterator + IteratorType anchor; + /// an index for arrays (used to create key names) + std::size_t array_index = 0; + + public: + explicit iteration_proxy_internal(IteratorType it) noexcept : anchor(it) {} + + /// dereference operator (needed for range-based for) + iteration_proxy_internal& operator*() + { + return *this; + } + + /// increment operator (needed for range-based for) + iteration_proxy_internal& operator++() + { + ++anchor; + ++array_index; + + return *this; + } + + /// inequality operator (needed for range-based for) + bool operator!=(const iteration_proxy_internal& o) const noexcept + { + return anchor != o.anchor; + } + + /// return key of the iterator + std::string key() const + { + assert(anchor.m_object != nullptr); + + switch (anchor.m_object->type()) + { + // use integer array index as key + case value_t::array: + return std::to_string(array_index); + + // use key from the object + case value_t::object: + return anchor.key(); + + // use an empty key for all primitive types + default: + return ""; + } + } + + /// return value of the iterator + typename IteratorType::reference value() const + { + return anchor.value(); + } + }; + + /// the container to iterate + typename IteratorType::reference container; + + public: + /// construct iteration proxy from a container + explicit iteration_proxy(typename IteratorType::reference cont) + : container(cont) {} + + /// return iterator begin (needed for range-based for) + iteration_proxy_internal begin() noexcept + { + return iteration_proxy_internal(container.begin()); + } + + /// return iterator end (needed for range-based for) + iteration_proxy_internal end() noexcept + { + return iteration_proxy_internal(container.end()); + } +}; + +/*! +@brief a template for a reverse iterator class + +@tparam Base the base iterator type to reverse. Valid types are @ref +iterator (to create @ref reverse_iterator) and @ref const_iterator (to +create @ref const_reverse_iterator). + +@requirement The class satisfies the following concept requirements: +- +[BidirectionalIterator](http://en.cppreference.com/w/cpp/concept/BidirectionalIterator): + The iterator that can be moved can be moved in both directions (i.e. + incremented and decremented). +- [OutputIterator](http://en.cppreference.com/w/cpp/concept/OutputIterator): + It is possible to write to the pointed-to element (only if @a Base is + @ref iterator). + +@since version 1.0.0 +*/ +template<typename Base> +class json_reverse_iterator : public std::reverse_iterator<Base> +{ + public: + using difference_type = std::ptrdiff_t; + /// shortcut to the reverse iterator adapter + using base_iterator = std::reverse_iterator<Base>; + /// the reference type for the pointed-to element + using reference = typename Base::reference; + + /// create reverse iterator from iterator + json_reverse_iterator(const typename base_iterator::iterator_type& it) noexcept + : base_iterator(it) {} + + /// create reverse iterator from base class + json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} + + /// post-increment (it++) + json_reverse_iterator const operator++(int) + { + return static_cast<json_reverse_iterator>(base_iterator::operator++(1)); + } + + /// pre-increment (++it) + json_reverse_iterator& operator++() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator++()); + } + + /// post-decrement (it--) + json_reverse_iterator const operator--(int) + { + return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); + } + + /// pre-decrement (--it) + json_reverse_iterator& operator--() + { + return static_cast<json_reverse_iterator&>(base_iterator::operator--()); + } + + /// add to iterator + json_reverse_iterator& operator+=(difference_type i) + { + return static_cast<json_reverse_iterator&>(base_iterator::operator+=(i)); + } + + /// add to iterator + json_reverse_iterator operator+(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator+(i)); + } + + /// subtract from iterator + json_reverse_iterator operator-(difference_type i) const + { + return static_cast<json_reverse_iterator>(base_iterator::operator-(i)); + } + + /// return difference + difference_type operator-(const json_reverse_iterator& other) const + { + return base_iterator(*this) - base_iterator(other); + } + + /// access to successor + reference operator[](difference_type n) const + { + return *(this->operator+(n)); + } + + /// return the key of an object iterator + auto key() const -> decltype(std::declval<Base>().key()) + { + auto it = --this->base(); + return it.key(); + } + + /// return the value of an iterator + reference value() const + { + auto it = --this->base(); + return it.operator * (); + } +}; + +///////////////////// +// output adapters // +///////////////////// + +/// abstract output adapter interface +template<typename CharType> struct output_adapter_protocol +{ + virtual void write_character(CharType c) = 0; + virtual void write_characters(const CharType* s, std::size_t length) = 0; + virtual ~output_adapter_protocol() = default; +}; + +/// a type to simplify interfaces +template<typename CharType> +using output_adapter_t = std::shared_ptr<output_adapter_protocol<CharType>>; + +/// output adapter for byte vectors +template<typename CharType> +class output_vector_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_vector_adapter(std::vector<CharType>& vec) : v(vec) {} + + void write_character(CharType c) override + { + v.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + std::copy(s, s + length, std::back_inserter(v)); + } + + private: + std::vector<CharType>& v; +}; + +/// output adapter for output streams +template<typename CharType> +class output_stream_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_stream_adapter(std::basic_ostream<CharType>& s) : stream(s) {} + + void write_character(CharType c) override + { + stream.put(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + stream.write(s, static_cast<std::streamsize>(length)); + } + + private: + std::basic_ostream<CharType>& stream; +}; + +/// output adapter for basic_string +template<typename CharType> +class output_string_adapter : public output_adapter_protocol<CharType> +{ + public: + explicit output_string_adapter(std::basic_string<CharType>& s) : str(s) {} + + void write_character(CharType c) override + { + str.push_back(c); + } + + void write_characters(const CharType* s, std::size_t length) override + { + str.append(s, length); + } + + private: + std::basic_string<CharType>& str; +}; + +template<typename CharType> +class output_adapter +{ + public: + output_adapter(std::vector<CharType>& vec) + : oa(std::make_shared<output_vector_adapter<CharType>>(vec)) {} + + output_adapter(std::basic_ostream<CharType>& s) + : oa(std::make_shared<output_stream_adapter<CharType>>(s)) {} + + output_adapter(std::basic_string<CharType>& s) + : oa(std::make_shared<output_string_adapter<CharType>>(s)) {} + + operator output_adapter_t<CharType>() + { + return oa; + } + + private: + output_adapter_t<CharType> oa = nullptr; +}; + +////////////////////////////// +// binary reader and writer // +////////////////////////////// + +/*! +@brief deserialization of CBOR and MessagePack values +*/ +template<typename BasicJsonType> +class binary_reader +{ + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + + public: + /*! + @brief create a binary reader + + @param[in] adapter input adapter to read from + */ + explicit binary_reader(input_adapter_t adapter) : ia(std::move(adapter)) + { + assert(ia); + } + + /*! + @brief create a JSON value from CBOR input + + @param[in] strict whether to expect the input to be consumed completed + @return JSON value created from CBOR input + + @throw parse_error.110 if input ended unexpectedly or the end of file was + not reached when @a strict was set to true + @throw parse_error.112 if unsupported byte was read + */ + BasicJsonType parse_cbor(const bool strict) + { + const auto res = parse_cbor_internal(); + if (strict) + { + get(); + check_eof(true); + } + return res; + } + + /*! + @brief create a JSON value from MessagePack input + + @param[in] strict whether to expect the input to be consumed completed + @return JSON value created from MessagePack input + + @throw parse_error.110 if input ended unexpectedly or the end of file was + not reached when @a strict was set to true + @throw parse_error.112 if unsupported byte was read + */ + BasicJsonType parse_msgpack(const bool strict) + { + const auto res = parse_msgpack_internal(); + if (strict) + { + get(); + check_eof(true); + } + return res; + } + + /*! + @brief determine system byte order + + @return true if and only if system's byte order is little endian + + @note from http://stackoverflow.com/a/1001328/266378 + */ + static constexpr bool little_endianess(int num = 1) noexcept + { + return (*reinterpret_cast<char*>(&num) == 1); + } + + private: + /*! + @param[in] get_char whether a new character should be retrieved from the + input (true, default) or whether the last read + character should be considered instead + */ + BasicJsonType parse_cbor_internal(const bool get_char = true) + { + switch (get_char ? get() : current) + { + // EOF + case std::char_traits<char>::eof(): + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + + // Integer 0x00..0x17 (0..23) + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + return static_cast<number_unsigned_t>(current); + + case 0x18: // Unsigned integer (one-byte uint8_t follows) + return get_number<uint8_t>(); + + case 0x19: // Unsigned integer (two-byte uint16_t follows) + return get_number<uint16_t>(); + + case 0x1A: // Unsigned integer (four-byte uint32_t follows) + return get_number<uint32_t>(); + + case 0x1B: // Unsigned integer (eight-byte uint64_t follows) + return get_number<uint64_t>(); + + // Negative integer -1-0x00..-1-0x17 (-1..-24) + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + return static_cast<int8_t>(0x20 - 1 - current); + + case 0x38: // Negative integer (one-byte uint8_t follows) + { + // must be uint8_t ! + return static_cast<number_integer_t>(-1) - get_number<uint8_t>(); + } + + case 0x39: // Negative integer -1-n (two-byte uint16_t follows) + { + return static_cast<number_integer_t>(-1) - get_number<uint16_t>(); + } + + case 0x3A: // Negative integer -1-n (four-byte uint32_t follows) + { + return static_cast<number_integer_t>(-1) - get_number<uint32_t>(); + } + + case 0x3B: // Negative integer -1-n (eight-byte uint64_t follows) + { + return static_cast<number_integer_t>(-1) - + static_cast<number_integer_t>(get_number<uint64_t>()); + } + + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + case 0x7F: // UTF-8 string (indefinite length) + { + return get_cbor_string(); + } + + // array (0x00..0x17 data items follow) + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + { + return get_cbor_array(current & 0x1F); + } + + case 0x98: // array (one-byte uint8_t for n follows) + { + return get_cbor_array(get_number<uint8_t>()); + } + + case 0x99: // array (two-byte uint16_t for n follow) + { + return get_cbor_array(get_number<uint16_t>()); + } + + case 0x9A: // array (four-byte uint32_t for n follow) + { + return get_cbor_array(get_number<uint32_t>()); + } + + case 0x9B: // array (eight-byte uint64_t for n follow) + { + return get_cbor_array(get_number<uint64_t>()); + } + + case 0x9F: // array (indefinite length) + { + BasicJsonType result = value_t::array; + while (get() != 0xFF) + { + result.push_back(parse_cbor_internal(false)); + } + return result; + } + + // map (0x00..0x17 pairs of data items follow) + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + { + return get_cbor_object(current & 0x1F); + } + + case 0xB8: // map (one-byte uint8_t for n follows) + { + return get_cbor_object(get_number<uint8_t>()); + } + + case 0xB9: // map (two-byte uint16_t for n follow) + { + return get_cbor_object(get_number<uint16_t>()); + } + + case 0xBA: // map (four-byte uint32_t for n follow) + { + return get_cbor_object(get_number<uint32_t>()); + } + + case 0xBB: // map (eight-byte uint64_t for n follow) + { + return get_cbor_object(get_number<uint64_t>()); + } + + case 0xBF: // map (indefinite length) + { + BasicJsonType result = value_t::object; + while (get() != 0xFF) + { + auto key = get_cbor_string(); + result[key] = parse_cbor_internal(); + } + return result; + } + + case 0xF4: // false + { + return false; + } + + case 0xF5: // true + { + return true; + } + + case 0xF6: // null + { + return value_t::null; + } + + case 0xF9: // Half-Precision Float (two-byte IEEE 754) + { + const int byte1 = get(); + check_eof(); + const int byte2 = get(); + check_eof(); + + // code from RFC 7049, Appendix D, Figure 3: + // As half-precision floating-point numbers were only added + // to IEEE 754 in 2008, today's programming platforms often + // still only have limited support for them. It is very + // easy to include at least decoding support for them even + // without such support. An example of a small decoder for + // half-precision floating-point numbers in the C language + // is shown in Fig. 3. + const int half = (byte1 << 8) + byte2; + const int exp = (half >> 10) & 0x1F; + const int mant = half & 0x3FF; + double val; + if (exp == 0) + { + val = std::ldexp(mant, -24); + } + else if (exp != 31) + { + val = std::ldexp(mant + 1024, exp - 25); + } + else + { + val = (mant == 0) ? std::numeric_limits<double>::infinity() + : std::numeric_limits<double>::quiet_NaN(); + } + return (half & 0x8000) != 0 ? -val : val; + } + + case 0xFA: // Single-Precision Float (four-byte IEEE 754) + { + return get_number<float>(); + } + + case 0xFB: // Double-Precision Float (eight-byte IEEE 754) + { + return get_number<double>(); + } + + default: // anything else (0xFF is handled inside the other types) + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(112, chars_read, "error reading CBOR; last byte: 0x" + ss.str())); + } + } + } + + BasicJsonType parse_msgpack_internal() + { + switch (get()) + { + // EOF + case std::char_traits<char>::eof(): + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + + // positive fixint + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x08: + case 0x09: + case 0x0A: + case 0x0B: + case 0x0C: + case 0x0D: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x22: + case 0x23: + case 0x24: + case 0x25: + case 0x26: + case 0x27: + case 0x28: + case 0x29: + case 0x2A: + case 0x2B: + case 0x2C: + case 0x2D: + case 0x2E: + case 0x2F: + case 0x30: + case 0x31: + case 0x32: + case 0x33: + case 0x34: + case 0x35: + case 0x36: + case 0x37: + case 0x38: + case 0x39: + case 0x3A: + case 0x3B: + case 0x3C: + case 0x3D: + case 0x3E: + case 0x3F: + case 0x40: + case 0x41: + case 0x42: + case 0x43: + case 0x44: + case 0x45: + case 0x46: + case 0x47: + case 0x48: + case 0x49: + case 0x4A: + case 0x4B: + case 0x4C: + case 0x4D: + case 0x4E: + case 0x4F: + case 0x50: + case 0x51: + case 0x52: + case 0x53: + case 0x54: + case 0x55: + case 0x56: + case 0x57: + case 0x58: + case 0x59: + case 0x5A: + case 0x5B: + case 0x5C: + case 0x5D: + case 0x5E: + case 0x5F: + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + case 0x78: + case 0x79: + case 0x7A: + case 0x7B: + case 0x7C: + case 0x7D: + case 0x7E: + case 0x7F: + return static_cast<number_unsigned_t>(current); + + // fixmap + case 0x80: + case 0x81: + case 0x82: + case 0x83: + case 0x84: + case 0x85: + case 0x86: + case 0x87: + case 0x88: + case 0x89: + case 0x8A: + case 0x8B: + case 0x8C: + case 0x8D: + case 0x8E: + case 0x8F: + { + return get_msgpack_object(current & 0x0F); + } + + // fixarray + case 0x90: + case 0x91: + case 0x92: + case 0x93: + case 0x94: + case 0x95: + case 0x96: + case 0x97: + case 0x98: + case 0x99: + case 0x9A: + case 0x9B: + case 0x9C: + case 0x9D: + case 0x9E: + case 0x9F: + { + return get_msgpack_array(current & 0x0F); + } + + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + return get_msgpack_string(); + + case 0xC0: // nil + return value_t::null; + + case 0xC2: // false + return false; + + case 0xC3: // true + return true; + + case 0xCA: // float 32 + return get_number<float>(); + + case 0xCB: // float 64 + return get_number<double>(); + + case 0xCC: // uint 8 + return get_number<uint8_t>(); + + case 0xCD: // uint 16 + return get_number<uint16_t>(); + + case 0xCE: // uint 32 + return get_number<uint32_t>(); + + case 0xCF: // uint 64 + return get_number<uint64_t>(); + + case 0xD0: // int 8 + return get_number<int8_t>(); + + case 0xD1: // int 16 + return get_number<int16_t>(); + + case 0xD2: // int 32 + return get_number<int32_t>(); + + case 0xD3: // int 64 + return get_number<int64_t>(); + + case 0xD9: // str 8 + case 0xDA: // str 16 + case 0xDB: // str 32 + return get_msgpack_string(); + + case 0xDC: // array 16 + { + return get_msgpack_array(get_number<uint16_t>()); + } + + case 0xDD: // array 32 + { + return get_msgpack_array(get_number<uint32_t>()); + } + + case 0xDE: // map 16 + { + return get_msgpack_object(get_number<uint16_t>()); + } + + case 0xDF: // map 32 + { + return get_msgpack_object(get_number<uint32_t>()); + } + + // positive fixint + case 0xE0: + case 0xE1: + case 0xE2: + case 0xE3: + case 0xE4: + case 0xE5: + case 0xE6: + case 0xE7: + case 0xE8: + case 0xE9: + case 0xEA: + case 0xEB: + case 0xEC: + case 0xED: + case 0xEE: + case 0xEF: + case 0xF0: + case 0xF1: + case 0xF2: + case 0xF3: + case 0xF4: + case 0xF5: + case 0xF6: + case 0xF7: + case 0xF8: + case 0xF9: + case 0xFA: + case 0xFB: + case 0xFC: + case 0xFD: + case 0xFE: + case 0xFF: + return static_cast<int8_t>(current); + + default: // anything else + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(112, chars_read, + "error reading MessagePack; last byte: 0x" + ss.str())); + } + } + } + + /*! + @brief get next character from the input + + This function provides the interface to the used input adapter. It does + not throw in case the input reached EOF, but returns a -'ve valued + `std::char_traits<char>::eof()` in that case. + + @return character read from the input + */ + int get() + { + ++chars_read; + return (current = ia->get_character()); + } + + /* + @brief read a number from the input + + @tparam NumberType the type of the number + + @return number of type @a NumberType + + @note This function needs to respect the system's endianess, because + bytes in CBOR and MessagePack are stored in network order (big + endian) and therefore need reordering on little endian systems. + + @throw parse_error.110 if input has less than `sizeof(NumberType)` bytes + */ + template<typename NumberType> NumberType get_number() + { + // step 1: read input into array with system's byte order + std::array<uint8_t, sizeof(NumberType)> vec; + for (std::size_t i = 0; i < sizeof(NumberType); ++i) + { + get(); + check_eof(); + + // reverse byte order prior to conversion if necessary + if (is_little_endian) + { + vec[sizeof(NumberType) - i - 1] = static_cast<uint8_t>(current); + } + else + { + vec[i] = static_cast<uint8_t>(current); // LCOV_EXCL_LINE + } + } + + // step 2: convert array into number of type T and return + NumberType result; + std::memcpy(&result, vec.data(), sizeof(NumberType)); + return result; + } + + /*! + @brief create a string by reading characters from the input + + @param[in] len number of bytes to read + + @note We can not reserve @a len bytes for the result, because @a len + may be too large. Usually, @ref check_eof() detects the end of + the input before we run out of string memory. + + @return string created by reading @a len bytes + + @throw parse_error.110 if input has less than @a len bytes + */ + template<typename NumberType> + std::string get_string(const NumberType len) + { + std::string result; + std::generate_n(std::back_inserter(result), len, [this]() + { + get(); + check_eof(); + return static_cast<char>(current); + }); + return result; + } + + /*! + @brief reads a CBOR string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + Additionally, CBOR's strings with indefinite lengths are supported. + + @return string + + @throw parse_error.110 if input ended + @throw parse_error.113 if an unexpected byte is read + */ + std::string get_cbor_string() + { + check_eof(); + + switch (current) + { + // UTF-8 string (0x00..0x17 bytes follow) + case 0x60: + case 0x61: + case 0x62: + case 0x63: + case 0x64: + case 0x65: + case 0x66: + case 0x67: + case 0x68: + case 0x69: + case 0x6A: + case 0x6B: + case 0x6C: + case 0x6D: + case 0x6E: + case 0x6F: + case 0x70: + case 0x71: + case 0x72: + case 0x73: + case 0x74: + case 0x75: + case 0x76: + case 0x77: + { + return get_string(current & 0x1F); + } + + case 0x78: // UTF-8 string (one-byte uint8_t for n follows) + { + return get_string(get_number<uint8_t>()); + } + + case 0x79: // UTF-8 string (two-byte uint16_t for n follow) + { + return get_string(get_number<uint16_t>()); + } + + case 0x7A: // UTF-8 string (four-byte uint32_t for n follow) + { + return get_string(get_number<uint32_t>()); + } + + case 0x7B: // UTF-8 string (eight-byte uint64_t for n follow) + { + return get_string(get_number<uint64_t>()); + } + + case 0x7F: // UTF-8 string (indefinite length) + { + std::string result; + while (get() != 0xFF) + { + check_eof(); + result.push_back(static_cast<char>(current)); + } + return result; + } + + default: + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(113, chars_read, "expected a CBOR string; last byte: 0x" + ss.str())); + } + } + } + + template<typename NumberType> + BasicJsonType get_cbor_array(const NumberType len) + { + BasicJsonType result = value_t::array; + std::generate_n(std::back_inserter(*result.m_value.array), len, [this]() + { + return parse_cbor_internal(); + }); + return result; + } + + template<typename NumberType> + BasicJsonType get_cbor_object(const NumberType len) + { + BasicJsonType result = value_t::object; + std::generate_n(std::inserter(*result.m_value.object, + result.m_value.object->end()), + len, [this]() + { + get(); + auto key = get_cbor_string(); + auto val = parse_cbor_internal(); + return std::make_pair(std::move(key), std::move(val)); + }); + return result; + } + + /*! + @brief reads a MessagePack string + + This function first reads starting bytes to determine the expected + string length and then copies this number of bytes into a string. + + @return string + + @throw parse_error.110 if input ended + @throw parse_error.113 if an unexpected byte is read + */ + std::string get_msgpack_string() + { + check_eof(); + + switch (current) + { + // fixstr + case 0xA0: + case 0xA1: + case 0xA2: + case 0xA3: + case 0xA4: + case 0xA5: + case 0xA6: + case 0xA7: + case 0xA8: + case 0xA9: + case 0xAA: + case 0xAB: + case 0xAC: + case 0xAD: + case 0xAE: + case 0xAF: + case 0xB0: + case 0xB1: + case 0xB2: + case 0xB3: + case 0xB4: + case 0xB5: + case 0xB6: + case 0xB7: + case 0xB8: + case 0xB9: + case 0xBA: + case 0xBB: + case 0xBC: + case 0xBD: + case 0xBE: + case 0xBF: + { + return get_string(current & 0x1F); + } + + case 0xD9: // str 8 + { + return get_string(get_number<uint8_t>()); + } + + case 0xDA: // str 16 + { + return get_string(get_number<uint16_t>()); + } + + case 0xDB: // str 32 + { + return get_string(get_number<uint32_t>()); + } + + default: + { + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << current; + JSON_THROW(parse_error::create(113, chars_read, + "expected a MessagePack string; last byte: 0x" + ss.str())); + } + } + } + + template<typename NumberType> + BasicJsonType get_msgpack_array(const NumberType len) + { + BasicJsonType result = value_t::array; + std::generate_n(std::back_inserter(*result.m_value.array), len, [this]() + { + return parse_msgpack_internal(); + }); + return result; + } + + template<typename NumberType> + BasicJsonType get_msgpack_object(const NumberType len) + { + BasicJsonType result = value_t::object; + std::generate_n(std::inserter(*result.m_value.object, + result.m_value.object->end()), + len, [this]() + { + get(); + auto key = get_msgpack_string(); + auto val = parse_msgpack_internal(); + return std::make_pair(std::move(key), std::move(val)); + }); + return result; + } + + /*! + @brief check if input ended + @throw parse_error.110 if input ended + */ + void check_eof(const bool expect_eof = false) const + { + if (expect_eof) + { + if (JSON_UNLIKELY(current != std::char_traits<char>::eof())) + { + JSON_THROW(parse_error::create(110, chars_read, "expected end of input")); + } + } + else + { + if (JSON_UNLIKELY(current == std::char_traits<char>::eof())) + { + JSON_THROW(parse_error::create(110, chars_read, "unexpected end of input")); + } + } + } + + private: + /// input adapter + input_adapter_t ia = nullptr; + + /// the current character + int current = std::char_traits<char>::eof(); + + /// the number of characters read + std::size_t chars_read = 0; + + /// whether we can assume little endianess + const bool is_little_endian = little_endianess(); +}; + +/*! +@brief serialization to CBOR and MessagePack values +*/ +template<typename BasicJsonType, typename CharType> +class binary_writer +{ + public: + /*! + @brief create a binary writer + + @param[in] adapter output adapter to write to + */ + explicit binary_writer(output_adapter_t<CharType> adapter) : oa(adapter) + { + assert(oa); + } + + /*! + @brief[in] j JSON value to serialize + */ + void write_cbor(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: + { + oa->write_character(static_cast<CharType>(0xF6)); + break; + } + + case value_t::boolean: + { + oa->write_character(j.m_value.boolean + ? static_cast<CharType>(0xF5) + : static_cast<CharType>(0xF4)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // CBOR does not differentiate between positive signed + // integers and unsigned integers. Therefore, we used the + // code from the value_t::number_unsigned case here. + if (j.m_value.number_integer <= 0x17) + { + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<uint8_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x18)); + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<uint16_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x19)); + write_number(static_cast<uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer <= (std::numeric_limits<uint32_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x1A)); + write_number(static_cast<uint32_t>(j.m_value.number_integer)); + } + else + { + oa->write_character(static_cast<CharType>(0x1B)); + write_number(static_cast<uint64_t>(j.m_value.number_integer)); + } + } + else + { + // The conversions below encode the sign in the first + // byte, and the value is converted to a positive number. + const auto positive_number = -1 - j.m_value.number_integer; + if (j.m_value.number_integer >= -24) + { + write_number(static_cast<uint8_t>(0x20 + positive_number)); + } + else if (positive_number <= (std::numeric_limits<uint8_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x38)); + write_number(static_cast<uint8_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<uint16_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x39)); + write_number(static_cast<uint16_t>(positive_number)); + } + else if (positive_number <= (std::numeric_limits<uint32_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x3A)); + write_number(static_cast<uint32_t>(positive_number)); + } + else + { + oa->write_character(static_cast<CharType>(0x3B)); + write_number(static_cast<uint64_t>(positive_number)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned <= 0x17) + { + write_number(static_cast<uint8_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x18)); + write_number(static_cast<uint8_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint16_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x19)); + write_number(static_cast<uint16_t>(j.m_value.number_unsigned)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint32_t>::max)()) + { + oa->write_character(static_cast<CharType>(0x1A)); + write_number(static_cast<uint32_t>(j.m_value.number_unsigned)); + } + else + { + oa->write_character(static_cast<CharType>(0x1B)); + write_number(static_cast<uint64_t>(j.m_value.number_unsigned)); + } + break; + } + + case value_t::number_float: // Double-Precision Float + { + oa->write_character(static_cast<CharType>(0xFB)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 0x17) + { + write_number(static_cast<uint8_t>(0x60 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast<CharType>(0x78)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast<CharType>(0x79)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x7A)); + write_number(static_cast<uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x7B)); + write_number(static_cast<uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 0x17) + { + write_number(static_cast<uint8_t>(0x80 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast<CharType>(0x98)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast<CharType>(0x99)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x9A)); + write_number(static_cast<uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0x9B)); + write_number(static_cast<uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_cbor(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 0x17) + { + write_number(static_cast<uint8_t>(0xA0 + N)); + } + else if (N <= 0xFF) + { + oa->write_character(static_cast<CharType>(0xB8)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 0xFFFF) + { + oa->write_character(static_cast<CharType>(0xB9)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0xBA)); + write_number(static_cast<uint32_t>(N)); + } + // LCOV_EXCL_START + else if (N <= 0xFFFFFFFFFFFFFFFF) + { + oa->write_character(static_cast<CharType>(0xBB)); + write_number(static_cast<uint64_t>(N)); + } + // LCOV_EXCL_STOP + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_cbor(el.first); + write_cbor(el.second); + } + break; + } + + default: + break; + } + } + + /*! + @brief[in] j JSON value to serialize + */ + void write_msgpack(const BasicJsonType& j) + { + switch (j.type()) + { + case value_t::null: // nil + { + oa->write_character(static_cast<CharType>(0xC0)); + break; + } + + case value_t::boolean: // true and false + { + oa->write_character(j.m_value.boolean + ? static_cast<CharType>(0xC3) + : static_cast<CharType>(0xC2)); + break; + } + + case value_t::number_integer: + { + if (j.m_value.number_integer >= 0) + { + // MessagePack does not differentiate between positive + // signed integers and unsigned integers. Therefore, we used + // the code from the value_t::number_unsigned case here. + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)()) + { + // uint 8 + oa->write_character(static_cast<CharType>(0xCC)); + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint16_t>::max)()) + { + // uint 16 + oa->write_character(static_cast<CharType>(0xCD)); + write_number(static_cast<uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint32_t>::max)()) + { + // uint 32 + oa->write_character(static_cast<CharType>(0xCE)); + write_number(static_cast<uint32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint64_t>::max)()) + { + // uint 64 + oa->write_character(static_cast<CharType>(0xCF)); + write_number(static_cast<uint64_t>(j.m_value.number_integer)); + } + } + else + { + if (j.m_value.number_integer >= -32) + { + // negative fixnum + write_number(static_cast<int8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int8_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int8_t>::max)()) + { + // int 8 + oa->write_character(static_cast<CharType>(0xD0)); + write_number(static_cast<int8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int16_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int16_t>::max)()) + { + // int 16 + oa->write_character(static_cast<CharType>(0xD1)); + write_number(static_cast<int16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int32_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int32_t>::max)()) + { + // int 32 + oa->write_character(static_cast<CharType>(0xD2)); + write_number(static_cast<int32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_integer >= (std::numeric_limits<int64_t>::min)() and + j.m_value.number_integer <= (std::numeric_limits<int64_t>::max)()) + { + // int 64 + oa->write_character(static_cast<CharType>(0xD3)); + write_number(static_cast<int64_t>(j.m_value.number_integer)); + } + } + break; + } + + case value_t::number_unsigned: + { + if (j.m_value.number_unsigned < 128) + { + // positive fixnum + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint8_t>::max)()) + { + // uint 8 + oa->write_character(static_cast<CharType>(0xCC)); + write_number(static_cast<uint8_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint16_t>::max)()) + { + // uint 16 + oa->write_character(static_cast<CharType>(0xCD)); + write_number(static_cast<uint16_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint32_t>::max)()) + { + // uint 32 + oa->write_character(static_cast<CharType>(0xCE)); + write_number(static_cast<uint32_t>(j.m_value.number_integer)); + } + else if (j.m_value.number_unsigned <= (std::numeric_limits<uint64_t>::max)()) + { + // uint 64 + oa->write_character(static_cast<CharType>(0xCF)); + write_number(static_cast<uint64_t>(j.m_value.number_integer)); + } + break; + } + + case value_t::number_float: // float 64 + { + oa->write_character(static_cast<CharType>(0xCB)); + write_number(j.m_value.number_float); + break; + } + + case value_t::string: + { + // step 1: write control byte and the string length + const auto N = j.m_value.string->size(); + if (N <= 31) + { + // fixstr + write_number(static_cast<uint8_t>(0xA0 | N)); + } + else if (N <= 255) + { + // str 8 + oa->write_character(static_cast<CharType>(0xD9)); + write_number(static_cast<uint8_t>(N)); + } + else if (N <= 65535) + { + // str 16 + oa->write_character(static_cast<CharType>(0xDA)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 4294967295) + { + // str 32 + oa->write_character(static_cast<CharType>(0xDB)); + write_number(static_cast<uint32_t>(N)); + } + + // step 2: write the string + oa->write_characters( + reinterpret_cast<const CharType*>(j.m_value.string->c_str()), + j.m_value.string->size()); + break; + } + + case value_t::array: + { + // step 1: write control byte and the array size + const auto N = j.m_value.array->size(); + if (N <= 15) + { + // fixarray + write_number(static_cast<uint8_t>(0x90 | N)); + } + else if (N <= 0xFFFF) + { + // array 16 + oa->write_character(static_cast<CharType>(0xDC)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 0xFFFFFFFF) + { + // array 32 + oa->write_character(static_cast<CharType>(0xDD)); + write_number(static_cast<uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.array) + { + write_msgpack(el); + } + break; + } + + case value_t::object: + { + // step 1: write control byte and the object size + const auto N = j.m_value.object->size(); + if (N <= 15) + { + // fixmap + write_number(static_cast<uint8_t>(0x80 | (N & 0xF))); + } + else if (N <= 65535) + { + // map 16 + oa->write_character(static_cast<CharType>(0xDE)); + write_number(static_cast<uint16_t>(N)); + } + else if (N <= 4294967295) + { + // map 32 + oa->write_character(static_cast<CharType>(0xDF)); + write_number(static_cast<uint32_t>(N)); + } + + // step 2: write each element + for (const auto& el : *j.m_value.object) + { + write_msgpack(el.first); + write_msgpack(el.second); + } + break; + } + + default: + break; + } + } + + private: + /* + @brief write a number to output input + + @param[in] n number of type @a NumberType + @tparam NumberType the type of the number + + @note This function needs to respect the system's endianess, because bytes + in CBOR and MessagePack are stored in network order (big endian) and + therefore need reordering on little endian systems. + */ + template<typename NumberType> void write_number(NumberType n) + { + // step 1: write number to array of length NumberType + std::array<CharType, sizeof(NumberType)> vec; + std::memcpy(vec.data(), &n, sizeof(NumberType)); + + // step 2: write array to output (with possible reordering) + if (is_little_endian) + { + // reverse byte order prior to conversion if necessary + std::reverse(vec.begin(), vec.end()); + } + + oa->write_characters(vec.data(), sizeof(NumberType)); + } + + private: + /// whether we can assume little endianess + const bool is_little_endian = binary_reader<BasicJsonType>::little_endianess(); + + /// the output + output_adapter_t<CharType> oa = nullptr; +}; + +/////////////////// +// serialization // +/////////////////// + +template<typename BasicJsonType> +class serializer +{ + using string_t = typename BasicJsonType::string_t; + using number_float_t = typename BasicJsonType::number_float_t; + using number_integer_t = typename BasicJsonType::number_integer_t; + using number_unsigned_t = typename BasicJsonType::number_unsigned_t; + public: + /*! + @param[in] s output stream to serialize to + @param[in] ichar indentation character to use + */ + serializer(output_adapter_t<char> s, const char ichar) + : o(std::move(s)), loc(std::localeconv()), + thousands_sep(loc->thousands_sep == nullptr ? '\0' : * (loc->thousands_sep)), + decimal_point(loc->decimal_point == nullptr ? '\0' : * (loc->decimal_point)), + indent_char(ichar), indent_string(512, indent_char) {} + + // delete because of pointer members + serializer(const serializer&) = delete; + serializer& operator=(const serializer&) = delete; + + /*! + @brief internal implementation of the serialization function + + This function is called by the public member function dump and organizes + the serialization internally. The indentation level is propagated as + additional parameter. In case of arrays and objects, the function is + called recursively. + + - strings and object keys are escaped using `escape_string()` + - integer numbers are converted implicitly via `operator<<` + - floating-point numbers are converted to a string using `"%g"` format + + @param[in] val value to serialize + @param[in] pretty_print whether the output shall be pretty-printed + @param[in] indent_step the indent level + @param[in] current_indent the current indent level (only used internally) + */ + void dump(const BasicJsonType& val, const bool pretty_print, + const bool ensure_ascii, + const unsigned int indent_step, + const unsigned int current_indent = 0) + { + switch (val.m_type) + { + case value_t::object: + { + if (val.m_value.object->empty()) + { + o->write_characters("{}", 2); + return; + } + + if (pretty_print) + { + o->write_characters("{\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_characters(indent_string.c_str(), new_indent); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\": ", 3); + dump(i->second, true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character('}'); + } + else + { + o->write_character('{'); + + // first n-1 elements + auto i = val.m_value.object->cbegin(); + for (std::size_t cnt = 0; cnt < val.m_value.object->size() - 1; ++cnt, ++i) + { + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(i != val.m_value.object->cend()); + assert(std::next(i) == val.m_value.object->cend()); + o->write_character('\"'); + dump_escaped(i->first, ensure_ascii); + o->write_characters("\":", 2); + dump(i->second, false, ensure_ascii, indent_step, current_indent); + + o->write_character('}'); + } + + return; + } + + case value_t::array: + { + if (val.m_value.array->empty()) + { + o->write_characters("[]", 2); + return; + } + + if (pretty_print) + { + o->write_characters("[\n", 2); + + // variable to hold indentation for recursive calls + const auto new_indent = current_indent + indent_step; + if (JSON_UNLIKELY(indent_string.size() < new_indent)) + { + indent_string.resize(indent_string.size() * 2, ' '); + } + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + o->write_characters(indent_string.c_str(), new_indent); + dump(*i, true, ensure_ascii, indent_step, new_indent); + o->write_characters(",\n", 2); + } + + // last element + assert(not val.m_value.array->empty()); + o->write_characters(indent_string.c_str(), new_indent); + dump(val.m_value.array->back(), true, ensure_ascii, indent_step, new_indent); + + o->write_character('\n'); + o->write_characters(indent_string.c_str(), current_indent); + o->write_character(']'); + } + else + { + o->write_character('['); + + // first n-1 elements + for (auto i = val.m_value.array->cbegin(); + i != val.m_value.array->cend() - 1; ++i) + { + dump(*i, false, ensure_ascii, indent_step, current_indent); + o->write_character(','); + } + + // last element + assert(not val.m_value.array->empty()); + dump(val.m_value.array->back(), false, ensure_ascii, indent_step, current_indent); + + o->write_character(']'); + } + + return; + } + + case value_t::string: + { + o->write_character('\"'); + dump_escaped(*val.m_value.string, ensure_ascii); + o->write_character('\"'); + return; + } + + case value_t::boolean: + { + if (val.m_value.boolean) + { + o->write_characters("true", 4); + } + else + { + o->write_characters("false", 5); + } + return; + } + + case value_t::number_integer: + { + dump_integer(val.m_value.number_integer); + return; + } + + case value_t::number_unsigned: + { + dump_integer(val.m_value.number_unsigned); + return; + } + + case value_t::number_float: + { + dump_float(val.m_value.number_float); + return; + } + + case value_t::discarded: + { + o->write_characters("<discarded>", 11); + return; + } + + case value_t::null: + { + o->write_characters("null", 4); + return; + } + } + } + + private: + /*! + @brief returns the number of expected bytes following in UTF-8 string + + @param[in] u the first byte of a UTF-8 string + @return the number of expected bytes following + */ + static constexpr std::size_t bytes_following(const uint8_t u) + { + return ((u <= 127) ? 0 + : ((192 <= u and u <= 223) ? 1 + : ((224 <= u and u <= 239) ? 2 + : ((240 <= u and u <= 247) ? 3 : std::string::npos)))); + } + + /*! + @brief calculates the extra space to escape a JSON string + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + @return the number of characters required to escape string @a s + + @complexity Linear in the length of string @a s. + */ + static std::size_t extra_space(const string_t& s, + const bool ensure_ascii) noexcept + { + std::size_t res = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + switch (s[i]) + { + // control characters that can be escaped with a backslash + case '"': + case '\\': + case '\b': + case '\f': + case '\n': + case '\r': + case '\t': + { + // from c (1 byte) to \x (2 bytes) + res += 1; + break; + } + + // control characters that need \uxxxx escaping + case 0x00: + case 0x01: + case 0x02: + case 0x03: + case 0x04: + case 0x05: + case 0x06: + case 0x07: + case 0x0B: + case 0x0E: + case 0x0F: + case 0x10: + case 0x11: + case 0x12: + case 0x13: + case 0x14: + case 0x15: + case 0x16: + case 0x17: + case 0x18: + case 0x19: + case 0x1A: + case 0x1B: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + { + // from c (1 byte) to \uxxxx (6 bytes) + res += 5; + break; + } + + default: + { + if (ensure_ascii and (s[i] & 0x80 or s[i] == 0x7F)) + { + const auto bytes = bytes_following(static_cast<uint8_t>(s[i])); + // invalid characters will be detected by throw_if_invalid_utf8 + assert (bytes != std::string::npos); + + if (bytes == 3) + { + // codepoints that need 4 bytes (i.e., 3 additional + // bytes) in UTF-8 need a surrogate pair when \u + // escaping is used: from 4 bytes to \uxxxx\uxxxx + // (12 bytes) + res += (12 - bytes - 1); + } + else + { + // from x bytes to \uxxxx (6 bytes) + res += (6 - bytes - 1); + } + + // skip the additional bytes + i += bytes; + } + break; + } + } + } + + return res; + } + + static void escape_codepoint(int codepoint, string_t& result, std::size_t& pos) + { + // expecting a proper codepoint + assert(0x00 <= codepoint and codepoint <= 0x10FFFF); + + // the last written character was the backslash before the 'u' + assert(result[pos] == '\\'); + + // write the 'u' + result[++pos] = 'u'; + + // convert a number 0..15 to its hex representation (0..f) + static const std::array<char, 16> hexify = + { + { + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' + } + }; + + if (codepoint < 0x10000) + { + // codepoints U+0000..U+FFFF can be represented as \uxxxx. + result[++pos] = hexify[(codepoint >> 12) & 0x0F]; + result[++pos] = hexify[(codepoint >> 8) & 0x0F]; + result[++pos] = hexify[(codepoint >> 4) & 0x0F]; + result[++pos] = hexify[codepoint & 0x0F]; + } + else + { + // codepoints U+10000..U+10FFFF need a surrogate pair to be + // represented as \uxxxx\uxxxx. + // http://www.unicode.org/faq/utf_bom.html#utf16-4 + codepoint -= 0x10000; + const int high_surrogate = 0xD800 | ((codepoint >> 10) & 0x3FF); + const int low_surrogate = 0xDC00 | (codepoint & 0x3FF); + result[++pos] = hexify[(high_surrogate >> 12) & 0x0F]; + result[++pos] = hexify[(high_surrogate >> 8) & 0x0F]; + result[++pos] = hexify[(high_surrogate >> 4) & 0x0F]; + result[++pos] = hexify[high_surrogate & 0x0F]; + ++pos; // backslash is already in output + result[++pos] = 'u'; + result[++pos] = hexify[(low_surrogate >> 12) & 0x0F]; + result[++pos] = hexify[(low_surrogate >> 8) & 0x0F]; + result[++pos] = hexify[(low_surrogate >> 4) & 0x0F]; + result[++pos] = hexify[low_surrogate & 0x0F]; + } + + ++pos; + } + + /*! + @brief dump escaped string + + Escape a string by replacing certain special characters by a sequence of an + escape character (backslash) and another character and other control + characters by a sequence of "\u" followed by a four-digit hex + representation. The escaped string is written to output stream @a o. + + @param[in] s the string to escape + @param[in] ensure_ascii whether to escape non-ASCII characters with + \uXXXX sequences + + @complexity Linear in the length of string @a s. + */ + void dump_escaped(const string_t& s, const bool ensure_ascii) const + { + throw_if_invalid_utf8(s); + + const auto space = extra_space(s, ensure_ascii); + if (space == 0) + { + o->write_characters(s.c_str(), s.size()); + return; + } + + // create a result string of necessary size + string_t result(s.size() + space, '\\'); + std::size_t pos = 0; + + for (std::size_t i = 0; i < s.size(); ++i) + { + switch (s[i]) + { + case '"': // quotation mark (0x22) + { + result[pos + 1] = '"'; + pos += 2; + break; + } + + case '\\': // reverse solidus (0x5C) + { + // nothing to change + pos += 2; + break; + } + + case '\b': // backspace (0x08) + { + result[pos + 1] = 'b'; + pos += 2; + break; + } + + case '\f': // formfeed (0x0C) + { + result[pos + 1] = 'f'; + pos += 2; + break; + } + + case '\n': // newline (0x0A) + { + result[pos + 1] = 'n'; + pos += 2; + break; + } + + case '\r': // carriage return (0x0D) + { + result[pos + 1] = 'r'; + pos += 2; + break; + } + + case '\t': // horizontal tab (0x09) + { + result[pos + 1] = 't'; + pos += 2; + break; + } + + default: + { + // escape control characters (0x00..0x1F) or, if + // ensure_ascii parameter is used, non-ASCII characters + if ((0x00 <= s[i] and s[i] <= 0x1F) or + (ensure_ascii and (s[i] & 0x80 or s[i] == 0x7F))) + { + const auto bytes = bytes_following(static_cast<uint8_t>(s[i])); + // invalid characters will be detected by throw_if_invalid_utf8 + assert (bytes != std::string::npos); + + // check that the additional bytes are present + assert(i + bytes < s.size()); + + // to use \uxxxx escaping, we first need to calculate + // the codepoint from the UTF-8 bytes + int codepoint = 0; + + // bytes is unsigned type: + assert(bytes <= 3); + switch (bytes) + { + case 0: + { + codepoint = s[i] & 0xFF; + break; + } + + case 1: + { + codepoint = ((s[i] & 0x3F) << 6) + + (s[i + 1] & 0x7F); + break; + } + + case 2: + { + codepoint = ((s[i] & 0x1F) << 12) + + ((s[i + 1] & 0x7F) << 6) + + (s[i + 2] & 0x7F); + break; + } + + case 3: + { + codepoint = ((s[i] & 0xF) << 18) + + ((s[i + 1] & 0x7F) << 12) + + ((s[i + 2] & 0x7F) << 6) + + (s[i + 3] & 0x7F); + break; + } + + default: + break; // LCOV_EXCL_LINE + } + + escape_codepoint(codepoint, result, pos); + i += bytes; + } + else + { + // all other characters are added as-is + result[pos++] = s[i]; + } + break; + } + } + } + + assert(pos == result.size()); + o->write_characters(result.c_str(), result.size()); + } + + /*! + @brief dump an integer + + Dump a given integer to output stream @a o. Works internally with + @a number_buffer. + + @param[in] x integer number (signed or unsigned) to dump + @tparam NumberType either @a number_integer_t or @a number_unsigned_t + */ + template<typename NumberType, detail::enable_if_t< + std::is_same<NumberType, number_unsigned_t>::value or + std::is_same<NumberType, number_integer_t>::value, + int> = 0> + void dump_integer(NumberType x) + { + // special case for "0" + if (x == 0) + { + o->write_character('0'); + return; + } + + const bool is_negative = (x <= 0) and (x != 0); // see issue #755 + std::size_t i = 0; + + while (x != 0) + { + // spare 1 byte for '\0' + assert(i < number_buffer.size() - 1); + + const auto digit = std::labs(static_cast<long>(x % 10)); + number_buffer[i++] = static_cast<char>('0' + digit); + x /= 10; + } + + if (is_negative) + { + // make sure there is capacity for the '-' + assert(i < number_buffer.size() - 2); + number_buffer[i++] = '-'; + } + + std::reverse(number_buffer.begin(), number_buffer.begin() + i); + o->write_characters(number_buffer.data(), i); + } + + /*! + @brief dump a floating-point number + + Dump a given floating-point number to output stream @a o. Works internally + with @a number_buffer. + + @param[in] x floating-point number to dump + */ + void dump_float(number_float_t x) + { + // NaN / inf + if (not std::isfinite(x) or std::isnan(x)) + { + o->write_characters("null", 4); + return; + } + + // get number of digits for a text -> float -> text round-trip + static constexpr auto d = std::numeric_limits<number_float_t>::digits10; + + // the actual conversion + std::ptrdiff_t len = snprintf(number_buffer.data(), number_buffer.size(), "%.*g", d, x); + + // negative value indicates an error + assert(len > 0); + // check if buffer was large enough + assert(static_cast<std::size_t>(len) < number_buffer.size()); + + // erase thousands separator + if (thousands_sep != '\0') + { + const auto end = std::remove(number_buffer.begin(), + number_buffer.begin() + len, thousands_sep); + std::fill(end, number_buffer.end(), '\0'); + assert((end - number_buffer.begin()) <= len); + len = (end - number_buffer.begin()); + } + + // convert decimal point to '.' + if (decimal_point != '\0' and decimal_point != '.') + { + const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point); + if (dec_pos != number_buffer.end()) + { + *dec_pos = '.'; + } + } + + o->write_characters(number_buffer.data(), static_cast<std::size_t>(len)); + + // determine if need to append ".0" + const bool value_is_int_like = + std::none_of(number_buffer.begin(), number_buffer.begin() + len + 1, + [](char c) + { + return (c == '.' or c == 'e'); + }); + + if (value_is_int_like) + { + o->write_characters(".0", 2); + } + } + + /*! + @brief check whether a string is UTF-8 encoded + + The function checks each byte of a string whether it is UTF-8 encoded. The + result of the check is stored in the @a state parameter. The function must + be called initially with state 0 (accept). State 1 means the string must + be rejected, because the current byte is not allowed. If the string is + completely processed, but the state is non-zero, the string ended + prematurely; that is, the last byte indicated more bytes should have + followed. + + @param[in,out] state the state of the decoding + @param[in] byte next byte to decode + + @note The function has been edited: a std::array is used and the code + point is not calculated. + + @copyright Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de> + @sa http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ + */ + static void decode(uint8_t& state, const uint8_t byte) + { + static const std::array<uint8_t, 400> utf8d = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 00..1F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20..3F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 40..5F + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 60..7F + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, // 80..9F + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, // A0..BF + 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // C0..DF + 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x3, // E0..EF + 0xB, 0x6, 0x6, 0x6, 0x5, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, 0x8, // F0..FF + 0x0, 0x1, 0x2, 0x3, 0x5, 0x8, 0x7, 0x1, 0x1, 0x1, 0x4, 0x6, 0x1, 0x1, 0x1, 0x1, // s0..s0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, // s1..s2 + 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, // s3..s4 + 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, // s5..s6 + 1, 3, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // s7..s8 + } + }; + + const uint8_t type = utf8d[byte]; + state = utf8d[256u + state * 16u + type]; + } + + /*! + @brief throw an exception if a string is not UTF-8 encoded + + @param[in] str UTF-8 string to check + @throw type_error.316 if passed string is not UTF-8 encoded + + @since version 3.0.0 + */ + static void throw_if_invalid_utf8(const std::string& str) + { + // start with state 0 (= accept) + uint8_t state = 0; + + for (size_t i = 0; i < str.size(); ++i) + { + const auto byte = static_cast<uint8_t>(str[i]); + decode(state, byte); + if (state == 1) + { + // state 1 means reject + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast<int>(byte); + JSON_THROW(type_error::create(316, "invalid UTF-8 byte at index " + std::to_string(i) + ": 0x" + ss.str())); + } + } + + if (state != 0) + { + // we finish reading, but do not accept: string was incomplete + std::stringstream ss; + ss << std::setw(2) << std::uppercase << std::setfill('0') << std::hex << static_cast<int>(static_cast<uint8_t>(str.back())); + JSON_THROW(type_error::create(316, "incomplete UTF-8 string; last byte: 0x" + ss.str())); + } + } + + private: + /// the output of the serializer + output_adapter_t<char> o = nullptr; + + /// a (hopefully) large enough character buffer + std::array<char, 64> number_buffer{{}}; + + /// the locale + const std::lconv* loc = nullptr; + /// the locale's thousand separator character + const char thousands_sep = '\0'; + /// the locale's decimal point character + const char decimal_point = '\0'; + + /// the indentation character + const char indent_char; + + /// the indentation string + string_t indent_string; +}; + +template<typename BasicJsonType> +class json_ref +{ + public: + using value_type = BasicJsonType; + + json_ref(value_type&& value) + : owned_value(std::move(value)), value_ref(&owned_value), is_rvalue(true) + {} + + json_ref(const value_type& value) + : value_ref(const_cast<value_type*>(&value)), is_rvalue(false) + {} + + json_ref(std::initializer_list<json_ref> init) + : owned_value(init), value_ref(&owned_value), is_rvalue(true) + {} + + template<class... Args> + json_ref(Args&& ... args) + : owned_value(std::forward<Args>(args)...), value_ref(&owned_value), is_rvalue(true) + {} + + // class should be movable only + json_ref(json_ref&&) = default; + json_ref(const json_ref&) = delete; + json_ref& operator=(const json_ref&) = delete; + + value_type moved_or_copied() const + { + if (is_rvalue) + { + return std::move(*value_ref); + } + return *value_ref; + } + + value_type const& operator*() const + { + return *static_cast<value_type const*>(value_ref); + } + + value_type const* operator->() const + { + return static_cast<value_type const*>(value_ref); + } + + private: + mutable value_type owned_value = nullptr; + value_type* value_ref = nullptr; + const bool is_rvalue; +}; + +} // namespace detail + +/// namespace to hold default `to_json` / `from_json` functions +namespace +{ +constexpr const auto& to_json = detail::static_const<detail::to_json_fn>::value; +constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::value; +} + + +/*! +@brief default JSONSerializer template argument + +This serializer ignores the template arguments and uses ADL +([argument-dependent lookup](http://en.cppreference.com/w/cpp/language/adl)) +for serialization. +*/ +template<typename, typename> +struct adl_serializer +{ + /*! + @brief convert a JSON value to any value type + + This function is usually called by the `get()` function of the + @ref basic_json class (either explicit or via conversion operators). + + @param[in] j JSON value to read from + @param[in,out] val value to write to + */ + template<typename BasicJsonType, typename ValueType> + static void from_json(BasicJsonType&& j, ValueType& val) noexcept( + noexcept(::nlohmann::from_json(std::forward<BasicJsonType>(j), val))) + { + ::nlohmann::from_json(std::forward<BasicJsonType>(j), val); + } + + /*! + @brief convert any value type to a JSON value + + This function is usually called by the constructors of the @ref basic_json + class. + + @param[in,out] j JSON value to write to + @param[in] val value to read from + */ + template<typename BasicJsonType, typename ValueType> + static void to_json(BasicJsonType& j, ValueType&& val) noexcept( + noexcept(::nlohmann::to_json(j, std::forward<ValueType>(val)))) + { + ::nlohmann::to_json(j, std::forward<ValueType>(val)); + } +}; + +/*! +@brief JSON Pointer + +A JSON pointer defines a string syntax for identifying a specific value +within a JSON document. It can be used with functions `at` and +`operator[]`. Furthermore, JSON pointers are the base for JSON patches. + +@sa [RFC 6901](https://tools.ietf.org/html/rfc6901) + +@since version 2.0.0 +*/ +class json_pointer +{ + /// allow basic_json to access private members + NLOHMANN_BASIC_JSON_TPL_DECLARATION + friend class basic_json; + + public: + /*! + @brief create JSON pointer + + Create a JSON pointer according to the syntax described in + [Section 3 of RFC6901](https://tools.ietf.org/html/rfc6901#section-3). + + @param[in] s string representing the JSON pointer; if omitted, the empty + string is assumed which references the whole JSON value + + @throw parse_error.107 if the given JSON pointer @a s is nonempty and + does not begin with a slash (`/`); see example below + + @throw parse_error.108 if a tilde (`~`) in the given JSON pointer @a s + is not followed by `0` (representing `~`) or `1` (representing `/`); + see example below + + @liveexample{The example shows the construction several valid JSON + pointers as well as the exceptional behavior.,json_pointer} + + @since version 2.0.0 + */ + explicit json_pointer(const std::string& s = "") : reference_tokens(split(s)) {} + + /*! + @brief return a string representation of the JSON pointer + + @invariant For each JSON pointer `ptr`, it holds: + @code {.cpp} + ptr == json_pointer(ptr.to_string()); + @endcode + + @return a string representation of the JSON pointer + + @liveexample{The example shows the result of `to_string`., + json_pointer__to_string} + + @since version 2.0.0 + */ + std::string to_string() const noexcept + { + return std::accumulate(reference_tokens.begin(), reference_tokens.end(), + std::string{}, + [](const std::string & a, const std::string & b) + { + return a + "/" + escape(b); + }); + } + + /// @copydoc to_string() + operator std::string() const + { + return to_string(); + } + + /*! + @param[in] s reference token to be converted into an array index + + @return integer representation of @a s + + @throw out_of_range.404 if string @a s could not be converted to an integer + */ + static int array_index(const std::string& s) + { + size_t processed_chars = 0; + const int res = std::stoi(s, &processed_chars); + + // check if the string was completely read + if (JSON_UNLIKELY(processed_chars != s.size())) + { + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + s + "'")); + } + + return res; + } + + private: + /*! + @brief remove and return last reference pointer + @throw out_of_range.405 if JSON pointer has no parent + */ + std::string pop_back() + { + if (JSON_UNLIKELY(is_root())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + auto last = reference_tokens.back(); + reference_tokens.pop_back(); + return last; + } + + /// return whether pointer points to the root document + bool is_root() const + { + return reference_tokens.empty(); + } + + json_pointer top() const + { + if (JSON_UNLIKELY(is_root())) + { + JSON_THROW(detail::out_of_range::create(405, "JSON pointer has no parent")); + } + + json_pointer result = *this; + result.reference_tokens = {reference_tokens[0]}; + return result; + } + + /*! + @brief create and return a reference to the pointed to value + + @complexity Linear in the number of reference tokens. + + @throw parse_error.109 if array index is not a number + @throw type_error.313 if value cannot be unflattened + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_and_create(NLOHMANN_BASIC_JSON_TPL& j) const; + + /*! + @brief return a reference to the pointed to value + + @note This version does not throw if a value is not present, but tries to + create nested values instead. For instance, calling this function + with pointer `"/this/that"` on a null value is equivalent to calling + `operator[]("this").operator[]("that")` on that value, effectively + changing the null value to an object. + + @param[in] ptr a JSON value + + @return reference to the JSON value pointed to by the JSON pointer + + @complexity Linear in the length of the JSON pointer. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_unchecked(NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + NLOHMANN_BASIC_JSON_TPL& get_checked(NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @brief return a const reference to the pointed to value + + @param[in] ptr a JSON value + + @return const reference to the JSON value pointed to by the JSON + pointer + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + const NLOHMANN_BASIC_JSON_TPL& get_unchecked(const NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + const NLOHMANN_BASIC_JSON_TPL& get_checked(const NLOHMANN_BASIC_JSON_TPL* ptr) const; + + /*! + @brief split the string input to reference tokens + + @note This function is only called by the json_pointer constructor. + All exceptions below are documented there. + + @throw parse_error.107 if the pointer is not empty or begins with '/' + @throw parse_error.108 if character '~' is not followed by '0' or '1' + */ + static std::vector<std::string> split(const std::string& reference_string) + { + std::vector<std::string> result; + + // special case: empty reference string -> no reference tokens + if (reference_string.empty()) + { + return result; + } + + // check if nonempty reference string begins with slash + if (JSON_UNLIKELY(reference_string[0] != '/')) + { + JSON_THROW(detail::parse_error::create(107, 1, + "JSON pointer must be empty or begin with '/' - was: '" + + reference_string + "'")); + } + + // extract the reference tokens: + // - slash: position of the last read slash (or end of string) + // - start: position after the previous slash + for ( + // search for the first slash after the first character + std::size_t slash = reference_string.find_first_of('/', 1), + // set the beginning of the first reference token + start = 1; + // we can stop if start == string::npos+1 = 0 + start != 0; + // set the beginning of the next reference token + // (will eventually be 0 if slash == std::string::npos) + start = slash + 1, + // find next slash + slash = reference_string.find_first_of('/', start)) + { + // use the text between the beginning of the reference token + // (start) and the last slash (slash). + auto reference_token = reference_string.substr(start, slash - start); + + // check reference tokens are properly escaped + for (std::size_t pos = reference_token.find_first_of('~'); + pos != std::string::npos; + pos = reference_token.find_first_of('~', pos + 1)) + { + assert(reference_token[pos] == '~'); + + // ~ must be followed by 0 or 1 + if (JSON_UNLIKELY(pos == reference_token.size() - 1 or + (reference_token[pos + 1] != '0' and + reference_token[pos + 1] != '1'))) + { + JSON_THROW(detail::parse_error::create(108, 0, "escape character '~' must be followed with '0' or '1'")); + } + } + + // finally, store the reference token + unescape(reference_token); + result.push_back(reference_token); + } + + return result; + } + + /*! + @brief replace all occurrences of a substring by another string + + @param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t + @param[in] f the substring to replace with @a t + @param[in] t the string to replace @a f + + @pre The search string @a f must not be empty. **This precondition is + enforced with an assertion.** + + @since version 2.0.0 + */ + static void replace_substring(std::string& s, const std::string& f, + const std::string& t) + { + assert(not f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != std::string::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} + } + + /// escape "~"" to "~0" and "/" to "~1" + static std::string escape(std::string s) + { + replace_substring(s, "~", "~0"); + replace_substring(s, "/", "~1"); + return s; + } + + /// unescape "~1" to tilde and "~0" to slash (order is important!) + static void unescape(std::string& s) + { + replace_substring(s, "~1", "/"); + replace_substring(s, "~0", "~"); + } + + /*! + @param[in] reference_string the reference string to the current value + @param[in] value the value to consider + @param[in,out] result the result object to insert values to + + @note Empty objects or arrays are flattened to `null`. + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + static void flatten(const std::string& reference_string, + const NLOHMANN_BASIC_JSON_TPL& value, + NLOHMANN_BASIC_JSON_TPL& result); + + /*! + @param[in] value flattened JSON + + @return unflattened JSON + + @throw parse_error.109 if array index is not a number + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + @throw type_error.313 if value cannot be unflattened + */ + NLOHMANN_BASIC_JSON_TPL_DECLARATION + static NLOHMANN_BASIC_JSON_TPL + unflatten(const NLOHMANN_BASIC_JSON_TPL& value); + + friend bool operator==(json_pointer const& lhs, + json_pointer const& rhs) noexcept; + + friend bool operator!=(json_pointer const& lhs, + json_pointer const& rhs) noexcept; + + /// the reference tokens + std::vector<std::string> reference_tokens; +}; + +/*! +@brief a class to store JSON values + +@tparam ObjectType type for JSON objects (`std::map` by default; will be used +in @ref object_t) +@tparam ArrayType type for JSON arrays (`std::vector` by default; will be used +in @ref array_t) +@tparam StringType type for JSON strings and object keys (`std::string` by +default; will be used in @ref string_t) +@tparam BooleanType type for JSON booleans (`bool` by default; will be used +in @ref boolean_t) +@tparam NumberIntegerType type for JSON integer numbers (`int64_t` by +default; will be used in @ref number_integer_t) +@tparam NumberUnsignedType type for JSON unsigned integer numbers (@c +`uint64_t` by default; will be used in @ref number_unsigned_t) +@tparam NumberFloatType type for JSON floating-point numbers (`double` by +default; will be used in @ref number_float_t) +@tparam AllocatorType type of the allocator to use (`std::allocator` by +default) +@tparam JSONSerializer the serializer to resolve internal calls to `to_json()` +and `from_json()` (@ref adl_serializer by default) + +@requirement The class satisfies the following concept requirements: +- Basic + - [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible): + JSON values can be default constructed. The result will be a JSON null + value. + - [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible): + A JSON value can be constructed from an rvalue argument. + - [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible): + A JSON value can be copy-constructed from an lvalue expression. + - [MoveAssignable](http://en.cppreference.com/w/cpp/concept/MoveAssignable): + A JSON value van be assigned from an rvalue argument. + - [CopyAssignable](http://en.cppreference.com/w/cpp/concept/CopyAssignable): + A JSON value can be copy-assigned from an lvalue expression. + - [Destructible](http://en.cppreference.com/w/cpp/concept/Destructible): + JSON values can be destructed. +- Layout + - [StandardLayoutType](http://en.cppreference.com/w/cpp/concept/StandardLayoutType): + JSON values have + [standard layout](http://en.cppreference.com/w/cpp/language/data_members#Standard_layout): + All non-static data members are private and standard layout types, the + class has no virtual functions or (virtual) base classes. +- Library-wide + - [EqualityComparable](http://en.cppreference.com/w/cpp/concept/EqualityComparable): + JSON values can be compared with `==`, see @ref + operator==(const_reference,const_reference). + - [LessThanComparable](http://en.cppreference.com/w/cpp/concept/LessThanComparable): + JSON values can be compared with `<`, see @ref + operator<(const_reference,const_reference). + - [Swappable](http://en.cppreference.com/w/cpp/concept/Swappable): + Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of + other compatible types, using unqualified function call @ref swap(). + - [NullablePointer](http://en.cppreference.com/w/cpp/concept/NullablePointer): + JSON values can be compared against `std::nullptr_t` objects which are used + to model the `null` value. +- Container + - [Container](http://en.cppreference.com/w/cpp/concept/Container): + JSON values can be used like STL containers and provide iterator access. + - [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer); + JSON values can be used like STL containers and provide reverse iterator + access. + +@invariant The member variables @a m_value and @a m_type have the following +relationship: +- If `m_type == value_t::object`, then `m_value.object != nullptr`. +- If `m_type == value_t::array`, then `m_value.array != nullptr`. +- If `m_type == value_t::string`, then `m_value.string != nullptr`. +The invariants are checked by member function assert_invariant(). + +@internal +@note ObjectType trick from http://stackoverflow.com/a/9860911 +@endinternal + +@see [RFC 7159: The JavaScript Object Notation (JSON) Data Interchange +Format](http://rfc7159.net/rfc7159) + +@since version 1.0.0 + +@nosubgrouping +*/ +NLOHMANN_BASIC_JSON_TPL_DECLARATION +class basic_json +{ + private: + template<detail::value_t> friend struct detail::external_constructor; + friend ::nlohmann::json_pointer; + friend ::nlohmann::detail::parser<basic_json>; + friend ::nlohmann::detail::serializer<basic_json>; + template<typename BasicJsonType> + friend class ::nlohmann::detail::iter_impl; + template<typename BasicJsonType, typename CharType> + friend class ::nlohmann::detail::binary_writer; + template<typename BasicJsonType> + friend class ::nlohmann::detail::binary_reader; + + /// workaround type for MSVC + using basic_json_t = NLOHMANN_BASIC_JSON_TPL; + + // convenience aliases for types residing in namespace detail; + using lexer = ::nlohmann::detail::lexer<basic_json>; + using parser = ::nlohmann::detail::parser<basic_json>; + + using primitive_iterator_t = ::nlohmann::detail::primitive_iterator_t; + template<typename BasicJsonType> + using internal_iterator = ::nlohmann::detail::internal_iterator<BasicJsonType>; + template<typename BasicJsonType> + using iter_impl = ::nlohmann::detail::iter_impl<BasicJsonType>; + template<typename Iterator> + using iteration_proxy = ::nlohmann::detail::iteration_proxy<Iterator>; + template<typename Base> using json_reverse_iterator = ::nlohmann::detail::json_reverse_iterator<Base>; + + template<typename CharType> + using output_adapter_t = ::nlohmann::detail::output_adapter_t<CharType>; + + using binary_reader = ::nlohmann::detail::binary_reader<basic_json>; + template<typename CharType> using binary_writer = ::nlohmann::detail::binary_writer<basic_json, CharType>; + + using serializer = ::nlohmann::detail::serializer<basic_json>; + + public: + using value_t = detail::value_t; + /// @copydoc nlohmann::json_pointer + using json_pointer = ::nlohmann::json_pointer; + template<typename T, typename SFINAE> + using json_serializer = JSONSerializer<T, SFINAE>; + /// helper type for initializer lists of basic_json values + using initializer_list_t = std::initializer_list<detail::json_ref<basic_json>>; + + //////////////// + // exceptions // + //////////////// + + /// @name exceptions + /// Classes to implement user-defined exceptions. + /// @{ + + /// @copydoc detail::exception + using exception = detail::exception; + /// @copydoc detail::parse_error + using parse_error = detail::parse_error; + /// @copydoc detail::invalid_iterator + using invalid_iterator = detail::invalid_iterator; + /// @copydoc detail::type_error + using type_error = detail::type_error; + /// @copydoc detail::out_of_range + using out_of_range = detail::out_of_range; + /// @copydoc detail::other_error + using other_error = detail::other_error; + + /// @} + + + ///////////////////// + // container types // + ///////////////////// + + /// @name container types + /// The canonic container types to use @ref basic_json like any other STL + /// container. + /// @{ + + /// the type of elements in a basic_json container + using value_type = basic_json; + + /// the type of an element reference + using reference = value_type&; + /// the type of an element const reference + using const_reference = const value_type&; + + /// a type to represent differences between iterators + using difference_type = std::ptrdiff_t; + /// a type to represent container sizes + using size_type = std::size_t; + + /// the allocator type + using allocator_type = AllocatorType<basic_json>; + + /// the type of an element pointer + using pointer = typename std::allocator_traits<allocator_type>::pointer; + /// the type of an element const pointer + using const_pointer = typename std::allocator_traits<allocator_type>::const_pointer; + + /// an iterator for a basic_json container + using iterator = iter_impl<basic_json>; + /// a const iterator for a basic_json container + using const_iterator = iter_impl<const basic_json>; + /// a reverse iterator for a basic_json container + using reverse_iterator = json_reverse_iterator<typename basic_json::iterator>; + /// a const reverse iterator for a basic_json container + using const_reverse_iterator = json_reverse_iterator<typename basic_json::const_iterator>; + + /// @} + + + /*! + @brief returns the allocator associated with the container + */ + static allocator_type get_allocator() + { + return allocator_type(); + } + + /*! + @brief returns version information on the library + + This function returns a JSON object with information about the library, + including the version number and information on the platform and compiler. + + @return JSON object holding version information + key | description + ----------- | --------------- + `compiler` | Information on the used compiler. It is an object with the following keys: `c++` (the used C++ standard), `family` (the compiler family; possible values are `clang`, `icc`, `gcc`, `ilecpp`, `msvc`, `pgcpp`, `sunpro`, and `unknown`), and `version` (the compiler version). + `copyright` | The copyright line for the library as string. + `name` | The name of the library as string. + `platform` | The used platform as string. Possible values are `win32`, `linux`, `apple`, `unix`, and `unknown`. + `url` | The URL of the project as string. + `version` | The version of the library. It is an object with the following keys: `major`, `minor`, and `patch` as defined by [Semantic Versioning](http://semver.org), and `string` (the version string). + + @liveexample{The following code shows an example output of the `meta()` + function.,meta} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @complexity Constant. + + @since 2.1.0 + */ + static basic_json meta() + { + basic_json result; + + result["copyright"] = "(C) 2013-2017 Niels Lohmann"; + result["name"] = "JSON for Modern C++"; + result["url"] = "https://github.com/nlohmann/json"; + result["version"] = + { + {"string", "3.0.1"}, {"major", 3}, {"minor", 0}, {"patch", 1} + }; + +#ifdef _WIN32 + result["platform"] = "win32"; +#elif defined __linux__ + result["platform"] = "linux"; +#elif defined __APPLE__ + result["platform"] = "apple"; +#elif defined __unix__ + result["platform"] = "unix"; +#else + result["platform"] = "unknown"; +#endif + +#if defined(__ICC) || defined(__INTEL_COMPILER) + result["compiler"] = {{"family", "icc"}, {"version", __INTEL_COMPILER}}; +#elif defined(__clang__) + result["compiler"] = {{"family", "clang"}, {"version", __clang_version__}}; +#elif defined(__GNUC__) || defined(__GNUG__) + result["compiler"] = {{"family", "gcc"}, {"version", std::to_string(__GNUC__) + "." + std::to_string(__GNUC_MINOR__) + "." + std::to_string(__GNUC_PATCHLEVEL__)}}; +#elif defined(__HP_cc) || defined(__HP_aCC) + result["compiler"] = "hp" +#elif defined(__IBMCPP__) + result["compiler"] = {{"family", "ilecpp"}, {"version", __IBMCPP__}}; +#elif defined(_MSC_VER) + result["compiler"] = {{"family", "msvc"}, {"version", _MSC_VER}}; +#elif defined(__PGI) + result["compiler"] = {{"family", "pgcpp"}, {"version", __PGI}}; +#elif defined(__SUNPRO_CC) + result["compiler"] = {{"family", "sunpro"}, {"version", __SUNPRO_CC}}; +#else + result["compiler"] = {{"family", "unknown"}, {"version", "unknown"}}; +#endif + +#ifdef __cplusplus + result["compiler"]["c++"] = std::to_string(__cplusplus); +#else + result["compiler"]["c++"] = "unknown"; +#endif + return result; + } + + + /////////////////////////// + // JSON value data types // + /////////////////////////// + + /// @name JSON value data types + /// The data types to store a JSON value. These types are derived from + /// the template arguments passed to class @ref basic_json. + /// @{ + +#if defined(JSON_HAS_CPP_14) + // Use transparent comparator if possible, combined with perfect forwarding + // on find() and count() calls prevents unnecessary string construction. + using object_comparator_t = std::less<>; +#else + using object_comparator_t = std::less<StringType>; +#endif + + /*! + @brief a type for an object + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON objects as follows: + > An object is an unordered collection of zero or more name/value pairs, + > where a name is a string and a value is a string, number, boolean, null, + > object, or array. + + To store objects in C++, a type is defined by the template parameters + described below. + + @tparam ObjectType the container to store objects (e.g., `std::map` or + `std::unordered_map`) + @tparam StringType the type of the keys or names (e.g., `std::string`). + The comparison function `std::less<StringType>` is used to order elements + inside the container. + @tparam AllocatorType the allocator to use for objects (e.g., + `std::allocator`) + + #### Default type + + With the default values for @a ObjectType (`std::map`), @a StringType + (`std::string`), and @a AllocatorType (`std::allocator`), the default + value for @a object_t is: + + @code {.cpp} + std::map< + std::string, // key_type + basic_json, // value_type + std::less<std::string>, // key_compare + std::allocator<std::pair<const std::string, basic_json>> // allocator_type + > + @endcode + + #### Behavior + + The choice of @a object_t influences the behavior of the JSON class. With + the default type, objects have the following behavior: + + - When all names are unique, objects will be interoperable in the sense + that all software implementations receiving that object will agree on + the name-value mappings. + - When the names within an object are not unique, later stored name/value + pairs overwrite previously stored name/value pairs, leaving the used + names unique. For instance, `{"key": 1}` and `{"key": 2, "key": 1}` will + be treated as equal and both stored as `{"key": 1}`. + - Internally, name/value pairs are stored in lexicographical order of the + names. Objects will also be serialized (see @ref dump) in this order. + For instance, `{"b": 1, "a": 2}` and `{"a": 2, "b": 1}` will be stored + and serialized as `{"a": 2, "b": 1}`. + - When comparing objects, the order of the name/value pairs is irrelevant. + This makes objects interoperable in the sense that they will not be + affected by these differences. For instance, `{"b": 1, "a": 2}` and + `{"a": 2, "b": 1}` will be treated as equal. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the object's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON object. + + #### Storage + + Objects are stored as pointers in a @ref basic_json type. That is, for any + access to object values, a pointer of type `object_t*` must be + dereferenced. + + @sa @ref array_t -- type for an array value + + @since version 1.0.0 + + @note The order name/value pairs are added to the object is *not* + preserved by the library. Therefore, iterating an object may return + name/value pairs in a different order than they were originally stored. In + fact, keys will be traversed in alphabetical order as `std::map` with + `std::less` is used by default. Please note this behavior conforms to [RFC + 7159](http://rfc7159.net/rfc7159), because any order implements the + specified "unordered" nature of JSON objects. + */ + using object_t = ObjectType<StringType, + basic_json, + object_comparator_t, + AllocatorType<std::pair<const StringType, + basic_json>>>; + + /*! + @brief a type for an array + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON arrays as follows: + > An array is an ordered sequence of zero or more values. + + To store objects in C++, a type is defined by the template parameters + explained below. + + @tparam ArrayType container type to store arrays (e.g., `std::vector` or + `std::list`) + @tparam AllocatorType allocator to use for arrays (e.g., `std::allocator`) + + #### Default type + + With the default values for @a ArrayType (`std::vector`) and @a + AllocatorType (`std::allocator`), the default value for @a array_t is: + + @code {.cpp} + std::vector< + basic_json, // value_type + std::allocator<basic_json> // allocator_type + > + @endcode + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the maximum depth of nesting. + + In this class, the array's limit of nesting is not explicitly constrained. + However, a maximum depth of nesting may be introduced by the compiler or + runtime environment. A theoretical limit can be queried by calling the + @ref max_size function of a JSON array. + + #### Storage + + Arrays are stored as pointers in a @ref basic_json type. That is, for any + access to array values, a pointer of type `array_t*` must be dereferenced. + + @sa @ref object_t -- type for an object value + + @since version 1.0.0 + */ + using array_t = ArrayType<basic_json, AllocatorType<basic_json>>; + + /*! + @brief a type for a string + + [RFC 7159](http://rfc7159.net/rfc7159) describes JSON strings as follows: + > A string is a sequence of zero or more Unicode characters. + + To store objects in C++, a type is defined by the template parameter + described below. Unicode values are split by the JSON class into + byte-sized characters during deserialization. + + @tparam StringType the container to store strings (e.g., `std::string`). + Note this container is used for keys/names in objects, see @ref object_t. + + #### Default type + + With the default values for @a StringType (`std::string`), the default + value for @a string_t is: + + @code {.cpp} + std::string + @endcode + + #### Encoding + + Strings are stored in UTF-8 encoding. Therefore, functions like + `std::string::size()` or `std::string::length()` return the number of + bytes in the string rather than the number of characters or glyphs. + + #### String comparison + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > Software implementations are typically required to test names of object + > members for equality. Implementations that transform the textual + > representation into sequences of Unicode code units and then perform the + > comparison numerically, code unit by code unit, are interoperable in the + > sense that implementations will agree in all cases on equality or + > inequality of two strings. For example, implementations that compare + > strings with escaped characters unconverted may incorrectly find that + > `"a\\b"` and `"a\u005Cb"` are not equal. + + This implementation is interoperable as it does compare strings code unit + by code unit. + + #### Storage + + String values are stored as pointers in a @ref basic_json type. That is, + for any access to string values, a pointer of type `string_t*` must be + dereferenced. + + @since version 1.0.0 + */ + using string_t = StringType; + + /*! + @brief a type for a boolean + + [RFC 7159](http://rfc7159.net/rfc7159) implicitly describes a boolean as a + type which differentiates the two literals `true` and `false`. + + To store objects in C++, a type is defined by the template parameter @a + BooleanType which chooses the type to use. + + #### Default type + + With the default values for @a BooleanType (`bool`), the default value for + @a boolean_t is: + + @code {.cpp} + bool + @endcode + + #### Storage + + Boolean values are stored directly inside a @ref basic_json type. + + @since version 1.0.0 + */ + using boolean_t = BooleanType; + + /*! + @brief a type for a number (integer) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store integer numbers in C++, a type is defined by the template + parameter @a NumberIntegerType which chooses the type to use. + + #### Default type + + With the default values for @a NumberIntegerType (`int64_t`), the default + value for @a number_integer_t is: + + @code {.cpp} + int64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `9223372036854775807` (INT64_MAX) and the minimal integer number + that can be stored is `-9223372036854775808` (INT64_MIN). Integer numbers + that are out of range will yield over/underflow when used in a + constructor. During deserialization, too large or small integer numbers + will be automatically be stored as @ref number_unsigned_t or @ref + number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange of the exactly supported range [INT64_MIN, + INT64_MAX], this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_integer_t = NumberIntegerType; + + /*! + @brief a type for a number (unsigned) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store unsigned integer numbers in C++, a type is defined by the + template parameter @a NumberUnsignedType which chooses the type to use. + + #### Default type + + With the default values for @a NumberUnsignedType (`uint64_t`), the + default value for @a number_unsigned_t is: + + @code {.cpp} + uint64_t + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in integer literals lead to an interpretation as octal + number. Internally, the value will be stored as decimal number. For + instance, the C++ integer literal `010` will be serialized to `8`. + During deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) specifies: + > An implementation may set limits on the range and precision of numbers. + + When the default type is used, the maximal integer number that can be + stored is `18446744073709551615` (UINT64_MAX) and the minimal integer + number that can be stored is `0`. Integer numbers that are out of range + will yield over/underflow when used in a constructor. During + deserialization, too large or small integer numbers will be automatically + be stored as @ref number_integer_t or @ref number_float_t. + + [RFC 7159](http://rfc7159.net/rfc7159) further states: + > Note that when such software is used, numbers that are integers and are + > in the range \f$[-2^{53}+1, 2^{53}-1]\f$ are interoperable in the sense + > that implementations will agree exactly on their numeric values. + + As this range is a subrange (when considered in conjunction with the + number_integer_t type) of the exactly supported range [0, UINT64_MAX], + this class's integer type is interoperable. + + #### Storage + + Integer number values are stored directly inside a @ref basic_json type. + + @sa @ref number_float_t -- type for number values (floating-point) + @sa @ref number_integer_t -- type for number values (integer) + + @since version 2.0.0 + */ + using number_unsigned_t = NumberUnsignedType; + + /*! + @brief a type for a number (floating-point) + + [RFC 7159](http://rfc7159.net/rfc7159) describes numbers as follows: + > The representation of numbers is similar to that used in most + > programming languages. A number is represented in base 10 using decimal + > digits. It contains an integer component that may be prefixed with an + > optional minus sign, which may be followed by a fraction part and/or an + > exponent part. Leading zeros are not allowed. (...) Numeric values that + > cannot be represented in the grammar below (such as Infinity and NaN) + > are not permitted. + + This description includes both integer and floating-point numbers. + However, C++ allows more precise storage if it is known whether the number + is a signed integer, an unsigned integer or a floating-point number. + Therefore, three different types, @ref number_integer_t, @ref + number_unsigned_t and @ref number_float_t are used. + + To store floating-point numbers in C++, a type is defined by the template + parameter @a NumberFloatType which chooses the type to use. + + #### Default type + + With the default values for @a NumberFloatType (`double`), the default + value for @a number_float_t is: + + @code {.cpp} + double + @endcode + + #### Default behavior + + - The restrictions about leading zeros is not enforced in C++. Instead, + leading zeros in floating-point literals will be ignored. Internally, + the value will be stored as decimal number. For instance, the C++ + floating-point literal `01.2` will be serialized to `1.2`. During + deserialization, leading zeros yield an error. + - Not-a-number (NaN) values will be serialized to `null`. + + #### Limits + + [RFC 7159](http://rfc7159.net/rfc7159) states: + > This specification allows implementations to set limits on the range and + > precision of numbers accepted. Since software that implements IEEE + > 754-2008 binary64 (double precision) numbers is generally available and + > widely used, good interoperability can be achieved by implementations + > that expect no more precision or range than these provide, in the sense + > that implementations will approximate JSON numbers within the expected + > precision. + + This implementation does exactly follow this approach, as it uses double + precision floating-point numbers. Note values smaller than + `-1.79769313486232e+308` and values greater than `1.79769313486232e+308` + will be stored as NaN internally and be serialized to `null`. + + #### Storage + + Floating-point number values are stored directly inside a @ref basic_json + type. + + @sa @ref number_integer_t -- type for number values (integer) + + @sa @ref number_unsigned_t -- type for number values (unsigned integer) + + @since version 1.0.0 + */ + using number_float_t = NumberFloatType; + + /// @} + + private: + + /// helper for exception-safe object creation + template<typename T, typename... Args> + static T* create(Args&& ... args) + { + AllocatorType<T> alloc; + using AllocatorTraits = std::allocator_traits<AllocatorType<T>>; + + auto deleter = [&](T * object) + { + AllocatorTraits::deallocate(alloc, object, 1); + }; + std::unique_ptr<T, decltype(deleter)> object(AllocatorTraits::allocate(alloc, 1), deleter); + AllocatorTraits::construct(alloc, object.get(), std::forward<Args>(args)...); + assert(object != nullptr); + return object.release(); + } + + //////////////////////// + // JSON value storage // + //////////////////////// + + /*! + @brief a JSON value + + The actual storage for a JSON value of the @ref basic_json class. This + union combines the different storage types for the JSON value types + defined in @ref value_t. + + JSON type | value_t type | used type + --------- | --------------- | ------------------------ + object | object | pointer to @ref object_t + array | array | pointer to @ref array_t + string | string | pointer to @ref string_t + boolean | boolean | @ref boolean_t + number | number_integer | @ref number_integer_t + number | number_unsigned | @ref number_unsigned_t + number | number_float | @ref number_float_t + null | null | *no value is stored* + + @note Variable-length types (objects, arrays, and strings) are stored as + pointers. The size of the union should not exceed 64 bits if the default + value types are used. + + @since version 1.0.0 + */ + union json_value + { + /// object (stored with pointer to save storage) + object_t* object; + /// array (stored with pointer to save storage) + array_t* array; + /// string (stored with pointer to save storage) + string_t* string; + /// boolean + boolean_t boolean; + /// number (integer) + number_integer_t number_integer; + /// number (unsigned integer) + number_unsigned_t number_unsigned; + /// number (floating-point) + number_float_t number_float; + + /// default constructor (for null values) + json_value() = default; + /// constructor for booleans + json_value(boolean_t v) noexcept : boolean(v) {} + /// constructor for numbers (integer) + json_value(number_integer_t v) noexcept : number_integer(v) {} + /// constructor for numbers (unsigned) + json_value(number_unsigned_t v) noexcept : number_unsigned(v) {} + /// constructor for numbers (floating-point) + json_value(number_float_t v) noexcept : number_float(v) {} + /// constructor for empty values of a given type + json_value(value_t t) + { + switch (t) + { + case value_t::object: + { + object = create<object_t>(); + break; + } + + case value_t::array: + { + array = create<array_t>(); + break; + } + + case value_t::string: + { + string = create<string_t>(""); + break; + } + + case value_t::boolean: + { + boolean = boolean_t(false); + break; + } + + case value_t::number_integer: + { + number_integer = number_integer_t(0); + break; + } + + case value_t::number_unsigned: + { + number_unsigned = number_unsigned_t(0); + break; + } + + case value_t::number_float: + { + number_float = number_float_t(0.0); + break; + } + + case value_t::null: + { + object = nullptr; // silence warning, see #821 + break; + } + + default: + { + object = nullptr; // silence warning, see #821 + if (JSON_UNLIKELY(t == value_t::null)) + { + JSON_THROW(other_error::create(500, "961c151d2e87f2686a955a9be24d316f1362bf21 3.0.1")); // LCOV_EXCL_LINE + } + break; + } + } + } + + /// constructor for strings + json_value(const string_t& value) + { + string = create<string_t>(value); + } + + /// constructor for rvalue strings + json_value(string_t&& value) + { + string = create<string_t>(std::move(value)); + } + + /// constructor for objects + json_value(const object_t& value) + { + object = create<object_t>(value); + } + + /// constructor for rvalue objects + json_value(object_t&& value) + { + object = create<object_t>(std::move(value)); + } + + /// constructor for arrays + json_value(const array_t& value) + { + array = create<array_t>(value); + } + + /// constructor for rvalue arrays + json_value(array_t&& value) + { + array = create<array_t>(std::move(value)); + } + + void destroy(value_t t) + { + switch (t) + { + case value_t::object: + { + AllocatorType<object_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, object); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, object, 1); + break; + } + + case value_t::array: + { + AllocatorType<array_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, array); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, array, 1); + break; + } + + case value_t::string: + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, string, 1); + break; + } + + default: + { + break; + } + } + } + }; + + /*! + @brief checks the class invariants + + This function asserts the class invariants. It needs to be called at the + end of every constructor to make sure that created objects respect the + invariant. Furthermore, it has to be called each time the type of a JSON + value is changed, because the invariant expresses a relationship between + @a m_type and @a m_value. + */ + void assert_invariant() const + { + assert(m_type != value_t::object or m_value.object != nullptr); + assert(m_type != value_t::array or m_value.array != nullptr); + assert(m_type != value_t::string or m_value.string != nullptr); + } + + public: + ////////////////////////// + // JSON parser callback // + ////////////////////////// + + /*! + @brief parser event types + + The parser callback distinguishes the following events: + - `object_start`: the parser read `{` and started to process a JSON object + - `key`: the parser read a key of a value in an object + - `object_end`: the parser read `}` and finished processing a JSON object + - `array_start`: the parser read `[` and started to process a JSON array + - `array_end`: the parser read `]` and finished processing a JSON array + - `value`: the parser finished reading a JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + @sa @ref parser_callback_t for more information and examples + */ + using parse_event_t = typename parser::parse_event_t; + + /*! + @brief per-element parser callback type + + With a parser callback function, the result of parsing a JSON text can be + influenced. When passed to @ref parse, it is called on certain events + (passed as @ref parse_event_t via parameter @a event) with a set recursion + depth @a depth and context JSON value @a parsed. The return value of the + callback function is a boolean indicating whether the element that emitted + the callback shall be kept or not. + + We distinguish six scenarios (determined by the event type) in which the + callback function can be called. The following table describes the values + of the parameters @a depth, @a event, and @a parsed. + + parameter @a event | description | parameter @a depth | parameter @a parsed + ------------------ | ----------- | ------------------ | ------------------- + parse_event_t::object_start | the parser read `{` and started to process a JSON object | depth of the parent of the JSON object | a JSON value with type discarded + parse_event_t::key | the parser read a key of a value in an object | depth of the currently parsed JSON object | a JSON string containing the key + parse_event_t::object_end | the parser read `}` and finished processing a JSON object | depth of the parent of the JSON object | the parsed JSON object + parse_event_t::array_start | the parser read `[` and started to process a JSON array | depth of the parent of the JSON array | a JSON value with type discarded + parse_event_t::array_end | the parser read `]` and finished processing a JSON array | depth of the parent of the JSON array | the parsed JSON array + parse_event_t::value | the parser finished reading a JSON value | depth of the value | the parsed JSON value + + @image html callback_events.png "Example when certain parse events are triggered" + + Discarding a value (i.e., returning `false`) has different effects + depending on the context in which function was called: + + - Discarded values in structured types are skipped. That is, the parser + will behave as if the discarded value was never read. + - In case a value outside a structured type is skipped, it is replaced + with `null`. This case happens if the top-level element is skipped. + + @param[in] depth the depth of the recursion during parsing + + @param[in] event an event of type parse_event_t indicating the context in + the callback function has been called + + @param[in,out] parsed the current intermediate parse result; note that + writing to this value has no effect for parse_event_t::key events + + @return Whether the JSON value which called the function during parsing + should be kept (`true`) or not (`false`). In the latter case, it is either + skipped completely or replaced by an empty discarded object. + + @sa @ref parse for examples + + @since version 1.0.0 + */ + using parser_callback_t = typename parser::parser_callback_t; + + + ////////////////// + // constructors // + ////////////////// + + /// @name constructors and destructors + /// Constructors of class @ref basic_json, copy/move constructor, copy + /// assignment, static functions creating objects, and the destructor. + /// @{ + + /*! + @brief create an empty value with a given type + + Create an empty JSON value with a given type. The value will be default + initialized with an empty value which depends on the type: + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @param[in] v the type of the value to create + + @complexity Constant. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows the constructor for different @ref + value_t values,basic_json__value_t} + + @sa @ref clear() -- restores the postcondition of this constructor + + @since version 1.0.0 + */ + basic_json(const value_t v) + : m_type(v), m_value(v) + { + assert_invariant(); + } + + /*! + @brief create a null object + + Create a `null` JSON value. It either takes a null pointer as parameter + (explicitly creating `null`) or no parameter (implicitly creating `null`). + The passed null pointer itself is not read -- it is only used to choose + the right constructor. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @liveexample{The following code shows the constructor with and without a + null pointer parameter.,basic_json__nullptr_t} + + @since version 1.0.0 + */ + basic_json(std::nullptr_t = nullptr) noexcept + : basic_json(value_t::null) + { + assert_invariant(); + } + + /*! + @brief create a JSON value + + This is a "catch all" constructor for all compatible JSON types; that is, + types for which a `to_json()` method exists. The constructor forwards the + parameter @a val to that method (to `json_serializer<U>::to_json` method + with `U = uncvref_t<CompatibleType>`, to be exact). + + Template type @a CompatibleType includes, but is not limited to, the + following types: + - **arrays**: @ref array_t and all kinds of compatible containers such as + `std::vector`, `std::deque`, `std::list`, `std::forward_list`, + `std::array`, `std::valarray`, `std::set`, `std::unordered_set`, + `std::multiset`, and `std::unordered_multiset` with a `value_type` from + which a @ref basic_json value can be constructed. + - **objects**: @ref object_t and all kinds of compatible associative + containers such as `std::map`, `std::unordered_map`, `std::multimap`, + and `std::unordered_multimap` with a `key_type` compatible to + @ref string_t and a `value_type` from which a @ref basic_json value can + be constructed. + - **strings**: @ref string_t, string literals, and all compatible string + containers can be used. + - **numbers**: @ref number_integer_t, @ref number_unsigned_t, + @ref number_float_t, and all convertible number types such as `int`, + `size_t`, `int64_t`, `float` or `double` can be used. + - **boolean**: @ref boolean_t / `bool` can be used. + + See the examples below. + + @tparam CompatibleType a type such that: + - @a CompatibleType is not derived from `std::istream`, + - @a CompatibleType is not @ref basic_json (to avoid hijacking copy/move + constructors), + - @a CompatibleType is not a @ref basic_json nested type (e.g., + @ref json_pointer, @ref iterator, etc ...) + - @ref @ref json_serializer<U> has a + `to_json(basic_json_t&, CompatibleType&&)` method + + @tparam U = `uncvref_t<CompatibleType>` + + @param[in] val the value to be forwarded to the respective constructor + + @complexity Usually linear in the size of the passed @a val, also + depending on the implementation of the called `to_json()` + method. + + @exceptionsafety Depends on the called constructor. For types directly + supported by the library (i.e., all types for which no `to_json()` function + was provided), strong guarantee holds: if an exception is thrown, there are + no changes to any JSON value. + + @liveexample{The following code shows the constructor with several + compatible types.,basic_json__CompatibleType} + + @since version 2.1.0 + */ + template<typename CompatibleType, typename U = detail::uncvref_t<CompatibleType>, + detail::enable_if_t<not std::is_base_of<std::istream, U>::value and + not std::is_same<U, basic_json_t>::value and + not detail::is_basic_json_nested_type< + basic_json_t, U>::value and + detail::has_to_json<basic_json, U>::value, + int> = 0> + basic_json(CompatibleType && val) noexcept(noexcept(JSONSerializer<U>::to_json( + std::declval<basic_json_t&>(), std::forward<CompatibleType>(val)))) + { + JSONSerializer<U>::to_json(*this, std::forward<CompatibleType>(val)); + assert_invariant(); + } + + /*! + @brief create a container (array or object) from an initializer list + + Creates a JSON value of type array or object from the passed initializer + list @a init. In case @a type_deduction is `true` (default), the type of + the JSON value to be created is deducted from the initializer list @a init + according to the following rules: + + 1. If the list is empty, an empty JSON object value `{}` is created. + 2. If the list consists of pairs whose first element is a string, a JSON + object value is created where the first elements of the pairs are + treated as keys and the second elements are as values. + 3. In all other cases, an array is created. + + The rules aim to create the best fit between a C++ initializer list and + JSON values. The rationale is as follows: + + 1. The empty initializer list is written as `{}` which is exactly an empty + JSON object. + 2. C++ has no way of describing mapped types other than to list a list of + pairs. As JSON requires that keys must be of type string, rule 2 is the + weakest constraint one can pose on initializer lists to interpret them + as an object. + 3. In all other cases, the initializer list could not be interpreted as + JSON object type, so interpreting it as JSON array type is safe. + + With the rules described above, the following JSON values cannot be + expressed by an initializer list: + + - the empty array (`[]`): use @ref array(initializer_list_t) + with an empty initializer list in this case + - arrays whose elements satisfy rule 2: use @ref + array(initializer_list_t) with the same initializer list + in this case + + @note When used without parentheses around an empty initializer list, @ref + basic_json() is called instead of this function, yielding the JSON null + value. + + @param[in] init initializer list with JSON values + + @param[in] type_deduction internal parameter; when set to `true`, the type + of the JSON value is deducted from the initializer list @a init; when set + to `false`, the type provided via @a manual_type is forced. This mode is + used by the functions @ref array(initializer_list_t) and + @ref object(initializer_list_t). + + @param[in] manual_type internal parameter; when @a type_deduction is set + to `false`, the created JSON value will use the provided type (only @ref + value_t::array and @ref value_t::object are valid); when @a type_deduction + is set to `true`, this parameter has no effect + + @throw type_error.301 if @a type_deduction is `false`, @a manual_type is + `value_t::object`, but @a init contains an element which is not a pair + whose first element is a string. In this case, the constructor could not + create an object. If @a type_deduction would have be `true`, an array + would have been created. See @ref object(initializer_list_t) + for an example. + + @complexity Linear in the size of the initializer list @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows how JSON values are created from + initializer lists.,basic_json__list_init_t} + + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + basic_json(initializer_list_t init, + bool type_deduction = true, + value_t manual_type = value_t::array) + { + // check if each element is an array with two elements whose first + // element is a string + bool is_an_object = std::all_of(init.begin(), init.end(), + [](const detail::json_ref<basic_json>& element_ref) + { + return (element_ref->is_array() and element_ref->size() == 2 and (*element_ref)[0].is_string()); + }); + + // adjust type if type deduction is not wanted + if (not type_deduction) + { + // if array is wanted, do not create an object though possible + if (manual_type == value_t::array) + { + is_an_object = false; + } + + // if object is wanted but impossible, throw an exception + if (JSON_UNLIKELY(manual_type == value_t::object and not is_an_object)) + { + JSON_THROW(type_error::create(301, "cannot create object from initializer list")); + } + } + + if (is_an_object) + { + // the initializer list is a list of pairs -> create object + m_type = value_t::object; + m_value = value_t::object; + + std::for_each(init.begin(), init.end(), [this](const detail::json_ref<basic_json>& element_ref) + { + auto element = element_ref.moved_or_copied(); + m_value.object->emplace( + std::move(*((*element.m_value.array)[0].m_value.string)), + std::move((*element.m_value.array)[1])); + }); + } + else + { + // the initializer list describes an array -> create array + m_type = value_t::array; + m_value.array = create<array_t>(init.begin(), init.end()); + } + + assert_invariant(); + } + + /*! + @brief explicitly create an array from an initializer list + + Creates a JSON array value from a given initializer list. That is, given a + list of values `a, b, c`, creates the JSON value `[a, b, c]`. If the + initializer list is empty, the empty array `[]` is created. + + @note This function is only needed to express two edge cases that cannot + be realized with the initializer list constructor (@ref + basic_json(initializer_list_t, bool, value_t)). These cases + are: + 1. creating an array whose elements are all pairs whose first element is a + string -- in this case, the initializer list constructor would create an + object, taking the first elements as keys + 2. creating an empty array -- passing the empty initializer list to the + initializer list constructor yields an empty object + + @param[in] init initializer list with JSON values to create an array from + (optional) + + @return JSON array value + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `array` + function.,array} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref object(initializer_list_t) -- create a JSON object + value from an initializer list + + @since version 1.0.0 + */ + static basic_json array(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::array); + } + + /*! + @brief explicitly create an object from an initializer list + + Creates a JSON object value from a given initializer list. The initializer + lists elements must be pairs, and their first elements must be strings. If + the initializer list is empty, the empty object `{}` is created. + + @note This function is only added for symmetry reasons. In contrast to the + related function @ref array(initializer_list_t), there are + no cases which can only be expressed by this function. That is, any + initializer list @a init can also be passed to the initializer list + constructor @ref basic_json(initializer_list_t, bool, value_t). + + @param[in] init initializer list to create an object from (optional) + + @return JSON object value + + @throw type_error.301 if @a init is not a list of pairs whose first + elements are strings. In this case, no object can be created. When such a + value is passed to @ref basic_json(initializer_list_t, bool, value_t), + an array would have been created from the passed initializer list @a init. + See example below. + + @complexity Linear in the size of @a init. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows an example for the `object` + function.,object} + + @sa @ref basic_json(initializer_list_t, bool, value_t) -- + create a JSON value from an initializer list + @sa @ref array(initializer_list_t) -- create a JSON array + value from an initializer list + + @since version 1.0.0 + */ + static basic_json object(initializer_list_t init = {}) + { + return basic_json(init, false, value_t::object); + } + + /*! + @brief construct an array with count copies of given value + + Constructs a JSON array value by creating @a cnt copies of a passed value. + In case @a cnt is `0`, an empty array is created. + + @param[in] cnt the number of JSON copies of @a val to create + @param[in] val the JSON value to copy + + @post `std::distance(begin(),end()) == cnt` holds. + + @complexity Linear in @a cnt. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The following code shows examples for the @ref + basic_json(size_type\, const basic_json&) + constructor.,basic_json__size_type_basic_json} + + @since version 1.0.0 + */ + basic_json(size_type cnt, const basic_json& val) + : m_type(value_t::array) + { + m_value.array = create<array_t>(cnt, val); + assert_invariant(); + } + + /*! + @brief construct a JSON container given an iterator range + + Constructs the JSON value with the contents of the range `[first, last)`. + The semantics depends on the different types a JSON value can have: + - In case of a null type, invalid_iterator.206 is thrown. + - In case of other primitive types (number, boolean, or string), @a first + must be `begin()` and @a last must be `end()`. In this case, the value is + copied. Otherwise, invalid_iterator.204 is thrown. + - In case of structured types (array, object), the constructor behaves as + similar versions for `std::vector` or `std::map`; that is, a JSON array + or object is constructed from the values in the range. + + @tparam InputIT an input iterator type (@ref iterator or @ref + const_iterator) + + @param[in] first begin of the range to copy from (included) + @param[in] last end of the range to copy from (excluded) + + @pre Iterators @a first and @a last must be initialized. **This + precondition is enforced with an assertion (see warning).** If + assertions are switched off, a violation of this precondition yields + undefined behavior. + + @pre Range `[first, last)` is valid. Usually, this precondition cannot be + checked efficiently. Only certain edge cases are detected; see the + description of the exceptions below. A violation of this precondition + yields undefined behavior. + + @warning A precondition is enforced with a runtime assertion that will + result in calling `std::abort` if this precondition is not met. + Assertions can be disabled by defining `NDEBUG` at compile time. + See http://en.cppreference.com/w/cpp/error/assert for more + information. + + @throw invalid_iterator.201 if iterators @a first and @a last are not + compatible (i.e., do not belong to the same JSON value). In this case, + the range `[first, last)` is undefined. + @throw invalid_iterator.204 if iterators @a first and @a last belong to a + primitive type (number, boolean, or string), but @a first does not point + to the first element any more. In this case, the range `[first, last)` is + undefined. See example code below. + @throw invalid_iterator.206 if iterators @a first and @a last belong to a + null value. In this case, the range `[first, last)` is undefined. + + @complexity Linear in distance between @a first and @a last. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @liveexample{The example below shows several ways to create JSON values by + specifying a subrange with iterators.,basic_json__InputIt_InputIt} + + @since version 1.0.0 + */ + template<class InputIT, typename std::enable_if< + std::is_same<InputIT, typename basic_json_t::iterator>::value or + std::is_same<InputIT, typename basic_json_t::const_iterator>::value, int>::type = 0> + basic_json(InputIT first, InputIT last) + { + assert(first.m_object != nullptr); + assert(last.m_object != nullptr); + + // make sure iterator fits the current value + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(201, "iterators are not compatible")); + } + + // copy type from first iterator + m_type = first.m_object->m_type; + + // check if iterator range is complete for primitive values + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + break; + } + + default: + break; + } + + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = first.m_object->m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = first.m_object->m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value.number_float = first.m_object->m_value.number_float; + break; + } + + case value_t::boolean: + { + m_value.boolean = first.m_object->m_value.boolean; + break; + } + + case value_t::string: + { + m_value = *first.m_object->m_value.string; + break; + } + + case value_t::object: + { + m_value.object = create<object_t>(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + m_value.array = create<array_t>(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(invalid_iterator::create(206, "cannot construct with iterators from " + + std::string(first.m_object->type_name()))); + } + + assert_invariant(); + } + + + /////////////////////////////////////// + // other constructors and destructor // + /////////////////////////////////////// + + /// @private + basic_json(const detail::json_ref<basic_json>& ref) + : basic_json(ref.moved_or_copied()) + {} + + /*! + @brief copy constructor + + Creates a copy of a given JSON value. + + @param[in] other the JSON value to copy + + @post `*this == other` + + @complexity Linear in the size of @a other. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes to any JSON value. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + - As postcondition, it holds: `other == basic_json(other)`. + + @liveexample{The following code shows an example for the copy + constructor.,basic_json__basic_json} + + @since version 1.0.0 + */ + basic_json(const basic_json& other) + : m_type(other.m_type) + { + // check of passed value is valid + other.assert_invariant(); + + switch (m_type) + { + case value_t::object: + { + m_value = *other.m_value.object; + break; + } + + case value_t::array: + { + m_value = *other.m_value.array; + break; + } + + case value_t::string: + { + m_value = *other.m_value.string; + break; + } + + case value_t::boolean: + { + m_value = other.m_value.boolean; + break; + } + + case value_t::number_integer: + { + m_value = other.m_value.number_integer; + break; + } + + case value_t::number_unsigned: + { + m_value = other.m_value.number_unsigned; + break; + } + + case value_t::number_float: + { + m_value = other.m_value.number_float; + break; + } + + default: + break; + } + + assert_invariant(); + } + + /*! + @brief move constructor + + Move constructor. Constructs a JSON value with the contents of the given + value @a other using move semantics. It "steals" the resources from @a + other and leaves it as JSON null value. + + @param[in,out] other value to move to this object + + @post `*this` has the same value as @a other before the call. + @post @a other is a JSON null value. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this constructor never throws + exceptions. + + @requirement This function helps `basic_json` satisfying the + [MoveConstructible](http://en.cppreference.com/w/cpp/concept/MoveConstructible) + requirements. + + @liveexample{The code below shows the move constructor explicitly called + via std::move.,basic_json__moveconstructor} + + @since version 1.0.0 + */ + basic_json(basic_json&& other) noexcept + : m_type(std::move(other.m_type)), + m_value(std::move(other.m_value)) + { + // check that passed value is valid + other.assert_invariant(); + + // invalidate payload + other.m_type = value_t::null; + other.m_value = {}; + + assert_invariant(); + } + + /*! + @brief copy assignment + + Copy assignment operator. Copies a JSON value via the "copy and swap" + strategy: It is expressed in terms of the copy constructor, destructor, + and the `swap()` member function. + + @param[in] other value to copy from + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + + @liveexample{The code below shows and example for the copy assignment. It + creates a copy of value `a` which is then swapped with `b`. Finally\, the + copy of `a` (which is the null value after the swap) is + destroyed.,basic_json__copyassignment} + + @since version 1.0.0 + */ + reference& operator=(basic_json other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value and + std::is_nothrow_move_assignable<value_t>::value and + std::is_nothrow_move_constructible<json_value>::value and + std::is_nothrow_move_assignable<json_value>::value + ) + { + // check that passed value is valid + other.assert_invariant(); + + using std::swap; + swap(m_type, other.m_type); + swap(m_value, other.m_value); + + assert_invariant(); + return *this; + } + + /*! + @brief destructor + + Destroys the JSON value and frees all allocated memory. + + @complexity Linear. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is linear. + - All stored elements are destroyed and all memory is freed. + + @since version 1.0.0 + */ + ~basic_json() + { + assert_invariant(); + m_value.destroy(m_type); + } + + /// @} + + public: + /////////////////////// + // object inspection // + /////////////////////// + + /// @name object inspection + /// Functions to inspect the type of a JSON value. + /// @{ + + /*! + @brief serialization + + Serialization function for JSON values. The function tries to mimic + Python's `json.dumps()` function, and currently supports its @a indent + and @a ensure_ascii parameters. + + @param[in] indent If indent is nonnegative, then array elements and object + members will be pretty-printed with that indent level. An indent level of + `0` will only insert newlines. `-1` (the default) selects the most compact + representation. + @param[in] indent_char The character to use for indentation if @a indent is + greater than `0`. The default is ` ` (space). + @param[in] ensure_ascii If @a ensure_ascii is true, all non-ASCII characters + in the output are escaped with `\uXXXX` sequences, and the result consists + of ASCII characters only. + + @return string containing the serialization of the JSON value + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @liveexample{The following example shows the effect of different @a indent\, + @a indent_char\, and @a ensure_ascii parameters to the result of the + serialization.,dump} + + @see https://docs.python.org/2/library/json.html#json.dump + + @since version 1.0.0; indentation character @a indent_char, option + @a ensure_ascii and exceptions added in version 3.0.0 + */ + string_t dump(const int indent = -1, const char indent_char = ' ', + const bool ensure_ascii = false) const + { + string_t result; + serializer s(detail::output_adapter<char>(result), indent_char); + + if (indent >= 0) + { + s.dump(*this, true, ensure_ascii, static_cast<unsigned int>(indent)); + } + else + { + s.dump(*this, false, ensure_ascii, 0); + } + + return result; + } + + /*! + @brief return the type of the JSON value (explicit) + + Return the type of the JSON value as a value from the @ref value_t + enumeration. + + @return the type of the JSON value + Value type | return value + ------------------------- | ------------------------- + null | value_t::null + boolean | value_t::boolean + string | value_t::string + number (integer) | value_t::number_integer + number (unsigned integer) | value_t::number_unsigned + number (floating-point) | value_t::number_float + object | value_t::object + array | value_t::array + discarded | value_t::discarded + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `type()` for all JSON + types.,type} + + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr value_t type() const noexcept + { + return m_type; + } + + /*! + @brief return whether type is primitive + + This function returns true if and only if the JSON type is primitive + (string, number, boolean, or null). + + @return `true` if type is primitive (string, number, boolean, or null), + `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_primitive()` for all JSON + types.,is_primitive} + + @sa @ref is_structured() -- returns whether JSON value is structured + @sa @ref is_null() -- returns whether JSON value is `null` + @sa @ref is_string() -- returns whether JSON value is a string + @sa @ref is_boolean() -- returns whether JSON value is a boolean + @sa @ref is_number() -- returns whether JSON value is a number + + @since version 1.0.0 + */ + constexpr bool is_primitive() const noexcept + { + return is_null() or is_string() or is_boolean() or is_number(); + } + + /*! + @brief return whether type is structured + + This function returns true if and only if the JSON type is structured + (array or object). + + @return `true` if type is structured (array or object), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_structured()` for all JSON + types.,is_structured} + + @sa @ref is_primitive() -- returns whether value is primitive + @sa @ref is_array() -- returns whether value is an array + @sa @ref is_object() -- returns whether value is an object + + @since version 1.0.0 + */ + constexpr bool is_structured() const noexcept + { + return is_array() or is_object(); + } + + /*! + @brief return whether value is null + + This function returns true if and only if the JSON value is null. + + @return `true` if type is null, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_null()` for all JSON + types.,is_null} + + @since version 1.0.0 + */ + constexpr bool is_null() const noexcept + { + return (m_type == value_t::null); + } + + /*! + @brief return whether value is a boolean + + This function returns true if and only if the JSON value is a boolean. + + @return `true` if type is boolean, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_boolean()` for all JSON + types.,is_boolean} + + @since version 1.0.0 + */ + constexpr bool is_boolean() const noexcept + { + return (m_type == value_t::boolean); + } + + /*! + @brief return whether value is a number + + This function returns true if and only if the JSON value is a number. This + includes both integer (signed and unsigned) and floating-point values. + + @return `true` if type is number (regardless whether integer, unsigned + integer or floating-type), `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number()` for all JSON + types.,is_number} + + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number() const noexcept + { + return is_number_integer() or is_number_float(); + } + + /*! + @brief return whether value is an integer number + + This function returns true if and only if the JSON value is a signed or + unsigned integer number. This excludes floating-point values. + + @return `true` if type is an integer or unsigned integer number, `false` + otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_integer()` for all + JSON types.,is_number_integer} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 1.0.0 + */ + constexpr bool is_number_integer() const noexcept + { + return (m_type == value_t::number_integer or m_type == value_t::number_unsigned); + } + + /*! + @brief return whether value is an unsigned integer number + + This function returns true if and only if the JSON value is an unsigned + integer number. This excludes floating-point and signed integer values. + + @return `true` if type is an unsigned integer number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_unsigned()` for all + JSON types.,is_number_unsigned} + + @sa @ref is_number() -- check if value is a number + @sa @ref is_number_integer() -- check if value is an integer or unsigned + integer number + @sa @ref is_number_float() -- check if value is a floating-point number + + @since version 2.0.0 + */ + constexpr bool is_number_unsigned() const noexcept + { + return (m_type == value_t::number_unsigned); + } + + /*! + @brief return whether value is a floating-point number + + This function returns true if and only if the JSON value is a + floating-point number. This excludes signed and unsigned integer values. + + @return `true` if type is a floating-point number, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_number_float()` for all + JSON types.,is_number_float} + + @sa @ref is_number() -- check if value is number + @sa @ref is_number_integer() -- check if value is an integer number + @sa @ref is_number_unsigned() -- check if value is an unsigned integer + number + + @since version 1.0.0 + */ + constexpr bool is_number_float() const noexcept + { + return (m_type == value_t::number_float); + } + + /*! + @brief return whether value is an object + + This function returns true if and only if the JSON value is an object. + + @return `true` if type is object, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_object()` for all JSON + types.,is_object} + + @since version 1.0.0 + */ + constexpr bool is_object() const noexcept + { + return (m_type == value_t::object); + } + + /*! + @brief return whether value is an array + + This function returns true if and only if the JSON value is an array. + + @return `true` if type is array, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_array()` for all JSON + types.,is_array} + + @since version 1.0.0 + */ + constexpr bool is_array() const noexcept + { + return (m_type == value_t::array); + } + + /*! + @brief return whether value is a string + + This function returns true if and only if the JSON value is a string. + + @return `true` if type is string, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_string()` for all JSON + types.,is_string} + + @since version 1.0.0 + */ + constexpr bool is_string() const noexcept + { + return (m_type == value_t::string); + } + + /*! + @brief return whether value is discarded + + This function returns true if and only if the JSON value was discarded + during parsing with a callback function (see @ref parser_callback_t). + + @note This function will always be `false` for JSON values after parsing. + That is, discarded values can only occur during parsing, but will be + removed when inside a structured value or replaced by null in other cases. + + @return `true` if type is discarded, `false` otherwise. + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies `is_discarded()` for all JSON + types.,is_discarded} + + @since version 1.0.0 + */ + constexpr bool is_discarded() const noexcept + { + return (m_type == value_t::discarded); + } + + /*! + @brief return the type of the JSON value (implicit) + + Implicitly return the type of the JSON value as a value from the @ref + value_t enumeration. + + @return the type of the JSON value + + @complexity Constant. + + @exceptionsafety No-throw guarantee: this member function never throws + exceptions. + + @liveexample{The following code exemplifies the @ref value_t operator for + all JSON types.,operator__value_t} + + @sa @ref type() -- return the type of the JSON value (explicit) + @sa @ref type_name() -- return the type as string + + @since version 1.0.0 + */ + constexpr operator value_t() const noexcept + { + return m_type; + } + + /// @} + + private: + ////////////////// + // value access // + ////////////////// + + /// get a boolean (explicit) + boolean_t get_impl(boolean_t* /*unused*/) const + { + if (JSON_LIKELY(is_boolean())) + { + return m_value.boolean; + } + + JSON_THROW(type_error::create(302, "type must be boolean, but is " + std::string(type_name()))); + } + + /// get a pointer to the value (object) + object_t* get_impl_ptr(object_t* /*unused*/) noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (object) + constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const noexcept + { + return is_object() ? m_value.object : nullptr; + } + + /// get a pointer to the value (array) + array_t* get_impl_ptr(array_t* /*unused*/) noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (array) + constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const noexcept + { + return is_array() ? m_value.array : nullptr; + } + + /// get a pointer to the value (string) + string_t* get_impl_ptr(string_t* /*unused*/) noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (string) + constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const noexcept + { + return is_string() ? m_value.string : nullptr; + } + + /// get a pointer to the value (boolean) + boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (boolean) + constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) const noexcept + { + return is_boolean() ? &m_value.boolean : nullptr; + } + + /// get a pointer to the value (integer number) + number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (integer number) + constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /*unused*/) const noexcept + { + return is_number_integer() ? &m_value.number_integer : nullptr; + } + + /// get a pointer to the value (unsigned number) + number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (unsigned number) + constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t* /*unused*/) const noexcept + { + return is_number_unsigned() ? &m_value.number_unsigned : nullptr; + } + + /// get a pointer to the value (floating-point number) + number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /// get a pointer to the value (floating-point number) + constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unused*/) const noexcept + { + return is_number_float() ? &m_value.number_float : nullptr; + } + + /*! + @brief helper function to implement get_ref() + + This function helps to implement get_ref() without code duplication for + const and non-const overloads + + @tparam ThisType will be deduced as `basic_json` or `const basic_json` + + @throw type_error.303 if ReferenceType does not match underlying value + type of the current JSON + */ + template<typename ReferenceType, typename ThisType> + static ReferenceType get_ref_impl(ThisType& obj) + { + // delegate the call to get_ptr<>() + auto ptr = obj.template get_ptr<typename std::add_pointer<ReferenceType>::type>(); + + if (JSON_LIKELY(ptr != nullptr)) + { + return *ptr; + } + + JSON_THROW(type_error::create(303, "incompatible ReferenceType for get_ref, actual type is " + std::string(obj.type_name()))); + } + + public: + /// @name value access + /// Direct access to the stored value of a JSON value. + /// @{ + + /*! + @brief get special-case overload + + This overloads avoids a lot of template boilerplate, it can be seen as the + identity method + + @tparam BasicJsonType == @ref basic_json + + @return a copy of *this + + @complexity Constant. + + @since version 2.1.0 + */ + template<typename BasicJsonType, detail::enable_if_t< + std::is_same<typename std::remove_const<BasicJsonType>::type, basic_json_t>::value, + int> = 0> + basic_json get() const + { + return *this; + } + + /*! + @brief get a value (explicit) + + Explicit type conversion between the JSON value and a compatible value + which is [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) + and [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json, + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `void from_json(const basic_json&, ValueType&)`, and + - @ref json_serializer<ValueType> does not have a `from_json()` method of + the form `ValueType from_json(const basic_json&)` + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,get__ValueType_const} + + @since version 2.1.0 + */ + template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>, + detail::enable_if_t < + not std::is_same<basic_json_t, ValueType>::value and + detail::has_from_json<basic_json_t, ValueType>::value and + not detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer<ValueType>::from_json(std::declval<const basic_json_t&>(), std::declval<ValueType&>()))) + { + // we cannot static_assert on ValueTypeCV being non-const, because + // there is support for get<const basic_json_t>(), which is why we + // still need the uncvref + static_assert(not std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + static_assert(std::is_default_constructible<ValueType>::value, + "types must be DefaultConstructible when used with get()"); + + ValueType ret; + JSONSerializer<ValueType>::from_json(*this, ret); + return ret; + } + + /*! + @brief get a value (explicit); special case + + Explicit type conversion between the JSON value and a compatible value + which is **not** [CopyConstructible](http://en.cppreference.com/w/cpp/concept/CopyConstructible) + and **not** [DefaultConstructible](http://en.cppreference.com/w/cpp/concept/DefaultConstructible). + The value is converted by calling the @ref json_serializer<ValueType> + `from_json()` method. + + The function is equivalent to executing + @code {.cpp} + return JSONSerializer<ValueTypeCV>::from_json(*this); + @endcode + + This overloads is chosen if: + - @a ValueType is not @ref basic_json and + - @ref json_serializer<ValueType> has a `from_json()` method of the form + `ValueType from_json(const basic_json&)` + + @note If @ref json_serializer<ValueType> has both overloads of + `from_json()`, this one is chosen. + + @tparam ValueTypeCV the provided value type + @tparam ValueType the returned value type + + @return copy of the JSON value, converted to @a ValueType + + @throw what @ref json_serializer<ValueType> `from_json()` method throws + + @since version 2.1.0 + */ + template<typename ValueTypeCV, typename ValueType = detail::uncvref_t<ValueTypeCV>, + detail::enable_if_t<not std::is_same<basic_json_t, ValueType>::value and + detail::has_non_default_from_json<basic_json_t, ValueType>::value, + int> = 0> + ValueType get() const noexcept(noexcept( + JSONSerializer<ValueTypeCV>::from_json(std::declval<const basic_json_t&>()))) + { + static_assert(not std::is_reference<ValueTypeCV>::value, + "get() cannot be used with reference types, you might want to use get_ref()"); + return JSONSerializer<ValueTypeCV>::from_json(*this); + } + + /*! + @brief get a pointer value (explicit) + + Explicit pointer access to the internally stored JSON value. No copies are + made. + + @warning The pointer becomes invalid if the underlying JSON object + changes. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get__PointerType} + + @sa @ref get_ptr() for explicit pointer-member access + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + PointerType get() noexcept + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /*! + @brief get a pointer value (explicit) + @copydoc get() + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + constexpr const PointerType get() const noexcept + { + // delegate the call to get_ptr + return get_ptr<PointerType>(); + } + + /*! + @brief get a pointer value (implicit) + + Implicit pointer access to the internally stored JSON value. No copies are + made. + + @warning Writing data to the pointee of the result yields an undefined + state. + + @tparam PointerType pointer type; must be a pointer to @ref array_t, @ref + object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, + @ref number_unsigned_t, or @ref number_float_t. Enforced by a static + assertion. + + @return pointer to the internally stored JSON value if the requested + pointer type @a PointerType fits to the JSON value; `nullptr` otherwise + + @complexity Constant. + + @liveexample{The example below shows how pointers to internal values of a + JSON value can be requested. Note that no type conversions are made and a + `nullptr` is returned if the value and the requested pointer type does not + match.,get_ptr} + + @since version 1.0.0 + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value, int>::type = 0> + PointerType get_ptr() noexcept + { + // get the type of the PointerType (remove pointer and const) + using pointee_t = typename std::remove_const<typename + std::remove_pointer<typename + std::remove_const<PointerType>::type>::type>::type; + // make sure the type matches the allowed types + static_assert( + std::is_same<object_t, pointee_t>::value + or std::is_same<array_t, pointee_t>::value + or std::is_same<string_t, pointee_t>::value + or std::is_same<boolean_t, pointee_t>::value + or std::is_same<number_integer_t, pointee_t>::value + or std::is_same<number_unsigned_t, pointee_t>::value + or std::is_same<number_float_t, pointee_t>::value + , "incompatible pointer type"); + + // delegate the call to get_impl_ptr<>() + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /*! + @brief get a pointer value (implicit) + @copydoc get_ptr() + */ + template<typename PointerType, typename std::enable_if< + std::is_pointer<PointerType>::value and + std::is_const<typename std::remove_pointer<PointerType>::type>::value, int>::type = 0> + constexpr const PointerType get_ptr() const noexcept + { + // get the type of the PointerType (remove pointer and const) + using pointee_t = typename std::remove_const<typename + std::remove_pointer<typename + std::remove_const<PointerType>::type>::type>::type; + // make sure the type matches the allowed types + static_assert( + std::is_same<object_t, pointee_t>::value + or std::is_same<array_t, pointee_t>::value + or std::is_same<string_t, pointee_t>::value + or std::is_same<boolean_t, pointee_t>::value + or std::is_same<number_integer_t, pointee_t>::value + or std::is_same<number_unsigned_t, pointee_t>::value + or std::is_same<number_float_t, pointee_t>::value + , "incompatible pointer type"); + + // delegate the call to get_impl_ptr<>() const + return get_impl_ptr(static_cast<PointerType>(nullptr)); + } + + /*! + @brief get a reference value (implicit) + + Implicit reference access to the internally stored JSON value. No copies + are made. + + @warning Writing data to the referee of the result yields an undefined + state. + + @tparam ReferenceType reference type; must be a reference to @ref array_t, + @ref object_t, @ref string_t, @ref boolean_t, @ref number_integer_t, or + @ref number_float_t. Enforced by static assertion. + + @return reference to the internally stored JSON value if the requested + reference type @a ReferenceType fits to the JSON value; throws + type_error.303 otherwise + + @throw type_error.303 in case passed type @a ReferenceType is incompatible + with the stored JSON value; see example below + + @complexity Constant. + + @liveexample{The example shows several calls to `get_ref()`.,get_ref} + + @since version 1.1.0 + */ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value, int>::type = 0> + ReferenceType get_ref() + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a reference value (implicit) + @copydoc get_ref() + */ + template<typename ReferenceType, typename std::enable_if< + std::is_reference<ReferenceType>::value and + std::is_const<typename std::remove_reference<ReferenceType>::type>::value, int>::type = 0> + ReferenceType get_ref() const + { + // delegate call to get_ref_impl + return get_ref_impl<ReferenceType>(*this); + } + + /*! + @brief get a value (implicit) + + Implicit type conversion between the JSON value and a compatible value. + The call is realized by calling @ref get() const. + + @tparam ValueType non-pointer type compatible to the JSON value, for + instance `int` for JSON integer numbers, `bool` for JSON booleans, or + `std::vector` types for JSON arrays. The character type of @ref string_t + as well as an initializer list of this type is excluded to avoid + ambiguities as these types implicitly convert to `std::string`. + + @return copy of the JSON value, converted to type @a ValueType + + @throw type_error.302 in case passed type @a ValueType is incompatible + to the JSON value type (e.g., the JSON value is of type boolean, but a + string is requested); see example below + + @complexity Linear in the size of the JSON value. + + @liveexample{The example below shows several conversions from JSON values + to other types. There a few things to note: (1) Floating-point numbers can + be converted to integers\, (2) A JSON array can be converted to a standard + `std::vector<short>`\, (3) A JSON object can be converted to C++ + associative containers such as `std::unordered_map<std::string\, + json>`.,operator__ValueType} + + @since version 1.0.0 + */ + template < typename ValueType, typename std::enable_if < + not std::is_pointer<ValueType>::value and + not std::is_same<ValueType, detail::json_ref<basic_json>>::value and + not std::is_same<ValueType, typename string_t::value_type>::value +#ifndef _MSC_VER // fix for issue #167 operator<< ambiguity under VS2015 + and not std::is_same<ValueType, std::initializer_list<typename string_t::value_type>>::value +#endif +#if defined(JSON_HAS_CPP_17) + and not std::is_same<ValueType, typename std::string_view>::value +#endif + , int >::type = 0 > + operator ValueType() const + { + // delegate the call to get<>() const + return get<ValueType>(); + } + + /// @} + + + //////////////////// + // element access // + //////////////////// + + /// @name element access + /// Access to the JSON value. + /// @{ + + /*! + @brief access specified array element with bounds checking + + Returns a reference to the element at specified location @a idx, with + bounds checking. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__size_type} + */ + reference at(size_type idx) + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element with bounds checking + + Returns a const reference to the element at specified location @a idx, + with bounds checking. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.304 if the JSON value is not an array; in this case, + calling `at` with an index makes no sense. See example below. + @throw out_of_range.401 if the index @a idx is out of range of the array; + that is, `idx >= size()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 1.0.0 + + @liveexample{The example below shows how array elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__size_type_const} + */ + const_reference at(size_type idx) const + { + // at only works for arrays + if (JSON_LIKELY(is_array())) + { + JSON_TRY + { + return m_value.array->at(idx); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a reference to the element at with specified key @a key, with + bounds checking. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read and + written using `at()`. It also demonstrates the different exceptions that + can be thrown.,at__object_t_key_type} + */ + reference at(const typename object_t::key_type& key) + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified object element with bounds checking + + Returns a const reference to the element at with specified key @a key, + with bounds checking. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @throw type_error.304 if the JSON value is not an object; in this case, + calling `at` with a key makes no sense. See example below. + @throw out_of_range.403 if the key @a key is is not stored in the object; + that is, `find(key) == end()`. See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Logarithmic in the size of the container. + + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + + @liveexample{The example below shows how object elements can be read using + `at()`. It also demonstrates the different exceptions that can be thrown., + at__object_t_key_type_const} + */ + const_reference at(const typename object_t::key_type& key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + JSON_TRY + { + return m_value.object->at(key); + } + JSON_CATCH (std::out_of_range&) + { + // create better exception explanation + JSON_THROW(out_of_range::create(403, "key '" + key + "' not found")); + } + } + else + { + JSON_THROW(type_error::create(304, "cannot use at() with " + std::string(type_name()))); + } + } + + /*! + @brief access specified array element + + Returns a reference to the element at specified location @a idx. + + @note If @a idx is beyond the range of the array (i.e., `idx >= size()`), + then the array is silently filled up with `null` values to make `idx` a + valid reference to the last stored element. + + @param[in] idx index of the element to access + + @return reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array or null; in that + cases, using the [] operator with an index makes no sense. + + @complexity Constant if @a idx is in the range of the array. Otherwise + linear in `idx - size()`. + + @liveexample{The example below shows how array elements can be read and + written using `[]` operator. Note the addition of `null` + values.,operatorarray__size_type} + + @since version 1.0.0 + */ + reference operator[](size_type idx) + { + // implicitly convert null value to an empty array + if (is_null()) + { + m_type = value_t::array; + m_value.array = create<array_t>(); + assert_invariant(); + } + + // operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + // fill up array with null values if given idx is outside range + if (idx >= m_value.array->size()) + { + m_value.array->insert(m_value.array->end(), + idx - m_value.array->size() + 1, + basic_json()); + } + + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified array element + + Returns a const reference to the element at specified location @a idx. + + @param[in] idx index of the element to access + + @return const reference to the element at index @a idx + + @throw type_error.305 if the JSON value is not an array; in that case, + using the [] operator with an index makes no sense. + + @complexity Constant. + + @liveexample{The example below shows how array elements can be read using + the `[]` operator.,operatorarray__size_type_const} + + @since version 1.0.0 + */ + const_reference operator[](size_type idx) const + { + // const operator[] only works for arrays + if (JSON_LIKELY(is_array())) + { + return m_value.array->operator[](idx); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + reference operator[](const typename object_t::key_type& key) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + // operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.0.0 + */ + const_reference operator[](const typename object_t::key_type& key) const + { + // const operator[] only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element + + Returns a reference to the element at with specified key @a key. + + @note If @a key is not found in the object, then it is silently added to + the object and filled with a `null` value to make `key` a valid reference. + In case the value was `null` before, it is converted to an object. + + @param[in] key key of the element to access + + @return reference to the element at key @a key + + @throw type_error.305 if the JSON value is not an object or null; in that + cases, using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read and + written using the `[]` operator.,operatorarray__key_type} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template<typename T> + reference operator[](T* key) + { + // implicitly convert null to object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // at only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->operator[](key); + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief read-only access specified object element + + Returns a const reference to the element at with specified key @a key. No + bounds checking is performed. + + @warning If the element with key @a key does not exist, the behavior is + undefined. + + @param[in] key key of the element to access + + @return const reference to the element at key @a key + + @pre The element with key @a key must exist. **This precondition is + enforced with an assertion.** + + @throw type_error.305 if the JSON value is not an object; in that case, + using the [] operator with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be read using + the `[]` operator.,operatorarray__key_type_const} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref value() for access by value with a default value + + @since version 1.1.0 + */ + template<typename T> + const_reference operator[](T* key) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + assert(m_value.object->find(key) != m_value.object->end()); + return m_value.object->find(key)->second; + } + + JSON_THROW(type_error::create(305, "cannot use operator[] with " + std::string(type_name()))); + } + + /*! + @brief access specified object element with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(key); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const typename object_t::key_type&), this function + does not throw if the given key @a key was not found. + + @note Unlike @ref operator[](const typename object_t::key_type& key), this + function does not implicitly add an element to the position defined by @a + key. This function is furthermore also applicable to const objects. + + @param[in] key key of the element to access + @param[in] default_value the value to return if @a key is not found + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an object; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value} + + @sa @ref at(const typename object_t::key_type&) for access by reference + with range checking + @sa @ref operator[](const typename object_t::key_type&) for unchecked + access by reference + + @since version 1.0.0 + */ + template<class ValueType, typename std::enable_if< + std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> + ValueType value(const typename object_t::key_type& key, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if key is found, return value and given default value otherwise + const auto it = find(key); + if (it != end()) + { + return *it; + } + + return default_value; + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const typename object_t::key_type&, ValueType) const + */ + string_t value(const typename object_t::key_type& key, const char* default_value) const + { + return value(key, string_t(default_value)); + } + + /*! + @brief access specified object element via JSON Pointer with default value + + Returns either a copy of an object's element at the specified key @a key + or a given default value if no element with key @a key exists. + + The function is basically equivalent to executing + @code {.cpp} + try { + return at(ptr); + } catch(out_of_range) { + return default_value; + } + @endcode + + @note Unlike @ref at(const json_pointer&), this function does not throw + if the given key @a key was not found. + + @param[in] ptr a JSON pointer to the element to access + @param[in] default_value the value to return if @a ptr found no value + + @tparam ValueType type compatible to JSON values, for instance `int` for + JSON integer numbers, `bool` for JSON booleans, or `std::vector` types for + JSON arrays. Note the type of the expected value at @a key and the default + value @a default_value must be compatible. + + @return copy of the element at key @a key or @a default_value if @a key + is not found + + @throw type_error.306 if the JSON value is not an objec; in that case, + using `value()` with a key makes no sense. + + @complexity Logarithmic in the size of the container. + + @liveexample{The example below shows how object elements can be queried + with a default value.,basic_json__value_ptr} + + @sa @ref operator[](const json_pointer&) for unchecked access by reference + + @since version 2.0.2 + */ + template<class ValueType, typename std::enable_if< + std::is_convertible<basic_json_t, ValueType>::value, int>::type = 0> + ValueType value(const json_pointer& ptr, const ValueType& default_value) const + { + // at only works for objects + if (JSON_LIKELY(is_object())) + { + // if pointer resolves a value, return it or use default value + JSON_TRY + { + return ptr.get_checked(this); + } + JSON_CATCH (out_of_range&) + { + return default_value; + } + } + + JSON_THROW(type_error::create(306, "cannot use value() with " + std::string(type_name()))); + } + + /*! + @brief overload for a default value of type const char* + @copydoc basic_json::value(const json_pointer&, ValueType) const + */ + string_t value(const json_pointer& ptr, const char* default_value) const + { + return value(ptr, string_t(default_value)); + } + + /*! + @brief access the first element + + Returns a reference to the first element in the container. For a JSON + container `c`, the expression `c.front()` is equivalent to `*c.begin()`. + + @return In case of a structured type (array or object), a reference to the + first element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on `null` value + + @liveexample{The following code shows an example for `front()`.,front} + + @sa @ref back() -- access the last element + + @since version 1.0.0 + */ + reference front() + { + return *begin(); + } + + /*! + @copydoc basic_json::front() + */ + const_reference front() const + { + return *cbegin(); + } + + /*! + @brief access the last element + + Returns a reference to the last element in the container. For a JSON + container `c`, the expression `c.back()` is equivalent to + @code {.cpp} + auto tmp = c.end(); + --tmp; + return *tmp; + @endcode + + @return In case of a structured type (array or object), a reference to the + last element is returned. In case of number, string, or boolean values, a + reference to the value is returned. + + @complexity Constant. + + @pre The JSON value must not be `null` (would throw `std::out_of_range`) + or an empty array or object (undefined behavior, **guarded by + assertions**). + @post The JSON value remains unchanged. + + @throw invalid_iterator.214 when called on a `null` value. See example + below. + + @liveexample{The following code shows an example for `back()`.,back} + + @sa @ref front() -- access the first element + + @since version 1.0.0 + */ + reference back() + { + auto tmp = end(); + --tmp; + return *tmp; + } + + /*! + @copydoc basic_json::back() + */ + const_reference back() const + { + auto tmp = cend(); + --tmp; + return *tmp; + } + + /*! + @brief remove element given an iterator + + Removes the element specified by iterator @a pos. The iterator @a pos must + be valid and dereferenceable. Thus the `end()` iterator (which is valid, + but is not dereferenceable) cannot be used as a value for @a pos. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] pos iterator to the element to remove + @return Iterator following the last removed element. If the iterator @a + pos refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.202 if called on an iterator which does not belong + to the current JSON value; example: `"iterator does not fit current + value"` + @throw invalid_iterator.205 if called on a primitive type with invalid + iterator (i.e., any iterator which is not `begin()`); example: `"iterator + out of range"` + + @complexity The complexity depends on the type: + - objects: amortized constant + - arrays: linear in distance between @a pos and the end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType} + + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template<class IteratorType, typename std::enable_if< + std::is_same<IteratorType, typename basic_json_t::iterator>::value or + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type + = 0> + IteratorType erase(IteratorType pos) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != pos.m_object)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_UNLIKELY(not pos.m_it.primitive_iterator.is_begin())) + { + JSON_THROW(invalid_iterator::create(205, "iterator out of range")); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(pos.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(pos.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove elements given an iterator range + + Removes the element specified by the range `[first; last)`. The iterator + @a first does not need to be dereferenceable if `first == last`: erasing + an empty range is a no-op. + + If called on a primitive type other than `null`, the resulting JSON value + will be `null`. + + @param[in] first iterator to the beginning of the range to remove + @param[in] last iterator past the end of the range to remove + @return Iterator following the last removed element. If the iterator @a + second refers to the last element, the `end()` iterator is returned. + + @tparam IteratorType an @ref iterator or @ref const_iterator + + @post Invalidates iterators and references at or after the point of the + erase, including the `end()` iterator. + + @throw type_error.307 if called on a `null` value; example: `"cannot use + erase() with null"` + @throw invalid_iterator.203 if called on iterators which does not belong + to the current JSON value; example: `"iterators do not fit current value"` + @throw invalid_iterator.204 if called on a primitive type with invalid + iterators (i.e., if `first != begin()` and `last != end()`); example: + `"iterators out of range"` + + @complexity The complexity depends on the type: + - objects: `log(size()) + std::distance(first, last)` + - arrays: linear in the distance between @a first and @a last, plus linear + in the distance between @a last and end of the container + - strings: linear in the length of the string + - other types: constant + + @liveexample{The example shows the result of `erase()` for different JSON + types.,erase__IteratorType_IteratorType} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + template<class IteratorType, typename std::enable_if< + std::is_same<IteratorType, typename basic_json_t::iterator>::value or + std::is_same<IteratorType, typename basic_json_t::const_iterator>::value, int>::type + = 0> + IteratorType erase(IteratorType first, IteratorType last) + { + // make sure iterator fits the current value + if (JSON_UNLIKELY(this != first.m_object or this != last.m_object)) + { + JSON_THROW(invalid_iterator::create(203, "iterators do not fit current value")); + } + + IteratorType result = end(); + + switch (m_type) + { + case value_t::boolean: + case value_t::number_float: + case value_t::number_integer: + case value_t::number_unsigned: + case value_t::string: + { + if (JSON_LIKELY(not first.m_it.primitive_iterator.is_begin() + or not last.m_it.primitive_iterator.is_end())) + { + JSON_THROW(invalid_iterator::create(204, "iterators out of range")); + } + + if (is_string()) + { + AllocatorType<string_t> alloc; + std::allocator_traits<decltype(alloc)>::destroy(alloc, m_value.string); + std::allocator_traits<decltype(alloc)>::deallocate(alloc, m_value.string, 1); + m_value.string = nullptr; + } + + m_type = value_t::null; + assert_invariant(); + break; + } + + case value_t::object: + { + result.m_it.object_iterator = m_value.object->erase(first.m_it.object_iterator, + last.m_it.object_iterator); + break; + } + + case value_t::array: + { + result.m_it.array_iterator = m_value.array->erase(first.m_it.array_iterator, + last.m_it.array_iterator); + break; + } + + default: + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + return result; + } + + /*! + @brief remove element from a JSON object given a key + + Removes elements from a JSON object with the key value @a key. + + @param[in] key value of the elements to remove + + @return Number of elements removed. If @a ObjectType is the default + `std::map` type, the return value will always be `0` (@a key was not + found) or `1` (@a key was found). + + @post References and iterators to the erased elements are invalidated. + Other references and iterators are not affected. + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + + @complexity `log(size()) + count(key)` + + @liveexample{The example shows the effect of `erase()`.,erase__key_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const size_type) -- removes the element from an array at + the given index + + @since version 1.0.0 + */ + size_type erase(const typename object_t::key_type& key) + { + // this erase only works for objects + if (JSON_LIKELY(is_object())) + { + return m_value.object->erase(key); + } + + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + + /*! + @brief remove element from a JSON array given an index + + Removes element from a JSON array at the index @a idx. + + @param[in] idx index of the element to remove + + @throw type_error.307 when called on a type other than JSON object; + example: `"cannot use erase() with null"` + @throw out_of_range.401 when `idx >= size()`; example: `"array index 17 + is out of range"` + + @complexity Linear in distance between @a idx and the end of the container. + + @liveexample{The example shows the effect of `erase()`.,erase__size_type} + + @sa @ref erase(IteratorType) -- removes the element at a given position + @sa @ref erase(IteratorType, IteratorType) -- removes the elements in + the given range + @sa @ref erase(const typename object_t::key_type&) -- removes the element + from an object at the given key + + @since version 1.0.0 + */ + void erase(const size_type idx) + { + // this erase only works for arrays + if (JSON_LIKELY(is_array())) + { + if (JSON_UNLIKELY(idx >= size())) + { + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + + m_value.array->erase(m_value.array->begin() + static_cast<difference_type>(idx)); + } + else + { + JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()))); + } + } + + /// @} + + + //////////// + // lookup // + //////////// + + /// @name lookup + /// @{ + + /*! + @brief find an element in a JSON object + + Finds an element in a JSON object with key equivalent to @a key. If the + element is not found or the JSON value is not an object, end() is + returned. + + @note This method always returns @ref end() when executed on a JSON type + that is not an object. + + @param[in] key key value of the element to search for. + + @return Iterator to an element with key equivalent to @a key. If no such + element is found or the JSON value is not an object, past-the-end (see + @ref end()) iterator is returned. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `find()` is used.,find__key_type} + + @since version 1.0.0 + */ + template<typename KeyT> + iterator find(KeyT&& key) + { + auto result = end(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key)); + } + + return result; + } + + /*! + @brief find an element in a JSON object + @copydoc find(KeyT&&) + */ + template<typename KeyT> + const_iterator find(KeyT&& key) const + { + auto result = cend(); + + if (is_object()) + { + result.m_it.object_iterator = m_value.object->find(std::forward<KeyT>(key)); + } + + return result; + } + + /*! + @brief returns the number of occurrences of a key in a JSON object + + Returns the number of elements with key @a key. If ObjectType is the + default `std::map` type, the return value will always be `0` (@a key was + not found) or `1` (@a key was found). + + @note This method always returns `0` when executed on a JSON type that is + not an object. + + @param[in] key key value of the element to count + + @return Number of elements with key @a key. If the JSON value is not an + object, the return value will be `0`. + + @complexity Logarithmic in the size of the JSON object. + + @liveexample{The example shows how `count()` is used.,count} + + @since version 1.0.0 + */ + template<typename KeyT> + size_type count(KeyT&& key) const + { + // return 0 for all nonobject types + return is_object() ? m_value.object->count(std::forward<KeyT>(key)) : 0; + } + + /// @} + + + /////////////// + // iterators // + /////////////// + + /// @name iterators + /// @{ + + /*! + @brief returns an iterator to the first element + + Returns an iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `begin()`.,begin} + + @sa @ref cbegin() -- returns a const iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + iterator begin() noexcept + { + iterator result(this); + result.set_begin(); + return result; + } + + /*! + @copydoc basic_json::cbegin() + */ + const_iterator begin() const noexcept + { + return cbegin(); + } + + /*! + @brief returns a const iterator to the first element + + Returns a const iterator to the first element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator to the first element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).begin()`. + + @liveexample{The following code shows an example for `cbegin()`.,cbegin} + + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref end() -- returns an iterator to the end + @sa @ref cend() -- returns a const iterator to the end + + @since version 1.0.0 + */ + const_iterator cbegin() const noexcept + { + const_iterator result(this); + result.set_begin(); + return result; + } + + /*! + @brief returns an iterator to one past the last element + + Returns an iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + + @liveexample{The following code shows an example for `end()`.,end} + + @sa @ref cend() -- returns a const iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + iterator end() noexcept + { + iterator result(this); + result.set_end(); + return result; + } + + /*! + @copydoc basic_json::cend() + */ + const_iterator end() const noexcept + { + return cend(); + } + + /*! + @brief returns a const iterator to one past the last element + + Returns a const iterator to one past the last element. + + @image html range-begin-end.svg "Illustration from cppreference.com" + + @return const iterator one past the last element + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).end()`. + + @liveexample{The following code shows an example for `cend()`.,cend} + + @sa @ref end() -- returns an iterator to the end + @sa @ref begin() -- returns an iterator to the beginning + @sa @ref cbegin() -- returns a const iterator to the beginning + + @since version 1.0.0 + */ + const_iterator cend() const noexcept + { + const_iterator result(this); + result.set_end(); + return result; + } + + /*! + @brief returns an iterator to the reverse-beginning + + Returns an iterator to the reverse-beginning; that is, the last element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(end())`. + + @liveexample{The following code shows an example for `rbegin()`.,rbegin} + + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + /*! + @copydoc basic_json::crbegin() + */ + const_reverse_iterator rbegin() const noexcept + { + return crbegin(); + } + + /*! + @brief returns an iterator to the reverse-end + + Returns an iterator to the reverse-end; that is, one before the first + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `reverse_iterator(begin())`. + + @liveexample{The following code shows an example for `rend()`.,rend} + + @sa @ref crend() -- returns a const reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + /*! + @copydoc basic_json::crend() + */ + const_reverse_iterator rend() const noexcept + { + return crend(); + } + + /*! + @brief returns a const reverse iterator to the last element + + Returns a const iterator to the reverse-beginning; that is, the last + element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).rbegin()`. + + @liveexample{The following code shows an example for `crbegin()`.,crbegin} + + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref crend() -- returns a const reverse iterator to the end + + @since version 1.0.0 + */ + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(cend()); + } + + /*! + @brief returns a const reverse iterator to one before the first + + Returns a const reverse iterator to the reverse-end; that is, one before + the first element. + + @image html range-rbegin-rend.svg "Illustration from cppreference.com" + + @complexity Constant. + + @requirement This function helps `basic_json` satisfying the + [ReversibleContainer](http://en.cppreference.com/w/cpp/concept/ReversibleContainer) + requirements: + - The complexity is constant. + - Has the semantics of `const_cast<const basic_json&>(*this).rend()`. + + @liveexample{The following code shows an example for `crend()`.,crend} + + @sa @ref rend() -- returns a reverse iterator to the end + @sa @ref rbegin() -- returns a reverse iterator to the beginning + @sa @ref crbegin() -- returns a const reverse iterator to the beginning + + @since version 1.0.0 + */ + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(cbegin()); + } + + public: + /*! + @brief wrapper to access iterator member functions in range-based for + + This function allows to access @ref iterator::key() and @ref + iterator::value() during range-based for loops. In these loops, a + reference to the JSON values is returned, so there is no access to the + underlying iterator. + + For loop without iterator_wrapper: + + @code{cpp} + for (auto it = j_object.begin(); it != j_object.end(); ++it) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + Range-based for loop without iterator proxy: + + @code{cpp} + for (auto it : j_object) + { + // "it" is of type json::reference and has no key() member + std::cout << "value: " << it << '\n'; + } + @endcode + + Range-based for loop with iterator proxy: + + @code{cpp} + for (auto it : json::iterator_wrapper(j_object)) + { + std::cout << "key: " << it.key() << ", value:" << it.value() << '\n'; + } + @endcode + + @note When iterating over an array, `key()` will return the index of the + element as string (see example). + + @param[in] ref reference to a JSON value + @return iteration proxy object wrapping @a ref with an interface to use in + range-based for loops + + @liveexample{The following code shows how the wrapper is used,iterator_wrapper} + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @note The name of this function is not yet final and may change in the + future. + */ + static iteration_proxy<iterator> iterator_wrapper(reference ref) + { + return iteration_proxy<iterator>(ref); + } + + /*! + @copydoc iterator_wrapper(reference) + */ + static iteration_proxy<const_iterator> iterator_wrapper(const_reference ref) + { + return iteration_proxy<const_iterator>(ref); + } + + /// @} + + + ////////////// + // capacity // + ////////////// + + /// @name capacity + /// @{ + + /*! + @brief checks whether the container is empty. + + Checks if a JSON value has no elements (i.e. whether its @ref size is `0`). + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `true` + boolean | `false` + string | `false` + number | `false` + object | result of function `object_t::empty()` + array | result of function `array_t::empty()` + + @liveexample{The following code uses `empty()` to check if a JSON + object contains any elements.,empty} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `empty()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return whether a string stored as JSON value + is empty - it returns whether the JSON container itself is empty which is + false in the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `begin() == end()`. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + bool empty() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return true; + } + + case value_t::array: + { + // delegate call to array_t::empty() + return m_value.array->empty(); + } + + case value_t::object: + { + // delegate call to object_t::empty() + return m_value.object->empty(); + } + + default: + { + // all other types are nonempty + return false; + } + } + } + + /*! + @brief returns the number of elements + + Returns the number of elements in a JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` + boolean | `1` + string | `1` + number | `1` + object | result of function object_t::size() + array | result of function array_t::size() + + @liveexample{The following code calls `size()` on the different value + types.,size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their size() functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @note This function does not return the length of a string stored as JSON + value - it returns the number of elements in the JSON value which is 1 in + the case of a string. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of `std::distance(begin(), end())`. + + @sa @ref empty() -- checks whether the container is empty + @sa @ref max_size() -- returns the maximal number of elements + + @since version 1.0.0 + */ + size_type size() const noexcept + { + switch (m_type) + { + case value_t::null: + { + // null values are empty + return 0; + } + + case value_t::array: + { + // delegate call to array_t::size() + return m_value.array->size(); + } + + case value_t::object: + { + // delegate call to object_t::size() + return m_value.object->size(); + } + + default: + { + // all other types have size 1 + return 1; + } + } + } + + /*! + @brief returns the maximum possible number of elements + + Returns the maximum number of elements a JSON value is able to hold due to + system or library implementation limitations, i.e. `std::distance(begin(), + end())` for the JSON value. + + @return The return value depends on the different types and is + defined as follows: + Value type | return value + ----------- | ------------- + null | `0` (same as `size()`) + boolean | `1` (same as `size()`) + string | `1` (same as `size()`) + number | `1` (same as `size()`) + object | result of function `object_t::max_size()` + array | result of function `array_t::max_size()` + + @liveexample{The following code calls `max_size()` on the different value + types. Note the output is implementation specific.,max_size} + + @complexity Constant, as long as @ref array_t and @ref object_t satisfy + the Container concept; that is, their `max_size()` functions have constant + complexity. + + @iterators No changes. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @requirement This function helps `basic_json` satisfying the + [Container](http://en.cppreference.com/w/cpp/concept/Container) + requirements: + - The complexity is constant. + - Has the semantics of returning `b.size()` where `b` is the largest + possible JSON value. + + @sa @ref size() -- returns the number of elements + + @since version 1.0.0 + */ + size_type max_size() const noexcept + { + switch (m_type) + { + case value_t::array: + { + // delegate call to array_t::max_size() + return m_value.array->max_size(); + } + + case value_t::object: + { + // delegate call to object_t::max_size() + return m_value.object->max_size(); + } + + default: + { + // all other types have max_size() == size() + return size(); + } + } + } + + /// @} + + + /////////////// + // modifiers // + /////////////// + + /// @name modifiers + /// @{ + + /*! + @brief clears the contents + + Clears the content of a JSON value and resets it to the default value as + if @ref basic_json(value_t) would have been called with the current value + type from @ref type(): + + Value type | initial value + ----------- | ------------- + null | `null` + boolean | `false` + string | `""` + number | `0` + object | `{}` + array | `[]` + + @post Has the same effect as calling + @code {.cpp} + *this = basic_json(type()); + @endcode + + @liveexample{The example below shows the effect of `clear()` to different + JSON types.,clear} + + @complexity Linear in the size of the JSON value. + + @iterators All iterators, pointers and references related to this container + are invalidated. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @sa @ref basic_json(value_t) -- constructor that creates an object with the + same value than calling `clear()` + + @since version 1.0.0 + */ + void clear() noexcept + { + switch (m_type) + { + case value_t::number_integer: + { + m_value.number_integer = 0; + break; + } + + case value_t::number_unsigned: + { + m_value.number_unsigned = 0; + break; + } + + case value_t::number_float: + { + m_value.number_float = 0.0; + break; + } + + case value_t::boolean: + { + m_value.boolean = false; + break; + } + + case value_t::string: + { + m_value.string->clear(); + break; + } + + case value_t::array: + { + m_value.array->clear(); + break; + } + + case value_t::object: + { + m_value.object->clear(); + break; + } + + default: + break; + } + } + + /*! + @brief add an object to an array + + Appends the given element @a val to the end of the JSON value. If the + function is called on a JSON null value, an empty array is created before + appending @a val. + + @param[in] val the value to add to the JSON array + + @throw type_error.308 when called on a type other than JSON array or + null; example: `"cannot use push_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON array. Note how the `null` value was silently + converted to a JSON array.,push_back} + + @since version 1.0.0 + */ + void push_back(basic_json&& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (move semantics) + m_value.array->push_back(std::move(val)); + // invalidate object + val.m_type = value_t::null; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(basic_json&& val) + { + push_back(std::move(val)); + return *this; + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + void push_back(const basic_json& val) + { + // push_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array + m_value.array->push_back(val); + } + + /*! + @brief add an object to an array + @copydoc push_back(basic_json&&) + */ + reference operator+=(const basic_json& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + Inserts the given element @a val to the JSON object. If the function is + called on a JSON null value, an empty object is created before inserting + @a val. + + @param[in] val the value to add to the JSON object + + @throw type_error.308 when called on a type other than JSON object or + null; example: `"cannot use push_back() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `push_back()` and `+=` can be used to + add elements to a JSON object. Note how the `null` value was silently + converted to a JSON object.,push_back__object_t__value} + + @since version 1.0.0 + */ + void push_back(const typename object_t::value_type& val) + { + // push_back only works for null objects or objects + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(308, "cannot use push_back() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array + m_value.object->insert(val); + } + + /*! + @brief add an object to an object + @copydoc push_back(const typename object_t::value_type&) + */ + reference operator+=(const typename object_t::value_type& val) + { + push_back(val); + return *this; + } + + /*! + @brief add an object to an object + + This function allows to use `push_back` with an initializer list. In case + + 1. the current value is an object, + 2. the initializer list @a init contains only two elements, and + 3. the first element of @a init is a string, + + @a init is converted into an object element and added using + @ref push_back(const typename object_t::value_type&). Otherwise, @a init + is converted to a JSON value and added using @ref push_back(basic_json&&). + + @param[in] init an initializer list + + @complexity Linear in the size of the initializer list @a init. + + @note This function is required to resolve an ambiguous overload error, + because pairs like `{"key", "value"}` can be both interpreted as + `object_t::value_type` or `std::initializer_list<basic_json>`, see + https://github.com/nlohmann/json/issues/235 for more information. + + @liveexample{The example shows how initializer lists are treated as + objects when possible.,push_back__initializer_list} + */ + void push_back(initializer_list_t init) + { + if (is_object() and init.size() == 2 and (*init.begin())->is_string()) + { + basic_json&& key = init.begin()->moved_or_copied(); + push_back(typename object_t::value_type( + std::move(key.get_ref<string_t&>()), (init.begin() + 1)->moved_or_copied())); + } + else + { + push_back(basic_json(init)); + } + } + + /*! + @brief add an object to an object + @copydoc push_back(initializer_list_t) + */ + reference operator+=(initializer_list_t init) + { + push_back(init); + return *this; + } + + /*! + @brief add an object to an array + + Creates a JSON value from the passed parameters @a args to the end of the + JSON value. If the function is called on a JSON null value, an empty array + is created before appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @throw type_error.311 when called on a type other than JSON array or + null; example: `"cannot use emplace_back() with number"` + + @complexity Amortized constant. + + @liveexample{The example shows how `push_back()` can be used to add + elements to a JSON array. Note how the `null` value was silently converted + to a JSON array.,emplace_back} + + @since version 2.0.8 + */ + template<class... Args> + void emplace_back(Args&& ... args) + { + // emplace_back only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_array()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace_back() with " + std::string(type_name()))); + } + + // transform null object into an array + if (is_null()) + { + m_type = value_t::array; + m_value = value_t::array; + assert_invariant(); + } + + // add element to array (perfect forwarding) + m_value.array->emplace_back(std::forward<Args>(args)...); + } + + /*! + @brief add an object to an object if key does not exist + + Inserts a new element into a JSON object constructed in-place with the + given @a args if there is no element with the key in the container. If the + function is called on a JSON null value, an empty object is created before + appending the value created from @a args. + + @param[in] args arguments to forward to a constructor of @ref basic_json + @tparam Args compatible types to create a @ref basic_json object + + @return a pair consisting of an iterator to the inserted element, or the + already-existing element if no insertion happened, and a bool + denoting whether the insertion took place. + + @throw type_error.311 when called on a type other than JSON object or + null; example: `"cannot use emplace() with number"` + + @complexity Logarithmic in the size of the container, O(log(`size()`)). + + @liveexample{The example shows how `emplace()` can be used to add elements + to a JSON object. Note how the `null` value was silently converted to a + JSON object. Further note how no value is added if there was already one + value stored with the same key.,emplace} + + @since version 2.0.8 + */ + template<class... Args> + std::pair<iterator, bool> emplace(Args&& ... args) + { + // emplace only works for null objects or arrays + if (JSON_UNLIKELY(not(is_null() or is_object()))) + { + JSON_THROW(type_error::create(311, "cannot use emplace() with " + std::string(type_name()))); + } + + // transform null object into an object + if (is_null()) + { + m_type = value_t::object; + m_value = value_t::object; + assert_invariant(); + } + + // add element to array (perfect forwarding) + auto res = m_value.object->emplace(std::forward<Args>(args)...); + // create result iterator and set iterator to the result of emplace + auto it = begin(); + it.m_it.object_iterator = res.first; + + // return pair of iterator and boolean + return {it, res.second}; + } + + /*! + @brief inserts element + + Inserts element @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] val element to insert + @return iterator pointing to the inserted @a val. + + @throw type_error.309 if called on JSON values other than arrays; + example: `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Constant plus linear in the distance between @a pos and end of + the container. + + @liveexample{The example shows how `insert()` is used.,insert} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, val); + return result; + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts element + @copydoc insert(const_iterator, const basic_json&) + */ + iterator insert(const_iterator pos, basic_json&& val) + { + return insert(pos, val); + } + + /*! + @brief inserts elements + + Inserts @a cnt copies of @a val before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] cnt number of copies of @a val to insert + @param[in] val element to insert + @return iterator pointing to the first element inserted, or @a pos if + `cnt==0` + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @complexity Linear in @a cnt plus linear in the distance between @a pos + and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__count} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, size_type cnt, const basic_json& val) + { + // insert only works for arrays + if (JSON_LIKELY(is_array())) + { + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, cnt, val); + return result; + } + + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)` before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + @throw invalid_iterator.211 if @a first or @a last are iterators into + container for which insert is called; example: `"passed iterators may not + belong to container"` + + @return iterator pointing to the first element inserted, or @a pos if + `first==last` + + @complexity Linear in `std::distance(first, last)` plus linear in the + distance between @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__range} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, const_iterator first, const_iterator last) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + if (JSON_UNLIKELY(first.m_object == this)) + { + JSON_THROW(invalid_iterator::create(211, "passed iterators may not belong to container")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert( + pos.m_it.array_iterator, + first.m_it.array_iterator, + last.m_it.array_iterator); + return result; + } + + /*! + @brief inserts elements + + Inserts elements from initializer list @a ilist before iterator @a pos. + + @param[in] pos iterator before which the content will be inserted; may be + the end() iterator + @param[in] ilist initializer list to insert the values from + + @throw type_error.309 if called on JSON values other than arrays; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if @a pos is not an iterator of *this; + example: `"iterator does not fit current value"` + + @return iterator pointing to the first element inserted, or @a pos if + `ilist` is empty + + @complexity Linear in `ilist.size()` plus linear in the distance between + @a pos and end of the container. + + @liveexample{The example shows how `insert()` is used.,insert__ilist} + + @since version 1.0.0 + */ + iterator insert(const_iterator pos, initializer_list_t ilist) + { + // insert only works for arrays + if (JSON_UNLIKELY(not is_array())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if iterator pos fits to this JSON value + if (JSON_UNLIKELY(pos.m_object != this)) + { + JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value")); + } + + // insert to array and return iterator + iterator result(this); + result.m_it.array_iterator = m_value.array->insert(pos.m_it.array_iterator, ilist.begin(), ilist.end()); + return result; + } + + /*! + @brief inserts elements + + Inserts elements from range `[first, last)`. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.309 if called on JSON values other than objects; example: + `"cannot use insert() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity Logarithmic: `O(N*log(size() + N))`, where `N` is the number + of elements to insert. + + @liveexample{The example shows how `insert()` is used.,insert__range_object} + + @since version 3.0.0 + */ + void insert(const_iterator first, const_iterator last) + { + // insert only works for objects + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(309, "cannot use insert() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + m_value.object->insert(first.m_it.object_iterator, last.m_it.object_iterator); + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from JSON object @a j and overwrites existing keys. + + @param[in] j JSON object to read values from + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_reference j) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + if (JSON_UNLIKELY(not j.is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(j.type_name()))); + } + + for (auto it = j.cbegin(); it != j.cend(); ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief updates a JSON object from another object, overwriting existing keys + + Inserts all values from from range `[first, last)` and overwrites existing + keys. + + @param[in] first begin of the range of elements to insert + @param[in] last end of the range of elements to insert + + @throw type_error.312 if called on JSON values other than objects; example: + `"cannot use update() with string"` + @throw invalid_iterator.202 if iterator @a first or @a last does does not + point to an object; example: `"iterators first and last must point to + objects"` + @throw invalid_iterator.210 if @a first and @a last do not belong to the + same JSON value; example: `"iterators do not fit"` + + @complexity O(N*log(size() + N)), where N is the number of elements to + insert. + + @liveexample{The example shows how `update()` is used__range.,update} + + @sa https://docs.python.org/3.6/library/stdtypes.html#dict.update + + @since version 3.0.0 + */ + void update(const_iterator first, const_iterator last) + { + // implicitly convert null value to an empty object + if (is_null()) + { + m_type = value_t::object; + m_value.object = create<object_t>(); + assert_invariant(); + } + + if (JSON_UNLIKELY(not is_object())) + { + JSON_THROW(type_error::create(312, "cannot use update() with " + std::string(type_name()))); + } + + // check if range iterators belong to the same JSON object + if (JSON_UNLIKELY(first.m_object != last.m_object)) + { + JSON_THROW(invalid_iterator::create(210, "iterators do not fit")); + } + + // passed iterators must belong to objects + if (JSON_UNLIKELY(not first.m_object->is_object() + or not first.m_object->is_object())) + { + JSON_THROW(invalid_iterator::create(202, "iterators first and last must point to objects")); + } + + for (auto it = first; it != last; ++it) + { + m_value.object->operator[](it.key()) = it.value(); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of the JSON value with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other JSON value to exchange the contents with + + @complexity Constant. + + @liveexample{The example below shows how JSON values can be swapped with + `swap()`.,swap__reference} + + @since version 1.0.0 + */ + void swap(reference other) noexcept ( + std::is_nothrow_move_constructible<value_t>::value and + std::is_nothrow_move_assignable<value_t>::value and + std::is_nothrow_move_constructible<json_value>::value and + std::is_nothrow_move_assignable<json_value>::value + ) + { + std::swap(m_type, other.m_type); + std::swap(m_value, other.m_value); + assert_invariant(); + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON array with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other array to exchange the contents with + + @throw type_error.310 when JSON value is not an array; example: `"cannot + use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how arrays can be swapped with + `swap()`.,swap__array_t} + + @since version 1.0.0 + */ + void swap(array_t& other) + { + // swap only works for arrays + if (JSON_LIKELY(is_array())) + { + std::swap(*(m_value.array), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON object with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other object to exchange the contents with + + @throw type_error.310 when JSON value is not an object; example: + `"cannot use swap() with string"` + + @complexity Constant. + + @liveexample{The example below shows how objects can be swapped with + `swap()`.,swap__object_t} + + @since version 1.0.0 + */ + void swap(object_t& other) + { + // swap only works for objects + if (JSON_LIKELY(is_object())) + { + std::swap(*(m_value.object), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /*! + @brief exchanges the values + + Exchanges the contents of a JSON string with those of @a other. Does not + invoke any move, copy, or swap operations on individual elements. All + iterators and references remain valid. The past-the-end iterator is + invalidated. + + @param[in,out] other string to exchange the contents with + + @throw type_error.310 when JSON value is not a string; example: `"cannot + use swap() with boolean"` + + @complexity Constant. + + @liveexample{The example below shows how strings can be swapped with + `swap()`.,swap__string_t} + + @since version 1.0.0 + */ + void swap(string_t& other) + { + // swap only works for strings + if (JSON_LIKELY(is_string())) + { + std::swap(*(m_value.string), other); + } + else + { + JSON_THROW(type_error::create(310, "cannot use swap() with " + std::string(type_name()))); + } + } + + /// @} + + public: + ////////////////////////////////////////// + // lexicographical comparison operators // + ////////////////////////////////////////// + + /// @name lexicographical comparison operators + /// @{ + + /*! + @brief comparison: equal + + Compares two JSON values for equality according to the following rules: + - Two JSON values are equal if (1) they are from the same type and (2) + their stored values are the same according to their respective + `operator==`. + - Integer and floating-point numbers are automatically converted before + comparison. Note than two NaN values are always treated as unequal. + - Two JSON null values are equal. + + @note Floating-point inside JSON values numbers are compared with + `json::number_float_t::operator==` which is `double::operator==` by + default. To compare floating-point while respecting an epsilon, an alternative + [comparison function](https://github.com/mariokonrad/marnav/blob/master/src/marnav/math/floatingpoint.hpp#L34-#L39) + could be used, for instance + @code {.cpp} + template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value, T>::type> + inline bool is_same(T a, T b, T epsilon = std::numeric_limits<T>::epsilon()) noexcept + { + return std::abs(a - b) <= epsilon; + } + @endcode + + @note NaN values never compare equal to themselves or to other NaN values. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are equal + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Linear. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__equal} + + @since version 1.0.0 + */ + friend bool operator==(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return (*lhs.m_value.array == *rhs.m_value.array); + + case value_t::object: + return (*lhs.m_value.object == *rhs.m_value.object); + + case value_t::null: + return true; + + case value_t::string: + return (*lhs.m_value.string == *rhs.m_value.string); + + case value_t::boolean: + return (lhs.m_value.boolean == rhs.m_value.boolean); + + case value_t::number_integer: + return (lhs.m_value.number_integer == rhs.m_value.number_integer); + + case value_t::number_unsigned: + return (lhs.m_value.number_unsigned == rhs.m_value.number_unsigned); + + case value_t::number_float: + return (lhs.m_value.number_float == rhs.m_value.number_float); + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return (static_cast<number_float_t>(lhs.m_value.number_integer) == rhs.m_value.number_float); + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return (lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_integer)); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return (static_cast<number_float_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_float); + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return (lhs.m_value.number_float == static_cast<number_float_t>(rhs.m_value.number_unsigned)); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return (static_cast<number_integer_t>(lhs.m_value.number_unsigned) == rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return (lhs.m_value.number_integer == static_cast<number_integer_t>(rhs.m_value.number_unsigned)); + } + + return false; + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs == basic_json(rhs)); + } + + /*! + @brief comparison: equal + @copydoc operator==(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator==(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) == rhs); + } + + /*! + @brief comparison: not equal + + Compares two JSON values for inequality by calculating `not (lhs == rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether the values @a lhs and @a rhs are not equal + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__notequal} + + @since version 1.0.0 + */ + friend bool operator!=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs == rhs); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs != basic_json(rhs)); + } + + /*! + @brief comparison: not equal + @copydoc operator!=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator!=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) != rhs); + } + + /*! + @brief comparison: less than + + Compares whether one JSON value @a lhs is less than another JSON value @a + rhs according to the following rules: + - If @a lhs and @a rhs have the same type, the values are compared using + the default `<` operator. + - Integer and floating-point numbers are automatically converted before + comparison + - In case @a lhs and @a rhs have different types, the values are ignored + and the order of the types is considered, see + @ref operator<(const value_t, const value_t). + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__less} + + @since version 1.0.0 + */ + friend bool operator<(const_reference lhs, const_reference rhs) noexcept + { + const auto lhs_type = lhs.type(); + const auto rhs_type = rhs.type(); + + if (lhs_type == rhs_type) + { + switch (lhs_type) + { + case value_t::array: + return (*lhs.m_value.array) < (*rhs.m_value.array); + + case value_t::object: + return *lhs.m_value.object < *rhs.m_value.object; + + case value_t::null: + return false; + + case value_t::string: + return *lhs.m_value.string < *rhs.m_value.string; + + case value_t::boolean: + return lhs.m_value.boolean < rhs.m_value.boolean; + + case value_t::number_integer: + return lhs.m_value.number_integer < rhs.m_value.number_integer; + + case value_t::number_unsigned: + return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned; + + case value_t::number_float: + return lhs.m_value.number_float < rhs.m_value.number_float; + + default: + return false; + } + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_integer) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_integer) + { + return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_integer); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_float) + { + return static_cast<number_float_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_float; + } + else if (lhs_type == value_t::number_float and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_float < static_cast<number_float_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_integer and rhs_type == value_t::number_unsigned) + { + return lhs.m_value.number_integer < static_cast<number_integer_t>(rhs.m_value.number_unsigned); + } + else if (lhs_type == value_t::number_unsigned and rhs_type == value_t::number_integer) + { + return static_cast<number_integer_t>(lhs.m_value.number_unsigned) < rhs.m_value.number_integer; + } + + // We only reach this line if we cannot compare values. In that case, + // we compare types. Note we have to call the operator explicitly, + // because MSVC has problems otherwise. + return operator<(lhs_type, rhs_type); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs < basic_json(rhs)); + } + + /*! + @brief comparison: less than + @copydoc operator<(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) < rhs); + } + + /*! + @brief comparison: less than or equal + + Compares whether one JSON value @a lhs is less than or equal to another + JSON value by calculating `not (rhs < lhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is less than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greater} + + @since version 1.0.0 + */ + friend bool operator<=(const_reference lhs, const_reference rhs) noexcept + { + return not (rhs < lhs); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs <= basic_json(rhs)); + } + + /*! + @brief comparison: less than or equal + @copydoc operator<=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator<=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) <= rhs); + } + + /*! + @brief comparison: greater than + + Compares whether one JSON value @a lhs is greater than another + JSON value by calculating `not (lhs <= rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__lessequal} + + @since version 1.0.0 + */ + friend bool operator>(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs <= rhs); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs > basic_json(rhs)); + } + + /*! + @brief comparison: greater than + @copydoc operator>(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) > rhs); + } + + /*! + @brief comparison: greater than or equal + + Compares whether one JSON value @a lhs is greater than or equal to another + JSON value by calculating `not (lhs < rhs)`. + + @param[in] lhs first JSON value to consider + @param[in] rhs second JSON value to consider + @return whether @a lhs is greater than or equal to @a rhs + + @complexity Linear. + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @liveexample{The example demonstrates comparing several JSON + types.,operator__greaterequal} + + @since version 1.0.0 + */ + friend bool operator>=(const_reference lhs, const_reference rhs) noexcept + { + return not (lhs < rhs); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const_reference lhs, const ScalarType rhs) noexcept + { + return (lhs >= basic_json(rhs)); + } + + /*! + @brief comparison: greater than or equal + @copydoc operator>=(const_reference, const_reference) + */ + template<typename ScalarType, typename std::enable_if< + std::is_scalar<ScalarType>::value, int>::type = 0> + friend bool operator>=(const ScalarType lhs, const_reference rhs) noexcept + { + return (basic_json(lhs) >= rhs); + } + + /// @} + + /////////////////// + // serialization // + /////////////////// + + /// @name serialization + /// @{ + + /*! + @brief serialize to stream + + Serialize the given JSON value @a j to the output stream @a o. The JSON + value will be serialized using the @ref dump member function. + + - The indentation of the output can be controlled with the member variable + `width` of the output stream @a o. For instance, using the manipulator + `std::setw(4)` on @a o sets the indentation level to `4` and the + serialization result is the same as calling `dump(4)`. + + - The indentation character can be controlled with the member variable + `fill` of the output stream @a o. For instance, the manipulator + `std::setfill('\\t')` sets indentation to use a tab character rather than + the default space character. + + @param[in,out] o stream to serialize to + @param[in] j JSON value to serialize + + @return the stream @a o + + @throw type_error.316 if a string stored inside the JSON value is not + UTF-8 encoded + + @complexity Linear. + + @liveexample{The example below shows the serialization with different + parameters to `width` to adjust the indentation level.,operator_serialize} + + @since version 1.0.0; indentation character added in version 3.0.0 + */ + friend std::ostream& operator<<(std::ostream& o, const basic_json& j) + { + // read width member and use it as indentation parameter if nonzero + const bool pretty_print = (o.width() > 0); + const auto indentation = (pretty_print ? o.width() : 0); + + // reset width to 0 for subsequent calls to this stream + o.width(0); + + // do the actual serialization + serializer s(detail::output_adapter<char>(o), o.fill()); + s.dump(j, pretty_print, false, static_cast<unsigned int>(indentation)); + return o; + } + + /*! + @brief serialize to stream + @deprecated This stream operator is deprecated and will be removed in a + future version of the library. Please use + @ref operator<<(std::ostream&, const basic_json&) + instead; that is, replace calls like `j >> o;` with `o << j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::ostream& operator>>(const basic_json& j, std::ostream& o) + { + return o << j; + } + + /// @} + + + ///////////////////// + // deserialization // + ///////////////////// + + /// @name deserialization + /// @{ + + /*! + @brief deserialize from a compatible input + + This function reads from a compatible input. Examples are: + - an array of 1-byte values + - strings with character/literal type with size of 1 byte + - input streams + - container with contiguous storage of 1-byte values. Compatible container + types include `std::vector`, `std::string`, `std::array`, + `std::valarray`, and `std::initializer_list`. Furthermore, C-style + arrays can be used with `std::begin()`/`std::end()`. User-defined + containers can be used as long as they implement random-access iterators + and a contiguous storage. + + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @pre The container storage is contiguous. Violating this precondition + yields undefined behavior. **This precondition is enforced with an + assertion.** + @pre Each element of the container has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with a noncompliant container and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @param[in] i input to read from + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + + @return result of the deserialization + + @throw parse_error.101 if a parse error occurs; example: `""unexpected end + of input; expected string literal""` + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an array.,parse__array__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__string__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function with + and without callback function.,parse__istream__parser_callback_t} + + @liveexample{The example below demonstrates the `parse()` function reading + from a contiguous container.,parse__contiguouscontainer__parser_callback_t} + + @since version 2.0.3 (contiguous containers) + */ + static basic_json parse(detail::input_adapter i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + /*! + @copydoc basic_json parse(detail::input_adapter, const parser_callback_t) + */ + static basic_json parse(detail::input_adapter& i, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(i, cb, allow_exceptions).parse(true, result); + return result; + } + + static bool accept(detail::input_adapter i) + { + return parser(i).accept(true); + } + + static bool accept(detail::input_adapter& i) + { + return parser(i).accept(true); + } + + /*! + @brief deserialize from an iterator range with contiguous storage + + This function reads from an iterator range of a container with contiguous + storage of 1-byte values. Compatible container types include + `std::vector`, `std::string`, `std::array`, `std::valarray`, and + `std::initializer_list`. Furthermore, C-style arrays can be used with + `std::begin()`/`std::end()`. User-defined containers can be used as long + as they implement random-access iterators and a contiguous storage. + + @pre The iterator range is contiguous. Violating this precondition yields + undefined behavior. **This precondition is enforced with an assertion.** + @pre Each element in the range has a size of 1 byte. Violating this + precondition yields undefined behavior. **This precondition is enforced + with a static assertion.** + + @warning There is no way to enforce all preconditions at compile-time. If + the function is called with noncompliant iterators and with + assertions switched off, the behavior is undefined and will most + likely yield segmentation violation. + + @tparam IteratorType iterator of container with contiguous storage + @param[in] first begin of the range to parse (included) + @param[in] last end of the range to parse (excluded) + @param[in] cb a parser callback function of type @ref parser_callback_t + which is used to control the deserialization by filtering unwanted values + (optional) + @param[in] allow_exceptions whether to throw exceptions in case of a + parse error (optional, true by default) + + @return result of the deserialization + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. The complexity can be higher if the parser callback function + @a cb has a super-linear complexity. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below demonstrates the `parse()` function reading + from an iterator range.,parse__iteratortype__parser_callback_t} + + @since version 2.0.3 + */ + template<class IteratorType, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static basic_json parse(IteratorType first, IteratorType last, + const parser_callback_t cb = nullptr, + const bool allow_exceptions = true) + { + basic_json result; + parser(detail::input_adapter(first, last), cb, allow_exceptions).parse(true, result); + return result; + } + + template<class IteratorType, typename std::enable_if< + std::is_base_of< + std::random_access_iterator_tag, + typename std::iterator_traits<IteratorType>::iterator_category>::value, int>::type = 0> + static bool accept(IteratorType first, IteratorType last) + { + return parser(detail::input_adapter(first, last)).accept(true); + } + + /*! + @brief deserialize from stream + @deprecated This stream operator is deprecated and will be removed in a + future version of the library. Please use + @ref operator>>(std::istream&, basic_json&) + instead; that is, replace calls like `j << i;` with `i >> j;`. + @since version 1.0.0; deprecated since version 3.0.0 + */ + JSON_DEPRECATED + friend std::istream& operator<<(basic_json& j, std::istream& i) + { + return operator>>(i, j); + } + + /*! + @brief deserialize from stream + + Deserializes an input stream to a JSON value. + + @param[in,out] i input stream to read a serialized JSON value from + @param[in,out] j JSON value to write the deserialized input to + + @throw parse_error.101 in case of an unexpected token + @throw parse_error.102 if to_unicode fails or surrogate error + @throw parse_error.103 if to_unicode fails + + @complexity Linear in the length of the input. The parser is a predictive + LL(1) parser. + + @note A UTF-8 byte order mark is silently ignored. + + @liveexample{The example below shows how a JSON value is constructed by + reading a serialization from a stream.,operator_deserialize} + + @sa parse(std::istream&, const parser_callback_t) for a variant with a + parser callback function to filter values while parsing + + @since version 1.0.0 + */ + friend std::istream& operator>>(std::istream& i, basic_json& j) + { + parser(detail::input_adapter(i)).parse(false, j); + return i; + } + + /// @} + + /////////////////////////// + // convenience functions // + /////////////////////////// + + /*! + @brief return the type as string + + Returns the type name as string to be used in error messages - usually to + indicate that a function was called on a wrong JSON type. + + @return a string representation of a the @a m_type member: + Value type | return value + ----------- | ------------- + null | `"null"` + boolean | `"boolean"` + string | `"string"` + number | `"number"` (for all number types) + object | `"object"` + array | `"array"` + discarded | `"discarded"` + + @exceptionsafety No-throw guarantee: this function never throws exceptions. + + @complexity Constant. + + @liveexample{The following code exemplifies `type_name()` for all JSON + types.,type_name} + + @sa @ref type() -- return the type of the JSON value + @sa @ref operator value_t() -- return the type of the JSON value (implicit) + + @since version 1.0.0, public since 2.1.0, `const char*` and `noexcept` + since 3.0.0 + */ + const char* type_name() const noexcept + { + { + switch (m_type) + { + case value_t::null: + return "null"; + case value_t::object: + return "object"; + case value_t::array: + return "array"; + case value_t::string: + return "string"; + case value_t::boolean: + return "boolean"; + case value_t::discarded: + return "discarded"; + default: + return "number"; + } + } + } + + + private: + ////////////////////// + // member variables // + ////////////////////// + + /// the type of the current element + value_t m_type = value_t::null; + + /// the value of the current element + json_value m_value = {}; + + ////////////////////////////////////////// + // binary serialization/deserialization // + ////////////////////////////////////////// + + /// @name binary serialization/deserialization support + /// @{ + + public: + /*! + @brief create a CBOR serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the CBOR (Concise + Binary Object Representation) serialization format. CBOR is a binary + serialization format which aims to be more compact than JSON itself, yet + more efficient to parse. + + The library uses the following mapping from JSON values types to + CBOR types according to the CBOR specification (RFC 7049): + + JSON value type | value/range | CBOR type | first byte + --------------- | ------------------------------------------ | ---------------------------------- | --------------- + null | `null` | Null | 0xF6 + boolean | `true` | True | 0xF5 + boolean | `false` | False | 0xF4 + number_integer | -9223372036854775808..-2147483649 | Negative integer (8 bytes follow) | 0x3B + number_integer | -2147483648..-32769 | Negative integer (4 bytes follow) | 0x3A + number_integer | -32768..-129 | Negative integer (2 bytes follow) | 0x39 + number_integer | -128..-25 | Negative integer (1 byte follow) | 0x38 + number_integer | -24..-1 | Negative integer | 0x20..0x37 + number_integer | 0..23 | Integer | 0x00..0x17 + number_integer | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_integer | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_integer | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_integer | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_unsigned | 0..23 | Integer | 0x00..0x17 + number_unsigned | 24..255 | Unsigned integer (1 byte follow) | 0x18 + number_unsigned | 256..65535 | Unsigned integer (2 bytes follow) | 0x19 + number_unsigned | 65536..4294967295 | Unsigned integer (4 bytes follow) | 0x1A + number_unsigned | 4294967296..18446744073709551615 | Unsigned integer (8 bytes follow) | 0x1B + number_float | *any value* | Double-Precision Float | 0xFB + string | *length*: 0..23 | UTF-8 string | 0x60..0x77 + string | *length*: 23..255 | UTF-8 string (1 byte follow) | 0x78 + string | *length*: 256..65535 | UTF-8 string (2 bytes follow) | 0x79 + string | *length*: 65536..4294967295 | UTF-8 string (4 bytes follow) | 0x7A + string | *length*: 4294967296..18446744073709551615 | UTF-8 string (8 bytes follow) | 0x7B + array | *size*: 0..23 | array | 0x80..0x97 + array | *size*: 23..255 | array (1 byte follow) | 0x98 + array | *size*: 256..65535 | array (2 bytes follow) | 0x99 + array | *size*: 65536..4294967295 | array (4 bytes follow) | 0x9A + array | *size*: 4294967296..18446744073709551615 | array (8 bytes follow) | 0x9B + object | *size*: 0..23 | map | 0xA0..0xB7 + object | *size*: 23..255 | map (1 byte follow) | 0xB8 + object | *size*: 256..65535 | map (2 bytes follow) | 0xB9 + object | *size*: 65536..4294967295 | map (4 bytes follow) | 0xBA + object | *size*: 4294967296..18446744073709551615 | map (8 bytes follow) | 0xBB + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a CBOR value. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @note The following CBOR types are not used in the conversion: + - byte strings (0x40..0x5F) + - UTF-8 strings terminated by "break" (0x7F) + - arrays terminated by "break" (0x9F) + - maps terminated by "break" (0xBF) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + - half and single-precision floats (0xF9-0xFA) + - break (0xFF) + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in CBOR format.,to_cbor} + + @sa http://cbor.io + @sa @ref from_cbor(const std::vector<uint8_t>&, const size_t) for the + analogous deserialization + @sa @ref to_msgpack(const basic_json&) for the related MessagePack format + + @since version 2.0.9 + */ + static std::vector<uint8_t> to_cbor(const basic_json& j) + { + std::vector<uint8_t> result; + to_cbor(j, result); + return result; + } + + static void to_cbor(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_cbor(j); + } + + static void to_cbor(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_cbor(j); + } + + /*! + @brief create a MessagePack serialization of a given JSON value + + Serializes a given JSON value @a j to a byte vector using the MessagePack + serialization format. MessagePack is a binary serialization format which + aims to be more compact than JSON itself, yet more efficient to parse. + + The library uses the following mapping from JSON values types to + MessagePack types according to the MessagePack specification: + + JSON value type | value/range | MessagePack type | first byte + --------------- | --------------------------------- | ---------------- | ---------- + null | `null` | nil | 0xC0 + boolean | `true` | true | 0xC3 + boolean | `false` | false | 0xC2 + number_integer | -9223372036854775808..-2147483649 | int64 | 0xD3 + number_integer | -2147483648..-32769 | int32 | 0xD2 + number_integer | -32768..-129 | int16 | 0xD1 + number_integer | -128..-33 | int8 | 0xD0 + number_integer | -32..-1 | negative fixint | 0xE0..0xFF + number_integer | 0..127 | positive fixint | 0x00..0x7F + number_integer | 128..255 | uint 8 | 0xCC + number_integer | 256..65535 | uint 16 | 0xCD + number_integer | 65536..4294967295 | uint 32 | 0xCE + number_integer | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_unsigned | 0..127 | positive fixint | 0x00..0x7F + number_unsigned | 128..255 | uint 8 | 0xCC + number_unsigned | 256..65535 | uint 16 | 0xCD + number_unsigned | 65536..4294967295 | uint 32 | 0xCE + number_unsigned | 4294967296..18446744073709551615 | uint 64 | 0xCF + number_float | *any value* | float 64 | 0xCB + string | *length*: 0..31 | fixstr | 0xA0..0xBF + string | *length*: 32..255 | str 8 | 0xD9 + string | *length*: 256..65535 | str 16 | 0xDA + string | *length*: 65536..4294967295 | str 32 | 0xDB + array | *size*: 0..15 | fixarray | 0x90..0x9F + array | *size*: 16..65535 | array 16 | 0xDC + array | *size*: 65536..4294967295 | array 32 | 0xDD + object | *size*: 0..15 | fix map | 0x80..0x8F + object | *size*: 16..65535 | map 16 | 0xDE + object | *size*: 65536..4294967295 | map 32 | 0xDF + + @note The mapping is **complete** in the sense that any JSON value type + can be converted to a MessagePack value. + + @note The following values can **not** be converted to a MessagePack value: + - strings with more than 4294967295 bytes + - arrays with more than 4294967295 elements + - objects with more than 4294967295 elements + + @note The following MessagePack types are not used in the conversion: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - float 32 (0xCA) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @note If NaN or Infinity are stored inside a JSON number, they are + serialized properly. This behavior differs from the @ref dump() + function which serializes NaN or Infinity to `null`. + + @param[in] j JSON value to serialize + @return MessagePack serialization as byte vector + + @complexity Linear in the size of the JSON value @a j. + + @liveexample{The example shows the serialization of a JSON value to a byte + vector in MessagePack format.,to_msgpack} + + @sa http://msgpack.org + @sa @ref from_msgpack(const std::vector<uint8_t>&, const size_t) for the + analogous deserialization + @sa @ref to_cbor(const basic_json& for the related CBOR format + + @since version 2.0.9 + */ + static std::vector<uint8_t> to_msgpack(const basic_json& j) + { + std::vector<uint8_t> result; + to_msgpack(j, result); + return result; + } + + static void to_msgpack(const basic_json& j, detail::output_adapter<uint8_t> o) + { + binary_writer<uint8_t>(o).write_msgpack(j); + } + + static void to_msgpack(const basic_json& j, detail::output_adapter<char> o) + { + binary_writer<char>(o).write_msgpack(j); + } + + /*! + @brief create a JSON value from an input in CBOR format + + Deserializes a given input @a i to a JSON value using the CBOR (Concise + Binary Object Representation) serialization format. + + The library maps CBOR types to JSON value types as follows: + + CBOR type | JSON value type | first byte + ---------------------- | --------------- | ---------- + Integer | number_unsigned | 0x00..0x17 + Unsigned integer | number_unsigned | 0x18 + Unsigned integer | number_unsigned | 0x19 + Unsigned integer | number_unsigned | 0x1A + Unsigned integer | number_unsigned | 0x1B + Negative integer | number_integer | 0x20..0x37 + Negative integer | number_integer | 0x38 + Negative integer | number_integer | 0x39 + Negative integer | number_integer | 0x3A + Negative integer | number_integer | 0x3B + Negative integer | number_integer | 0x40..0x57 + UTF-8 string | string | 0x60..0x77 + UTF-8 string | string | 0x78 + UTF-8 string | string | 0x79 + UTF-8 string | string | 0x7A + UTF-8 string | string | 0x7B + UTF-8 string | string | 0x7F + array | array | 0x80..0x97 + array | array | 0x98 + array | array | 0x99 + array | array | 0x9A + array | array | 0x9B + array | array | 0x9F + map | object | 0xA0..0xB7 + map | object | 0xB8 + map | object | 0xB9 + map | object | 0xBA + map | object | 0xBB + map | object | 0xBF + False | `false` | 0xF4 + True | `true` | 0xF5 + Nill | `null` | 0xF6 + Half-Precision Float | number_float | 0xF9 + Single-Precision Float | number_float | 0xFA + Double-Precision Float | number_float | 0xFB + + @warning The mapping is **incomplete** in the sense that not all CBOR + types can be converted to a JSON value. The following CBOR types + are not supported and will yield parse errors (parse_error.112): + - byte strings (0x40..0x5F) + - date/time (0xC0..0xC1) + - bignum (0xC2..0xC3) + - decimal fraction (0xC4) + - bigfloat (0xC5) + - tagged items (0xC6..0xD4, 0xD8..0xDB) + - expected conversions (0xD5..0xD7) + - simple values (0xE0..0xF3, 0xF8) + - undefined (0xF7) + + @warning CBOR allows map keys of any type, whereas JSON only allows + strings as keys in object values. Therefore, CBOR maps with keys + other than UTF-8 strings are rejected (parse_error.113). + + @note Any CBOR output created @ref to_cbor can be successfully parsed by + @ref from_cbor. + + @param[in] i an input in CBOR format convertible to an input adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + @return deserialized JSON value + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from CBOR were + used in the given input @a v or if the input is not valid CBOR + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in CBOR + format to a JSON value.,from_cbor} + + @sa http://cbor.io + @sa @ref to_cbor(const basic_json&) for the analogous serialization + @sa @ref from_msgpack(detail::input_adapter, const bool) for the + related MessagePack format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0 + */ + static basic_json from_cbor(detail::input_adapter i, + const bool strict = true) + { + return binary_reader(i).parse_cbor(strict); + } + + /*! + @copydoc from_cbor(detail::input_adapter, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + static basic_json from_cbor(A1 && a1, A2 && a2, const bool strict = true) + { + return binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).parse_cbor(strict); + } + + /*! + @brief create a JSON value from an input in MessagePack format + + Deserializes a given input @a i to a JSON value using the MessagePack + serialization format. + + The library maps MessagePack types to JSON value types as follows: + + MessagePack type | JSON value type | first byte + ---------------- | --------------- | ---------- + positive fixint | number_unsigned | 0x00..0x7F + fixmap | object | 0x80..0x8F + fixarray | array | 0x90..0x9F + fixstr | string | 0xA0..0xBF + nil | `null` | 0xC0 + false | `false` | 0xC2 + true | `true` | 0xC3 + float 32 | number_float | 0xCA + float 64 | number_float | 0xCB + uint 8 | number_unsigned | 0xCC + uint 16 | number_unsigned | 0xCD + uint 32 | number_unsigned | 0xCE + uint 64 | number_unsigned | 0xCF + int 8 | number_integer | 0xD0 + int 16 | number_integer | 0xD1 + int 32 | number_integer | 0xD2 + int 64 | number_integer | 0xD3 + str 8 | string | 0xD9 + str 16 | string | 0xDA + str 32 | string | 0xDB + array 16 | array | 0xDC + array 32 | array | 0xDD + map 16 | object | 0xDE + map 32 | object | 0xDF + negative fixint | number_integer | 0xE0-0xFF + + @warning The mapping is **incomplete** in the sense that not all + MessagePack types can be converted to a JSON value. The following + MessagePack types are not supported and will yield parse errors: + - bin 8 - bin 32 (0xC4..0xC6) + - ext 8 - ext 32 (0xC7..0xC9) + - fixext 1 - fixext 16 (0xD4..0xD8) + + @note Any MessagePack output created @ref to_msgpack can be successfully + parsed by @ref from_msgpack. + + @param[in] i an input in MessagePack format convertible to an input + adapter + @param[in] strict whether to expect the input to be consumed until EOF + (true by default) + + @throw parse_error.110 if the given input ends prematurely or the end of + file was not reached when @a strict was set to true + @throw parse_error.112 if unsupported features from MessagePack were + used in the given input @a i or if the input is not valid MessagePack + @throw parse_error.113 if a string was expected as map key, but not found + + @complexity Linear in the size of the input @a i. + + @liveexample{The example shows the deserialization of a byte vector in + MessagePack format to a JSON value.,from_msgpack} + + @sa http://msgpack.org + @sa @ref to_msgpack(const basic_json&) for the analogous serialization + @sa @ref from_cbor(detail::input_adapter, const bool) for the related CBOR + format + + @since version 2.0.9; parameter @a start_index since 2.1.1; changed to + consume input adapters, removed start_index parameter, and added + @a strict parameter since 3.0.0 + */ + static basic_json from_msgpack(detail::input_adapter i, + const bool strict = true) + { + return binary_reader(i).parse_msgpack(strict); + } + + /*! + @copydoc from_msgpack(detail::input_adapter, const bool) + */ + template<typename A1, typename A2, + detail::enable_if_t<std::is_constructible<detail::input_adapter, A1, A2>::value, int> = 0> + static basic_json from_msgpack(A1 && a1, A2 && a2, const bool strict = true) + { + return binary_reader(detail::input_adapter(std::forward<A1>(a1), std::forward<A2>(a2))).parse_msgpack(strict); + } + + /// @} + + ////////////////////////// + // JSON Pointer support // + ////////////////////////// + + /// @name JSON Pointer functions + /// @{ + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. Similar to @ref operator[](const typename + object_t::key_type&), `null` values are created in arrays and objects if + necessary. + + In particular: + - If the JSON pointer points to an object key that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. + - If the JSON pointer points to an array index that does not exist, it + is created an filled with a `null` value before a reference to it + is returned. All indices between the current maximum and the given + index are also filled with `null`. + - The special value `-` is treated as a synonym for the index past the + end. + + @param[in] ptr a JSON pointer + + @return reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer} + + @since version 2.0.0 + */ + reference operator[](const json_pointer& ptr) + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Uses a JSON pointer to retrieve a reference to the respective JSON value. + No bound checking is performed. The function does not change the JSON + value; no `null` values are created. In particular, the the special value + `-` yields an exception. + + @param[in] ptr JSON pointer to the desired element + + @return const reference to the element pointed to by @a ptr + + @complexity Constant. + + @throw parse_error.106 if an array index begins with '0' + @throw parse_error.109 if an array index was not a number + @throw out_of_range.402 if the array index '-' is used + @throw out_of_range.404 if the JSON pointer can not be resolved + + @liveexample{The behavior is shown in the example.,operatorjson_pointer_const} + + @since version 2.0.0 + */ + const_reference operator[](const json_pointer& ptr) const + { + return ptr.get_unchecked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a reference to the element at with specified JSON pointer @a ptr, + with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer} + */ + reference at(const json_pointer& ptr) + { + return ptr.get_checked(this); + } + + /*! + @brief access specified element via JSON Pointer + + Returns a const reference to the element at with specified JSON pointer @a + ptr, with bounds checking. + + @param[in] ptr JSON pointer to the desired element + + @return reference to the element pointed to by @a ptr + + @throw parse_error.106 if an array index in the passed JSON pointer @a ptr + begins with '0'. See example below. + + @throw parse_error.109 if an array index in the passed JSON pointer @a ptr + is not a number. See example below. + + @throw out_of_range.401 if an array index in the passed JSON pointer @a ptr + is out of range. See example below. + + @throw out_of_range.402 if the array index '-' is used in the passed JSON + pointer @a ptr. As `at` provides checked access (and no elements are + implicitly inserted), the index '-' is always invalid. See example below. + + @throw out_of_range.403 if the JSON pointer describes a key of an object + which cannot be found. See example below. + + @throw out_of_range.404 if the JSON pointer @a ptr can not be resolved. + See example below. + + @exceptionsafety Strong guarantee: if an exception is thrown, there are no + changes in the JSON value. + + @complexity Constant. + + @since version 2.0.0 + + @liveexample{The behavior is shown in the example.,at_json_pointer_const} + */ + const_reference at(const json_pointer& ptr) const + { + return ptr.get_checked(this); + } + + /*! + @brief return flattened JSON value + + The function creates a JSON object whose keys are JSON pointers (see [RFC + 6901](https://tools.ietf.org/html/rfc6901)) and whose values are all + primitive. The original JSON value can be restored using the @ref + unflatten() function. + + @return an object that maps JSON pointers to primitive values + + @note Empty objects and arrays are flattened to `null` and will not be + reconstructed correctly by the @ref unflatten() function. + + @complexity Linear in the size the JSON value. + + @liveexample{The following code shows how a JSON object is flattened to an + object whose keys consist of JSON pointers.,flatten} + + @sa @ref unflatten() for the reverse function + + @since version 2.0.0 + */ + basic_json flatten() const + { + basic_json result(value_t::object); + json_pointer::flatten("", *this, result); + return result; + } + + /*! + @brief unflatten a previously flattened JSON value + + The function restores the arbitrary nesting of a JSON value that has been + flattened before using the @ref flatten() function. The JSON value must + meet certain constraints: + 1. The value must be an object. + 2. The keys must be JSON pointers (see + [RFC 6901](https://tools.ietf.org/html/rfc6901)) + 3. The mapped values must be primitive JSON types. + + @return the original JSON from a flattened version + + @note Empty objects and arrays are flattened by @ref flatten() to `null` + values and can not unflattened to their original type. Apart from + this example, for a JSON value `j`, the following is always true: + `j == j.flatten().unflatten()`. + + @complexity Linear in the size the JSON value. + + @throw type_error.314 if value is not an object + @throw type_error.315 if object values are not primitive + + @liveexample{The following code shows how a flattened JSON object is + unflattened into the original nested JSON object.,unflatten} + + @sa @ref flatten() for the reverse function + + @since version 2.0.0 + */ + basic_json unflatten() const + { + return json_pointer::unflatten(*this); + } + + /// @} + + ////////////////////////// + // JSON Patch functions // + ////////////////////////// + + /// @name JSON Patch functions + /// @{ + + /*! + @brief applies a JSON patch + + [JSON Patch](http://jsonpatch.com) defines a JSON document structure for + expressing a sequence of operations to apply to a JSON) document. With + this function, a JSON Patch is applied to the current JSON value by + executing all operations from the patch. + + @param[in] json_patch JSON patch document + @return patched document + + @note The application of a patch is atomic: Either all operations succeed + and the patched document is returned or an exception is thrown. In + any case, the original value is not changed: the patch is applied + to a copy of the value. + + @throw parse_error.104 if the JSON patch does not consist of an array of + objects + + @throw parse_error.105 if the JSON patch is malformed (e.g., mandatory + attributes are missing); example: `"operation add must have member path"` + + @throw out_of_range.401 if an array index is out of range. + + @throw out_of_range.403 if a JSON pointer inside the patch could not be + resolved successfully in the current JSON value; example: `"key baz not + found"` + + @throw out_of_range.405 if JSON pointer has no parent ("add", "remove", + "move") + + @throw other_error.501 if "test" operation was unsuccessful + + @complexity Linear in the size of the JSON value and the length of the + JSON patch. As usually only a fraction of the JSON value is affected by + the patch, the complexity can usually be neglected. + + @liveexample{The following code shows how a JSON patch is applied to a + value.,patch} + + @sa @ref diff -- create a JSON patch by comparing two JSON values + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + @sa [RFC 6901 (JSON Pointer)](https://tools.ietf.org/html/rfc6901) + + @since version 2.0.0 + */ + basic_json patch(const basic_json& json_patch) const + { + // make a working copy to apply the patch to + basic_json result = *this; + + // the valid JSON Patch operations + enum class patch_operations {add, remove, replace, move, copy, test, invalid}; + + const auto get_op = [](const std::string & op) + { + if (op == "add") + { + return patch_operations::add; + } + if (op == "remove") + { + return patch_operations::remove; + } + if (op == "replace") + { + return patch_operations::replace; + } + if (op == "move") + { + return patch_operations::move; + } + if (op == "copy") + { + return patch_operations::copy; + } + if (op == "test") + { + return patch_operations::test; + } + + return patch_operations::invalid; + }; + + // wrapper for "add" operation; add value at ptr + const auto operation_add = [&result](json_pointer & ptr, basic_json val) + { + // adding to the root of the target document means replacing it + if (ptr.is_root()) + { + result = val; + } + else + { + // make sure the top element of the pointer exists + json_pointer top_pointer = ptr.top(); + if (top_pointer != ptr) + { + result.at(top_pointer); + } + + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.pop_back(); + basic_json& parent = result[ptr]; + + switch (parent.m_type) + { + case value_t::null: + case value_t::object: + { + // use operator[] to add value + parent[last_path] = val; + break; + } + + case value_t::array: + { + if (last_path == "-") + { + // special case: append to back + parent.push_back(val); + } + else + { + const auto idx = json_pointer::array_index(last_path); + if (JSON_UNLIKELY(static_cast<size_type>(idx) > parent.size())) + { + // avoid undefined behavior + JSON_THROW(out_of_range::create(401, "array index " + std::to_string(idx) + " is out of range")); + } + else + { + // default case: insert add offset + parent.insert(parent.begin() + static_cast<difference_type>(idx), val); + } + } + break; + } + + default: + { + // if there exists a parent it cannot be primitive + assert(false); // LCOV_EXCL_LINE + } + } + } + }; + + // wrapper for "remove" operation; remove value at ptr + const auto operation_remove = [&result](json_pointer & ptr) + { + // get reference to parent of JSON pointer ptr + const auto last_path = ptr.pop_back(); + basic_json& parent = result.at(ptr); + + // remove child + if (parent.is_object()) + { + // perform range check + auto it = parent.find(last_path); + if (JSON_LIKELY(it != parent.end())) + { + parent.erase(it); + } + else + { + JSON_THROW(out_of_range::create(403, "key '" + last_path + "' not found")); + } + } + else if (parent.is_array()) + { + // note erase performs range check + parent.erase(static_cast<size_type>(json_pointer::array_index(last_path))); + } + }; + + // type check: top level value must be an array + if (JSON_UNLIKELY(not json_patch.is_array())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // iterate and apply the operations + for (const auto& val : json_patch) + { + // wrapper to get a value for an operation + const auto get_value = [&val](const std::string & op, + const std::string & member, + bool string_type) -> basic_json& + { + // find value + auto it = val.m_value.object->find(member); + + // context-sensitive error message + const auto error_msg = (op == "op") ? "operation" : "operation '" + op + "'"; + + // check if desired value is present + if (JSON_UNLIKELY(it == val.m_value.object->end())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have member '" + member + "'")); + } + + // check if result is of type string + if (JSON_UNLIKELY(string_type and not it->second.is_string())) + { + JSON_THROW(parse_error::create(105, 0, error_msg + " must have string member '" + member + "'")); + } + + // no error: return value + return it->second; + }; + + // type check: every element of the array must be an object + if (JSON_UNLIKELY(not val.is_object())) + { + JSON_THROW(parse_error::create(104, 0, "JSON patch must be an array of objects")); + } + + // collect mandatory members + const std::string op = get_value("op", "op", true); + const std::string path = get_value(op, "path", true); + json_pointer ptr(path); + + switch (get_op(op)) + { + case patch_operations::add: + { + operation_add(ptr, get_value("add", "value", false)); + break; + } + + case patch_operations::remove: + { + operation_remove(ptr); + break; + } + + case patch_operations::replace: + { + // the "path" location must exist - use at() + result.at(ptr) = get_value("replace", "value", false); + break; + } + + case patch_operations::move: + { + const std::string from_path = get_value("move", "from", true); + json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The move operation is functionally identical to a + // "remove" operation on the "from" location, followed + // immediately by an "add" operation at the target + // location with the value that was just removed. + operation_remove(from_ptr); + operation_add(ptr, v); + break; + } + + case patch_operations::copy: + { + const std::string from_path = get_value("copy", "from", true); + const json_pointer from_ptr(from_path); + + // the "from" location must exist - use at() + basic_json v = result.at(from_ptr); + + // The copy is functionally identical to an "add" + // operation at the target location using the value + // specified in the "from" member. + operation_add(ptr, v); + break; + } + + case patch_operations::test: + { + bool success = false; + JSON_TRY + { + // check if "value" matches the one at "path" + // the "path" location must exist - use at() + success = (result.at(ptr) == get_value("test", "value", false)); + } + JSON_CATCH (out_of_range&) + { + // ignore out of range errors: success remains false + } + + // throw an exception if test fails + if (JSON_UNLIKELY(not success)) + { + JSON_THROW(other_error::create(501, "unsuccessful: " + val.dump())); + } + + break; + } + + case patch_operations::invalid: + { + // op must be "add", "remove", "replace", "move", "copy", or + // "test" + JSON_THROW(parse_error::create(105, 0, "operation value '" + op + "' is invalid")); + } + } + } + + return result; + } + + /*! + @brief creates a diff as a JSON patch + + Creates a [JSON Patch](http://jsonpatch.com) so that value @a source can + be changed into the value @a target by calling @ref patch function. + + @invariant For two JSON values @a source and @a target, the following code + yields always `true`: + @code {.cpp} + source.patch(diff(source, target)) == target; + @endcode + + @note Currently, only `remove`, `add`, and `replace` operations are + generated. + + @param[in] source JSON value to compare from + @param[in] target JSON value to compare against + @param[in] path helper value to create JSON pointers + + @return a JSON patch to convert the @a source to @a target + + @complexity Linear in the lengths of @a source and @a target. + + @liveexample{The following code shows how a JSON patch is created as a + diff for two JSON values.,diff} + + @sa @ref patch -- apply a JSON patch + + @sa [RFC 6902 (JSON Patch)](https://tools.ietf.org/html/rfc6902) + + @since version 2.0.0 + */ + static basic_json diff(const basic_json& source, const basic_json& target, + const std::string& path = "") + { + // the patch + basic_json result(value_t::array); + + // if the values are the same, return empty patch + if (source == target) + { + return result; + } + + if (source.type() != target.type()) + { + // different types: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + } + else + { + switch (source.type()) + { + case value_t::array: + { + // first pass: traverse common elements + std::size_t i = 0; + while (i < source.size() and i < target.size()) + { + // recursive call to compare array values at index i + auto temp_diff = diff(source[i], target[i], path + "/" + std::to_string(i)); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + ++i; + } + + // i now reached the end of at least one array + // in a second pass, traverse the remaining elements + + // remove my remaining elements + const auto end_index = static_cast<difference_type>(result.size()); + while (i < source.size()) + { + // add operations in reverse order to avoid invalid + // indices + result.insert(result.begin() + end_index, object( + { + {"op", "remove"}, + {"path", path + "/" + std::to_string(i)} + })); + ++i; + } + + // add other remaining elements + while (i < target.size()) + { + result.push_back( + { + {"op", "add"}, + {"path", path + "/" + std::to_string(i)}, + {"value", target[i]} + }); + ++i; + } + + break; + } + + case value_t::object: + { + // first pass: traverse this object's elements + for (auto it = source.cbegin(); it != source.cend(); ++it) + { + // escape the key name to be used in a JSON patch + const auto key = json_pointer::escape(it.key()); + + if (target.find(it.key()) != target.end()) + { + // recursive call to compare object values at key it + auto temp_diff = diff(it.value(), target[it.key()], path + "/" + key); + result.insert(result.end(), temp_diff.begin(), temp_diff.end()); + } + else + { + // found a key that is not in o -> remove it + result.push_back(object( + { + {"op", "remove"}, {"path", path + "/" + key} + })); + } + } + + // second pass: traverse other object's elements + for (auto it = target.cbegin(); it != target.cend(); ++it) + { + if (source.find(it.key()) == source.end()) + { + // found a key that is not in this -> add it + const auto key = json_pointer::escape(it.key()); + result.push_back( + { + {"op", "add"}, {"path", path + "/" + key}, + {"value", it.value()} + }); + } + } + + break; + } + + default: + { + // both primitive type: replace value + result.push_back( + { + {"op", "replace"}, {"path", path}, {"value", target} + }); + break; + } + } + } + + return result; + } + + /// @} +}; + +///////////// +// presets // +///////////// + +/*! +@brief default JSON class + +This type is the default specialization of the @ref basic_json class which +uses the standard template types. + +@since version 1.0.0 +*/ +using json = basic_json<>; + +////////////////// +// json_pointer // +////////////////// + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_and_create(NLOHMANN_BASIC_JSON_TPL& j) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + auto result = &j; + + // in case no reference tokens exist, return a reference to the JSON value + // j which will be overwritten by a primitive value + for (const auto& reference_token : reference_tokens) + { + switch (result->m_type) + { + case detail::value_t::null: + { + if (reference_token == "0") + { + // start a new array if reference token is 0 + result = &result->operator[](0); + } + else + { + // start a new object otherwise + result = &result->operator[](reference_token); + } + break; + } + + case detail::value_t::object: + { + // create an entry in the object + result = &result->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // create an entry in the array + JSON_TRY + { + result = &result->operator[](static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + /* + The following code is only reached if there exists a reference + token _and_ the current value is primitive. In this case, we have + an error situation, because primitive values may only occur as + single value; that is, with an empty list of reference tokens. + */ + default: + JSON_THROW(detail::type_error::create(313, "invalid value to unflatten")); + } + } + + return *result; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_unchecked(NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + // convert null values to arrays or objects before continuing + if (ptr->m_type == detail::value_t::null) + { + // check if reference token is a number + const bool nums = + std::all_of(reference_token.begin(), reference_token.end(), + [](const char x) + { + return (x >= '0' and x <= '9'); + }); + + // change value to array for numbers or "-" or to object otherwise + *ptr = (nums or reference_token == "-") + ? detail::value_t::array + : detail::value_t::object; + } + + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + if (reference_token == "-") + { + // explicitly treat "-" as index beyond the end + ptr = &ptr->operator[](ptr->m_value.array->size()); + } + else + { + // convert array index to number; unchecked access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_checked(NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +const NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_unchecked(const NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // use unchecked object access + ptr = &ptr->operator[](reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" cannot be used for const access + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // use unchecked array access + JSON_TRY + { + ptr = &ptr->operator[]( + static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +const NLOHMANN_BASIC_JSON_TPL& +json_pointer::get_checked(const NLOHMANN_BASIC_JSON_TPL* ptr) const +{ + using size_type = typename NLOHMANN_BASIC_JSON_TPL::size_type; + for (const auto& reference_token : reference_tokens) + { + switch (ptr->m_type) + { + case detail::value_t::object: + { + // note: at performs range check + ptr = &ptr->at(reference_token); + break; + } + + case detail::value_t::array: + { + if (JSON_UNLIKELY(reference_token == "-")) + { + // "-" always fails the range check + JSON_THROW(detail::out_of_range::create(402, + "array index '-' (" + std::to_string(ptr->m_value.array->size()) + + ") is out of range")); + } + + // error condition (cf. RFC 6901, Sect. 4) + if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0')) + { + JSON_THROW(detail::parse_error::create(106, 0, + "array index '" + reference_token + + "' must not begin with '0'")); + } + + // note: at performs range check + JSON_TRY + { + ptr = &ptr->at(static_cast<size_type>(array_index(reference_token))); + } + JSON_CATCH(std::invalid_argument&) + { + JSON_THROW(detail::parse_error::create(109, 0, "array index '" + reference_token + "' is not a number")); + } + break; + } + + default: + JSON_THROW(detail::out_of_range::create(404, "unresolved reference token '" + reference_token + "'")); + } + } + + return *ptr; +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +void json_pointer::flatten(const std::string& reference_string, + const NLOHMANN_BASIC_JSON_TPL& value, + NLOHMANN_BASIC_JSON_TPL& result) +{ + switch (value.m_type) + { + case detail::value_t::array: + { + if (value.m_value.array->empty()) + { + // flatten empty array as null + result[reference_string] = nullptr; + } + else + { + // iterate array and use index as reference string + for (std::size_t i = 0; i < value.m_value.array->size(); ++i) + { + flatten(reference_string + "/" + std::to_string(i), + value.m_value.array->operator[](i), result); + } + } + break; + } + + case detail::value_t::object: + { + if (value.m_value.object->empty()) + { + // flatten empty object as null + result[reference_string] = nullptr; + } + else + { + // iterate object and use keys as reference string + for (const auto& element : *value.m_value.object) + { + flatten(reference_string + "/" + escape(element.first), element.second, result); + } + } + break; + } + + default: + { + // add primitive value with its reference string + result[reference_string] = value; + break; + } + } +} + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +NLOHMANN_BASIC_JSON_TPL +json_pointer::unflatten(const NLOHMANN_BASIC_JSON_TPL& value) +{ + if (JSON_UNLIKELY(not value.is_object())) + { + JSON_THROW(detail::type_error::create(314, "only objects can be unflattened")); + } + + NLOHMANN_BASIC_JSON_TPL result; + + // iterate the JSON object values + for (const auto& element : *value.m_value.object) + { + if (JSON_UNLIKELY(not element.second.is_primitive())) + { + JSON_THROW(detail::type_error::create(315, "values in object must be primitive")); + } + + // assign value to reference pointed to by JSON pointer; Note that if + // the JSON pointer is "" (i.e., points to the whole value), function + // get_and_create returns a reference to result itself. An assignment + // will then create a primitive value. + json_pointer(element.first).get_and_create(result) = element.second; + } + + return result; +} + +inline bool operator==(json_pointer const& lhs, json_pointer const& rhs) noexcept +{ + return (lhs.reference_tokens == rhs.reference_tokens); +} + +inline bool operator!=(json_pointer const& lhs, json_pointer const& rhs) noexcept +{ + return not (lhs == rhs); +} +} // namespace nlohmann + + +/////////////////////// +// nonmember support // +/////////////////////// + +// specialization of std::swap, and std::hash +namespace std +{ +/*! +@brief exchanges the values of two JSON objects + +@since version 1.0.0 +*/ +template<> +inline void swap(nlohmann::json& j1, + nlohmann::json& j2) noexcept( + is_nothrow_move_constructible<nlohmann::json>::value and + is_nothrow_move_assignable<nlohmann::json>::value + ) +{ + j1.swap(j2); +} + +/// hash value for JSON objects +template<> +struct hash<nlohmann::json> +{ + /*! + @brief return a hash value for a JSON object + + @since version 1.0.0 + */ + std::size_t operator()(const nlohmann::json& j) const + { + // a naive hashing via the string representation + const auto& h = hash<nlohmann::json::string_t>(); + return h(j.dump()); + } +}; + +/// specialization for std::less<value_t> +/// @note: do not remove the space after '<', +/// see https://github.com/nlohmann/json/pull/679 +template<> +struct less< ::nlohmann::detail::value_t> +{ + /*! + @brief compare two value_t enum values + @since version 3.0.0 + */ + bool operator()(nlohmann::detail::value_t lhs, + nlohmann::detail::value_t rhs) const noexcept + { + return nlohmann::detail::operator<(lhs, rhs); + } +}; + +} // namespace std + +/*! +@brief user-defined string literal for JSON values + +This operator implements a user-defined string literal for JSON objects. It +can be used by adding `"_json"` to a string literal and returns a JSON object +if no parse error occurred. + +@param[in] s a string representation of a JSON object +@param[in] n the length of string @a s +@return a JSON object + +@since version 1.0.0 +*/ +inline nlohmann::json operator "" _json(const char* s, std::size_t n) +{ + return nlohmann::json::parse(s, s + n); +} + +/*! +@brief user-defined string literal for JSON pointer + +This operator implements a user-defined string literal for JSON Pointers. It +can be used by adding `"_json_pointer"` to a string literal and returns a JSON pointer +object if no parse error occurred. + +@param[in] s a string representation of a JSON Pointer +@param[in] n the length of string @a s +@return a JSON pointer object + +@since version 2.0.0 +*/ +inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) +{ + return nlohmann::json::json_pointer(std::string(s, n)); +} + +// restore GCC/clang diagnostic settings +#if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) + #pragma GCC diagnostic pop +#endif +#if defined(__clang__) + #pragma GCC diagnostic pop +#endif + +// clean up +#undef JSON_CATCH +#undef JSON_THROW +#undef JSON_TRY +#undef JSON_LIKELY +#undef JSON_UNLIKELY +#undef JSON_DEPRECATED +#undef NLOHMANN_BASIC_JSON_TPL_DECLARATION +#undef NLOHMANN_BASIC_JSON_TPL + +#endif diff --git a/modules/Communication/PlatoonProtocolLib/src/FollowerVehicle.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/src/FollowerVehicle.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/src/FollowerVehicle.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/src/FollowerVehicle.cpp diff --git a/modules/Communication/PlatoonProtocolLib/src/LeaderVehicle.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/src/LeaderVehicle.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/src/LeaderVehicle.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/src/LeaderVehicle.cpp diff --git a/modules/Communication/PlatoonProtocolLib/src/PlatoonProtocolLibConfig.h.in b/modules/catkin_ws/src/PlatoonProtocolLib/src/PlatoonProtocolLibConfig.h.in similarity index 100% rename from modules/Communication/PlatoonProtocolLib/src/PlatoonProtocolLibConfig.h.in rename to modules/catkin_ws/src/PlatoonProtocolLib/src/PlatoonProtocolLibConfig.h.in diff --git a/modules/Communication/PlatoonProtocolLib/src/Protocol.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/src/Protocol.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/src/Protocol.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/src/Protocol.cpp diff --git a/modules/Communication/PlatoonProtocolLib/src/Vehicle.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/src/Vehicle.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/src/Vehicle.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/src/Vehicle.cpp diff --git a/modules/Communication/PlatoonProtocolLib/src/VehicleEndpoint.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/src/VehicleEndpoint.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/src/VehicleEndpoint.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/src/VehicleEndpoint.cpp diff --git a/modules/Communication/PlatoonProtocolLib/test/Main.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/test/Main.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/test/Main.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/test/Main.cpp diff --git a/modules/Communication/PlatoonProtocolLib/test/ProtocolTest.cpp b/modules/catkin_ws/src/PlatoonProtocolLib/test/ProtocolTest.cpp similarity index 100% rename from modules/Communication/PlatoonProtocolLib/test/ProtocolTest.cpp rename to modules/catkin_ws/src/PlatoonProtocolLib/test/ProtocolTest.cpp diff --git a/modules/Communication/PlatoonProtocolLib/test/ProtocolTest.h b/modules/catkin_ws/src/PlatoonProtocolLib/test/ProtocolTest.h similarity index 100% rename from modules/Communication/PlatoonProtocolLib/test/ProtocolTest.h rename to modules/catkin_ws/src/PlatoonProtocolLib/test/ProtocolTest.h diff --git a/modules/catkin_ws/src/car/CMakeLists.txt b/modules/catkin_ws/src/car/CMakeLists.txt index 6d36938f2589caf1b7231d31a9218a13164eca4e..2847e81ed880604caa05c7d67940e4089d6a06a6 100644 --- a/modules/catkin_ws/src/car/CMakeLists.txt +++ b/modules/catkin_ws/src/car/CMakeLists.txt @@ -59,9 +59,11 @@ set(MAIN_NODE_SOURCE_FILES src/mainNode/NotifiableThread.cpp src/mainNode/PlatoonController.cpp) -find_package(NetworkingLib REQUIRED) -find_package(PlatoonProtocolLib REQUIRED) -find_package(PC2CarLib REQUIRED) +set(LOCAL_INSTALL_DIR ${CMAKE_CURRENT_LIST_DIR}/../../install) + +find_package(NetworkingLib REQUIRED CONFIG PATHS ${LOCAL_INSTALL_DIR}) +find_package(PlatoonProtocolLib REQUIRED CONFIG PATHS ${LOCAL_INSTALL_DIR}) +find_package(PC2CarLib REQUIRED CONFIG PATHS ${LOCAL_INSTALL_DIR}) add_library(main_node ${MAIN_NODE_SOURCE_FILES}) add_dependencies(main_node ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp) @@ -71,6 +73,10 @@ target_link_libraries(main_node NetworkingLib PlatoonProtocolLib PC2CarLib) +target_include_directories(main_node PUBLIC + ${NETWORKINGLIB_INCLUDE_DIRS} + ${PLATOON_PROTOCOL_LIB_INCLUDE_DIRS} + ${PC2CARLIB_INCLUDE_DIRS}) add_library(environment src/environment/environment.cpp) add_dependencies(environment ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CATKIN_IGNORE b/modules/catkin_ws/src/protocol/cmake-build-debug/CATKIN_IGNORE deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeCache.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeCache.txt deleted file mode 100644 index ed01d9cbd9000d02f155d24b472491817db3b114..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeCache.txt +++ /dev/null @@ -1,542 +0,0 @@ -# This is the CMakeCache file. -# For build in directory: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug -# It was generated by CMake: /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -# You can edit this file to change values found and used by cmake. -# If you do not want to change any of the values, simply exit the editor. -# If you do want to change a value, simply edit, save, and exit the editor. -# The syntax for the file is as follows: -# KEY:TYPE=VALUE -# KEY is the name of a variable in the cache. -# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. -# VALUE is the current value for the KEY. - -######################## -# EXTERNAL cache entries -######################## - -//Build shared libraries (DLLs). -BUILD_SHARED_LIBS:BOOL=ON - -//Catkin enable testing -CATKIN_ENABLE_TESTING:BOOL=ON - -//Prefix to apply to package generated via gendebian -CATKIN_PACKAGE_PREFIX:STRING= - -//Catkin skip testing -CATKIN_SKIP_TESTING:BOOL=OFF - -//Path to a program. -CMAKE_AR:FILEPATH=/usr/bin/ar - -//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or -// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. -CMAKE_BUILD_TYPE:STRING=Debug - -//The CodeBlocks executable -CMAKE_CODEBLOCKS_EXECUTABLE:FILEPATH=CMAKE_CODEBLOCKS_EXECUTABLE-NOTFOUND - -//Additional command line arguments when CodeBlocks invokes make. -// Enter e.g. -j<some_number> to get parallel builds -CMAKE_CODEBLOCKS_MAKE_ARGUMENTS:STRING=-j4 - -//Enable/Disable color output during build. -CMAKE_COLOR_MAKEFILE:BOOL=ON - -//CXX compiler -CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ - -//A wrapper around 'ar' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-5 - -//A wrapper around 'ranlib' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-5 - -//Flags used by the compiler during all build types. -CMAKE_CXX_FLAGS:STRING= - -//Flags used by the compiler during debug builds. -CMAKE_CXX_FLAGS_DEBUG:STRING=-g - -//Flags used by the compiler during release builds for minimum -// size. -CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG - -//Flags used by the compiler during release builds. -CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG - -//Flags used by the compiler during release builds with debug info. -CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG - -//C compiler -CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc - -//A wrapper around 'ar' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-5 - -//A wrapper around 'ranlib' adding the appropriate '--plugin' option -// for the GCC compiler -CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-5 - -//Flags used by the compiler during all build types. -CMAKE_C_FLAGS:STRING= - -//Flags used by the compiler during debug builds. -CMAKE_C_FLAGS_DEBUG:STRING=-g - -//Flags used by the compiler during release builds for minimum -// size. -CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG - -//Flags used by the compiler during release builds. -CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG - -//Flags used by the compiler during release builds with debug info. -CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG - -//Flags used by the linker. -CMAKE_EXE_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//Enable/Disable output of compile commands during generation. -CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF - -//Install path prefix, prepended onto install directories. -CMAKE_INSTALL_PREFIX:PATH=/usr/local - -//Path to a program. -CMAKE_LINKER:FILEPATH=/usr/bin/ld - -//Path to a program. -CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make - -//Flags used by the linker during the creation of modules. -CMAKE_MODULE_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//Path to a program. -CMAKE_NM:FILEPATH=/usr/bin/nm - -//Path to a program. -CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy - -//Path to a program. -CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump - -//Value Computed by CMake -CMAKE_PROJECT_NAME:STATIC=protocol - -//Path to a program. -CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib - -//Flags used by the linker during the creation of dll's. -CMAKE_SHARED_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//If set, runtime paths are not added when installing shared libraries, -// but are added when building. -CMAKE_SKIP_INSTALL_RPATH:BOOL=NO - -//If set, runtime paths are not added when using shared libraries. -CMAKE_SKIP_RPATH:BOOL=NO - -//Flags used by the linker during the creation of static libraries. -CMAKE_STATIC_LINKER_FLAGS:STRING= - -//Flags used by the linker during debug builds. -CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= - -//Flags used by the linker during release minsize builds. -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= - -//Flags used by the linker during release builds. -CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= - -//Flags used by the linker during Release with Debug Info builds. -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= - -//Path to a program. -CMAKE_STRIP:FILEPATH=/usr/bin/strip - -//If this value is on, makefiles will be generated without the -// .SILENT directive, and all commands will be echoed to the console -// during the make. This is useful for debugging only. With Visual -// Studio IDE projects all commands are done without /nologo. -CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE - -//Path to a program. -DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND - -//Path to a program. -EMPY_EXECUTABLE:FILEPATH=/usr/bin/empy - -//Empy script -EMPY_SCRIPT:STRING=/usr/bin/empy - -//Path to a file. -GTEST_INCLUDE_DIR:PATH=/usr/include - -//Path to a library. -GTEST_LIBRARY:FILEPATH=GTEST_LIBRARY-NOTFOUND - -//Path to a library. -GTEST_LIBRARY_DEBUG:FILEPATH=GTEST_LIBRARY_DEBUG-NOTFOUND - -//Path to a library. -GTEST_MAIN_LIBRARY:FILEPATH=GTEST_MAIN_LIBRARY-NOTFOUND - -//Path to a library. -GTEST_MAIN_LIBRARY_DEBUG:FILEPATH=GTEST_MAIN_LIBRARY_DEBUG-NOTFOUND - -//lsb_release executable was found -LSB_FOUND:BOOL=TRUE - -//Path to a program. -LSB_RELEASE_EXECUTABLE:FILEPATH=/usr/bin/lsb_release - -//Path to a program. -NOSETESTS:FILEPATH=/usr/bin/nosetests-2.7 - -//Path to a program. -PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python - -//Specify specific Python version to use ('major.minor' or 'major') -PYTHON_VERSION:STRING= - -//Path to a program. -ProcessorCount_cmd_getconf:FILEPATH=/usr/bin/getconf - -//Path to a program. -ProcessorCount_cmd_sysctl:FILEPATH=/sbin/sysctl - -//Path to a library. -RT_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/librt.so - -//Enable debian style python package layout -SETUPTOOLS_DEB_LAYOUT:BOOL=ON - -//LSB Distrib tag -UBUNTU:BOOL=TRUE - -//LSB Distrib - codename tag -UBUNTU_XENIAL:BOOL=TRUE - -//Path to a file. -_CATKIN_GTEST_INCLUDE:FILEPATH=/usr/include/gtest/gtest.h - -//Path to a file. -_CATKIN_GTEST_SRC:FILEPATH=/usr/src/gtest/src/gtest.cc - -//The directory containing a CMake configuration file for catkin. -catkin_DIR:PATH=/opt/ros/kinetic/share/catkin/cmake - -//The directory containing a CMake configuration file for cpp_common. -cpp_common_DIR:PATH=/opt/ros/kinetic/share/cpp_common/cmake - -//The directory containing a CMake configuration file for gencpp. -gencpp_DIR:PATH=/opt/ros/kinetic/share/gencpp/cmake - -//The directory containing a CMake configuration file for geneus. -geneus_DIR:PATH=/opt/ros/kinetic/share/geneus/cmake - -//The directory containing a CMake configuration file for genlisp. -genlisp_DIR:PATH=/opt/ros/kinetic/share/genlisp/cmake - -//The directory containing a CMake configuration file for genmsg. -genmsg_DIR:PATH=/opt/ros/kinetic/share/genmsg/cmake - -//The directory containing a CMake configuration file for gennodejs. -gennodejs_DIR:PATH=/opt/ros/kinetic/share/gennodejs/cmake - -//The directory containing a CMake configuration file for genpy. -genpy_DIR:PATH=/opt/ros/kinetic/share/genpy/cmake - -//Value Computed by CMake -gtest_BINARY_DIR:STATIC=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest - -//Dependencies for the target -gtest_LIB_DEPENDS:STATIC=general;-lpthread; - -//Value Computed by CMake -gtest_SOURCE_DIR:STATIC=/usr/src/gtest - -//Build gtest's sample programs. -gtest_build_samples:BOOL=OFF - -//Build all of gtest's own tests. -gtest_build_tests:BOOL=OFF - -//Disable uses of pthreads in gtest. -gtest_disable_pthreads:BOOL=OFF - -//Use shared (DLL) run-time lib even when Google Test is built -// as static lib. -gtest_force_shared_crt:BOOL=OFF - -//Dependencies for the target -gtest_main_LIB_DEPENDS:STATIC=general;-lpthread;general;gtest; - -//Path to a library. -lib:FILEPATH=/opt/ros/kinetic/lib/libxmlrpcpp.so - -//The directory containing a CMake configuration file for message_generation. -message_generation_DIR:PATH=/opt/ros/kinetic/share/message_generation/cmake - -//The directory containing a CMake configuration file for message_runtime. -message_runtime_DIR:PATH=/opt/ros/kinetic/share/message_runtime/cmake - -//Value Computed by CMake -protocol_BINARY_DIR:STATIC=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug - -//Value Computed by CMake -protocol_SOURCE_DIR:STATIC=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol - -//The directory containing a CMake configuration file for rosconsole. -rosconsole_DIR:PATH=/opt/ros/kinetic/share/rosconsole/cmake - -//The directory containing a CMake configuration file for roscpp. -roscpp_DIR:PATH=/opt/ros/kinetic/share/roscpp/cmake - -//The directory containing a CMake configuration file for roscpp_serialization. -roscpp_serialization_DIR:PATH=/opt/ros/kinetic/share/roscpp_serialization/cmake - -//The directory containing a CMake configuration file for roscpp_traits. -roscpp_traits_DIR:PATH=/opt/ros/kinetic/share/roscpp_traits/cmake - -//The directory containing a CMake configuration file for rosgraph_msgs. -rosgraph_msgs_DIR:PATH=/opt/ros/kinetic/share/rosgraph_msgs/cmake - -//The directory containing a CMake configuration file for rostime. -rostime_DIR:PATH=/opt/ros/kinetic/share/rostime/cmake - -//The directory containing a CMake configuration file for std_msgs. -std_msgs_DIR:PATH=/opt/ros/kinetic/share/std_msgs/cmake - -//The directory containing a CMake configuration file for xmlrpcpp. -xmlrpcpp_DIR:PATH=/opt/ros/kinetic/share/xmlrpcpp/cmake - - -######################## -# INTERNAL cache entries -######################## - -//catkin environment -CATKIN_ENV:INTERNAL=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/env_cached.sh -CATKIN_TEST_RESULTS_DIR:INTERNAL=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/test_results -//ADVANCED property for variable: CMAKE_AR -CMAKE_AR-ADVANCED:INTERNAL=1 -//This is the directory where this CMakeCache.txt was created -CMAKE_CACHEFILE_DIR:INTERNAL=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug -//Major version of cmake used to create the current loaded cache -CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 -//Minor version of cmake used to create the current loaded cache -CMAKE_CACHE_MINOR_VERSION:INTERNAL=9 -//Patch version of cmake used to create the current loaded cache -CMAKE_CACHE_PATCH_VERSION:INTERNAL=6 -//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE -CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 -//Path to CMake executable. -CMAKE_COMMAND:INTERNAL=/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -//Path to cpack program executable. -CMAKE_CPACK_COMMAND:INTERNAL=/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cpack -//Path to ctest program executable. -CMAKE_CTEST_COMMAND:INTERNAL=/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/ctest -//ADVANCED property for variable: CMAKE_CXX_COMPILER -CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR -CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB -CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS -CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG -CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL -CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE -CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO -CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_COMPILER -CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_COMPILER_AR -CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB -CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS -CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG -CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL -CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE -CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO -CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//Executable file format -CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS -CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG -CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL -CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE -CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS -CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 -//Name of external makefile project generator. -CMAKE_EXTRA_GENERATOR:INTERNAL=CodeBlocks -//CXX compiler system defined macros -CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS:INTERNAL=__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;5;__GNUC_MINOR__;4;__GNUC_PATCHLEVEL__; ;__VERSION__;"5.4.0 20160609";__ATOMIC_RELAXED; ;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__FINITE_MATH_ONLY__; ;_LP64;1;__LP64__;1;__SIZEOF_INT__;4;__SIZEOF_LONG__;8;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long unsigned int;__PTRDIFF_TYPE__;long int;__WCHAR_TYPE__;int;__WINT_TYPE__;unsigned int;__INTMAX_TYPE__;long int;__UINTMAX_TYPE__;long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;long int;__INT_FAST32_TYPE__;long int;__INT_FAST64_TYPE__;long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;long unsigned int;__UINT_FAST32_TYPE__;long unsigned int;__UINT_FAST64_TYPE__;long unsigned int;__INTPTR_TYPE__;long int;__UINTPTR_TYPE__;long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1009;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffffffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0x7fffffff;__WCHAR_MIN__;(-__WCHAR_MAX__ - 1);__WINT_MAX__;0xffffffffU;__WINT_MIN__;0U;__PTRDIFF_MAX__;0x7fffffffffffffffL;__SIZE_MAX__;0xffffffffffffffffUL;__INTMAX_MAX__;0x7fffffffffffffffL;__INTMAX_C(c);c ## L;__UINTMAX_MAX__;0xffffffffffffffffUL;__UINTMAX_C(c);c ## UL;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffUL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST64_MAX__;0x7fffffffffffffffL;__INT64_C(c);c ## L;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffUL;__UINT64_C(c);c ## UL;__INT_FAST8_MAX__;0x7f;__INT_FAST16_MAX__;0x7fffffffffffffffL;__INT_FAST32_MAX__;0x7fffffffffffffffL;__INT_FAST64_MAX__;0x7fffffffffffffffL;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffffffffffffffffUL;__UINT_FAST32_MAX__;0xffffffffffffffffUL;__UINT_FAST64_MAX__;0xffffffffffffffffUL;__INTPTR_MAX__;0x7fffffffffffffffL;__UINTPTR_MAX__;0xffffffffffffffffUL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__; ;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859812e+38F;__FLT_MIN__;1.17549435082228750797e-38F;__FLT_EPSILON__;1.19209289550781250000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570815e+308L);__DBL_MIN__;((double)2.22507385850720138309e-308L);__DBL_EPSILON__;((double)2.22044604925031308085e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544177e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502e+4932L;__LDBL_MIN__;3.36210314311209350626e-4932L;__LDBL_EPSILON__;1.08420217248550443401e-19L;__LDBL_DENORM_MIN__;3.64519953188247460253e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__GCC_HAVE_DWARF2_CFI_ASM;1;__PRAGMA_REDEFINE_EXTNAME;1;__SSP_STRONG__;3;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;4;__SIZEOF_WINT_T__;4;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__k8;1;__k8__;1;__code_model_small__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__gnu_linux__;1;__linux;1;__linux__;1;linux;1;__unix;1;__unix__;1;unix;1;__ELF__;1;__DECIMAL_BID_FORMAT__;1;_STDC_PREDEF_H;1;__STDC_IEC_559__;1;__STDC_IEC_559_COMPLEX__;1;__STDC_ISO_10646__;201505L;__STDC_NO_THREADS__;1;__STDC__;1;__cplusplus;199711L;__STDC_HOSTED__;1;__GNUC__;5;__GNUC_MINOR__;4;__GNUC_PATCHLEVEL__; ;__VERSION__;"5.4.0 20160609";__ATOMIC_RELAXED; ;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__FINITE_MATH_ONLY__; ;_LP64;1;__LP64__;1;__SIZEOF_INT__;4;__SIZEOF_LONG__;8;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__GNUG__;5;__SIZE_TYPE__;long unsigned int;__PTRDIFF_TYPE__;long int;__WCHAR_TYPE__;int;__WINT_TYPE__;unsigned int;__INTMAX_TYPE__;long int;__UINTMAX_TYPE__;long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;long int;__INT_FAST32_TYPE__;long int;__INT_FAST64_TYPE__;long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;long unsigned int;__UINT_FAST32_TYPE__;long unsigned int;__UINT_FAST64_TYPE__;long unsigned int;__INTPTR_TYPE__;long int;__UINTPTR_TYPE__;long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_WEAK__;1;__DEPRECATED;1;__GXX_RTTI;1;__cpp_rtti;199711;__cpp_binary_literals;201304;__cpp_runtime_arrays;198712;__EXCEPTIONS;1;__cpp_exceptions;199711;__GXX_ABI_VERSION;1009;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffffffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0x7fffffff;__WCHAR_MIN__;(-__WCHAR_MAX__ - 1);__WINT_MAX__;0xffffffffU;__WINT_MIN__;0U;__PTRDIFF_MAX__;0x7fffffffffffffffL;__SIZE_MAX__;0xffffffffffffffffUL;__GLIBCXX_TYPE_INT_N_0;__int128;__GLIBCXX_BITSIZE_INT_N_0;128;__INTMAX_MAX__;0x7fffffffffffffffL;__INTMAX_C(c);c ## L;__UINTMAX_MAX__;0xffffffffffffffffUL;__UINTMAX_C(c);c ## UL;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffUL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST64_MAX__;0x7fffffffffffffffL;__INT64_C(c);c ## L;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffUL;__UINT64_C(c);c ## UL;__INT_FAST8_MAX__;0x7f;__INT_FAST16_MAX__;0x7fffffffffffffffL;__INT_FAST32_MAX__;0x7fffffffffffffffL;__INT_FAST64_MAX__;0x7fffffffffffffffL;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffffffffffffffffUL;__UINT_FAST32_MAX__;0xffffffffffffffffUL;__UINT_FAST64_MAX__;0xffffffffffffffffUL;__INTPTR_MAX__;0x7fffffffffffffffL;__UINTPTR_MAX__;0xffffffffffffffffUL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__; ;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859812e+38F;__FLT_MIN__;1.17549435082228750797e-38F;__FLT_EPSILON__;1.19209289550781250000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;double(1.79769313486231570815e+308L);__DBL_MIN__;double(2.22507385850720138309e-308L);__DBL_EPSILON__;double(2.22044604925031308085e-16L);__DBL_DENORM_MIN__;double(4.94065645841246544177e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502e+4932L;__LDBL_MIN__;3.36210314311209350626e-4932L;__LDBL_EPSILON__;1.08420217248550443401e-19L;__LDBL_DENORM_MIN__;3.64519953188247460253e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_GNU_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__GCC_HAVE_DWARF2_CFI_ASM;1;__PRAGMA_REDEFINE_EXTNAME;1;__SSP_STRONG__;3;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;4;__SIZEOF_WINT_T__;4;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__k8;1;__k8__;1;__code_model_small__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__gnu_linux__;1;__linux;1;__linux__;1;linux;1;__unix;1;__unix__;1;unix;1;__ELF__;1;__DECIMAL_BID_FORMAT__;1;_GNU_SOURCE;1;_STDC_PREDEF_H;1;__STDC_IEC_559__;1;__STDC_IEC_559_COMPLEX__;1;__STDC_ISO_10646__;201505L;__STDC_NO_THREADS__;1 -//CXX compiler system include directories -CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS:INTERNAL=/usr/include/c++/5;/usr/include/x86_64-linux-gnu/c++/5;/usr/include/c++/5/backward;/usr/lib/gcc/x86_64-linux-gnu/5/include;/usr/local/include;/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed;/usr/include/x86_64-linux-gnu;/usr/include -//C compiler system defined macros -CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS:INTERNAL=__STDC__;1;__STDC_VERSION__;201112L;__STDC_UTF_16__;1;__STDC_UTF_32__;1;__STDC_HOSTED__;1;__GNUC__;5;__GNUC_MINOR__;4;__GNUC_PATCHLEVEL__; ;__VERSION__;"5.4.0 20160609";__ATOMIC_RELAXED; ;__ATOMIC_SEQ_CST;5;__ATOMIC_ACQUIRE;2;__ATOMIC_RELEASE;3;__ATOMIC_ACQ_REL;4;__ATOMIC_CONSUME;1;__FINITE_MATH_ONLY__; ;_LP64;1;__LP64__;1;__SIZEOF_INT__;4;__SIZEOF_LONG__;8;__SIZEOF_LONG_LONG__;8;__SIZEOF_SHORT__;2;__SIZEOF_FLOAT__;4;__SIZEOF_DOUBLE__;8;__SIZEOF_LONG_DOUBLE__;16;__SIZEOF_SIZE_T__;8;__CHAR_BIT__;8;__BIGGEST_ALIGNMENT__;16;__ORDER_LITTLE_ENDIAN__;1234;__ORDER_BIG_ENDIAN__;4321;__ORDER_PDP_ENDIAN__;3412;__BYTE_ORDER__;__ORDER_LITTLE_ENDIAN__;__FLOAT_WORD_ORDER__;__ORDER_LITTLE_ENDIAN__;__SIZEOF_POINTER__;8;__SIZE_TYPE__;long unsigned int;__PTRDIFF_TYPE__;long int;__WCHAR_TYPE__;int;__WINT_TYPE__;unsigned int;__INTMAX_TYPE__;long int;__UINTMAX_TYPE__;long unsigned int;__CHAR16_TYPE__;short unsigned int;__CHAR32_TYPE__;unsigned int;__SIG_ATOMIC_TYPE__;int;__INT8_TYPE__;signed char;__INT16_TYPE__;short int;__INT32_TYPE__;int;__INT64_TYPE__;long int;__UINT8_TYPE__;unsigned char;__UINT16_TYPE__;short unsigned int;__UINT32_TYPE__;unsigned int;__UINT64_TYPE__;long unsigned int;__INT_LEAST8_TYPE__;signed char;__INT_LEAST16_TYPE__;short int;__INT_LEAST32_TYPE__;int;__INT_LEAST64_TYPE__;long int;__UINT_LEAST8_TYPE__;unsigned char;__UINT_LEAST16_TYPE__;short unsigned int;__UINT_LEAST32_TYPE__;unsigned int;__UINT_LEAST64_TYPE__;long unsigned int;__INT_FAST8_TYPE__;signed char;__INT_FAST16_TYPE__;long int;__INT_FAST32_TYPE__;long int;__INT_FAST64_TYPE__;long int;__UINT_FAST8_TYPE__;unsigned char;__UINT_FAST16_TYPE__;long unsigned int;__UINT_FAST32_TYPE__;long unsigned int;__UINT_FAST64_TYPE__;long unsigned int;__INTPTR_TYPE__;long int;__UINTPTR_TYPE__;long unsigned int;__has_include(STR);__has_include__(STR);__has_include_next(STR);__has_include_next__(STR);__GXX_ABI_VERSION;1009;__SCHAR_MAX__;0x7f;__SHRT_MAX__;0x7fff;__INT_MAX__;0x7fffffff;__LONG_MAX__;0x7fffffffffffffffL;__LONG_LONG_MAX__;0x7fffffffffffffffLL;__WCHAR_MAX__;0x7fffffff;__WCHAR_MIN__;(-__WCHAR_MAX__ - 1);__WINT_MAX__;0xffffffffU;__WINT_MIN__;0U;__PTRDIFF_MAX__;0x7fffffffffffffffL;__SIZE_MAX__;0xffffffffffffffffUL;__INTMAX_MAX__;0x7fffffffffffffffL;__INTMAX_C(c);c ## L;__UINTMAX_MAX__;0xffffffffffffffffUL;__UINTMAX_C(c);c ## UL;__SIG_ATOMIC_MAX__;0x7fffffff;__SIG_ATOMIC_MIN__;(-__SIG_ATOMIC_MAX__ - 1);__INT8_MAX__;0x7f;__INT16_MAX__;0x7fff;__INT32_MAX__;0x7fffffff;__INT64_MAX__;0x7fffffffffffffffL;__UINT8_MAX__;0xff;__UINT16_MAX__;0xffff;__UINT32_MAX__;0xffffffffU;__UINT64_MAX__;0xffffffffffffffffUL;__INT_LEAST8_MAX__;0x7f;__INT8_C(c);c;__INT_LEAST16_MAX__;0x7fff;__INT16_C(c);c;__INT_LEAST32_MAX__;0x7fffffff;__INT32_C(c);c;__INT_LEAST64_MAX__;0x7fffffffffffffffL;__INT64_C(c);c ## L;__UINT_LEAST8_MAX__;0xff;__UINT8_C(c);c;__UINT_LEAST16_MAX__;0xffff;__UINT16_C(c);c;__UINT_LEAST32_MAX__;0xffffffffU;__UINT32_C(c);c ## U;__UINT_LEAST64_MAX__;0xffffffffffffffffUL;__UINT64_C(c);c ## UL;__INT_FAST8_MAX__;0x7f;__INT_FAST16_MAX__;0x7fffffffffffffffL;__INT_FAST32_MAX__;0x7fffffffffffffffL;__INT_FAST64_MAX__;0x7fffffffffffffffL;__UINT_FAST8_MAX__;0xff;__UINT_FAST16_MAX__;0xffffffffffffffffUL;__UINT_FAST32_MAX__;0xffffffffffffffffUL;__UINT_FAST64_MAX__;0xffffffffffffffffUL;__INTPTR_MAX__;0x7fffffffffffffffL;__UINTPTR_MAX__;0xffffffffffffffffUL;__GCC_IEC_559;2;__GCC_IEC_559_COMPLEX;2;__FLT_EVAL_METHOD__; ;__DEC_EVAL_METHOD__;2;__FLT_RADIX__;2;__FLT_MANT_DIG__;24;__FLT_DIG__;6;__FLT_MIN_EXP__;(-125);__FLT_MIN_10_EXP__;(-37);__FLT_MAX_EXP__;128;__FLT_MAX_10_EXP__;38;__FLT_DECIMAL_DIG__;9;__FLT_MAX__;3.40282346638528859812e+38F;__FLT_MIN__;1.17549435082228750797e-38F;__FLT_EPSILON__;1.19209289550781250000e-7F;__FLT_DENORM_MIN__;1.40129846432481707092e-45F;__FLT_HAS_DENORM__;1;__FLT_HAS_INFINITY__;1;__FLT_HAS_QUIET_NAN__;1;__DBL_MANT_DIG__;53;__DBL_DIG__;15;__DBL_MIN_EXP__;(-1021);__DBL_MIN_10_EXP__;(-307);__DBL_MAX_EXP__;1024;__DBL_MAX_10_EXP__;308;__DBL_DECIMAL_DIG__;17;__DBL_MAX__;((double)1.79769313486231570815e+308L);__DBL_MIN__;((double)2.22507385850720138309e-308L);__DBL_EPSILON__;((double)2.22044604925031308085e-16L);__DBL_DENORM_MIN__;((double)4.94065645841246544177e-324L);__DBL_HAS_DENORM__;1;__DBL_HAS_INFINITY__;1;__DBL_HAS_QUIET_NAN__;1;__LDBL_MANT_DIG__;64;__LDBL_DIG__;18;__LDBL_MIN_EXP__;(-16381);__LDBL_MIN_10_EXP__;(-4931);__LDBL_MAX_EXP__;16384;__LDBL_MAX_10_EXP__;4932;__DECIMAL_DIG__;21;__LDBL_MAX__;1.18973149535723176502e+4932L;__LDBL_MIN__;3.36210314311209350626e-4932L;__LDBL_EPSILON__;1.08420217248550443401e-19L;__LDBL_DENORM_MIN__;3.64519953188247460253e-4951L;__LDBL_HAS_DENORM__;1;__LDBL_HAS_INFINITY__;1;__LDBL_HAS_QUIET_NAN__;1;__DEC32_MANT_DIG__;7;__DEC32_MIN_EXP__;(-94);__DEC32_MAX_EXP__;97;__DEC32_MIN__;1E-95DF;__DEC32_MAX__;9.999999E96DF;__DEC32_EPSILON__;1E-6DF;__DEC32_SUBNORMAL_MIN__;0.000001E-95DF;__DEC64_MANT_DIG__;16;__DEC64_MIN_EXP__;(-382);__DEC64_MAX_EXP__;385;__DEC64_MIN__;1E-383DD;__DEC64_MAX__;9.999999999999999E384DD;__DEC64_EPSILON__;1E-15DD;__DEC64_SUBNORMAL_MIN__;0.000000000000001E-383DD;__DEC128_MANT_DIG__;34;__DEC128_MIN_EXP__;(-6142);__DEC128_MAX_EXP__;6145;__DEC128_MIN__;1E-6143DL;__DEC128_MAX__;9.999999999999999999999999999999999E6144DL;__DEC128_EPSILON__;1E-33DL;__DEC128_SUBNORMAL_MIN__;0.000000000000000000000000000000001E-6143DL;__REGISTER_PREFIX__; ;__USER_LABEL_PREFIX__; ;__GNUC_STDC_INLINE__;1;__NO_INLINE__;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;1;__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8;1;__GCC_ATOMIC_BOOL_LOCK_FREE;2;__GCC_ATOMIC_CHAR_LOCK_FREE;2;__GCC_ATOMIC_CHAR16_T_LOCK_FREE;2;__GCC_ATOMIC_CHAR32_T_LOCK_FREE;2;__GCC_ATOMIC_WCHAR_T_LOCK_FREE;2;__GCC_ATOMIC_SHORT_LOCK_FREE;2;__GCC_ATOMIC_INT_LOCK_FREE;2;__GCC_ATOMIC_LONG_LOCK_FREE;2;__GCC_ATOMIC_LLONG_LOCK_FREE;2;__GCC_ATOMIC_TEST_AND_SET_TRUEVAL;1;__GCC_ATOMIC_POINTER_LOCK_FREE;2;__GCC_HAVE_DWARF2_CFI_ASM;1;__PRAGMA_REDEFINE_EXTNAME;1;__SSP_STRONG__;3;__SIZEOF_INT128__;16;__SIZEOF_WCHAR_T__;4;__SIZEOF_WINT_T__;4;__SIZEOF_PTRDIFF_T__;8;__amd64;1;__amd64__;1;__x86_64;1;__x86_64__;1;__SIZEOF_FLOAT80__;16;__SIZEOF_FLOAT128__;16;__ATOMIC_HLE_ACQUIRE;65536;__ATOMIC_HLE_RELEASE;131072;__k8;1;__k8__;1;__code_model_small__;1;__MMX__;1;__SSE__;1;__SSE2__;1;__FXSR__;1;__SSE_MATH__;1;__SSE2_MATH__;1;__gnu_linux__;1;__linux;1;__linux__;1;linux;1;__unix;1;__unix__;1;unix;1;__ELF__;1;__DECIMAL_BID_FORMAT__;1;_STDC_PREDEF_H;1;__STDC_IEC_559__;1;__STDC_IEC_559_COMPLEX__;1;__STDC_ISO_10646__;201505L;__STDC_NO_THREADS__;1 -//C compiler system include directories -CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS:INTERNAL=/usr/lib/gcc/x86_64-linux-gnu/5/include;/usr/local/include;/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed;/usr/include/x86_64-linux-gnu;/usr/include -//Name of generator. -CMAKE_GENERATOR:INTERNAL=Unix Makefiles -//Name of generator platform. -CMAKE_GENERATOR_PLATFORM:INTERNAL= -//Name of generator toolset. -CMAKE_GENERATOR_TOOLSET:INTERNAL= -//Have symbol pthread_create -CMAKE_HAVE_LIBC_CREATE:INTERNAL= -//Have library pthreads -CMAKE_HAVE_PTHREADS_CREATE:INTERNAL= -//Have library pthread -CMAKE_HAVE_PTHREAD_CREATE:INTERNAL=1 -//Have include pthread.h -CMAKE_HAVE_PTHREAD_H:INTERNAL=1 -//Source directory with the top level CMakeLists.txt file for this -// project -CMAKE_HOME_DIRECTORY:INTERNAL=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol -//Install .so files without execute permission. -CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 -//ADVANCED property for variable: CMAKE_LINKER -CMAKE_LINKER-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MAKE_PROGRAM -CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS -CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG -CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL -CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE -CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_NM -CMAKE_NM-ADVANCED:INTERNAL=1 -//number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 -//ADVANCED property for variable: CMAKE_OBJCOPY -CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_OBJDUMP -CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 -//Platform information initialized -CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_RANLIB -CMAKE_RANLIB-ADVANCED:INTERNAL=1 -//Path to CMake installation. -CMAKE_ROOT:INTERNAL=/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS -CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG -CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL -CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE -CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH -CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_SKIP_RPATH -CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS -CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG -CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL -CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE -CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO -CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: CMAKE_STRIP -CMAKE_STRIP-ADVANCED:INTERNAL=1 -//uname command -CMAKE_UNAME:INTERNAL=/bin/uname -//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE -CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 -//Details about finding PythonInterp -FIND_PACKAGE_MESSAGE_DETAILS_PythonInterp:INTERNAL=[/usr/bin/python][v2.7.12()] -//Details about finding Threads -FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] -GTEST_FROM_SOURCE_FOUND:INTERNAL=TRUE -GTEST_FROM_SOURCE_INCLUDE_DIRS:INTERNAL=/usr/include -GTEST_FROM_SOURCE_LIBRARIES:INTERNAL=gtest -GTEST_FROM_SOURCE_LIBRARY_DIRS:INTERNAL=/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest -GTEST_FROM_SOURCE_MAIN_LIBRARIES:INTERNAL=gtest_main -//ADVANCED property for variable: GTEST_INCLUDE_DIR -GTEST_INCLUDE_DIR-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: GTEST_LIBRARY -GTEST_LIBRARY-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: GTEST_LIBRARY_DEBUG -GTEST_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: GTEST_MAIN_LIBRARY -GTEST_MAIN_LIBRARY-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: GTEST_MAIN_LIBRARY_DEBUG -GTEST_MAIN_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: PYTHON_EXECUTABLE -PYTHON_EXECUTABLE-ADVANCED:INTERNAL=1 -//This needs to be in PYTHONPATH when 'setup.py install' is called. -// And it needs to match. But setuptools won't tell us where -// it will install things. -PYTHON_INSTALL_DIR:INTERNAL=lib/python2.7/dist-packages -//ADVANCED property for variable: ProcessorCount_cmd_getconf -ProcessorCount_cmd_getconf-ADVANCED:INTERNAL=1 -//ADVANCED property for variable: ProcessorCount_cmd_sysctl -ProcessorCount_cmd_sysctl-ADVANCED:INTERNAL=1 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeCCompiler.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeCCompiler.cmake deleted file mode 100644 index dba258ed28abafb4cb6edaaab1948cc828296abb..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeCCompiler.cmake +++ /dev/null @@ -1,71 +0,0 @@ -set(CMAKE_C_COMPILER "/usr/bin/cc") -set(CMAKE_C_COMPILER_ARG1 "") -set(CMAKE_C_COMPILER_ID "GNU") -set(CMAKE_C_COMPILER_VERSION "5.4.0") -set(CMAKE_C_COMPILER_WRAPPER "") -set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") -set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert") -set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") -set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") -set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") - -set(CMAKE_C_PLATFORM_ID "Linux") -set(CMAKE_C_SIMULATE_ID "") -set(CMAKE_C_SIMULATE_VERSION "") - - -set(CMAKE_AR "/usr/bin/ar") -set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-5") -set(CMAKE_RANLIB "/usr/bin/ranlib") -set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-5") -set(CMAKE_LINKER "/usr/bin/ld") -set(CMAKE_COMPILER_IS_GNUCC 1) -set(CMAKE_C_COMPILER_LOADED 1) -set(CMAKE_C_COMPILER_WORKS TRUE) -set(CMAKE_C_ABI_COMPILED TRUE) -set(CMAKE_COMPILER_IS_MINGW ) -set(CMAKE_COMPILER_IS_CYGWIN ) -if(CMAKE_COMPILER_IS_CYGWIN) - set(CYGWIN 1) - set(UNIX 1) -endif() - -set(CMAKE_C_COMPILER_ENV_VAR "CC") - -if(CMAKE_COMPILER_IS_MINGW) - set(MINGW 1) -endif() -set(CMAKE_C_COMPILER_ID_RUN 1) -set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) -set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_C_LINKER_PREFERENCE 10) - -# Save compiler ABI information. -set(CMAKE_C_SIZEOF_DATA_PTR "8") -set(CMAKE_C_COMPILER_ABI "ELF") -set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") - -if(CMAKE_C_SIZEOF_DATA_PTR) - set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") -endif() - -if(CMAKE_C_COMPILER_ABI) - set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") -endif() - -if(CMAKE_C_LIBRARY_ARCHITECTURE) - set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") -endif() - -set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") -if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) - set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") -endif() - - - - - -set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") -set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") -set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake deleted file mode 100644 index b98f1059c1925ac8fa39f0774d31556a784799fc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeCXXCompiler.cmake +++ /dev/null @@ -1,73 +0,0 @@ -set(CMAKE_CXX_COMPILER "/usr/bin/c++") -set(CMAKE_CXX_COMPILER_ARG1 "") -set(CMAKE_CXX_COMPILER_ID "GNU") -set(CMAKE_CXX_COMPILER_VERSION "5.4.0") -set(CMAKE_CXX_COMPILER_WRAPPER "") -set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") -set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17") -set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") -set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") -set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") -set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") - -set(CMAKE_CXX_PLATFORM_ID "Linux") -set(CMAKE_CXX_SIMULATE_ID "") -set(CMAKE_CXX_SIMULATE_VERSION "") - - -set(CMAKE_AR "/usr/bin/ar") -set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-5") -set(CMAKE_RANLIB "/usr/bin/ranlib") -set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-5") -set(CMAKE_LINKER "/usr/bin/ld") -set(CMAKE_COMPILER_IS_GNUCXX 1) -set(CMAKE_CXX_COMPILER_LOADED 1) -set(CMAKE_CXX_COMPILER_WORKS TRUE) -set(CMAKE_CXX_ABI_COMPILED TRUE) -set(CMAKE_COMPILER_IS_MINGW ) -set(CMAKE_COMPILER_IS_CYGWIN ) -if(CMAKE_COMPILER_IS_CYGWIN) - set(CYGWIN 1) - set(UNIX 1) -endif() - -set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") - -if(CMAKE_COMPILER_IS_MINGW) - set(MINGW 1) -endif() -set(CMAKE_CXX_COMPILER_ID_RUN 1) -set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) -set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) -set(CMAKE_CXX_LINKER_PREFERENCE 30) -set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) - -# Save compiler ABI information. -set(CMAKE_CXX_SIZEOF_DATA_PTR "8") -set(CMAKE_CXX_COMPILER_ABI "ELF") -set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") - -if(CMAKE_CXX_SIZEOF_DATA_PTR) - set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") -endif() - -if(CMAKE_CXX_COMPILER_ABI) - set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") -endif() - -if(CMAKE_CXX_LIBRARY_ARCHITECTURE) - set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") -endif() - -set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") -if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) - set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") -endif() - - - - - -set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") -set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") -set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin deleted file mode 100755 index 69592bc8517e63ed5eaa4d72c3b114d8fa1bed4e..0000000000000000000000000000000000000000 Binary files a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_C.bin and /dev/null differ diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin deleted file mode 100755 index ccb7de9ede4cf8725175d46ca9e0c16ef6061c41..0000000000000000000000000000000000000000 Binary files a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeDetermineCompilerABI_CXX.bin and /dev/null differ diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeSystem.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeSystem.cmake deleted file mode 100644 index 31bd4d543c1c3e1294a11f1c6d210d1467e9be08..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CMakeSystem.cmake +++ /dev/null @@ -1,15 +0,0 @@ -set(CMAKE_HOST_SYSTEM "Linux-4.4.0-112-generic") -set(CMAKE_HOST_SYSTEM_NAME "Linux") -set(CMAKE_HOST_SYSTEM_VERSION "4.4.0-112-generic") -set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") - - - -set(CMAKE_SYSTEM "Linux-4.4.0-112-generic") -set(CMAKE_SYSTEM_NAME "Linux") -set(CMAKE_SYSTEM_VERSION "4.4.0-112-generic") -set(CMAKE_SYSTEM_PROCESSOR "x86_64") - -set(CMAKE_CROSSCOMPILING "FALSE") - -set(CMAKE_SYSTEM_LOADED 1) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c deleted file mode 100644 index df91dafed5154594b27404de06cb3f51d680aee2..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CompilerIdC/CMakeCCompilerId.c +++ /dev/null @@ -1,567 +0,0 @@ -#ifdef __cplusplus -# error "A C++ compiler has been selected for C." -#endif - -#if defined(__18CXX) -# define ID_VOID_MAIN -#endif -#if defined(__CLASSIC_C__) -/* cv-qualifiers did not exist in K&R C */ -# define const -# define volatile -#endif - - -/* Version number components: V=Version, R=Revision, P=Patch - Version date components: YYYY=Year, MM=Month, DD=Day */ - -#if defined(__INTEL_COMPILER) || defined(__ICC) -# define COMPILER_ID "Intel" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif - /* __INTEL_COMPILER = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) - /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__PATHCC__) -# define COMPILER_ID "PathScale" -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif - -#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) -# define COMPILER_ID "Embarcadero" -# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) -# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) -# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) - -#elif defined(__BORLANDC__) -# define COMPILER_ID "Borland" - /* __BORLANDC__ = 0xVRR */ -# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) -# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) - -#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 -# define COMPILER_ID "Watcom" - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__WATCOMC__) -# define COMPILER_ID "OpenWatcom" - /* __WATCOMC__ = VVRP + 1100 */ -# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__SUNPRO_C) -# define COMPILER_ID "SunPro" -# if __SUNPRO_C >= 0x5100 - /* __SUNPRO_C = 0xVRRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) -# else - /* __SUNPRO_CC = 0xVRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) -# endif - -#elif defined(__HP_cc) -# define COMPILER_ID "HP" - /* __HP_cc = VVRRPP */ -# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) -# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) - -#elif defined(__DECC) -# define COMPILER_ID "Compaq" - /* __DECC_VER = VVRRTPPPP */ -# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) -# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) -# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) - -#elif defined(__IBMC__) && defined(__COMPILER_VER__) -# define COMPILER_ID "zOS" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 -# define COMPILER_ID "XL" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 -# define COMPILER_ID "VisualAge" - /* __IBMC__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) - -#elif defined(__PGI) -# define COMPILER_ID "PGI" -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif - -#elif defined(_CRAYC) -# define COMPILER_ID "Cray" -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) - -#elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI" - /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ -# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) -# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) -# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) - -#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) -# define COMPILER_ID "Fujitsu" - -#elif defined(__TINYC__) -# define COMPILER_ID "TinyCC" - -#elif defined(__BCC__) -# define COMPILER_ID "Bruce" - -#elif defined(__SCO_VERSION__) -# define COMPILER_ID "SCO" - -#elif defined(__clang__) && defined(__apple_build_version__) -# define COMPILER_ID "AppleClang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) - -#elif defined(__clang__) -# define COMPILER_ID "Clang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__GNUC__) -# define COMPILER_ID "GNU" -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# if defined(__GNUC_MINOR__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif defined(_MSC_VER) -# define COMPILER_ID "MSVC" - /* _MSC_VER = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) -# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) -# if defined(_MSC_FULL_VER) -# if _MSC_VER >= 1400 - /* _MSC_FULL_VER = VVRRPPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) -# else - /* _MSC_FULL_VER = VVRRPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) -# endif -# endif -# if defined(_MSC_BUILD) -# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) -# endif - -#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) -# define COMPILER_ID "ADSP" -#if defined(__VISUALDSPVERSION__) - /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ -# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) -# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) -#endif - -#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) -# define COMPILER_ID "IAR" - -#elif defined(__ARMCC_VERSION) -# define COMPILER_ID "ARMCC" -#if __ARMCC_VERSION >= 1000000 - /* __ARMCC_VERSION = VRRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#else - /* __ARMCC_VERSION = VRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#endif - - -#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) -# define COMPILER_ID "SDCC" -# if defined(__SDCC_VERSION_MAJOR) -# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) -# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) -# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) -# else - /* SDCC = VRP */ -# define COMPILER_VERSION_MAJOR DEC(SDCC/100) -# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) -# define COMPILER_VERSION_PATCH DEC(SDCC % 10) -# endif - -#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) -# define COMPILER_ID "MIPSpro" -# if defined(_SGI_COMPILER_VERSION) - /* _SGI_COMPILER_VERSION = VRP */ -# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) -# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) -# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) -# else - /* _COMPILER_VERSION = VRP */ -# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) -# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) -# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) -# endif - - -/* These compilers are either not known or too old to define an - identification macro. Try to identify the platform and guess that - it is the native compiler. */ -#elif defined(__sgi) -# define COMPILER_ID "MIPSpro" - -#elif defined(__hpux) || defined(__hpua) -# define COMPILER_ID "HP" - -#else /* unknown compiler */ -# define COMPILER_ID "" -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; -#ifdef SIMULATE_ID -char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; -#endif - -#ifdef __QNXNTO__ -char const* qnxnto = "INFO" ":" "qnxnto[]"; -#endif - -#if defined(__CRAYXE) || defined(__CRAYXC) -char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; -#endif - -#define STRINGIFY_HELPER(X) #X -#define STRINGIFY(X) STRINGIFY_HELPER(X) - -/* Identify known platforms by name. */ -#if defined(__linux) || defined(__linux__) || defined(linux) -# define PLATFORM_ID "Linux" - -#elif defined(__CYGWIN__) -# define PLATFORM_ID "Cygwin" - -#elif defined(__MINGW32__) -# define PLATFORM_ID "MinGW" - -#elif defined(__APPLE__) -# define PLATFORM_ID "Darwin" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -# define PLATFORM_ID "Windows" - -#elif defined(__FreeBSD__) || defined(__FreeBSD) -# define PLATFORM_ID "FreeBSD" - -#elif defined(__NetBSD__) || defined(__NetBSD) -# define PLATFORM_ID "NetBSD" - -#elif defined(__OpenBSD__) || defined(__OPENBSD) -# define PLATFORM_ID "OpenBSD" - -#elif defined(__sun) || defined(sun) -# define PLATFORM_ID "SunOS" - -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) -# define PLATFORM_ID "AIX" - -#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) -# define PLATFORM_ID "IRIX" - -#elif defined(__hpux) || defined(__hpux__) -# define PLATFORM_ID "HP-UX" - -#elif defined(__HAIKU__) -# define PLATFORM_ID "Haiku" - -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) -# define PLATFORM_ID "BeOS" - -#elif defined(__QNX__) || defined(__QNXNTO__) -# define PLATFORM_ID "QNX" - -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) -# define PLATFORM_ID "Tru64" - -#elif defined(__riscos) || defined(__riscos__) -# define PLATFORM_ID "RISCos" - -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) -# define PLATFORM_ID "SINIX" - -#elif defined(__UNIX_SV__) -# define PLATFORM_ID "UNIX_SV" - -#elif defined(__bsdos__) -# define PLATFORM_ID "BSDOS" - -#elif defined(_MPRAS) || defined(MPRAS) -# define PLATFORM_ID "MP-RAS" - -#elif defined(__osf) || defined(__osf__) -# define PLATFORM_ID "OSF1" - -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) -# define PLATFORM_ID "SCO_SV" - -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) -# define PLATFORM_ID "ULTRIX" - -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) -# define PLATFORM_ID "Xenix" - -#elif defined(__WATCOMC__) -# if defined(__LINUX__) -# define PLATFORM_ID "Linux" - -# elif defined(__DOS__) -# define PLATFORM_ID "DOS" - -# elif defined(__OS2__) -# define PLATFORM_ID "OS2" - -# elif defined(__WINDOWS__) -# define PLATFORM_ID "Windows3x" - -# else /* unknown platform */ -# define PLATFORM_ID -# endif - -#else /* unknown platform */ -# define PLATFORM_ID - -#endif - -/* For windows compilers MSVC and Intel we can determine - the architecture of the compiler being used. This is because - the compilers do not have flags that can change the architecture, - but rather depend on which compiler is being used -*/ -#if defined(_WIN32) && defined(_MSC_VER) -# if defined(_M_IA64) -# define ARCHITECTURE_ID "IA64" - -# elif defined(_M_X64) || defined(_M_AMD64) -# define ARCHITECTURE_ID "x64" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# elif defined(_M_ARM) -# if _M_ARM == 4 -# define ARCHITECTURE_ID "ARMV4I" -# elif _M_ARM == 5 -# define ARCHITECTURE_ID "ARMV5I" -# else -# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) -# endif - -# elif defined(_M_MIPS) -# define ARCHITECTURE_ID "MIPS" - -# elif defined(_M_SH) -# define ARCHITECTURE_ID "SHx" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__WATCOMC__) -# if defined(_M_I86) -# define ARCHITECTURE_ID "I86" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#else -# define ARCHITECTURE_ID -#endif - -/* Convert integer to decimal digit literals. */ -#define DEC(n) \ - ('0' + (((n) / 10000000)%10)), \ - ('0' + (((n) / 1000000)%10)), \ - ('0' + (((n) / 100000)%10)), \ - ('0' + (((n) / 10000)%10)), \ - ('0' + (((n) / 1000)%10)), \ - ('0' + (((n) / 100)%10)), \ - ('0' + (((n) / 10)%10)), \ - ('0' + ((n) % 10)) - -/* Convert integer to hex digit literals. */ -#define HEX(n) \ - ('0' + ((n)>>28 & 0xF)), \ - ('0' + ((n)>>24 & 0xF)), \ - ('0' + ((n)>>20 & 0xF)), \ - ('0' + ((n)>>16 & 0xF)), \ - ('0' + ((n)>>12 & 0xF)), \ - ('0' + ((n)>>8 & 0xF)), \ - ('0' + ((n)>>4 & 0xF)), \ - ('0' + ((n) & 0xF)) - -/* Construct a string literal encoding the version number components. */ -#ifdef COMPILER_VERSION_MAJOR -char const info_version[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', - COMPILER_VERSION_MAJOR, -# ifdef COMPILER_VERSION_MINOR - '.', COMPILER_VERSION_MINOR, -# ifdef COMPILER_VERSION_PATCH - '.', COMPILER_VERSION_PATCH, -# ifdef COMPILER_VERSION_TWEAK - '.', COMPILER_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct a string literal encoding the version number components. */ -#ifdef SIMULATE_VERSION_MAJOR -char const info_simulate_version[] = { - 'I', 'N', 'F', 'O', ':', - 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', - SIMULATE_VERSION_MAJOR, -# ifdef SIMULATE_VERSION_MINOR - '.', SIMULATE_VERSION_MINOR, -# ifdef SIMULATE_VERSION_PATCH - '.', SIMULATE_VERSION_PATCH, -# ifdef SIMULATE_VERSION_TWEAK - '.', SIMULATE_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; -char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; - - - - -#if !defined(__STDC__) -# if defined(_MSC_VER) && !defined(__clang__) -# define C_DIALECT "90" -# else -# define C_DIALECT -# endif -#elif __STDC_VERSION__ >= 201000L -# define C_DIALECT "11" -#elif __STDC_VERSION__ >= 199901L -# define C_DIALECT "99" -#else -# define C_DIALECT "90" -#endif -const char* info_language_dialect_default = - "INFO" ":" "dialect_default[" C_DIALECT "]"; - -/*--------------------------------------------------------------------------*/ - -#ifdef ID_VOID_MAIN -void main() {} -#else -# if defined(__CLASSIC_C__) -int main(argc, argv) int argc; char *argv[]; -# else -int main(int argc, char* argv[]) -# endif -{ - int require = 0; - require += info_compiler[argc]; - require += info_platform[argc]; - require += info_arch[argc]; -#ifdef COMPILER_VERSION_MAJOR - require += info_version[argc]; -#endif -#ifdef SIMULATE_ID - require += info_simulate[argc]; -#endif -#ifdef SIMULATE_VERSION_MAJOR - require += info_simulate_version[argc]; -#endif -#if defined(__CRAYXE) || defined(__CRAYXC) - require += info_cray[argc]; -#endif - require += info_language_dialect_default[argc]; - (void)argv; - return require; -} -#endif diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp deleted file mode 100644 index e7037e5010c857ea7fc9d3479e88e0c07c2c69bd..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/3.9.6/CompilerIdCXX/CMakeCXXCompilerId.cpp +++ /dev/null @@ -1,539 +0,0 @@ -/* This source file must have a .cpp extension so that all C++ compilers - recognize the extension without flags. Borland does not know .cxx for - example. */ -#ifndef __cplusplus -# error "A C compiler has been selected for C++." -#endif - - -/* Version number components: V=Version, R=Revision, P=Patch - Version date components: YYYY=Year, MM=Month, DD=Day */ - -#if defined(__COMO__) -# define COMPILER_ID "Comeau" - /* __COMO_VERSION__ = VRR */ -# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) -# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) - -#elif defined(__INTEL_COMPILER) || defined(__ICC) -# define COMPILER_ID "Intel" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif - /* __INTEL_COMPILER = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) -# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) -# if defined(__INTEL_COMPILER_UPDATE) -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) -# else -# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) -# endif -# if defined(__INTEL_COMPILER_BUILD_DATE) - /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ -# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) -# endif -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__PATHCC__) -# define COMPILER_ID "PathScale" -# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) -# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) -# if defined(__PATHCC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) -# endif - -#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) -# define COMPILER_ID "Embarcadero" -# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) -# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) -# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) - -#elif defined(__BORLANDC__) -# define COMPILER_ID "Borland" - /* __BORLANDC__ = 0xVRR */ -# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) -# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) - -#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 -# define COMPILER_ID "Watcom" - /* __WATCOMC__ = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__WATCOMC__) -# define COMPILER_ID "OpenWatcom" - /* __WATCOMC__ = VVRP + 1100 */ -# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) -# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) -# if (__WATCOMC__ % 10) > 0 -# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) -# endif - -#elif defined(__SUNPRO_CC) -# define COMPILER_ID "SunPro" -# if __SUNPRO_CC >= 0x5100 - /* __SUNPRO_CC = 0xVRRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) -# else - /* __SUNPRO_CC = 0xVRP */ -# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) -# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) -# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) -# endif - -#elif defined(__HP_aCC) -# define COMPILER_ID "HP" - /* __HP_aCC = VVRRPP */ -# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) -# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) -# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) - -#elif defined(__DECCXX) -# define COMPILER_ID "Compaq" - /* __DECCXX_VER = VVRRTPPPP */ -# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) -# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) -# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) - -#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) -# define COMPILER_ID "zOS" - /* __IBMCPP__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) - -#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 -# define COMPILER_ID "XL" - /* __IBMCPP__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) - -#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 -# define COMPILER_ID "VisualAge" - /* __IBMCPP__ = VRP */ -# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) -# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) -# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) - -#elif defined(__PGI) -# define COMPILER_ID "PGI" -# define COMPILER_VERSION_MAJOR DEC(__PGIC__) -# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) -# if defined(__PGIC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) -# endif - -#elif defined(_CRAYC) -# define COMPILER_ID "Cray" -# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) -# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) - -#elif defined(__TI_COMPILER_VERSION__) -# define COMPILER_ID "TI" - /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ -# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) -# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) -# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) - -#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) -# define COMPILER_ID "Fujitsu" - -#elif defined(__SCO_VERSION__) -# define COMPILER_ID "SCO" - -#elif defined(__clang__) && defined(__apple_build_version__) -# define COMPILER_ID "AppleClang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif -# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) - -#elif defined(__clang__) -# define COMPILER_ID "Clang" -# if defined(_MSC_VER) -# define SIMULATE_ID "MSVC" -# endif -# define COMPILER_VERSION_MAJOR DEC(__clang_major__) -# define COMPILER_VERSION_MINOR DEC(__clang_minor__) -# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) -# if defined(_MSC_VER) - /* _MSC_VER = VVRR */ -# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) -# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) -# endif - -#elif defined(__GNUC__) || defined(__GNUG__) -# define COMPILER_ID "GNU" -# if defined(__GNUC__) -# define COMPILER_VERSION_MAJOR DEC(__GNUC__) -# else -# define COMPILER_VERSION_MAJOR DEC(__GNUG__) -# endif -# if defined(__GNUC_MINOR__) -# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) -# endif -# if defined(__GNUC_PATCHLEVEL__) -# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) -# endif - -#elif defined(_MSC_VER) -# define COMPILER_ID "MSVC" - /* _MSC_VER = VVRR */ -# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) -# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) -# if defined(_MSC_FULL_VER) -# if _MSC_VER >= 1400 - /* _MSC_FULL_VER = VVRRPPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) -# else - /* _MSC_FULL_VER = VVRRPPPP */ -# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) -# endif -# endif -# if defined(_MSC_BUILD) -# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) -# endif - -#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) -# define COMPILER_ID "ADSP" -#if defined(__VISUALDSPVERSION__) - /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ -# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) -# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) -# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) -#endif - -#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) -# define COMPILER_ID "IAR" - -#elif defined(__ARMCC_VERSION) -# define COMPILER_ID "ARMCC" -#if __ARMCC_VERSION >= 1000000 - /* __ARMCC_VERSION = VRRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#else - /* __ARMCC_VERSION = VRPPPP */ - # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) - # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) - # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) -#endif - - -#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) -# define COMPILER_ID "MIPSpro" -# if defined(_SGI_COMPILER_VERSION) - /* _SGI_COMPILER_VERSION = VRP */ -# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) -# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) -# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) -# else - /* _COMPILER_VERSION = VRP */ -# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) -# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) -# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) -# endif - - -/* These compilers are either not known or too old to define an - identification macro. Try to identify the platform and guess that - it is the native compiler. */ -#elif defined(__sgi) -# define COMPILER_ID "MIPSpro" - -#elif defined(__hpux) || defined(__hpua) -# define COMPILER_ID "HP" - -#else /* unknown compiler */ -# define COMPILER_ID "" -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; -#ifdef SIMULATE_ID -char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; -#endif - -#ifdef __QNXNTO__ -char const* qnxnto = "INFO" ":" "qnxnto[]"; -#endif - -#if defined(__CRAYXE) || defined(__CRAYXC) -char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; -#endif - -#define STRINGIFY_HELPER(X) #X -#define STRINGIFY(X) STRINGIFY_HELPER(X) - -/* Identify known platforms by name. */ -#if defined(__linux) || defined(__linux__) || defined(linux) -# define PLATFORM_ID "Linux" - -#elif defined(__CYGWIN__) -# define PLATFORM_ID "Cygwin" - -#elif defined(__MINGW32__) -# define PLATFORM_ID "MinGW" - -#elif defined(__APPLE__) -# define PLATFORM_ID "Darwin" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -# define PLATFORM_ID "Windows" - -#elif defined(__FreeBSD__) || defined(__FreeBSD) -# define PLATFORM_ID "FreeBSD" - -#elif defined(__NetBSD__) || defined(__NetBSD) -# define PLATFORM_ID "NetBSD" - -#elif defined(__OpenBSD__) || defined(__OPENBSD) -# define PLATFORM_ID "OpenBSD" - -#elif defined(__sun) || defined(sun) -# define PLATFORM_ID "SunOS" - -#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) -# define PLATFORM_ID "AIX" - -#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) -# define PLATFORM_ID "IRIX" - -#elif defined(__hpux) || defined(__hpux__) -# define PLATFORM_ID "HP-UX" - -#elif defined(__HAIKU__) -# define PLATFORM_ID "Haiku" - -#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) -# define PLATFORM_ID "BeOS" - -#elif defined(__QNX__) || defined(__QNXNTO__) -# define PLATFORM_ID "QNX" - -#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) -# define PLATFORM_ID "Tru64" - -#elif defined(__riscos) || defined(__riscos__) -# define PLATFORM_ID "RISCos" - -#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) -# define PLATFORM_ID "SINIX" - -#elif defined(__UNIX_SV__) -# define PLATFORM_ID "UNIX_SV" - -#elif defined(__bsdos__) -# define PLATFORM_ID "BSDOS" - -#elif defined(_MPRAS) || defined(MPRAS) -# define PLATFORM_ID "MP-RAS" - -#elif defined(__osf) || defined(__osf__) -# define PLATFORM_ID "OSF1" - -#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) -# define PLATFORM_ID "SCO_SV" - -#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) -# define PLATFORM_ID "ULTRIX" - -#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) -# define PLATFORM_ID "Xenix" - -#elif defined(__WATCOMC__) -# if defined(__LINUX__) -# define PLATFORM_ID "Linux" - -# elif defined(__DOS__) -# define PLATFORM_ID "DOS" - -# elif defined(__OS2__) -# define PLATFORM_ID "OS2" - -# elif defined(__WINDOWS__) -# define PLATFORM_ID "Windows3x" - -# else /* unknown platform */ -# define PLATFORM_ID -# endif - -#else /* unknown platform */ -# define PLATFORM_ID - -#endif - -/* For windows compilers MSVC and Intel we can determine - the architecture of the compiler being used. This is because - the compilers do not have flags that can change the architecture, - but rather depend on which compiler is being used -*/ -#if defined(_WIN32) && defined(_MSC_VER) -# if defined(_M_IA64) -# define ARCHITECTURE_ID "IA64" - -# elif defined(_M_X64) || defined(_M_AMD64) -# define ARCHITECTURE_ID "x64" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# elif defined(_M_ARM) -# if _M_ARM == 4 -# define ARCHITECTURE_ID "ARMV4I" -# elif _M_ARM == 5 -# define ARCHITECTURE_ID "ARMV5I" -# else -# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) -# endif - -# elif defined(_M_MIPS) -# define ARCHITECTURE_ID "MIPS" - -# elif defined(_M_SH) -# define ARCHITECTURE_ID "SHx" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#elif defined(__WATCOMC__) -# if defined(_M_I86) -# define ARCHITECTURE_ID "I86" - -# elif defined(_M_IX86) -# define ARCHITECTURE_ID "X86" - -# else /* unknown architecture */ -# define ARCHITECTURE_ID "" -# endif - -#else -# define ARCHITECTURE_ID -#endif - -/* Convert integer to decimal digit literals. */ -#define DEC(n) \ - ('0' + (((n) / 10000000)%10)), \ - ('0' + (((n) / 1000000)%10)), \ - ('0' + (((n) / 100000)%10)), \ - ('0' + (((n) / 10000)%10)), \ - ('0' + (((n) / 1000)%10)), \ - ('0' + (((n) / 100)%10)), \ - ('0' + (((n) / 10)%10)), \ - ('0' + ((n) % 10)) - -/* Convert integer to hex digit literals. */ -#define HEX(n) \ - ('0' + ((n)>>28 & 0xF)), \ - ('0' + ((n)>>24 & 0xF)), \ - ('0' + ((n)>>20 & 0xF)), \ - ('0' + ((n)>>16 & 0xF)), \ - ('0' + ((n)>>12 & 0xF)), \ - ('0' + ((n)>>8 & 0xF)), \ - ('0' + ((n)>>4 & 0xF)), \ - ('0' + ((n) & 0xF)) - -/* Construct a string literal encoding the version number components. */ -#ifdef COMPILER_VERSION_MAJOR -char const info_version[] = { - 'I', 'N', 'F', 'O', ':', - 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', - COMPILER_VERSION_MAJOR, -# ifdef COMPILER_VERSION_MINOR - '.', COMPILER_VERSION_MINOR, -# ifdef COMPILER_VERSION_PATCH - '.', COMPILER_VERSION_PATCH, -# ifdef COMPILER_VERSION_TWEAK - '.', COMPILER_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct a string literal encoding the version number components. */ -#ifdef SIMULATE_VERSION_MAJOR -char const info_simulate_version[] = { - 'I', 'N', 'F', 'O', ':', - 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', - SIMULATE_VERSION_MAJOR, -# ifdef SIMULATE_VERSION_MINOR - '.', SIMULATE_VERSION_MINOR, -# ifdef SIMULATE_VERSION_PATCH - '.', SIMULATE_VERSION_PATCH, -# ifdef SIMULATE_VERSION_TWEAK - '.', SIMULATE_VERSION_TWEAK, -# endif -# endif -# endif - ']','\0'}; -#endif - -/* Construct the string literal in pieces to prevent the source from - getting matched. Store it in a pointer rather than an array - because some compilers will just produce instructions to fill the - array rather than assigning a pointer to a static array. */ -char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; -char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; - - - - -const char* info_language_dialect_default = "INFO" ":" "dialect_default[" -#if __cplusplus > 201402L - "17" -#elif __cplusplus >= 201402L - "14" -#elif __cplusplus >= 201103L - "11" -#else - "98" -#endif -"]"; - -/*--------------------------------------------------------------------------*/ - -int main(int argc, char* argv[]) -{ - int require = 0; - require += info_compiler[argc]; - require += info_platform[argc]; -#ifdef COMPILER_VERSION_MAJOR - require += info_version[argc]; -#endif -#ifdef SIMULATE_ID - require += info_simulate[argc]; -#endif -#ifdef SIMULATE_VERSION_MAJOR - require += info_simulate_version[argc]; -#endif -#if defined(__CRAYXE) || defined(__CRAYXC) - require += info_cray[argc]; -#endif - require += info_language_dialect_default[argc]; - (void)argv; - return require; -} diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake deleted file mode 100644 index 6dc36eaec2c9a49e3ac4bc3bfcb5a55c1f9aa722..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Relative path conversion top directories. -set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol") -set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug") - -# Force unix paths in dependencies. -set(CMAKE_FORCE_UNIX_PATHS 1) - - -# The C and CXX include file regular expressions for this directory. -set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") -set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") -set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) -set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/CMakeRuleHashes.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/CMakeRuleHashes.txt deleted file mode 100644 index 75c130ba88db6f8bb85d25392f5be4fe52b76926..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/CMakeRuleHashes.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Hashes of file build rules. -a5eafe2d3560103097873f91bb00397c CMakeFiles/_protocol_generate_messages_check_deps_Broadcast -085e83d84dc063a6b4cf57b3667c4ea3 CMakeFiles/clean_test_results -9d23d7b5b8f89fd1bd687a1ef53feb61 CMakeFiles/protocol_generate_messages_cpp -9d23d7b5b8f89fd1bd687a1ef53feb61 CMakeFiles/protocol_generate_messages_eus -9d23d7b5b8f89fd1bd687a1ef53feb61 CMakeFiles/protocol_generate_messages_lisp -9d23d7b5b8f89fd1bd687a1ef53feb61 CMakeFiles/protocol_generate_messages_nodejs -9d23d7b5b8f89fd1bd687a1ef53feb61 CMakeFiles/protocol_generate_messages_py -081916ade37925d2fa42726ac09c9aee devel/include/protocol/Broadcast.h -ac63db790f8841defbe582aff2f2b3fd devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py -fe2d1a32146efacb11fc74833bbcd9e4 devel/lib/python2.7/dist-packages/protocol/msg/__init__.py -1ed695ec03dd07eb1824be2d47bc4ad8 devel/share/common-lisp/ros/protocol/msg/Broadcast.lisp -1161a467e69bf913ee4d6298aa72bc01 devel/share/gennodejs/ros/protocol/msg/Broadcast.js -5c33e3a840f47431781b06f18d50b5a0 devel/share/roseus/ros/protocol/manifest.l -e6d1cb4c2394c5680fc30d0473a16e8a devel/share/roseus/ros/protocol/msg/Broadcast.l diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/Makefile.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/Makefile.cmake deleted file mode 100644 index 0d409084bcd0d2b1c8ecccc68949cc346bd0d9f7..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/Makefile.cmake +++ /dev/null @@ -1,311 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# The generator used is: -set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") - -# The top level Makefile was generated from the following files: -set(CMAKE_MAKEFILE_DEPENDS - "CMakeCache.txt" - "../CMakeLists.txt" - "CMakeFiles/3.9.6/CMakeCCompiler.cmake" - "CMakeFiles/3.9.6/CMakeCXXCompiler.cmake" - "CMakeFiles/3.9.6/CMakeSystem.cmake" - "CMakeFiles/feature_tests.c" - "CMakeFiles/feature_tests.cxx" - "catkin/catkin_generated/version/package.cmake" - "catkin_generated/installspace/_setup_util.py" - "catkin_generated/ordered_paths.cmake" - "catkin_generated/package.cmake" - "catkin_generated/protocol-msg-extras.cmake.develspace.in" - "catkin_generated/protocol-msg-extras.cmake.installspace.in" - "cmake/protocol-genmsg.cmake" - "devel/share/protocol/cmake/protocol-msg-paths.cmake" - "../package.xml" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCCompiler.cmake.in" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCCompilerABI.c" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCInformation.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCXXCompiler.cmake.in" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCXXCompilerABI.cpp" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCXXInformation.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCommonLanguageInclude.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeCompilerIdDetection.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeConfigurableFile.in" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineCCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineCXXCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineCompileFeatures.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineCompilerABI.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineCompilerId.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeDetermineSystem.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeFindBinUtils.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeFindCodeBlocks.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeGenericSystem.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeLanguageInformation.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeParseArguments.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeParseImplicitLinkInfo.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeSystem.cmake.in" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeSystemSpecificInformation.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeSystemSpecificInitialize.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeTestCXXCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeTestCompilerCommon.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CMakeUnixFindMake.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CheckFunctionExists.c" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CheckIncludeFile.c.in" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CheckIncludeFile.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CheckLibraryExists.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/CheckSymbolExists.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/ADSP-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/ARMCC-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/AppleClang-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Borland-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/CMakeCommonCompilerMacros.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Clang-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Cray-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GHS-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-C-FeatureTests.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-C.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-CXX-FeatureTests.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-CXX.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU-FindBinUtils.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/GNU.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/HP-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/IAR-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Intel-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/MSVC-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/PGI-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/PathScale-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/SCO-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/TI-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/Watcom-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/XL-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/zOS-C-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/FindGTest.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/FindPackageMessage.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/FindPythonInterp.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/FindThreads.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/GoogleTest.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Internal/FeatureTesting.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Platform/Linux-Determine-CXX.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Platform/Linux-GNU-C.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Platform/Linux-GNU-CXX.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Platform/Linux-GNU.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Platform/Linux.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/Platform/UnixPaths.cmake" - "/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/share/cmake-3.9/Modules/ProcessorCount.cmake" - "/opt/ros/kinetic/share/catkin/cmake/../package.xml" - "/opt/ros/kinetic/share/catkin/cmake/all.cmake" - "/opt/ros/kinetic/share/catkin/cmake/assert.cmake" - "/opt/ros/kinetic/share/catkin/cmake/atomic_configure_file.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_add_env_hooks.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_destinations.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_download.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_generate_environment.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_libraries.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_metapackage.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_python_setup.cmake" - "/opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake" - "/opt/ros/kinetic/share/catkin/cmake/debug_message.cmake" - "/opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em" - "/opt/ros/kinetic/share/catkin/cmake/em_expand.cmake" - "/opt/ros/kinetic/share/catkin/cmake/empy.cmake" - "/opt/ros/kinetic/share/catkin/cmake/find_program_required.cmake" - "/opt/ros/kinetic/share/catkin/cmake/interrogate_setup_dot_py.py" - "/opt/ros/kinetic/share/catkin/cmake/legacy.cmake" - "/opt/ros/kinetic/share/catkin/cmake/list_append_deduplicate.cmake" - "/opt/ros/kinetic/share/catkin/cmake/list_append_unique.cmake" - "/opt/ros/kinetic/share/catkin/cmake/list_insert_in_workspace_order.cmake" - "/opt/ros/kinetic/share/catkin/cmake/platform/lsb.cmake" - "/opt/ros/kinetic/share/catkin/cmake/platform/ubuntu.cmake" - "/opt/ros/kinetic/share/catkin/cmake/platform/windows.cmake" - "/opt/ros/kinetic/share/catkin/cmake/python.cmake" - "/opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake" - "/opt/ros/kinetic/share/catkin/cmake/stamp.cmake" - "/opt/ros/kinetic/share/catkin/cmake/string_starts_with.cmake" - "/opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/generate_cached_setup.py.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in" - "/opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in" - "/opt/ros/kinetic/share/catkin/cmake/test/catkin_download_test_data.cmake" - "/opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake" - "/opt/ros/kinetic/share/catkin/cmake/test/nosetests.cmake" - "/opt/ros/kinetic/share/catkin/cmake/test/tests.cmake" - "/opt/ros/kinetic/share/catkin/cmake/tools/doxygen.cmake" - "/opt/ros/kinetic/share/catkin/cmake/tools/libraries.cmake" - "/opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake" - "/opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig-version.cmake" - "/opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig.cmake" - "/opt/ros/kinetic/share/gencpp/cmake/gencpp-extras.cmake" - "/opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake" - "/opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake" - "/opt/ros/kinetic/share/geneus/cmake/geneus-extras.cmake" - "/opt/ros/kinetic/share/geneus/cmake/geneusConfig-version.cmake" - "/opt/ros/kinetic/share/geneus/cmake/geneusConfig.cmake" - "/opt/ros/kinetic/share/genlisp/cmake/genlisp-extras.cmake" - "/opt/ros/kinetic/share/genlisp/cmake/genlispConfig-version.cmake" - "/opt/ros/kinetic/share/genlisp/cmake/genlispConfig.cmake" - "/opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake" - "/opt/ros/kinetic/share/genmsg/cmake/genmsgConfig-version.cmake" - "/opt/ros/kinetic/share/genmsg/cmake/genmsgConfig.cmake" - "/opt/ros/kinetic/share/genmsg/cmake/pkg-genmsg.cmake.em" - "/opt/ros/kinetic/share/genmsg/cmake/pkg-genmsg.context.in" - "/opt/ros/kinetic/share/genmsg/cmake/pkg-msg-extras.cmake.in" - "/opt/ros/kinetic/share/genmsg/cmake/pkg-msg-paths.cmake.develspace.in" - "/opt/ros/kinetic/share/genmsg/cmake/pkg-msg-paths.cmake.installspace.in" - "/opt/ros/kinetic/share/gennodejs/cmake/gennodejs-extras.cmake" - "/opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig-version.cmake" - "/opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig.cmake" - "/opt/ros/kinetic/share/genpy/cmake/genpy-extras.cmake" - "/opt/ros/kinetic/share/genpy/cmake/genpyConfig-version.cmake" - "/opt/ros/kinetic/share/genpy/cmake/genpyConfig.cmake" - "/opt/ros/kinetic/share/message_generation/cmake/message_generationConfig-version.cmake" - "/opt/ros/kinetic/share/message_generation/cmake/message_generationConfig.cmake" - "/opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig-version.cmake" - "/opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig.cmake" - "/opt/ros/kinetic/share/rosconsole/cmake/rosconsole-extras.cmake" - "/opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig-version.cmake" - "/opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig.cmake" - "/opt/ros/kinetic/share/roscpp/cmake/roscpp-msg-extras.cmake" - "/opt/ros/kinetic/share/roscpp/cmake/roscppConfig-version.cmake" - "/opt/ros/kinetic/share/roscpp/cmake/roscppConfig.cmake" - "/opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig-version.cmake" - "/opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig.cmake" - "/opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig-version.cmake" - "/opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig.cmake" - "/opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgs-msg-extras.cmake" - "/opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig-version.cmake" - "/opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig.cmake" - "/opt/ros/kinetic/share/rostime/cmake/rostimeConfig-version.cmake" - "/opt/ros/kinetic/share/rostime/cmake/rostimeConfig.cmake" - "/opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-extras.cmake" - "/opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-paths.cmake" - "/opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig-version.cmake" - "/opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig.cmake" - "/opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcpp-extras.cmake" - "/opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig-version.cmake" - "/opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig.cmake" - "/usr/src/gtest/CMakeLists.txt" - "/usr/src/gtest/cmake/internal_utils.cmake" - ) - -# The corresponding makefile is: -set(CMAKE_MAKEFILE_OUTPUTS - "Makefile" - "CMakeFiles/cmake.check_cache" - ) - -# Byproducts of CMake generate step: -set(CMAKE_MAKEFILE_PRODUCTS - "CMakeFiles/3.9.6/CMakeSystem.cmake" - "CMakeFiles/3.9.6/CMakeCCompiler.cmake" - "CMakeFiles/3.9.6/CMakeCXXCompiler.cmake" - "CMakeFiles/3.9.6/CMakeCCompiler.cmake" - "CMakeFiles/3.9.6/CMakeCXXCompiler.cmake" - "catkin_generated/stamps/protocol/package.xml.stamp" - "catkin_generated/installspace/_setup_util.py" - "catkin_generated/stamps/protocol/_setup_util.py.stamp" - "catkin_generated/installspace/env.sh" - "catkin_generated/installspace/setup.bash" - "catkin_generated/installspace/setup.sh" - "catkin_generated/installspace/setup.zsh" - "catkin_generated/installspace/.rosinstall" - "catkin_generated/generate_cached_setup.py" - "catkin_generated/env_cached.sh" - "catkin_generated/stamps/protocol/interrogate_setup_dot_py.py.stamp" - "devel/share/protocol/cmake/protocol-msg-paths.cmake" - "catkin_generated/installspace/protocol-msg-paths.cmake" - "catkin_generated/protocol-msg-extras.cmake.develspace.in" - "catkin_generated/protocol-msg-extras.cmake.installspace.in" - "cmake/protocol-genmsg-context.py" - "catkin_generated/stamps/protocol/pkg-genmsg.cmake.em.stamp" - "catkin_generated/stamps/protocol/package.xml.stamp" - "catkin_generated/pkg.develspace.context.pc.py" - "catkin_generated/stamps/protocol/pkg.pc.em.stamp" - "devel/share/protocol/cmake/protocol-msg-extras.cmake" - "devel/share/protocol/cmake/protocolConfig.cmake" - "devel/share/protocol/cmake/protocolConfig-version.cmake" - "catkin_generated/pkg.installspace.context.pc.py" - "catkin_generated/stamps/protocol/pkg.pc.em.stamp" - "catkin_generated/installspace/protocol-msg-extras.cmake" - "catkin_generated/installspace/protocolConfig.cmake" - "catkin_generated/installspace/protocolConfig-version.cmake" - "CMakeFiles/CMakeDirectoryInformation.cmake" - "gtest/CMakeFiles/CMakeDirectoryInformation.cmake" - ) - -# Dependency information for all targets: -set(CMAKE_DEPEND_INFO_FILES - "CMakeFiles/protocol_genpy.dir/DependInfo.cmake" - "CMakeFiles/protocol_generate_messages_nodejs.dir/DependInfo.cmake" - "CMakeFiles/listener.dir/DependInfo.cmake" - "CMakeFiles/protocol_genlisp.dir/DependInfo.cmake" - "CMakeFiles/protocol_gennodejs.dir/DependInfo.cmake" - "CMakeFiles/protocol_generate_messages_lisp.dir/DependInfo.cmake" - "CMakeFiles/protocol_gencpp.dir/DependInfo.cmake" - "CMakeFiles/protocol_generate_messages_cpp.dir/DependInfo.cmake" - "CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake" - "CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/DependInfo.cmake" - "CMakeFiles/talker.dir/DependInfo.cmake" - "CMakeFiles/clean_test_results.dir/DependInfo.cmake" - "CMakeFiles/std_msgs_generate_messages_nodejs.dir/DependInfo.cmake" - "CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake" - "CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/DependInfo.cmake" - "CMakeFiles/roscpp_generate_messages_eus.dir/DependInfo.cmake" - "CMakeFiles/protocol_generate_messages_py.dir/DependInfo.cmake" - "CMakeFiles/doxygen.dir/DependInfo.cmake" - "CMakeFiles/run_tests.dir/DependInfo.cmake" - "CMakeFiles/protocol_generate_messages_eus.dir/DependInfo.cmake" - "CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake" - "CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake" - "CMakeFiles/download_extra_data.dir/DependInfo.cmake" - "CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake" - "CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/DependInfo.cmake" - "CMakeFiles/roscpp_generate_messages_nodejs.dir/DependInfo.cmake" - "CMakeFiles/tests.dir/DependInfo.cmake" - "CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake" - "CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake" - "CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake" - "CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake" - "CMakeFiles/std_msgs_generate_messages_eus.dir/DependInfo.cmake" - "CMakeFiles/protocol_geneus.dir/DependInfo.cmake" - "CMakeFiles/protocol_generate_messages.dir/DependInfo.cmake" - "gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake" - "gtest/CMakeFiles/gtest.dir/DependInfo.cmake" - ) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/Makefile2 b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/Makefile2 deleted file mode 100644 index 3df106c49812bdea949184468094e37917e0fe7b..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/Makefile2 +++ /dev/null @@ -1,1266 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Default target executed when no arguments are given to make. -default_target: all - -.PHONY : default_target - -# The main recursive all target -all: - -.PHONY : all - -# The main recursive preinstall target -preinstall: - -.PHONY : preinstall - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -#============================================================================= -# Target rules for target CMakeFiles/protocol_genpy.dir - -# All Build rule for target. -CMakeFiles/protocol_genpy.dir/all: CMakeFiles/protocol_generate_messages_py.dir/all - $(MAKE) -f CMakeFiles/protocol_genpy.dir/build.make CMakeFiles/protocol_genpy.dir/depend - $(MAKE) -f CMakeFiles/protocol_genpy.dir/build.make CMakeFiles/protocol_genpy.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target protocol_genpy" -.PHONY : CMakeFiles/protocol_genpy.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_genpy.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 2 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_genpy.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_genpy.dir/rule - -# Convenience name for target. -protocol_genpy: CMakeFiles/protocol_genpy.dir/rule - -.PHONY : protocol_genpy - -# clean rule for target. -CMakeFiles/protocol_genpy.dir/clean: - $(MAKE) -f CMakeFiles/protocol_genpy.dir/build.make CMakeFiles/protocol_genpy.dir/clean -.PHONY : CMakeFiles/protocol_genpy.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_genpy.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_generate_messages_nodejs.dir - -# All Build rule for target. -CMakeFiles/protocol_generate_messages_nodejs.dir/all: CMakeFiles/std_msgs_generate_messages_nodejs.dir/all -CMakeFiles/protocol_generate_messages_nodejs.dir/all: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all - $(MAKE) -f CMakeFiles/protocol_generate_messages_nodejs.dir/build.make CMakeFiles/protocol_generate_messages_nodejs.dir/depend - $(MAKE) -f CMakeFiles/protocol_generate_messages_nodejs.dir/build.make CMakeFiles/protocol_generate_messages_nodejs.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=11 "Built target protocol_generate_messages_nodejs" -.PHONY : CMakeFiles/protocol_generate_messages_nodejs.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_generate_messages_nodejs.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 1 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_generate_messages_nodejs.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_generate_messages_nodejs.dir/rule - -# Convenience name for target. -protocol_generate_messages_nodejs: CMakeFiles/protocol_generate_messages_nodejs.dir/rule - -.PHONY : protocol_generate_messages_nodejs - -# clean rule for target. -CMakeFiles/protocol_generate_messages_nodejs.dir/clean: - $(MAKE) -f CMakeFiles/protocol_generate_messages_nodejs.dir/build.make CMakeFiles/protocol_generate_messages_nodejs.dir/clean -.PHONY : CMakeFiles/protocol_generate_messages_nodejs.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_generate_messages_nodejs.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/listener.dir - -# All Build rule for target. -CMakeFiles/listener.dir/all: CMakeFiles/protocol_generate_messages_cpp.dir/all - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/depend - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=5,6 "Built target listener" -.PHONY : CMakeFiles/listener.dir/all - -# Include target in all. -all: CMakeFiles/listener.dir/all - -.PHONY : all - -# Build rule for subdir invocation for target. -CMakeFiles/listener.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 3 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/listener.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/listener.dir/rule - -# Convenience name for target. -listener: CMakeFiles/listener.dir/rule - -.PHONY : listener - -# clean rule for target. -CMakeFiles/listener.dir/clean: - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/clean -.PHONY : CMakeFiles/listener.dir/clean - -# clean rule for target. -clean: CMakeFiles/listener.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_genlisp.dir - -# All Build rule for target. -CMakeFiles/protocol_genlisp.dir/all: CMakeFiles/protocol_generate_messages_lisp.dir/all - $(MAKE) -f CMakeFiles/protocol_genlisp.dir/build.make CMakeFiles/protocol_genlisp.dir/depend - $(MAKE) -f CMakeFiles/protocol_genlisp.dir/build.make CMakeFiles/protocol_genlisp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target protocol_genlisp" -.PHONY : CMakeFiles/protocol_genlisp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_genlisp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 1 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_genlisp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_genlisp.dir/rule - -# Convenience name for target. -protocol_genlisp: CMakeFiles/protocol_genlisp.dir/rule - -.PHONY : protocol_genlisp - -# clean rule for target. -CMakeFiles/protocol_genlisp.dir/clean: - $(MAKE) -f CMakeFiles/protocol_genlisp.dir/build.make CMakeFiles/protocol_genlisp.dir/clean -.PHONY : CMakeFiles/protocol_genlisp.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_genlisp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_gennodejs.dir - -# All Build rule for target. -CMakeFiles/protocol_gennodejs.dir/all: CMakeFiles/protocol_generate_messages_nodejs.dir/all - $(MAKE) -f CMakeFiles/protocol_gennodejs.dir/build.make CMakeFiles/protocol_gennodejs.dir/depend - $(MAKE) -f CMakeFiles/protocol_gennodejs.dir/build.make CMakeFiles/protocol_gennodejs.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target protocol_gennodejs" -.PHONY : CMakeFiles/protocol_gennodejs.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_gennodejs.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 1 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_gennodejs.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_gennodejs.dir/rule - -# Convenience name for target. -protocol_gennodejs: CMakeFiles/protocol_gennodejs.dir/rule - -.PHONY : protocol_gennodejs - -# clean rule for target. -CMakeFiles/protocol_gennodejs.dir/clean: - $(MAKE) -f CMakeFiles/protocol_gennodejs.dir/build.make CMakeFiles/protocol_gennodejs.dir/clean -.PHONY : CMakeFiles/protocol_gennodejs.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_gennodejs.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_generate_messages_lisp.dir - -# All Build rule for target. -CMakeFiles/protocol_generate_messages_lisp.dir/all: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all -CMakeFiles/protocol_generate_messages_lisp.dir/all: CMakeFiles/std_msgs_generate_messages_lisp.dir/all - $(MAKE) -f CMakeFiles/protocol_generate_messages_lisp.dir/build.make CMakeFiles/protocol_generate_messages_lisp.dir/depend - $(MAKE) -f CMakeFiles/protocol_generate_messages_lisp.dir/build.make CMakeFiles/protocol_generate_messages_lisp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=10 "Built target protocol_generate_messages_lisp" -.PHONY : CMakeFiles/protocol_generate_messages_lisp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_generate_messages_lisp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 1 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_generate_messages_lisp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_generate_messages_lisp.dir/rule - -# Convenience name for target. -protocol_generate_messages_lisp: CMakeFiles/protocol_generate_messages_lisp.dir/rule - -.PHONY : protocol_generate_messages_lisp - -# clean rule for target. -CMakeFiles/protocol_generate_messages_lisp.dir/clean: - $(MAKE) -f CMakeFiles/protocol_generate_messages_lisp.dir/build.make CMakeFiles/protocol_generate_messages_lisp.dir/clean -.PHONY : CMakeFiles/protocol_generate_messages_lisp.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_generate_messages_lisp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_gencpp.dir - -# All Build rule for target. -CMakeFiles/protocol_gencpp.dir/all: CMakeFiles/protocol_generate_messages_cpp.dir/all - $(MAKE) -f CMakeFiles/protocol_gencpp.dir/build.make CMakeFiles/protocol_gencpp.dir/depend - $(MAKE) -f CMakeFiles/protocol_gencpp.dir/build.make CMakeFiles/protocol_gencpp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target protocol_gencpp" -.PHONY : CMakeFiles/protocol_gencpp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_gencpp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 1 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_gencpp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_gencpp.dir/rule - -# Convenience name for target. -protocol_gencpp: CMakeFiles/protocol_gencpp.dir/rule - -.PHONY : protocol_gencpp - -# clean rule for target. -CMakeFiles/protocol_gencpp.dir/clean: - $(MAKE) -f CMakeFiles/protocol_gencpp.dir/build.make CMakeFiles/protocol_gencpp.dir/clean -.PHONY : CMakeFiles/protocol_gencpp.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_gencpp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_generate_messages_cpp.dir - -# All Build rule for target. -CMakeFiles/protocol_generate_messages_cpp.dir/all: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all -CMakeFiles/protocol_generate_messages_cpp.dir/all: CMakeFiles/std_msgs_generate_messages_cpp.dir/all - $(MAKE) -f CMakeFiles/protocol_generate_messages_cpp.dir/build.make CMakeFiles/protocol_generate_messages_cpp.dir/depend - $(MAKE) -f CMakeFiles/protocol_generate_messages_cpp.dir/build.make CMakeFiles/protocol_generate_messages_cpp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=7 "Built target protocol_generate_messages_cpp" -.PHONY : CMakeFiles/protocol_generate_messages_cpp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_generate_messages_cpp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 1 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_generate_messages_cpp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_generate_messages_cpp.dir/rule - -# Convenience name for target. -protocol_generate_messages_cpp: CMakeFiles/protocol_generate_messages_cpp.dir/rule - -.PHONY : protocol_generate_messages_cpp - -# clean rule for target. -CMakeFiles/protocol_generate_messages_cpp.dir/clean: - $(MAKE) -f CMakeFiles/protocol_generate_messages_cpp.dir/build.make CMakeFiles/protocol_generate_messages_cpp.dir/clean -.PHONY : CMakeFiles/protocol_generate_messages_cpp.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_generate_messages_cpp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/roscpp_generate_messages_py.dir - -# All Build rule for target. -CMakeFiles/roscpp_generate_messages_py.dir/all: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_py.dir/build.make CMakeFiles/roscpp_generate_messages_py.dir/depend - $(MAKE) -f CMakeFiles/roscpp_generate_messages_py.dir/build.make CMakeFiles/roscpp_generate_messages_py.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target roscpp_generate_messages_py" -.PHONY : CMakeFiles/roscpp_generate_messages_py.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/roscpp_generate_messages_py.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/roscpp_generate_messages_py.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/roscpp_generate_messages_py.dir/rule - -# Convenience name for target. -roscpp_generate_messages_py: CMakeFiles/roscpp_generate_messages_py.dir/rule - -.PHONY : roscpp_generate_messages_py - -# clean rule for target. -CMakeFiles/roscpp_generate_messages_py.dir/clean: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_py.dir/build.make CMakeFiles/roscpp_generate_messages_py.dir/clean -.PHONY : CMakeFiles/roscpp_generate_messages_py.dir/clean - -# clean rule for target. -clean: CMakeFiles/roscpp_generate_messages_py.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/rosgraph_msgs_generate_messages_eus.dir - -# All Build rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/all: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/depend - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target rosgraph_msgs_generate_messages_eus" -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/rule - -# Convenience name for target. -rosgraph_msgs_generate_messages_eus: CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/rule - -.PHONY : rosgraph_msgs_generate_messages_eus - -# clean rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/clean: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/clean -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/clean - -# clean rule for target. -clean: CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/talker.dir - -# All Build rule for target. -CMakeFiles/talker.dir/all: CMakeFiles/protocol_generate_messages_cpp.dir/all - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/depend - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=14,15 "Built target talker" -.PHONY : CMakeFiles/talker.dir/all - -# Include target in all. -all: CMakeFiles/talker.dir/all - -.PHONY : all - -# Build rule for subdir invocation for target. -CMakeFiles/talker.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 3 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/talker.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/talker.dir/rule - -# Convenience name for target. -talker: CMakeFiles/talker.dir/rule - -.PHONY : talker - -# clean rule for target. -CMakeFiles/talker.dir/clean: - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/clean -.PHONY : CMakeFiles/talker.dir/clean - -# clean rule for target. -clean: CMakeFiles/talker.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/clean_test_results.dir - -# All Build rule for target. -CMakeFiles/clean_test_results.dir/all: - $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/depend - $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target clean_test_results" -.PHONY : CMakeFiles/clean_test_results.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/clean_test_results.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/clean_test_results.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/clean_test_results.dir/rule - -# Convenience name for target. -clean_test_results: CMakeFiles/clean_test_results.dir/rule - -.PHONY : clean_test_results - -# clean rule for target. -CMakeFiles/clean_test_results.dir/clean: - $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/clean -.PHONY : CMakeFiles/clean_test_results.dir/clean - -# clean rule for target. -clean: CMakeFiles/clean_test_results.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/std_msgs_generate_messages_nodejs.dir - -# All Build rule for target. -CMakeFiles/std_msgs_generate_messages_nodejs.dir/all: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/std_msgs_generate_messages_nodejs.dir/depend - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/std_msgs_generate_messages_nodejs.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target std_msgs_generate_messages_nodejs" -.PHONY : CMakeFiles/std_msgs_generate_messages_nodejs.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/std_msgs_generate_messages_nodejs.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/std_msgs_generate_messages_nodejs.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/std_msgs_generate_messages_nodejs.dir/rule - -# Convenience name for target. -std_msgs_generate_messages_nodejs: CMakeFiles/std_msgs_generate_messages_nodejs.dir/rule - -.PHONY : std_msgs_generate_messages_nodejs - -# clean rule for target. -CMakeFiles/std_msgs_generate_messages_nodejs.dir/clean: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/std_msgs_generate_messages_nodejs.dir/clean -.PHONY : CMakeFiles/std_msgs_generate_messages_nodejs.dir/clean - -# clean rule for target. -clean: CMakeFiles/std_msgs_generate_messages_nodejs.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/roscpp_generate_messages_cpp.dir - -# All Build rule for target. -CMakeFiles/roscpp_generate_messages_cpp.dir/all: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_cpp.dir/build.make CMakeFiles/roscpp_generate_messages_cpp.dir/depend - $(MAKE) -f CMakeFiles/roscpp_generate_messages_cpp.dir/build.make CMakeFiles/roscpp_generate_messages_cpp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target roscpp_generate_messages_cpp" -.PHONY : CMakeFiles/roscpp_generate_messages_cpp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/roscpp_generate_messages_cpp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/roscpp_generate_messages_cpp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/roscpp_generate_messages_cpp.dir/rule - -# Convenience name for target. -roscpp_generate_messages_cpp: CMakeFiles/roscpp_generate_messages_cpp.dir/rule - -.PHONY : roscpp_generate_messages_cpp - -# clean rule for target. -CMakeFiles/roscpp_generate_messages_cpp.dir/clean: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_cpp.dir/build.make CMakeFiles/roscpp_generate_messages_cpp.dir/clean -.PHONY : CMakeFiles/roscpp_generate_messages_cpp.dir/clean - -# clean rule for target. -clean: CMakeFiles/roscpp_generate_messages_cpp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir - -# All Build rule for target. -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all: - $(MAKE) -f CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/depend - $(MAKE) -f CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target _protocol_generate_messages_check_deps_Broadcast" -.PHONY : CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/rule - -# Convenience name for target. -_protocol_generate_messages_check_deps_Broadcast: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/rule - -.PHONY : _protocol_generate_messages_check_deps_Broadcast - -# clean rule for target. -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/clean: - $(MAKE) -f CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/clean -.PHONY : CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/clean - -# clean rule for target. -clean: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/roscpp_generate_messages_eus.dir - -# All Build rule for target. -CMakeFiles/roscpp_generate_messages_eus.dir/all: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_eus.dir/build.make CMakeFiles/roscpp_generate_messages_eus.dir/depend - $(MAKE) -f CMakeFiles/roscpp_generate_messages_eus.dir/build.make CMakeFiles/roscpp_generate_messages_eus.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target roscpp_generate_messages_eus" -.PHONY : CMakeFiles/roscpp_generate_messages_eus.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/roscpp_generate_messages_eus.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/roscpp_generate_messages_eus.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/roscpp_generate_messages_eus.dir/rule - -# Convenience name for target. -roscpp_generate_messages_eus: CMakeFiles/roscpp_generate_messages_eus.dir/rule - -.PHONY : roscpp_generate_messages_eus - -# clean rule for target. -CMakeFiles/roscpp_generate_messages_eus.dir/clean: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_eus.dir/build.make CMakeFiles/roscpp_generate_messages_eus.dir/clean -.PHONY : CMakeFiles/roscpp_generate_messages_eus.dir/clean - -# clean rule for target. -clean: CMakeFiles/roscpp_generate_messages_eus.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_generate_messages_py.dir - -# All Build rule for target. -CMakeFiles/protocol_generate_messages_py.dir/all: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all -CMakeFiles/protocol_generate_messages_py.dir/all: CMakeFiles/std_msgs_generate_messages_py.dir/all - $(MAKE) -f CMakeFiles/protocol_generate_messages_py.dir/build.make CMakeFiles/protocol_generate_messages_py.dir/depend - $(MAKE) -f CMakeFiles/protocol_generate_messages_py.dir/build.make CMakeFiles/protocol_generate_messages_py.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=12,13 "Built target protocol_generate_messages_py" -.PHONY : CMakeFiles/protocol_generate_messages_py.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_generate_messages_py.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 2 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_generate_messages_py.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_generate_messages_py.dir/rule - -# Convenience name for target. -protocol_generate_messages_py: CMakeFiles/protocol_generate_messages_py.dir/rule - -.PHONY : protocol_generate_messages_py - -# clean rule for target. -CMakeFiles/protocol_generate_messages_py.dir/clean: - $(MAKE) -f CMakeFiles/protocol_generate_messages_py.dir/build.make CMakeFiles/protocol_generate_messages_py.dir/clean -.PHONY : CMakeFiles/protocol_generate_messages_py.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_generate_messages_py.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/doxygen.dir - -# All Build rule for target. -CMakeFiles/doxygen.dir/all: - $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/depend - $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target doxygen" -.PHONY : CMakeFiles/doxygen.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/doxygen.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/doxygen.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/doxygen.dir/rule - -# Convenience name for target. -doxygen: CMakeFiles/doxygen.dir/rule - -.PHONY : doxygen - -# clean rule for target. -CMakeFiles/doxygen.dir/clean: - $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/clean -.PHONY : CMakeFiles/doxygen.dir/clean - -# clean rule for target. -clean: CMakeFiles/doxygen.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/run_tests.dir - -# All Build rule for target. -CMakeFiles/run_tests.dir/all: - $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/depend - $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target run_tests" -.PHONY : CMakeFiles/run_tests.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/run_tests.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/run_tests.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/run_tests.dir/rule - -# Convenience name for target. -run_tests: CMakeFiles/run_tests.dir/rule - -.PHONY : run_tests - -# clean rule for target. -CMakeFiles/run_tests.dir/clean: - $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/clean -.PHONY : CMakeFiles/run_tests.dir/clean - -# clean rule for target. -clean: CMakeFiles/run_tests.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_generate_messages_eus.dir - -# All Build rule for target. -CMakeFiles/protocol_generate_messages_eus.dir/all: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/all -CMakeFiles/protocol_generate_messages_eus.dir/all: CMakeFiles/std_msgs_generate_messages_eus.dir/all - $(MAKE) -f CMakeFiles/protocol_generate_messages_eus.dir/build.make CMakeFiles/protocol_generate_messages_eus.dir/depend - $(MAKE) -f CMakeFiles/protocol_generate_messages_eus.dir/build.make CMakeFiles/protocol_generate_messages_eus.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=8,9 "Built target protocol_generate_messages_eus" -.PHONY : CMakeFiles/protocol_generate_messages_eus.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_generate_messages_eus.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 2 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_generate_messages_eus.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_generate_messages_eus.dir/rule - -# Convenience name for target. -protocol_generate_messages_eus: CMakeFiles/protocol_generate_messages_eus.dir/rule - -.PHONY : protocol_generate_messages_eus - -# clean rule for target. -CMakeFiles/protocol_generate_messages_eus.dir/clean: - $(MAKE) -f CMakeFiles/protocol_generate_messages_eus.dir/build.make CMakeFiles/protocol_generate_messages_eus.dir/clean -.PHONY : CMakeFiles/protocol_generate_messages_eus.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_generate_messages_eus.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/std_msgs_generate_messages_cpp.dir - -# All Build rule for target. -CMakeFiles/std_msgs_generate_messages_cpp.dir/all: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make CMakeFiles/std_msgs_generate_messages_cpp.dir/depend - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make CMakeFiles/std_msgs_generate_messages_cpp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target std_msgs_generate_messages_cpp" -.PHONY : CMakeFiles/std_msgs_generate_messages_cpp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/std_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/std_msgs_generate_messages_cpp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/std_msgs_generate_messages_cpp.dir/rule - -# Convenience name for target. -std_msgs_generate_messages_cpp: CMakeFiles/std_msgs_generate_messages_cpp.dir/rule - -.PHONY : std_msgs_generate_messages_cpp - -# clean rule for target. -CMakeFiles/std_msgs_generate_messages_cpp.dir/clean: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make CMakeFiles/std_msgs_generate_messages_cpp.dir/clean -.PHONY : CMakeFiles/std_msgs_generate_messages_cpp.dir/clean - -# clean rule for target. -clean: CMakeFiles/std_msgs_generate_messages_cpp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir - -# All Build rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/all: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target rosgraph_msgs_generate_messages_cpp" -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule - -# Convenience name for target. -rosgraph_msgs_generate_messages_cpp: CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/rule - -.PHONY : rosgraph_msgs_generate_messages_cpp - -# clean rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean - -# clean rule for target. -clean: CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/download_extra_data.dir - -# All Build rule for target. -CMakeFiles/download_extra_data.dir/all: - $(MAKE) -f CMakeFiles/download_extra_data.dir/build.make CMakeFiles/download_extra_data.dir/depend - $(MAKE) -f CMakeFiles/download_extra_data.dir/build.make CMakeFiles/download_extra_data.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target download_extra_data" -.PHONY : CMakeFiles/download_extra_data.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/download_extra_data.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/download_extra_data.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/download_extra_data.dir/rule - -# Convenience name for target. -download_extra_data: CMakeFiles/download_extra_data.dir/rule - -.PHONY : download_extra_data - -# clean rule for target. -CMakeFiles/download_extra_data.dir/clean: - $(MAKE) -f CMakeFiles/download_extra_data.dir/build.make CMakeFiles/download_extra_data.dir/clean -.PHONY : CMakeFiles/download_extra_data.dir/clean - -# clean rule for target. -clean: CMakeFiles/download_extra_data.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/std_msgs_generate_messages_lisp.dir - -# All Build rule for target. -CMakeFiles/std_msgs_generate_messages_lisp.dir/all: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make CMakeFiles/std_msgs_generate_messages_lisp.dir/depend - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make CMakeFiles/std_msgs_generate_messages_lisp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target std_msgs_generate_messages_lisp" -.PHONY : CMakeFiles/std_msgs_generate_messages_lisp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/std_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/std_msgs_generate_messages_lisp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/std_msgs_generate_messages_lisp.dir/rule - -# Convenience name for target. -std_msgs_generate_messages_lisp: CMakeFiles/std_msgs_generate_messages_lisp.dir/rule - -.PHONY : std_msgs_generate_messages_lisp - -# clean rule for target. -CMakeFiles/std_msgs_generate_messages_lisp.dir/clean: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make CMakeFiles/std_msgs_generate_messages_lisp.dir/clean -.PHONY : CMakeFiles/std_msgs_generate_messages_lisp.dir/clean - -# clean rule for target. -clean: CMakeFiles/std_msgs_generate_messages_lisp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir - -# All Build rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/all: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/depend - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target rosgraph_msgs_generate_messages_nodejs" -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/rule - -# Convenience name for target. -rosgraph_msgs_generate_messages_nodejs: CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/rule - -.PHONY : rosgraph_msgs_generate_messages_nodejs - -# clean rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/clean: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/clean -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/clean - -# clean rule for target. -clean: CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/roscpp_generate_messages_nodejs.dir - -# All Build rule for target. -CMakeFiles/roscpp_generate_messages_nodejs.dir/all: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make CMakeFiles/roscpp_generate_messages_nodejs.dir/depend - $(MAKE) -f CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make CMakeFiles/roscpp_generate_messages_nodejs.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target roscpp_generate_messages_nodejs" -.PHONY : CMakeFiles/roscpp_generate_messages_nodejs.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/roscpp_generate_messages_nodejs.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/roscpp_generate_messages_nodejs.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/roscpp_generate_messages_nodejs.dir/rule - -# Convenience name for target. -roscpp_generate_messages_nodejs: CMakeFiles/roscpp_generate_messages_nodejs.dir/rule - -.PHONY : roscpp_generate_messages_nodejs - -# clean rule for target. -CMakeFiles/roscpp_generate_messages_nodejs.dir/clean: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make CMakeFiles/roscpp_generate_messages_nodejs.dir/clean -.PHONY : CMakeFiles/roscpp_generate_messages_nodejs.dir/clean - -# clean rule for target. -clean: CMakeFiles/roscpp_generate_messages_nodejs.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/tests.dir - -# All Build rule for target. -CMakeFiles/tests.dir/all: - $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/depend - $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target tests" -.PHONY : CMakeFiles/tests.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/tests.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/tests.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/tests.dir/rule - -# Convenience name for target. -tests: CMakeFiles/tests.dir/rule - -.PHONY : tests - -# clean rule for target. -CMakeFiles/tests.dir/clean: - $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/clean -.PHONY : CMakeFiles/tests.dir/clean - -# clean rule for target. -clean: CMakeFiles/tests.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir - -# All Build rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/all: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/depend - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target rosgraph_msgs_generate_messages_lisp" -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule - -# Convenience name for target. -rosgraph_msgs_generate_messages_lisp: CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/rule - -.PHONY : rosgraph_msgs_generate_messages_lisp - -# clean rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean - -# clean rule for target. -clean: CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/rosgraph_msgs_generate_messages_py.dir - -# All Build rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_py.dir/all: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target rosgraph_msgs_generate_messages_py" -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_py.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/rosgraph_msgs_generate_messages_py.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule - -# Convenience name for target. -rosgraph_msgs_generate_messages_py: CMakeFiles/rosgraph_msgs_generate_messages_py.dir/rule - -.PHONY : rosgraph_msgs_generate_messages_py - -# clean rule for target. -CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean - -# clean rule for target. -clean: CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/std_msgs_generate_messages_py.dir - -# All Build rule for target. -CMakeFiles/std_msgs_generate_messages_py.dir/all: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_py.dir/build.make CMakeFiles/std_msgs_generate_messages_py.dir/depend - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_py.dir/build.make CMakeFiles/std_msgs_generate_messages_py.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target std_msgs_generate_messages_py" -.PHONY : CMakeFiles/std_msgs_generate_messages_py.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/std_msgs_generate_messages_py.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/std_msgs_generate_messages_py.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/std_msgs_generate_messages_py.dir/rule - -# Convenience name for target. -std_msgs_generate_messages_py: CMakeFiles/std_msgs_generate_messages_py.dir/rule - -.PHONY : std_msgs_generate_messages_py - -# clean rule for target. -CMakeFiles/std_msgs_generate_messages_py.dir/clean: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_py.dir/build.make CMakeFiles/std_msgs_generate_messages_py.dir/clean -.PHONY : CMakeFiles/std_msgs_generate_messages_py.dir/clean - -# clean rule for target. -clean: CMakeFiles/std_msgs_generate_messages_py.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/roscpp_generate_messages_lisp.dir - -# All Build rule for target. -CMakeFiles/roscpp_generate_messages_lisp.dir/all: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_lisp.dir/build.make CMakeFiles/roscpp_generate_messages_lisp.dir/depend - $(MAKE) -f CMakeFiles/roscpp_generate_messages_lisp.dir/build.make CMakeFiles/roscpp_generate_messages_lisp.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target roscpp_generate_messages_lisp" -.PHONY : CMakeFiles/roscpp_generate_messages_lisp.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/roscpp_generate_messages_lisp.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/roscpp_generate_messages_lisp.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/roscpp_generate_messages_lisp.dir/rule - -# Convenience name for target. -roscpp_generate_messages_lisp: CMakeFiles/roscpp_generate_messages_lisp.dir/rule - -.PHONY : roscpp_generate_messages_lisp - -# clean rule for target. -CMakeFiles/roscpp_generate_messages_lisp.dir/clean: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_lisp.dir/build.make CMakeFiles/roscpp_generate_messages_lisp.dir/clean -.PHONY : CMakeFiles/roscpp_generate_messages_lisp.dir/clean - -# clean rule for target. -clean: CMakeFiles/roscpp_generate_messages_lisp.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/std_msgs_generate_messages_eus.dir - -# All Build rule for target. -CMakeFiles/std_msgs_generate_messages_eus.dir/all: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_eus.dir/build.make CMakeFiles/std_msgs_generate_messages_eus.dir/depend - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_eus.dir/build.make CMakeFiles/std_msgs_generate_messages_eus.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target std_msgs_generate_messages_eus" -.PHONY : CMakeFiles/std_msgs_generate_messages_eus.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/std_msgs_generate_messages_eus.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/std_msgs_generate_messages_eus.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/std_msgs_generate_messages_eus.dir/rule - -# Convenience name for target. -std_msgs_generate_messages_eus: CMakeFiles/std_msgs_generate_messages_eus.dir/rule - -.PHONY : std_msgs_generate_messages_eus - -# clean rule for target. -CMakeFiles/std_msgs_generate_messages_eus.dir/clean: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_eus.dir/build.make CMakeFiles/std_msgs_generate_messages_eus.dir/clean -.PHONY : CMakeFiles/std_msgs_generate_messages_eus.dir/clean - -# clean rule for target. -clean: CMakeFiles/std_msgs_generate_messages_eus.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_geneus.dir - -# All Build rule for target. -CMakeFiles/protocol_geneus.dir/all: CMakeFiles/protocol_generate_messages_eus.dir/all - $(MAKE) -f CMakeFiles/protocol_geneus.dir/build.make CMakeFiles/protocol_geneus.dir/depend - $(MAKE) -f CMakeFiles/protocol_geneus.dir/build.make CMakeFiles/protocol_geneus.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target protocol_geneus" -.PHONY : CMakeFiles/protocol_geneus.dir/all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_geneus.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 2 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_geneus.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_geneus.dir/rule - -# Convenience name for target. -protocol_geneus: CMakeFiles/protocol_geneus.dir/rule - -.PHONY : protocol_geneus - -# clean rule for target. -CMakeFiles/protocol_geneus.dir/clean: - $(MAKE) -f CMakeFiles/protocol_geneus.dir/build.make CMakeFiles/protocol_geneus.dir/clean -.PHONY : CMakeFiles/protocol_geneus.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_geneus.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target CMakeFiles/protocol_generate_messages.dir - -# All Build rule for target. -CMakeFiles/protocol_generate_messages.dir/all: CMakeFiles/protocol_generate_messages_nodejs.dir/all -CMakeFiles/protocol_generate_messages.dir/all: CMakeFiles/protocol_generate_messages_lisp.dir/all -CMakeFiles/protocol_generate_messages.dir/all: CMakeFiles/protocol_generate_messages_cpp.dir/all -CMakeFiles/protocol_generate_messages.dir/all: CMakeFiles/protocol_generate_messages_py.dir/all -CMakeFiles/protocol_generate_messages.dir/all: CMakeFiles/protocol_generate_messages_eus.dir/all - $(MAKE) -f CMakeFiles/protocol_generate_messages.dir/build.make CMakeFiles/protocol_generate_messages.dir/depend - $(MAKE) -f CMakeFiles/protocol_generate_messages.dir/build.make CMakeFiles/protocol_generate_messages.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num= "Built target protocol_generate_messages" -.PHONY : CMakeFiles/protocol_generate_messages.dir/all - -# Include target in all. -all: CMakeFiles/protocol_generate_messages.dir/all - -.PHONY : all - -# Build rule for subdir invocation for target. -CMakeFiles/protocol_generate_messages.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 7 - $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/protocol_generate_messages.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : CMakeFiles/protocol_generate_messages.dir/rule - -# Convenience name for target. -protocol_generate_messages: CMakeFiles/protocol_generate_messages.dir/rule - -.PHONY : protocol_generate_messages - -# clean rule for target. -CMakeFiles/protocol_generate_messages.dir/clean: - $(MAKE) -f CMakeFiles/protocol_generate_messages.dir/build.make CMakeFiles/protocol_generate_messages.dir/clean -.PHONY : CMakeFiles/protocol_generate_messages.dir/clean - -# clean rule for target. -clean: CMakeFiles/protocol_generate_messages.dir/clean - -.PHONY : clean - -#============================================================================= -# Directory level rules for directory gtest - -# Convenience name for "all" pass in the directory. -gtest/all: - -.PHONY : gtest/all - -# Convenience name for "clean" pass in the directory. -gtest/clean: gtest/CMakeFiles/gtest_main.dir/clean -gtest/clean: gtest/CMakeFiles/gtest.dir/clean - -.PHONY : gtest/clean - -# Convenience name for "preinstall" pass in the directory. -gtest/preinstall: - -.PHONY : gtest/preinstall - -#============================================================================= -# Target rules for target gtest/CMakeFiles/gtest_main.dir - -# All Build rule for target. -gtest/CMakeFiles/gtest_main.dir/all: gtest/CMakeFiles/gtest.dir/all - $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/depend - $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=3,4 "Built target gtest_main" -.PHONY : gtest/CMakeFiles/gtest_main.dir/all - -# Build rule for subdir invocation for target. -gtest/CMakeFiles/gtest_main.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 4 - $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest_main.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : gtest/CMakeFiles/gtest_main.dir/rule - -# Convenience name for target. -gtest_main: gtest/CMakeFiles/gtest_main.dir/rule - -.PHONY : gtest_main - -# clean rule for target. -gtest/CMakeFiles/gtest_main.dir/clean: - $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/clean -.PHONY : gtest/CMakeFiles/gtest_main.dir/clean - -# clean rule for target. -clean: gtest/CMakeFiles/gtest_main.dir/clean - -.PHONY : clean - -#============================================================================= -# Target rules for target gtest/CMakeFiles/gtest.dir - -# All Build rule for target. -gtest/CMakeFiles/gtest.dir/all: - $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/depend - $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=1,2 "Built target gtest" -.PHONY : gtest/CMakeFiles/gtest.dir/all - -# Build rule for subdir invocation for target. -gtest/CMakeFiles/gtest.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 2 - $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest.dir/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : gtest/CMakeFiles/gtest.dir/rule - -# Convenience name for target. -gtest: gtest/CMakeFiles/gtest.dir/rule - -.PHONY : gtest - -# clean rule for target. -gtest/CMakeFiles/gtest.dir/clean: - $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/clean -.PHONY : gtest/CMakeFiles/gtest.dir/clean - -# clean rule for target. -clean: gtest/CMakeFiles/gtest.dir/clean - -.PHONY : clean - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/TargetDirectories.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/TargetDirectories.txt deleted file mode 100644 index 426f586c031a3bd4dbfc781c3c4439a80458bfd9..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/TargetDirectories.txt +++ /dev/null @@ -1,50 +0,0 @@ -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/install/local.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/install.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/list_install_components.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rebuild_cache.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/edit_cache.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/test.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/install/strip.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/install/strip.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/install/local.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/install.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/list_install_components.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/edit_cache.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/test.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/rebuild_cache.dir -/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make deleted file mode 100644 index 9691e1d0bcd2e3c050d882678c161da5a9424195..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make +++ /dev/null @@ -1,76 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for _protocol_generate_messages_check_deps_Broadcast. - -# Include the progress variables for this target. -include CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/progress.make - -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast: - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py protocol /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg - -_protocol_generate_messages_check_deps_Broadcast: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast -_protocol_generate_messages_check_deps_Broadcast: CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make - -.PHONY : _protocol_generate_messages_check_deps_Broadcast - -# Rule to build all files generated by this target. -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build: _protocol_generate_messages_check_deps_Broadcast - -.PHONY : CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build - -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/cmake_clean.cmake -.PHONY : CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/clean - -CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/cmake_clean.cmake deleted file mode 100644 index 018b807b730c545742bcb26389733c031362e4c2..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/cmake_clean.cmake +++ /dev/null @@ -1,8 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/_protocol_generate_messages_check_deps_Broadcast" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/build.make deleted file mode 100644 index 5125fac7cb51888879f720f125934f41b06842ab..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/build.make +++ /dev/null @@ -1,76 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for clean_test_results. - -# Include the progress variables for this target. -include CMakeFiles/clean_test_results.dir/progress.make - -CMakeFiles/clean_test_results: - /usr/bin/python /opt/ros/kinetic/share/catkin/cmake/test/remove_test_results.py /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/test_results - -clean_test_results: CMakeFiles/clean_test_results -clean_test_results: CMakeFiles/clean_test_results.dir/build.make - -.PHONY : clean_test_results - -# Rule to build all files generated by this target. -CMakeFiles/clean_test_results.dir/build: clean_test_results - -.PHONY : CMakeFiles/clean_test_results.dir/build - -CMakeFiles/clean_test_results.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/clean_test_results.dir/cmake_clean.cmake -.PHONY : CMakeFiles/clean_test_results.dir/clean - -CMakeFiles/clean_test_results.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/clean_test_results.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/cmake_clean.cmake deleted file mode 100644 index 63bf0e0f4cda9ec3f7123aee2e30d09703661043..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/cmake_clean.cmake +++ /dev/null @@ -1,8 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/clean_test_results" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/clean_test_results.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clean_test_results.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clion-environment.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clion-environment.txt deleted file mode 100644 index 26e70bf87d8fbfcba35335a01d2d7663bb54986a..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clion-environment.txt +++ /dev/null @@ -1,3 +0,0 @@ -Options: - -Options: \ No newline at end of file diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clion-log.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clion-log.txt deleted file mode 100644 index ffb3e7e33923ed6ea5d5750992ba268b5700d8c3..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/clion-log.txt +++ /dev/null @@ -1,42 +0,0 @@ -/home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" --- The C compiler identification is GNU 5.4.0 --- The CXX compiler identification is GNU 5.4.0 --- Check for working C compiler: /usr/bin/cc --- Check for working C compiler: /usr/bin/cc -- works --- Detecting C compiler ABI info --- Detecting C compiler ABI info - done --- Detecting C compile features --- Detecting C compile features - done --- Check for working CXX compiler: /usr/bin/c++ --- Check for working CXX compiler: /usr/bin/c++ -- works --- Detecting CXX compiler ABI info --- Detecting CXX compiler ABI info - done --- Detecting CXX compile features --- Detecting CXX compile features - done --- Using CATKIN_DEVEL_PREFIX: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel --- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic --- This workspace overlays: /opt/ros/kinetic --- Found PythonInterp: /usr/bin/python (found version "2.7.12") --- Using PYTHON_EXECUTABLE: /usr/bin/python --- Using Debian Python package layout --- Using empy: /usr/bin/empy --- Using CATKIN_ENABLE_TESTING: ON --- Call enable_testing() --- Using CATKIN_TEST_RESULTS_DIR: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/test_results --- Looking for pthread.h --- Looking for pthread.h - found --- Looking for pthread_create --- Looking for pthread_create - not found --- Looking for pthread_create in pthreads --- Looking for pthread_create in pthreads - not found --- Looking for pthread_create in pthread --- Looking for pthread_create in pthread - found --- Found Threads: TRUE --- Found gtest sources under '/usr/src/gtest': gtests will be built --- Using Python nosetests: /usr/bin/nosetests-2.7 --- catkin 0.7.8 --- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy --- protocol: 1 messages, 0 services --- Configuring done --- Generating done --- Build files have been written to: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/cmake.check_cache b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/cmake.check_cache deleted file mode 100644 index 3dccd731726d7faa8b29d8d7dba3b981a53ca497..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/cmake.check_cache +++ /dev/null @@ -1 +0,0 @@ -# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/build.make deleted file mode 100644 index fcf1d73b0e0a53980945aa29a1dbc73661b385ba..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for download_extra_data. - -# Include the progress variables for this target. -include CMakeFiles/download_extra_data.dir/progress.make - -download_extra_data: CMakeFiles/download_extra_data.dir/build.make - -.PHONY : download_extra_data - -# Rule to build all files generated by this target. -CMakeFiles/download_extra_data.dir/build: download_extra_data - -.PHONY : CMakeFiles/download_extra_data.dir/build - -CMakeFiles/download_extra_data.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/download_extra_data.dir/cmake_clean.cmake -.PHONY : CMakeFiles/download_extra_data.dir/clean - -CMakeFiles/download_extra_data.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/download_extra_data.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/cmake_clean.cmake deleted file mode 100644 index bf7d7e25c0800701682eb7dcc091389edb9f8952..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/download_extra_data.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/download_extra_data.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/build.make deleted file mode 100644 index b711895c738c9dbaa13342c1892d0a61c50d90de..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for doxygen. - -# Include the progress variables for this target. -include CMakeFiles/doxygen.dir/progress.make - -doxygen: CMakeFiles/doxygen.dir/build.make - -.PHONY : doxygen - -# Rule to build all files generated by this target. -CMakeFiles/doxygen.dir/build: doxygen - -.PHONY : CMakeFiles/doxygen.dir/build - -CMakeFiles/doxygen.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/doxygen.dir/cmake_clean.cmake -.PHONY : CMakeFiles/doxygen.dir/clean - -CMakeFiles/doxygen.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/doxygen.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/cmake_clean.cmake deleted file mode 100644 index ef20a758f2dfce53bd9a1326dac1182bbe19a225..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/doxygen.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/doxygen.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.bin b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.bin deleted file mode 100755 index 9fe5cc8969376b49b19e03a00f2f5b48ae2b1220..0000000000000000000000000000000000000000 Binary files a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.bin and /dev/null differ diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.c b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.c deleted file mode 100644 index 83e86dd8cd85f9f7554f51122b8cd08412ec01f2..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.c +++ /dev/null @@ -1,34 +0,0 @@ - - const char features[] = {"\n" -"C_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 -"1" -#else -"0" -#endif -"c_function_prototypes\n" -"C_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -"1" -#else -"0" -#endif -"c_restrict\n" -"C_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L -"1" -#else -"0" -#endif -"c_static_assert\n" -"C_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 304 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -"1" -#else -"0" -#endif -"c_variadic_macros\n" - -}; - -int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.cxx b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.cxx deleted file mode 100644 index b93418c6ed69feaf1b5c2feb9592bbdb5a5f042c..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/feature_tests.cxx +++ /dev/null @@ -1,405 +0,0 @@ - - const char features[] = {"\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L -"1" -#else -"0" -#endif -"cxx_aggregate_default_initializers\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_alias_templates\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_alignas\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_alignof\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_attributes\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_attribute_deprecated\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_auto_type\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_binary_literals\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_constexpr\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_contextual_conversions\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_decltype\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_decltype_auto\n" -"CXX_FEATURE:" -#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_decltype_incomplete_return_types\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_default_function_template_args\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_defaulted_functions\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_defaulted_move_initializers\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_delegating_constructors\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_deleted_functions\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_digit_separators\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_enum_forward_declarations\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_explicit_conversions\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_extended_friend_declarations\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_extern_templates\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_final\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_func_identifier\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_generalized_initializers\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_generic_lambdas\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_inheriting_constructors\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_inline_namespaces\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_lambdas\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_lambda_init_captures\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_local_type_template_args\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_long_long_type\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_noexcept\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_nonstatic_member_init\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_nullptr\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_override\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_range_for\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_raw_string_literals\n" -"CXX_FEATURE:" -#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_reference_qualified_functions\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L -"1" -#else -"0" -#endif -"cxx_relaxed_constexpr\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L -"1" -#else -"0" -#endif -"cxx_return_type_deduction\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_right_angle_brackets\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_rvalue_references\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_sizeof_member\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_static_assert\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_strong_enums\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus -"1" -#else -"0" -#endif -"cxx_template_template_parameters\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_thread_local\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_trailing_return_types\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_unicode_literals\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_uniform_initialization\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_unrestricted_unions\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L -"1" -#else -"0" -#endif -"cxx_user_literals\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L -"1" -#else -"0" -#endif -"cxx_variable_templates\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_variadic_macros\n" -"CXX_FEATURE:" -#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) -"1" -#else -"0" -#endif -"cxx_variadic_templates\n" - -}; - -int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/DependInfo.cmake deleted file mode 100644 index 9b8eccef0089f2fcfd2a3910be950c7991d8d8c1..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/DependInfo.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - "CXX" - ) -# The set of files for implicit dependencies of each language: -set(CMAKE_DEPENDS_CHECK_CXX - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/listener.cpp" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/src/listener.cpp.o" - ) -set(CMAKE_CXX_COMPILER_ID "GNU") - -# Preprocessor definitions for this target. -set(CMAKE_TARGET_DEFINITIONS_CXX - "ROSCONSOLE_BACKEND_LOG4CXX" - "ROS_PACKAGE_NAME=\"protocol\"" - ) - -# The include file search paths: -set(CMAKE_CXX_TARGET_INCLUDE_PATH - "devel/include" - "/opt/ros/kinetic/include" - "/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp" - ) - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/build.make deleted file mode 100644 index 332b0813df1bbc317a18dfeb6f4b421df6b2f6d0..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/build.make +++ /dev/null @@ -1,132 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Include any dependencies generated for this target. -include CMakeFiles/listener.dir/depend.make - -# Include the progress variables for this target. -include CMakeFiles/listener.dir/progress.make - -# Include the compile flags for this target's objects. -include CMakeFiles/listener.dir/flags.make - -CMakeFiles/listener.dir/src/listener.cpp.o: CMakeFiles/listener.dir/flags.make -CMakeFiles/listener.dir/src/listener.cpp.o: ../src/listener.cpp - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/listener.dir/src/listener.cpp.o" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/listener.dir/src/listener.cpp.o -c "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/listener.cpp" - -CMakeFiles/listener.dir/src/listener.cpp.i: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/listener.dir/src/listener.cpp.i" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/listener.cpp" > CMakeFiles/listener.dir/src/listener.cpp.i - -CMakeFiles/listener.dir/src/listener.cpp.s: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/listener.dir/src/listener.cpp.s" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/listener.cpp" -o CMakeFiles/listener.dir/src/listener.cpp.s - -CMakeFiles/listener.dir/src/listener.cpp.o.requires: - -.PHONY : CMakeFiles/listener.dir/src/listener.cpp.o.requires - -CMakeFiles/listener.dir/src/listener.cpp.o.provides: CMakeFiles/listener.dir/src/listener.cpp.o.requires - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/src/listener.cpp.o.provides.build -.PHONY : CMakeFiles/listener.dir/src/listener.cpp.o.provides - -CMakeFiles/listener.dir/src/listener.cpp.o.provides.build: CMakeFiles/listener.dir/src/listener.cpp.o - - -# Object files for target listener -listener_OBJECTS = \ -"CMakeFiles/listener.dir/src/listener.cpp.o" - -# External object files for target listener -listener_EXTERNAL_OBJECTS = - -devel/lib/protocol/listener: CMakeFiles/listener.dir/src/listener.cpp.o -devel/lib/protocol/listener: CMakeFiles/listener.dir/build.make -devel/lib/protocol/listener: /opt/ros/kinetic/lib/libroscpp.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_filesystem.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_signals.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/librosconsole.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/librosconsole_log4cxx.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/librosconsole_backend_interface.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/liblog4cxx.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_regex.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/libxmlrpcpp.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/libroscpp_serialization.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/librostime.so -devel/lib/protocol/listener: /opt/ros/kinetic/lib/libcpp_common.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_system.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_thread.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_chrono.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_date_time.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libboost_atomic.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libpthread.so -devel/lib/protocol/listener: /usr/lib/x86_64-linux-gnu/libconsole_bridge.so -devel/lib/protocol/listener: CMakeFiles/listener.dir/link.txt - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable devel/lib/protocol/listener" - $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/listener.dir/link.txt --verbose=$(VERBOSE) - -# Rule to build all files generated by this target. -CMakeFiles/listener.dir/build: devel/lib/protocol/listener - -.PHONY : CMakeFiles/listener.dir/build - -CMakeFiles/listener.dir/requires: CMakeFiles/listener.dir/src/listener.cpp.o.requires - -.PHONY : CMakeFiles/listener.dir/requires - -CMakeFiles/listener.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/listener.dir/cmake_clean.cmake -.PHONY : CMakeFiles/listener.dir/clean - -CMakeFiles/listener.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/listener.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/cmake_clean.cmake deleted file mode 100644 index 77d45e2a8afa58e56c9e813c5d69e612e3c7145f..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/listener.dir/src/listener.cpp.o" - "devel/lib/protocol/listener.pdb" - "devel/lib/protocol/listener" -) - -# Per-language clean rules from dependency scanning. -foreach(lang CXX) - include(CMakeFiles/listener.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/depend.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/depend.make deleted file mode 100644 index aa3eaaf63a06de1a39820988ab5010b87dd06f34..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/depend.make +++ /dev/null @@ -1,2 +0,0 @@ -# Empty dependencies file for listener. -# This may be replaced when dependencies are built. diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/flags.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/flags.make deleted file mode 100644 index 76119edb7fe51627f942633247878e96e42d297d..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/flags.make +++ /dev/null @@ -1,10 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# compile CXX with /usr/bin/c++ -CXX_FLAGS = -g - -CXX_DEFINES = -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"protocol\" - -CXX_INCLUDES = -I"/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include" -I/opt/ros/kinetic/include -I/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/link.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/link.txt deleted file mode 100644 index bb15a08b561b1e3f60d67fa39aced0ee7536dc5e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/link.txt +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/c++ -g -rdynamic CMakeFiles/listener.dir/src/listener.cpp.o -o devel/lib/protocol/listener -Wl,-rpath,/opt/ros/kinetic/lib /opt/ros/kinetic/lib/libroscpp.so -lboost_filesystem -lboost_signals /opt/ros/kinetic/lib/librosconsole.so /opt/ros/kinetic/lib/librosconsole_log4cxx.so /opt/ros/kinetic/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex /opt/ros/kinetic/lib/libxmlrpcpp.so /opt/ros/kinetic/lib/libroscpp_serialization.so /opt/ros/kinetic/lib/librostime.so /opt/ros/kinetic/lib/libcpp_common.so -lboost_system -lboost_thread -lboost_chrono -lboost_date_time -lboost_atomic -lpthread -lconsole_bridge diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/progress.make deleted file mode 100644 index 3a86673aa7c1868ad77aa16c631effd83be0da02..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/listener.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 5 -CMAKE_PROGRESS_2 = 6 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/progress.marks b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/progress.marks deleted file mode 100644 index b4de3947675361a7770d29b8982c407b0ec6b2a0..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/progress.marks +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/build.make deleted file mode 100644 index 7e6b63403666d77306636570b13a031166312d86..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_gencpp. - -# Include the progress variables for this target. -include CMakeFiles/protocol_gencpp.dir/progress.make - -protocol_gencpp: CMakeFiles/protocol_gencpp.dir/build.make - -.PHONY : protocol_gencpp - -# Rule to build all files generated by this target. -CMakeFiles/protocol_gencpp.dir/build: protocol_gencpp - -.PHONY : CMakeFiles/protocol_gencpp.dir/build - -CMakeFiles/protocol_gencpp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_gencpp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_gencpp.dir/clean - -CMakeFiles/protocol_gencpp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_gencpp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/cmake_clean.cmake deleted file mode 100644 index 893aafd1d69cc0f2c9ec603eb9707c624deb995a..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_gencpp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gencpp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/build.make deleted file mode 100644 index 2229d23e10a1d2640f374361efa882046b0a0620..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_generate_messages. - -# Include the progress variables for this target. -include CMakeFiles/protocol_generate_messages.dir/progress.make - -protocol_generate_messages: CMakeFiles/protocol_generate_messages.dir/build.make - -.PHONY : protocol_generate_messages - -# Rule to build all files generated by this target. -CMakeFiles/protocol_generate_messages.dir/build: protocol_generate_messages - -.PHONY : CMakeFiles/protocol_generate_messages.dir/build - -CMakeFiles/protocol_generate_messages.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_generate_messages.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_generate_messages.dir/clean - -CMakeFiles/protocol_generate_messages.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_generate_messages.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/cmake_clean.cmake deleted file mode 100644 index 0eb8e73713a812db807d23e7f05f56cb1b0212d6..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_generate_messages.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/build.make deleted file mode 100644 index a00f8b0b915ad67b8756ea2f8c8d15d3d8be825a..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/build.make +++ /dev/null @@ -1,83 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_generate_messages_cpp. - -# Include the progress variables for this target. -include CMakeFiles/protocol_generate_messages_cpp.dir/progress.make - -CMakeFiles/protocol_generate_messages_cpp: devel/include/protocol/Broadcast.h - - -devel/include/protocol/Broadcast.h: /opt/ros/kinetic/lib/gencpp/gen_cpp.py -devel/include/protocol/Broadcast.h: ../msg/Broadcast.msg -devel/include/protocol/Broadcast.h: /opt/ros/kinetic/share/gencpp/msg.h.template - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Generating C++ code from protocol/Broadcast.msg" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/gencpp/cmake/../../../lib/gencpp/gen_cpp.py /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg -Iprotocol:/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg -Istd_msgs:/opt/ros/kinetic/share/std_msgs/cmake/../msg -p protocol -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include/protocol -e /opt/ros/kinetic/share/gencpp/cmake/.. - -protocol_generate_messages_cpp: CMakeFiles/protocol_generate_messages_cpp -protocol_generate_messages_cpp: devel/include/protocol/Broadcast.h -protocol_generate_messages_cpp: CMakeFiles/protocol_generate_messages_cpp.dir/build.make - -.PHONY : protocol_generate_messages_cpp - -# Rule to build all files generated by this target. -CMakeFiles/protocol_generate_messages_cpp.dir/build: protocol_generate_messages_cpp - -.PHONY : CMakeFiles/protocol_generate_messages_cpp.dir/build - -CMakeFiles/protocol_generate_messages_cpp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_generate_messages_cpp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_generate_messages_cpp.dir/clean - -CMakeFiles/protocol_generate_messages_cpp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_generate_messages_cpp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/cmake_clean.cmake deleted file mode 100644 index 145162793b021f70d6a72d5ff69aeeb21d9dac6f..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/cmake_clean.cmake +++ /dev/null @@ -1,9 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/protocol_generate_messages_cpp" - "devel/include/protocol/Broadcast.h" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/progress.make deleted file mode 100644 index 68e0bc5f45990a61b98e2fc8ed05a2db2c7b2a0a..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_cpp.dir/progress.make +++ /dev/null @@ -1,2 +0,0 @@ -CMAKE_PROGRESS_1 = 7 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/build.make deleted file mode 100644 index 075ddd2b447f74b005d3adb2bde4dd6e38e2756c..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/build.make +++ /dev/null @@ -1,88 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_generate_messages_eus. - -# Include the progress variables for this target. -include CMakeFiles/protocol_generate_messages_eus.dir/progress.make - -CMakeFiles/protocol_generate_messages_eus: devel/share/roseus/ros/protocol/msg/Broadcast.l -CMakeFiles/protocol_generate_messages_eus: devel/share/roseus/ros/protocol/manifest.l - - -devel/share/roseus/ros/protocol/msg/Broadcast.l: /opt/ros/kinetic/lib/geneus/gen_eus.py -devel/share/roseus/ros/protocol/msg/Broadcast.l: ../msg/Broadcast.msg - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Generating EusLisp code from protocol/Broadcast.msg" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/geneus/cmake/../../../lib/geneus/gen_eus.py /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg -Iprotocol:/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg -Istd_msgs:/opt/ros/kinetic/share/std_msgs/cmake/../msg -p protocol -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/roseus/ros/protocol/msg - -devel/share/roseus/ros/protocol/manifest.l: /opt/ros/kinetic/lib/geneus/gen_eus.py - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Generating EusLisp manifest code for protocol" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/geneus/cmake/../../../lib/geneus/gen_eus.py -m -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/roseus/ros/protocol protocol std_msgs - -protocol_generate_messages_eus: CMakeFiles/protocol_generate_messages_eus -protocol_generate_messages_eus: devel/share/roseus/ros/protocol/msg/Broadcast.l -protocol_generate_messages_eus: devel/share/roseus/ros/protocol/manifest.l -protocol_generate_messages_eus: CMakeFiles/protocol_generate_messages_eus.dir/build.make - -.PHONY : protocol_generate_messages_eus - -# Rule to build all files generated by this target. -CMakeFiles/protocol_generate_messages_eus.dir/build: protocol_generate_messages_eus - -.PHONY : CMakeFiles/protocol_generate_messages_eus.dir/build - -CMakeFiles/protocol_generate_messages_eus.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_generate_messages_eus.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_generate_messages_eus.dir/clean - -CMakeFiles/protocol_generate_messages_eus.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_generate_messages_eus.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/cmake_clean.cmake deleted file mode 100644 index 93d38b17e27877d32470ecb35627d3436286203e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/protocol_generate_messages_eus" - "devel/share/roseus/ros/protocol/msg/Broadcast.l" - "devel/share/roseus/ros/protocol/manifest.l" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_generate_messages_eus.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/progress.make deleted file mode 100644 index 895faac227d8e6c3c5be24b8edcae9c3c7edfcb5..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_eus.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 8 -CMAKE_PROGRESS_2 = 9 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/build.make deleted file mode 100644 index 8c9e35ba749f3831440c1ad794c5eb84effb2486..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/build.make +++ /dev/null @@ -1,82 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_generate_messages_lisp. - -# Include the progress variables for this target. -include CMakeFiles/protocol_generate_messages_lisp.dir/progress.make - -CMakeFiles/protocol_generate_messages_lisp: devel/share/common-lisp/ros/protocol/msg/Broadcast.lisp - - -devel/share/common-lisp/ros/protocol/msg/Broadcast.lisp: /opt/ros/kinetic/lib/genlisp/gen_lisp.py -devel/share/common-lisp/ros/protocol/msg/Broadcast.lisp: ../msg/Broadcast.msg - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Generating Lisp code from protocol/Broadcast.msg" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/genlisp/cmake/../../../lib/genlisp/gen_lisp.py /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg -Iprotocol:/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg -Istd_msgs:/opt/ros/kinetic/share/std_msgs/cmake/../msg -p protocol -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/common-lisp/ros/protocol/msg - -protocol_generate_messages_lisp: CMakeFiles/protocol_generate_messages_lisp -protocol_generate_messages_lisp: devel/share/common-lisp/ros/protocol/msg/Broadcast.lisp -protocol_generate_messages_lisp: CMakeFiles/protocol_generate_messages_lisp.dir/build.make - -.PHONY : protocol_generate_messages_lisp - -# Rule to build all files generated by this target. -CMakeFiles/protocol_generate_messages_lisp.dir/build: protocol_generate_messages_lisp - -.PHONY : CMakeFiles/protocol_generate_messages_lisp.dir/build - -CMakeFiles/protocol_generate_messages_lisp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_generate_messages_lisp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_generate_messages_lisp.dir/clean - -CMakeFiles/protocol_generate_messages_lisp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_generate_messages_lisp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/cmake_clean.cmake deleted file mode 100644 index 6dbf60605c4a0d9c3be9c12d2f5c12d6719264f5..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/cmake_clean.cmake +++ /dev/null @@ -1,9 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/protocol_generate_messages_lisp" - "devel/share/common-lisp/ros/protocol/msg/Broadcast.lisp" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/progress.make deleted file mode 100644 index d61796b1938e81e1e78b8660e1f6f5dc2a318000..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_lisp.dir/progress.make +++ /dev/null @@ -1,2 +0,0 @@ -CMAKE_PROGRESS_1 = 10 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/build.make deleted file mode 100644 index c94672456d5468b5655f414d811717dcce2ab6fb..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/build.make +++ /dev/null @@ -1,82 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_generate_messages_nodejs. - -# Include the progress variables for this target. -include CMakeFiles/protocol_generate_messages_nodejs.dir/progress.make - -CMakeFiles/protocol_generate_messages_nodejs: devel/share/gennodejs/ros/protocol/msg/Broadcast.js - - -devel/share/gennodejs/ros/protocol/msg/Broadcast.js: /opt/ros/kinetic/lib/gennodejs/gen_nodejs.py -devel/share/gennodejs/ros/protocol/msg/Broadcast.js: ../msg/Broadcast.msg - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Generating Javascript code from protocol/Broadcast.msg" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/gennodejs/cmake/../../../lib/gennodejs/gen_nodejs.py /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg -Iprotocol:/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg -Istd_msgs:/opt/ros/kinetic/share/std_msgs/cmake/../msg -p protocol -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/gennodejs/ros/protocol/msg - -protocol_generate_messages_nodejs: CMakeFiles/protocol_generate_messages_nodejs -protocol_generate_messages_nodejs: devel/share/gennodejs/ros/protocol/msg/Broadcast.js -protocol_generate_messages_nodejs: CMakeFiles/protocol_generate_messages_nodejs.dir/build.make - -.PHONY : protocol_generate_messages_nodejs - -# Rule to build all files generated by this target. -CMakeFiles/protocol_generate_messages_nodejs.dir/build: protocol_generate_messages_nodejs - -.PHONY : CMakeFiles/protocol_generate_messages_nodejs.dir/build - -CMakeFiles/protocol_generate_messages_nodejs.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_generate_messages_nodejs.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_generate_messages_nodejs.dir/clean - -CMakeFiles/protocol_generate_messages_nodejs.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_generate_messages_nodejs.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/cmake_clean.cmake deleted file mode 100644 index e3ae5cac0c6588084cb0d805f62063dca7f7499d..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/cmake_clean.cmake +++ /dev/null @@ -1,9 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/protocol_generate_messages_nodejs" - "devel/share/gennodejs/ros/protocol/msg/Broadcast.js" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_generate_messages_nodejs.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/progress.make deleted file mode 100644 index 27952ed76a534aed5b8a5fa4bfd9bb2d3e51eeba..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_nodejs.dir/progress.make +++ /dev/null @@ -1,2 +0,0 @@ -CMAKE_PROGRESS_1 = 11 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/build.make deleted file mode 100644 index 55dd5edb1846cc4c1ce7d110f1b15cfe7ec6a502..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/build.make +++ /dev/null @@ -1,89 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_generate_messages_py. - -# Include the progress variables for this target. -include CMakeFiles/protocol_generate_messages_py.dir/progress.make - -CMakeFiles/protocol_generate_messages_py: devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py -CMakeFiles/protocol_generate_messages_py: devel/lib/python2.7/dist-packages/protocol/msg/__init__.py - - -devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py: /opt/ros/kinetic/lib/genpy/genmsg_py.py -devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py: ../msg/Broadcast.msg - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Generating Python from MSG protocol/Broadcast" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg -Iprotocol:/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/msg -Istd_msgs:/opt/ros/kinetic/share/std_msgs/cmake/../msg -p protocol -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/python2.7/dist-packages/protocol/msg - -devel/lib/python2.7/dist-packages/protocol/msg/__init__.py: /opt/ros/kinetic/lib/genpy/genmsg_py.py -devel/lib/python2.7/dist-packages/protocol/msg/__init__.py: devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Generating Python msg __init__.py for protocol" - catkin_generated/env_cached.sh /usr/bin/python /opt/ros/kinetic/share/genpy/cmake/../../../lib/genpy/genmsg_py.py -o /home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/python2.7/dist-packages/protocol/msg --initpy - -protocol_generate_messages_py: CMakeFiles/protocol_generate_messages_py -protocol_generate_messages_py: devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py -protocol_generate_messages_py: devel/lib/python2.7/dist-packages/protocol/msg/__init__.py -protocol_generate_messages_py: CMakeFiles/protocol_generate_messages_py.dir/build.make - -.PHONY : protocol_generate_messages_py - -# Rule to build all files generated by this target. -CMakeFiles/protocol_generate_messages_py.dir/build: protocol_generate_messages_py - -.PHONY : CMakeFiles/protocol_generate_messages_py.dir/build - -CMakeFiles/protocol_generate_messages_py.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_generate_messages_py.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_generate_messages_py.dir/clean - -CMakeFiles/protocol_generate_messages_py.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_generate_messages_py.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/cmake_clean.cmake deleted file mode 100644 index 4b32ceaee5600e88a2b6067533c20ac5e161009b..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/protocol_generate_messages_py" - "devel/lib/python2.7/dist-packages/protocol/msg/_Broadcast.py" - "devel/lib/python2.7/dist-packages/protocol/msg/__init__.py" -) - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/progress.make deleted file mode 100644 index 7df1340bfd15f30e69323732abd474231c0c47b0..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_generate_messages_py.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 12 -CMAKE_PROGRESS_2 = 13 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/build.make deleted file mode 100644 index d318bfe3cc541a00654a996dcbb2d90fe3186aa8..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_geneus. - -# Include the progress variables for this target. -include CMakeFiles/protocol_geneus.dir/progress.make - -protocol_geneus: CMakeFiles/protocol_geneus.dir/build.make - -.PHONY : protocol_geneus - -# Rule to build all files generated by this target. -CMakeFiles/protocol_geneus.dir/build: protocol_geneus - -.PHONY : CMakeFiles/protocol_geneus.dir/build - -CMakeFiles/protocol_geneus.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_geneus.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_geneus.dir/clean - -CMakeFiles/protocol_geneus.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_geneus.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/cmake_clean.cmake deleted file mode 100644 index 42f0c934398a52ffc28c786e45f7cea1abbcc217..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_geneus.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_geneus.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/build.make deleted file mode 100644 index 9f1784848944d67ac8013a3fe8bd2aa90645c097..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_genlisp. - -# Include the progress variables for this target. -include CMakeFiles/protocol_genlisp.dir/progress.make - -protocol_genlisp: CMakeFiles/protocol_genlisp.dir/build.make - -.PHONY : protocol_genlisp - -# Rule to build all files generated by this target. -CMakeFiles/protocol_genlisp.dir/build: protocol_genlisp - -.PHONY : CMakeFiles/protocol_genlisp.dir/build - -CMakeFiles/protocol_genlisp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_genlisp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_genlisp.dir/clean - -CMakeFiles/protocol_genlisp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_genlisp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/cmake_clean.cmake deleted file mode 100644 index 967dcf2225b1dd65b2dd9a23b47ed256f618d3cc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_genlisp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genlisp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/build.make deleted file mode 100644 index d5c1e4dca2c6eca7adb738c4ff966fd6a42dbb29..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_gennodejs. - -# Include the progress variables for this target. -include CMakeFiles/protocol_gennodejs.dir/progress.make - -protocol_gennodejs: CMakeFiles/protocol_gennodejs.dir/build.make - -.PHONY : protocol_gennodejs - -# Rule to build all files generated by this target. -CMakeFiles/protocol_gennodejs.dir/build: protocol_gennodejs - -.PHONY : CMakeFiles/protocol_gennodejs.dir/build - -CMakeFiles/protocol_gennodejs.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_gennodejs.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_gennodejs.dir/clean - -CMakeFiles/protocol_gennodejs.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_gennodejs.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/cmake_clean.cmake deleted file mode 100644 index 310892d8e74feb963f6c1f7783d355e214679852..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_gennodejs.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_gennodejs.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/build.make deleted file mode 100644 index 8c8cdf4f1bd08d53ba7d4dee9339e1bcc870558e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for protocol_genpy. - -# Include the progress variables for this target. -include CMakeFiles/protocol_genpy.dir/progress.make - -protocol_genpy: CMakeFiles/protocol_genpy.dir/build.make - -.PHONY : protocol_genpy - -# Rule to build all files generated by this target. -CMakeFiles/protocol_genpy.dir/build: protocol_genpy - -.PHONY : CMakeFiles/protocol_genpy.dir/build - -CMakeFiles/protocol_genpy.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/protocol_genpy.dir/cmake_clean.cmake -.PHONY : CMakeFiles/protocol_genpy.dir/clean - -CMakeFiles/protocol_genpy.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/protocol_genpy.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/cmake_clean.cmake deleted file mode 100644 index cb5244a4fcd184fb189b86d2f4aea6b22788d4ae..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/protocol_genpy.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/protocol_genpy.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make deleted file mode 100644 index 068e1966d5c280165336f645b9bce7a70a8e24cf..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for roscpp_generate_messages_cpp. - -# Include the progress variables for this target. -include CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make - -roscpp_generate_messages_cpp: CMakeFiles/roscpp_generate_messages_cpp.dir/build.make - -.PHONY : roscpp_generate_messages_cpp - -# Rule to build all files generated by this target. -CMakeFiles/roscpp_generate_messages_cpp.dir/build: roscpp_generate_messages_cpp - -.PHONY : CMakeFiles/roscpp_generate_messages_cpp.dir/build - -CMakeFiles/roscpp_generate_messages_cpp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/roscpp_generate_messages_cpp.dir/clean - -CMakeFiles/roscpp_generate_messages_cpp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/roscpp_generate_messages_cpp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake deleted file mode 100644 index bf353654a022affaf54224fbd1c18177f271b037..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/roscpp_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_cpp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/build.make deleted file mode 100644 index aa17781663dd7af85c4f0389ce39ee6dd5e52afb..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for roscpp_generate_messages_eus. - -# Include the progress variables for this target. -include CMakeFiles/roscpp_generate_messages_eus.dir/progress.make - -roscpp_generate_messages_eus: CMakeFiles/roscpp_generate_messages_eus.dir/build.make - -.PHONY : roscpp_generate_messages_eus - -# Rule to build all files generated by this target. -CMakeFiles/roscpp_generate_messages_eus.dir/build: roscpp_generate_messages_eus - -.PHONY : CMakeFiles/roscpp_generate_messages_eus.dir/build - -CMakeFiles/roscpp_generate_messages_eus.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_eus.dir/cmake_clean.cmake -.PHONY : CMakeFiles/roscpp_generate_messages_eus.dir/clean - -CMakeFiles/roscpp_generate_messages_eus.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/roscpp_generate_messages_eus.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/cmake_clean.cmake deleted file mode 100644 index 61700fa61598b5a7c45ee26eac646fe367101992..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/roscpp_generate_messages_eus.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_eus.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make deleted file mode 100644 index 354a87ce51522eabc5e05331a687187be09a66e0..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for roscpp_generate_messages_lisp. - -# Include the progress variables for this target. -include CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make - -roscpp_generate_messages_lisp: CMakeFiles/roscpp_generate_messages_lisp.dir/build.make - -.PHONY : roscpp_generate_messages_lisp - -# Rule to build all files generated by this target. -CMakeFiles/roscpp_generate_messages_lisp.dir/build: roscpp_generate_messages_lisp - -.PHONY : CMakeFiles/roscpp_generate_messages_lisp.dir/build - -CMakeFiles/roscpp_generate_messages_lisp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/roscpp_generate_messages_lisp.dir/clean - -CMakeFiles/roscpp_generate_messages_lisp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/roscpp_generate_messages_lisp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake deleted file mode 100644 index 492a50bd91a039addba1281e459d4aee16b465e4..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/roscpp_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_lisp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make deleted file mode 100644 index 04d5cffe50f45f966bedab135d1ea12ce084186e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for roscpp_generate_messages_nodejs. - -# Include the progress variables for this target. -include CMakeFiles/roscpp_generate_messages_nodejs.dir/progress.make - -roscpp_generate_messages_nodejs: CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make - -.PHONY : roscpp_generate_messages_nodejs - -# Rule to build all files generated by this target. -CMakeFiles/roscpp_generate_messages_nodejs.dir/build: roscpp_generate_messages_nodejs - -.PHONY : CMakeFiles/roscpp_generate_messages_nodejs.dir/build - -CMakeFiles/roscpp_generate_messages_nodejs.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_nodejs.dir/cmake_clean.cmake -.PHONY : CMakeFiles/roscpp_generate_messages_nodejs.dir/clean - -CMakeFiles/roscpp_generate_messages_nodejs.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/roscpp_generate_messages_nodejs.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/cmake_clean.cmake deleted file mode 100644 index 37945a670242e2de6d8465b3474da9eb383ab588..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/roscpp_generate_messages_nodejs.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_nodejs.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/build.make deleted file mode 100644 index 2e7e0634a8fb57a7668491e1a0cec7640d27082d..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for roscpp_generate_messages_py. - -# Include the progress variables for this target. -include CMakeFiles/roscpp_generate_messages_py.dir/progress.make - -roscpp_generate_messages_py: CMakeFiles/roscpp_generate_messages_py.dir/build.make - -.PHONY : roscpp_generate_messages_py - -# Rule to build all files generated by this target. -CMakeFiles/roscpp_generate_messages_py.dir/build: roscpp_generate_messages_py - -.PHONY : CMakeFiles/roscpp_generate_messages_py.dir/build - -CMakeFiles/roscpp_generate_messages_py.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake -.PHONY : CMakeFiles/roscpp_generate_messages_py.dir/clean - -CMakeFiles/roscpp_generate_messages_py.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/roscpp_generate_messages_py.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake deleted file mode 100644 index 2c13747338b810ad1480558faa521f8adb7d395b..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/roscpp_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/roscpp_generate_messages_py.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make deleted file mode 100644 index 17f01aa7e3f73c09758ccb9c809a69bea2e050c5..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for rosgraph_msgs_generate_messages_cpp. - -# Include the progress variables for this target. -include CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make - -rosgraph_msgs_generate_messages_cpp: CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make - -.PHONY : rosgraph_msgs_generate_messages_cpp - -# Rule to build all files generated by this target. -CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build: rosgraph_msgs_generate_messages_cpp - -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build - -CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/clean - -CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake deleted file mode 100644 index 720bdd0edac46cb588da30503f36902d22b1f3bd..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make deleted file mode 100644 index 7841cc5fb81600c94eaec2652cd783019454f6d7..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for rosgraph_msgs_generate_messages_eus. - -# Include the progress variables for this target. -include CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/progress.make - -rosgraph_msgs_generate_messages_eus: CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make - -.PHONY : rosgraph_msgs_generate_messages_eus - -# Rule to build all files generated by this target. -CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build: rosgraph_msgs_generate_messages_eus - -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build - -CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/cmake_clean.cmake -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/clean - -CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/cmake_clean.cmake deleted file mode 100644 index 5610f8400a30f1c9e738841c6a11b635aaeb3648..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make deleted file mode 100644 index fd9f3cd1e014c98ae6f5b700b304a3a5009ccfbb..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for rosgraph_msgs_generate_messages_lisp. - -# Include the progress variables for this target. -include CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make - -rosgraph_msgs_generate_messages_lisp: CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make - -.PHONY : rosgraph_msgs_generate_messages_lisp - -# Rule to build all files generated by this target. -CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build: rosgraph_msgs_generate_messages_lisp - -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build - -CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/clean - -CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake deleted file mode 100644 index cdd6e3fce75ecbc3ad7295b674353e85f77ba7a5..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make deleted file mode 100644 index 324e7487d328485f879d4c0649427eb498c8f9d7..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for rosgraph_msgs_generate_messages_nodejs. - -# Include the progress variables for this target. -include CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/progress.make - -rosgraph_msgs_generate_messages_nodejs: CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make - -.PHONY : rosgraph_msgs_generate_messages_nodejs - -# Rule to build all files generated by this target. -CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build: rosgraph_msgs_generate_messages_nodejs - -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build - -CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/cmake_clean.cmake -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/clean - -CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/cmake_clean.cmake deleted file mode 100644 index 37bf13dc24b1724d4b85b9617056c744d5e99df3..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make deleted file mode 100644 index 083133368e31d50381b4b9a95be08a2cf886df5e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for rosgraph_msgs_generate_messages_py. - -# Include the progress variables for this target. -include CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make - -rosgraph_msgs_generate_messages_py: CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make - -.PHONY : rosgraph_msgs_generate_messages_py - -# Rule to build all files generated by this target. -CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build: rosgraph_msgs_generate_messages_py - -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build - -CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_py.dir/clean - -CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/rosgraph_msgs_generate_messages_py.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake deleted file mode 100644 index de801d4c76b9fbe39fc2cdad82bc436399718f92..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/rosgraph_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/rosgraph_msgs_generate_messages_py.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/build.make deleted file mode 100644 index 158193d4c5e18937180fe9ffc8053a2d2fed7b0b..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for run_tests. - -# Include the progress variables for this target. -include CMakeFiles/run_tests.dir/progress.make - -run_tests: CMakeFiles/run_tests.dir/build.make - -.PHONY : run_tests - -# Rule to build all files generated by this target. -CMakeFiles/run_tests.dir/build: run_tests - -.PHONY : CMakeFiles/run_tests.dir/build - -CMakeFiles/run_tests.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/run_tests.dir/cmake_clean.cmake -.PHONY : CMakeFiles/run_tests.dir/clean - -CMakeFiles/run_tests.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/run_tests.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/cmake_clean.cmake deleted file mode 100644 index e67d34f6d11ce305bbc51c998454c8d9cc3b7470..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/run_tests.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/run_tests.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make deleted file mode 100644 index 9d1b2ae499b3dd11e8dc0f286705e8e199782099..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for std_msgs_generate_messages_cpp. - -# Include the progress variables for this target. -include CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make - -std_msgs_generate_messages_cpp: CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make - -.PHONY : std_msgs_generate_messages_cpp - -# Rule to build all files generated by this target. -CMakeFiles/std_msgs_generate_messages_cpp.dir/build: std_msgs_generate_messages_cpp - -.PHONY : CMakeFiles/std_msgs_generate_messages_cpp.dir/build - -CMakeFiles/std_msgs_generate_messages_cpp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/std_msgs_generate_messages_cpp.dir/clean - -CMakeFiles/std_msgs_generate_messages_cpp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/std_msgs_generate_messages_cpp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake deleted file mode 100644 index 0d092bf7dcb1a5955b6c2c4eef8f16df0593f3ea..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/std_msgs_generate_messages_cpp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_cpp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/build.make deleted file mode 100644 index 8af881d80e894890359101fc5360550b46da44d0..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for std_msgs_generate_messages_eus. - -# Include the progress variables for this target. -include CMakeFiles/std_msgs_generate_messages_eus.dir/progress.make - -std_msgs_generate_messages_eus: CMakeFiles/std_msgs_generate_messages_eus.dir/build.make - -.PHONY : std_msgs_generate_messages_eus - -# Rule to build all files generated by this target. -CMakeFiles/std_msgs_generate_messages_eus.dir/build: std_msgs_generate_messages_eus - -.PHONY : CMakeFiles/std_msgs_generate_messages_eus.dir/build - -CMakeFiles/std_msgs_generate_messages_eus.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_eus.dir/cmake_clean.cmake -.PHONY : CMakeFiles/std_msgs_generate_messages_eus.dir/clean - -CMakeFiles/std_msgs_generate_messages_eus.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/std_msgs_generate_messages_eus.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/cmake_clean.cmake deleted file mode 100644 index 855155ec96fb985c24a72c15e128f656d9f6065a..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/std_msgs_generate_messages_eus.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_eus.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make deleted file mode 100644 index e880c403596338beffa4d92df636546d24743273..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for std_msgs_generate_messages_lisp. - -# Include the progress variables for this target. -include CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make - -std_msgs_generate_messages_lisp: CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make - -.PHONY : std_msgs_generate_messages_lisp - -# Rule to build all files generated by this target. -CMakeFiles/std_msgs_generate_messages_lisp.dir/build: std_msgs_generate_messages_lisp - -.PHONY : CMakeFiles/std_msgs_generate_messages_lisp.dir/build - -CMakeFiles/std_msgs_generate_messages_lisp.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake -.PHONY : CMakeFiles/std_msgs_generate_messages_lisp.dir/clean - -CMakeFiles/std_msgs_generate_messages_lisp.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/std_msgs_generate_messages_lisp.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake deleted file mode 100644 index b995112eab054ad92b9ec2bd7533b328f13f306e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/std_msgs_generate_messages_lisp.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_lisp.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make deleted file mode 100644 index 5aee248b5a7e3efdd0e33fcfa6f8b137fa415f4f..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for std_msgs_generate_messages_nodejs. - -# Include the progress variables for this target. -include CMakeFiles/std_msgs_generate_messages_nodejs.dir/progress.make - -std_msgs_generate_messages_nodejs: CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make - -.PHONY : std_msgs_generate_messages_nodejs - -# Rule to build all files generated by this target. -CMakeFiles/std_msgs_generate_messages_nodejs.dir/build: std_msgs_generate_messages_nodejs - -.PHONY : CMakeFiles/std_msgs_generate_messages_nodejs.dir/build - -CMakeFiles/std_msgs_generate_messages_nodejs.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_nodejs.dir/cmake_clean.cmake -.PHONY : CMakeFiles/std_msgs_generate_messages_nodejs.dir/clean - -CMakeFiles/std_msgs_generate_messages_nodejs.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/std_msgs_generate_messages_nodejs.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/cmake_clean.cmake deleted file mode 100644 index f5f42ae06987e0d5a16acccec495927a20b926de..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/std_msgs_generate_messages_nodejs.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_nodejs.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/build.make deleted file mode 100644 index 6dc4afb958a424d17559a9eb3b80fd1f6826b510..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for std_msgs_generate_messages_py. - -# Include the progress variables for this target. -include CMakeFiles/std_msgs_generate_messages_py.dir/progress.make - -std_msgs_generate_messages_py: CMakeFiles/std_msgs_generate_messages_py.dir/build.make - -.PHONY : std_msgs_generate_messages_py - -# Rule to build all files generated by this target. -CMakeFiles/std_msgs_generate_messages_py.dir/build: std_msgs_generate_messages_py - -.PHONY : CMakeFiles/std_msgs_generate_messages_py.dir/build - -CMakeFiles/std_msgs_generate_messages_py.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake -.PHONY : CMakeFiles/std_msgs_generate_messages_py.dir/clean - -CMakeFiles/std_msgs_generate_messages_py.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/std_msgs_generate_messages_py.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake deleted file mode 100644 index 15da12c8d9c8a0533d756cbfb4fbf902c32cf641..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/std_msgs_generate_messages_py.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/std_msgs_generate_messages_py.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/DependInfo.cmake deleted file mode 100644 index b52b22d631612be47b07b1f28b9bd2cee957bc8b..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/DependInfo.cmake +++ /dev/null @@ -1,29 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - "CXX" - ) -# The set of files for implicit dependencies of each language: -set(CMAKE_DEPENDS_CHECK_CXX - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/talker.cpp" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/src/talker.cpp.o" - ) -set(CMAKE_CXX_COMPILER_ID "GNU") - -# Preprocessor definitions for this target. -set(CMAKE_TARGET_DEFINITIONS_CXX - "ROSCONSOLE_BACKEND_LOG4CXX" - "ROS_PACKAGE_NAME=\"protocol\"" - ) - -# The include file search paths: -set(CMAKE_CXX_TARGET_INCLUDE_PATH - "devel/include" - "/opt/ros/kinetic/include" - "/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp" - ) - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/build.make deleted file mode 100644 index 725cdb2a864cedda7306b196c610d65c1145268c..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/build.make +++ /dev/null @@ -1,132 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Include any dependencies generated for this target. -include CMakeFiles/talker.dir/depend.make - -# Include the progress variables for this target. -include CMakeFiles/talker.dir/progress.make - -# Include the compile flags for this target's objects. -include CMakeFiles/talker.dir/flags.make - -CMakeFiles/talker.dir/src/talker.cpp.o: CMakeFiles/talker.dir/flags.make -CMakeFiles/talker.dir/src/talker.cpp.o: ../src/talker.cpp - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/talker.dir/src/talker.cpp.o" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/talker.dir/src/talker.cpp.o -c "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/talker.cpp" - -CMakeFiles/talker.dir/src/talker.cpp.i: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/talker.dir/src/talker.cpp.i" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/talker.cpp" > CMakeFiles/talker.dir/src/talker.cpp.i - -CMakeFiles/talker.dir/src/talker.cpp.s: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/talker.dir/src/talker.cpp.s" - /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/talker.cpp" -o CMakeFiles/talker.dir/src/talker.cpp.s - -CMakeFiles/talker.dir/src/talker.cpp.o.requires: - -.PHONY : CMakeFiles/talker.dir/src/talker.cpp.o.requires - -CMakeFiles/talker.dir/src/talker.cpp.o.provides: CMakeFiles/talker.dir/src/talker.cpp.o.requires - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/src/talker.cpp.o.provides.build -.PHONY : CMakeFiles/talker.dir/src/talker.cpp.o.provides - -CMakeFiles/talker.dir/src/talker.cpp.o.provides.build: CMakeFiles/talker.dir/src/talker.cpp.o - - -# Object files for target talker -talker_OBJECTS = \ -"CMakeFiles/talker.dir/src/talker.cpp.o" - -# External object files for target talker -talker_EXTERNAL_OBJECTS = - -devel/lib/protocol/talker: CMakeFiles/talker.dir/src/talker.cpp.o -devel/lib/protocol/talker: CMakeFiles/talker.dir/build.make -devel/lib/protocol/talker: /opt/ros/kinetic/lib/libroscpp.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_filesystem.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_signals.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/librosconsole.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/librosconsole_log4cxx.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/librosconsole_backend_interface.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/liblog4cxx.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_regex.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/libxmlrpcpp.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/libroscpp_serialization.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/librostime.so -devel/lib/protocol/talker: /opt/ros/kinetic/lib/libcpp_common.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_system.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_thread.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_chrono.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_date_time.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libboost_atomic.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libpthread.so -devel/lib/protocol/talker: /usr/lib/x86_64-linux-gnu/libconsole_bridge.so -devel/lib/protocol/talker: CMakeFiles/talker.dir/link.txt - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable devel/lib/protocol/talker" - $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/talker.dir/link.txt --verbose=$(VERBOSE) - -# Rule to build all files generated by this target. -CMakeFiles/talker.dir/build: devel/lib/protocol/talker - -.PHONY : CMakeFiles/talker.dir/build - -CMakeFiles/talker.dir/requires: CMakeFiles/talker.dir/src/talker.cpp.o.requires - -.PHONY : CMakeFiles/talker.dir/requires - -CMakeFiles/talker.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/talker.dir/cmake_clean.cmake -.PHONY : CMakeFiles/talker.dir/clean - -CMakeFiles/talker.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/talker.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/cmake_clean.cmake deleted file mode 100644 index d21d2925abd0dcc3f88bf9657c26ec714553c54d..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/talker.dir/src/talker.cpp.o" - "devel/lib/protocol/talker.pdb" - "devel/lib/protocol/talker" -) - -# Per-language clean rules from dependency scanning. -foreach(lang CXX) - include(CMakeFiles/talker.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/depend.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/depend.make deleted file mode 100644 index b6e8c25ba588c51c41cc08e3a4f2cd85bfd8eb73..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/depend.make +++ /dev/null @@ -1,2 +0,0 @@ -# Empty dependencies file for talker. -# This may be replaced when dependencies are built. diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/flags.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/flags.make deleted file mode 100644 index 76119edb7fe51627f942633247878e96e42d297d..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/flags.make +++ /dev/null @@ -1,10 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# compile CXX with /usr/bin/c++ -CXX_FLAGS = -g - -CXX_DEFINES = -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"protocol\" - -CXX_INCLUDES = -I"/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include" -I/opt/ros/kinetic/include -I/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/link.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/link.txt deleted file mode 100644 index 1243547b72259ba978dff58efd0290db9dd1e436..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/link.txt +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/c++ -g -rdynamic CMakeFiles/talker.dir/src/talker.cpp.o -o devel/lib/protocol/talker -Wl,-rpath,/opt/ros/kinetic/lib /opt/ros/kinetic/lib/libroscpp.so -lboost_filesystem -lboost_signals /opt/ros/kinetic/lib/librosconsole.so /opt/ros/kinetic/lib/librosconsole_log4cxx.so /opt/ros/kinetic/lib/librosconsole_backend_interface.so -llog4cxx -lboost_regex /opt/ros/kinetic/lib/libxmlrpcpp.so /opt/ros/kinetic/lib/libroscpp_serialization.so /opt/ros/kinetic/lib/librostime.so /opt/ros/kinetic/lib/libcpp_common.so -lboost_system -lboost_thread -lboost_chrono -lboost_date_time -lboost_atomic -lpthread -lconsole_bridge diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/progress.make deleted file mode 100644 index 8063b3b41f4abfb7adb2f51e1685368a6a3ad674..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/talker.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 14 -CMAKE_PROGRESS_2 = 15 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/DependInfo.cmake deleted file mode 100644 index 19fab2149bf120962a1699d74b7373348dc4c117..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/DependInfo.cmake +++ /dev/null @@ -1,11 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - ) -# The set of files for implicit dependencies of each language: - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/build.make deleted file mode 100644 index d2a93b91bb7dc96f2241b67b69309c49763b6992..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/build.make +++ /dev/null @@ -1,72 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Utility rule file for tests. - -# Include the progress variables for this target. -include CMakeFiles/tests.dir/progress.make - -tests: CMakeFiles/tests.dir/build.make - -.PHONY : tests - -# Rule to build all files generated by this target. -CMakeFiles/tests.dir/build: tests - -.PHONY : CMakeFiles/tests.dir/build - -CMakeFiles/tests.dir/clean: - $(CMAKE_COMMAND) -P CMakeFiles/tests.dir/cmake_clean.cmake -.PHONY : CMakeFiles/tests.dir/clean - -CMakeFiles/tests.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : CMakeFiles/tests.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/cmake_clean.cmake deleted file mode 100644 index 910f04d829639aafb592cbe6806fdcd7276630ee..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/cmake_clean.cmake +++ /dev/null @@ -1,5 +0,0 @@ - -# Per-language clean rules from dependency scanning. -foreach(lang ) - include(CMakeFiles/tests.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/progress.make deleted file mode 100644 index 8b137891791fe96927ad78e64b0aad7bded08bdc..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/tests.dir/progress.make +++ /dev/null @@ -1 +0,0 @@ - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/CTestTestfile.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/CTestTestfile.cmake deleted file mode 100644 index 6bd5a5ca6abe1178b00ee19689004f9789e40d16..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/CTestTestfile.cmake +++ /dev/null @@ -1,7 +0,0 @@ -# CMake generated Testfile for -# Source directory: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol -# Build directory: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug -# -# This file includes the relevant testing commands required for -# testing this directory and lists subdirectories to be tested as well. -subdirs("gtest") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile b/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile deleted file mode 100644 index 425ba657edb555a57a30f5566ff11ba2a0d41268..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile +++ /dev/null @@ -1,760 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Default target executed when no arguments are given to make. -default_target: all - -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components - -.PHONY : list_install_components/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache - -.PHONY : rebuild_cache/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache - -.PHONY : edit_cache/fast - -# Special rule for the target test -test: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/ctest --force-new-ctest-process $(ARGS) -.PHONY : test - -# Special rule for the target test -test/fast: test - -.PHONY : test/fast - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# The main all target -all: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles/progress.marks" - $(MAKE) -f CMakeFiles/Makefile2 all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : all - -# The main clean target -clean: - $(MAKE) -f CMakeFiles/Makefile2 clean -.PHONY : clean - -# The main clean target -clean/fast: clean - -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - $(MAKE) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - $(MAKE) -f CMakeFiles/Makefile2 preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -#============================================================================= -# Target rules for targets named protocol_genpy - -# Build rule for target. -protocol_genpy: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_genpy -.PHONY : protocol_genpy - -# fast build rule for target. -protocol_genpy/fast: - $(MAKE) -f CMakeFiles/protocol_genpy.dir/build.make CMakeFiles/protocol_genpy.dir/build -.PHONY : protocol_genpy/fast - -#============================================================================= -# Target rules for targets named protocol_generate_messages_nodejs - -# Build rule for target. -protocol_generate_messages_nodejs: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_generate_messages_nodejs -.PHONY : protocol_generate_messages_nodejs - -# fast build rule for target. -protocol_generate_messages_nodejs/fast: - $(MAKE) -f CMakeFiles/protocol_generate_messages_nodejs.dir/build.make CMakeFiles/protocol_generate_messages_nodejs.dir/build -.PHONY : protocol_generate_messages_nodejs/fast - -#============================================================================= -# Target rules for targets named listener - -# Build rule for target. -listener: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 listener -.PHONY : listener - -# fast build rule for target. -listener/fast: - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/build -.PHONY : listener/fast - -#============================================================================= -# Target rules for targets named protocol_genlisp - -# Build rule for target. -protocol_genlisp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_genlisp -.PHONY : protocol_genlisp - -# fast build rule for target. -protocol_genlisp/fast: - $(MAKE) -f CMakeFiles/protocol_genlisp.dir/build.make CMakeFiles/protocol_genlisp.dir/build -.PHONY : protocol_genlisp/fast - -#============================================================================= -# Target rules for targets named protocol_gennodejs - -# Build rule for target. -protocol_gennodejs: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_gennodejs -.PHONY : protocol_gennodejs - -# fast build rule for target. -protocol_gennodejs/fast: - $(MAKE) -f CMakeFiles/protocol_gennodejs.dir/build.make CMakeFiles/protocol_gennodejs.dir/build -.PHONY : protocol_gennodejs/fast - -#============================================================================= -# Target rules for targets named protocol_generate_messages_lisp - -# Build rule for target. -protocol_generate_messages_lisp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_generate_messages_lisp -.PHONY : protocol_generate_messages_lisp - -# fast build rule for target. -protocol_generate_messages_lisp/fast: - $(MAKE) -f CMakeFiles/protocol_generate_messages_lisp.dir/build.make CMakeFiles/protocol_generate_messages_lisp.dir/build -.PHONY : protocol_generate_messages_lisp/fast - -#============================================================================= -# Target rules for targets named protocol_gencpp - -# Build rule for target. -protocol_gencpp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_gencpp -.PHONY : protocol_gencpp - -# fast build rule for target. -protocol_gencpp/fast: - $(MAKE) -f CMakeFiles/protocol_gencpp.dir/build.make CMakeFiles/protocol_gencpp.dir/build -.PHONY : protocol_gencpp/fast - -#============================================================================= -# Target rules for targets named protocol_generate_messages_cpp - -# Build rule for target. -protocol_generate_messages_cpp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_generate_messages_cpp -.PHONY : protocol_generate_messages_cpp - -# fast build rule for target. -protocol_generate_messages_cpp/fast: - $(MAKE) -f CMakeFiles/protocol_generate_messages_cpp.dir/build.make CMakeFiles/protocol_generate_messages_cpp.dir/build -.PHONY : protocol_generate_messages_cpp/fast - -#============================================================================= -# Target rules for targets named roscpp_generate_messages_py - -# Build rule for target. -roscpp_generate_messages_py: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_py -.PHONY : roscpp_generate_messages_py - -# fast build rule for target. -roscpp_generate_messages_py/fast: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_py.dir/build.make CMakeFiles/roscpp_generate_messages_py.dir/build -.PHONY : roscpp_generate_messages_py/fast - -#============================================================================= -# Target rules for targets named rosgraph_msgs_generate_messages_eus - -# Build rule for target. -rosgraph_msgs_generate_messages_eus: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_eus -.PHONY : rosgraph_msgs_generate_messages_eus - -# fast build rule for target. -rosgraph_msgs_generate_messages_eus/fast: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_eus.dir/build -.PHONY : rosgraph_msgs_generate_messages_eus/fast - -#============================================================================= -# Target rules for targets named talker - -# Build rule for target. -talker: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 talker -.PHONY : talker - -# fast build rule for target. -talker/fast: - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/build -.PHONY : talker/fast - -#============================================================================= -# Target rules for targets named clean_test_results - -# Build rule for target. -clean_test_results: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 clean_test_results -.PHONY : clean_test_results - -# fast build rule for target. -clean_test_results/fast: - $(MAKE) -f CMakeFiles/clean_test_results.dir/build.make CMakeFiles/clean_test_results.dir/build -.PHONY : clean_test_results/fast - -#============================================================================= -# Target rules for targets named std_msgs_generate_messages_nodejs - -# Build rule for target. -std_msgs_generate_messages_nodejs: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_nodejs -.PHONY : std_msgs_generate_messages_nodejs - -# fast build rule for target. -std_msgs_generate_messages_nodejs/fast: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/std_msgs_generate_messages_nodejs.dir/build -.PHONY : std_msgs_generate_messages_nodejs/fast - -#============================================================================= -# Target rules for targets named roscpp_generate_messages_cpp - -# Build rule for target. -roscpp_generate_messages_cpp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_cpp -.PHONY : roscpp_generate_messages_cpp - -# fast build rule for target. -roscpp_generate_messages_cpp/fast: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_cpp.dir/build.make CMakeFiles/roscpp_generate_messages_cpp.dir/build -.PHONY : roscpp_generate_messages_cpp/fast - -#============================================================================= -# Target rules for targets named _protocol_generate_messages_check_deps_Broadcast - -# Build rule for target. -_protocol_generate_messages_check_deps_Broadcast: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 _protocol_generate_messages_check_deps_Broadcast -.PHONY : _protocol_generate_messages_check_deps_Broadcast - -# fast build rule for target. -_protocol_generate_messages_check_deps_Broadcast/fast: - $(MAKE) -f CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build.make CMakeFiles/_protocol_generate_messages_check_deps_Broadcast.dir/build -.PHONY : _protocol_generate_messages_check_deps_Broadcast/fast - -#============================================================================= -# Target rules for targets named roscpp_generate_messages_eus - -# Build rule for target. -roscpp_generate_messages_eus: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_eus -.PHONY : roscpp_generate_messages_eus - -# fast build rule for target. -roscpp_generate_messages_eus/fast: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_eus.dir/build.make CMakeFiles/roscpp_generate_messages_eus.dir/build -.PHONY : roscpp_generate_messages_eus/fast - -#============================================================================= -# Target rules for targets named protocol_generate_messages_py - -# Build rule for target. -protocol_generate_messages_py: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_generate_messages_py -.PHONY : protocol_generate_messages_py - -# fast build rule for target. -protocol_generate_messages_py/fast: - $(MAKE) -f CMakeFiles/protocol_generate_messages_py.dir/build.make CMakeFiles/protocol_generate_messages_py.dir/build -.PHONY : protocol_generate_messages_py/fast - -#============================================================================= -# Target rules for targets named doxygen - -# Build rule for target. -doxygen: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 doxygen -.PHONY : doxygen - -# fast build rule for target. -doxygen/fast: - $(MAKE) -f CMakeFiles/doxygen.dir/build.make CMakeFiles/doxygen.dir/build -.PHONY : doxygen/fast - -#============================================================================= -# Target rules for targets named run_tests - -# Build rule for target. -run_tests: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 run_tests -.PHONY : run_tests - -# fast build rule for target. -run_tests/fast: - $(MAKE) -f CMakeFiles/run_tests.dir/build.make CMakeFiles/run_tests.dir/build -.PHONY : run_tests/fast - -#============================================================================= -# Target rules for targets named protocol_generate_messages_eus - -# Build rule for target. -protocol_generate_messages_eus: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_generate_messages_eus -.PHONY : protocol_generate_messages_eus - -# fast build rule for target. -protocol_generate_messages_eus/fast: - $(MAKE) -f CMakeFiles/protocol_generate_messages_eus.dir/build.make CMakeFiles/protocol_generate_messages_eus.dir/build -.PHONY : protocol_generate_messages_eus/fast - -#============================================================================= -# Target rules for targets named std_msgs_generate_messages_cpp - -# Build rule for target. -std_msgs_generate_messages_cpp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_cpp -.PHONY : std_msgs_generate_messages_cpp - -# fast build rule for target. -std_msgs_generate_messages_cpp/fast: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_cpp.dir/build.make CMakeFiles/std_msgs_generate_messages_cpp.dir/build -.PHONY : std_msgs_generate_messages_cpp/fast - -#============================================================================= -# Target rules for targets named rosgraph_msgs_generate_messages_cpp - -# Build rule for target. -rosgraph_msgs_generate_messages_cpp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_cpp -.PHONY : rosgraph_msgs_generate_messages_cpp - -# fast build rule for target. -rosgraph_msgs_generate_messages_cpp/fast: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_cpp.dir/build -.PHONY : rosgraph_msgs_generate_messages_cpp/fast - -#============================================================================= -# Target rules for targets named download_extra_data - -# Build rule for target. -download_extra_data: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 download_extra_data -.PHONY : download_extra_data - -# fast build rule for target. -download_extra_data/fast: - $(MAKE) -f CMakeFiles/download_extra_data.dir/build.make CMakeFiles/download_extra_data.dir/build -.PHONY : download_extra_data/fast - -#============================================================================= -# Target rules for targets named std_msgs_generate_messages_lisp - -# Build rule for target. -std_msgs_generate_messages_lisp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_lisp -.PHONY : std_msgs_generate_messages_lisp - -# fast build rule for target. -std_msgs_generate_messages_lisp/fast: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_lisp.dir/build.make CMakeFiles/std_msgs_generate_messages_lisp.dir/build -.PHONY : std_msgs_generate_messages_lisp/fast - -#============================================================================= -# Target rules for targets named rosgraph_msgs_generate_messages_nodejs - -# Build rule for target. -rosgraph_msgs_generate_messages_nodejs: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_nodejs -.PHONY : rosgraph_msgs_generate_messages_nodejs - -# fast build rule for target. -rosgraph_msgs_generate_messages_nodejs/fast: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_nodejs.dir/build -.PHONY : rosgraph_msgs_generate_messages_nodejs/fast - -#============================================================================= -# Target rules for targets named roscpp_generate_messages_nodejs - -# Build rule for target. -roscpp_generate_messages_nodejs: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_nodejs -.PHONY : roscpp_generate_messages_nodejs - -# fast build rule for target. -roscpp_generate_messages_nodejs/fast: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_nodejs.dir/build.make CMakeFiles/roscpp_generate_messages_nodejs.dir/build -.PHONY : roscpp_generate_messages_nodejs/fast - -#============================================================================= -# Target rules for targets named tests - -# Build rule for target. -tests: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 tests -.PHONY : tests - -# fast build rule for target. -tests/fast: - $(MAKE) -f CMakeFiles/tests.dir/build.make CMakeFiles/tests.dir/build -.PHONY : tests/fast - -#============================================================================= -# Target rules for targets named rosgraph_msgs_generate_messages_lisp - -# Build rule for target. -rosgraph_msgs_generate_messages_lisp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_lisp -.PHONY : rosgraph_msgs_generate_messages_lisp - -# fast build rule for target. -rosgraph_msgs_generate_messages_lisp/fast: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_lisp.dir/build -.PHONY : rosgraph_msgs_generate_messages_lisp/fast - -#============================================================================= -# Target rules for targets named rosgraph_msgs_generate_messages_py - -# Build rule for target. -rosgraph_msgs_generate_messages_py: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 rosgraph_msgs_generate_messages_py -.PHONY : rosgraph_msgs_generate_messages_py - -# fast build rule for target. -rosgraph_msgs_generate_messages_py/fast: - $(MAKE) -f CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build.make CMakeFiles/rosgraph_msgs_generate_messages_py.dir/build -.PHONY : rosgraph_msgs_generate_messages_py/fast - -#============================================================================= -# Target rules for targets named std_msgs_generate_messages_py - -# Build rule for target. -std_msgs_generate_messages_py: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_py -.PHONY : std_msgs_generate_messages_py - -# fast build rule for target. -std_msgs_generate_messages_py/fast: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_py.dir/build.make CMakeFiles/std_msgs_generate_messages_py.dir/build -.PHONY : std_msgs_generate_messages_py/fast - -#============================================================================= -# Target rules for targets named roscpp_generate_messages_lisp - -# Build rule for target. -roscpp_generate_messages_lisp: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 roscpp_generate_messages_lisp -.PHONY : roscpp_generate_messages_lisp - -# fast build rule for target. -roscpp_generate_messages_lisp/fast: - $(MAKE) -f CMakeFiles/roscpp_generate_messages_lisp.dir/build.make CMakeFiles/roscpp_generate_messages_lisp.dir/build -.PHONY : roscpp_generate_messages_lisp/fast - -#============================================================================= -# Target rules for targets named std_msgs_generate_messages_eus - -# Build rule for target. -std_msgs_generate_messages_eus: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 std_msgs_generate_messages_eus -.PHONY : std_msgs_generate_messages_eus - -# fast build rule for target. -std_msgs_generate_messages_eus/fast: - $(MAKE) -f CMakeFiles/std_msgs_generate_messages_eus.dir/build.make CMakeFiles/std_msgs_generate_messages_eus.dir/build -.PHONY : std_msgs_generate_messages_eus/fast - -#============================================================================= -# Target rules for targets named protocol_geneus - -# Build rule for target. -protocol_geneus: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_geneus -.PHONY : protocol_geneus - -# fast build rule for target. -protocol_geneus/fast: - $(MAKE) -f CMakeFiles/protocol_geneus.dir/build.make CMakeFiles/protocol_geneus.dir/build -.PHONY : protocol_geneus/fast - -#============================================================================= -# Target rules for targets named protocol_generate_messages - -# Build rule for target. -protocol_generate_messages: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 protocol_generate_messages -.PHONY : protocol_generate_messages - -# fast build rule for target. -protocol_generate_messages/fast: - $(MAKE) -f CMakeFiles/protocol_generate_messages.dir/build.make CMakeFiles/protocol_generate_messages.dir/build -.PHONY : protocol_generate_messages/fast - -#============================================================================= -# Target rules for targets named gtest_main - -# Build rule for target. -gtest_main: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 gtest_main -.PHONY : gtest_main - -# fast build rule for target. -gtest_main/fast: - $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/build -.PHONY : gtest_main/fast - -#============================================================================= -# Target rules for targets named gtest - -# Build rule for target. -gtest: cmake_check_build_system - $(MAKE) -f CMakeFiles/Makefile2 gtest -.PHONY : gtest - -# fast build rule for target. -gtest/fast: - $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/build -.PHONY : gtest/fast - -src/listener.o: src/listener.cpp.o - -.PHONY : src/listener.o - -# target to build an object file -src/listener.cpp.o: - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/src/listener.cpp.o -.PHONY : src/listener.cpp.o - -src/listener.i: src/listener.cpp.i - -.PHONY : src/listener.i - -# target to preprocess a source file -src/listener.cpp.i: - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/src/listener.cpp.i -.PHONY : src/listener.cpp.i - -src/listener.s: src/listener.cpp.s - -.PHONY : src/listener.s - -# target to generate assembly for a file -src/listener.cpp.s: - $(MAKE) -f CMakeFiles/listener.dir/build.make CMakeFiles/listener.dir/src/listener.cpp.s -.PHONY : src/listener.cpp.s - -src/talker.o: src/talker.cpp.o - -.PHONY : src/talker.o - -# target to build an object file -src/talker.cpp.o: - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/src/talker.cpp.o -.PHONY : src/talker.cpp.o - -src/talker.i: src/talker.cpp.i - -.PHONY : src/talker.i - -# target to preprocess a source file -src/talker.cpp.i: - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/src/talker.cpp.i -.PHONY : src/talker.cpp.i - -src/talker.s: src/talker.cpp.s - -.PHONY : src/talker.s - -# target to generate assembly for a file -src/talker.cpp.s: - $(MAKE) -f CMakeFiles/talker.dir/build.make CMakeFiles/talker.dir/src/talker.cpp.s -.PHONY : src/talker.cpp.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... install/local" - @echo "... install" - @echo "... list_install_components" - @echo "... rebuild_cache" - @echo "... edit_cache" - @echo "... test" - @echo "... protocol_genpy" - @echo "... protocol_generate_messages_nodejs" - @echo "... listener" - @echo "... protocol_genlisp" - @echo "... protocol_gennodejs" - @echo "... protocol_generate_messages_lisp" - @echo "... protocol_gencpp" - @echo "... protocol_generate_messages_cpp" - @echo "... roscpp_generate_messages_py" - @echo "... rosgraph_msgs_generate_messages_eus" - @echo "... talker" - @echo "... clean_test_results" - @echo "... std_msgs_generate_messages_nodejs" - @echo "... roscpp_generate_messages_cpp" - @echo "... install/strip" - @echo "... _protocol_generate_messages_check_deps_Broadcast" - @echo "... roscpp_generate_messages_eus" - @echo "... protocol_generate_messages_py" - @echo "... doxygen" - @echo "... run_tests" - @echo "... protocol_generate_messages_eus" - @echo "... std_msgs_generate_messages_cpp" - @echo "... rosgraph_msgs_generate_messages_cpp" - @echo "... download_extra_data" - @echo "... std_msgs_generate_messages_lisp" - @echo "... rosgraph_msgs_generate_messages_nodejs" - @echo "... roscpp_generate_messages_nodejs" - @echo "... tests" - @echo "... rosgraph_msgs_generate_messages_lisp" - @echo "... rosgraph_msgs_generate_messages_py" - @echo "... std_msgs_generate_messages_py" - @echo "... roscpp_generate_messages_lisp" - @echo "... std_msgs_generate_messages_eus" - @echo "... protocol_geneus" - @echo "... protocol_generate_messages" - @echo "... gtest_main" - @echo "... gtest" - @echo "... src/listener.o" - @echo "... src/listener.i" - @echo "... src/listener.s" - @echo "... src/talker.o" - @echo "... src/talker.i" - @echo "... src/talker.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin/catkin_generated/version/package.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin/catkin_generated/version/package.cmake deleted file mode 100644 index f76451054c84b495e338e9f1fbdd321a45ccff0d..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin/catkin_generated/version/package.cmake +++ /dev/null @@ -1,20 +0,0 @@ -set(_CATKIN_CURRENT_PACKAGE "catkin") -set(catkin_VERSION "0.7.8") -set(catkin_MAINTAINER "Dirk Thomas <dthomas@osrfoundation.org>") -set(catkin_PACKAGE_FORMAT "2") -set(catkin_BUILD_DEPENDS "python-empy" "python-argparse" "python-catkin-pkg") -set(catkin_BUILD_DEPENDS_python-catkin-pkg_VERSION_GT "0.2.9") -set(catkin_BUILD_EXPORT_DEPENDS "gtest" "python-empy" "python-nose" "python-argparse" "python-catkin-pkg") -set(catkin_BUILD_EXPORT_DEPENDS_python-catkin-pkg_VERSION_GT "0.2.9") -set(catkin_BUILDTOOL_DEPENDS "cmake") -set(catkin_BUILDTOOL_EXPORT_DEPENDS "cmake") -set(catkin_EXEC_DEPENDS "python-argparse" "python-catkin-pkg") -set(catkin_EXEC_DEPENDS_python-catkin-pkg_VERSION_GT "0.2.9") -set(catkin_RUN_DEPENDS "python-argparse" "python-catkin-pkg" "gtest" "python-empy" "python-nose") -set(catkin_RUN_DEPENDS_python-catkin-pkg_VERSION_GT "0.2.9") -set(catkin_TEST_DEPENDS "python-mock" "python-nose") -set(catkin_DOC_DEPENDS ) -set(catkin_URL_WEBSITE "http://www.ros.org/wiki/catkin") -set(catkin_URL_BUGTRACKER "https://github.com/ros/catkin/issues") -set(catkin_URL_REPOSITORY "https://github.com/ros/catkin") -set(catkin_DEPRECATED "") \ No newline at end of file diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/env_cached.sh b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/env_cached.sh deleted file mode 100755 index d6be91db5c97c428f17b165713d3f9a077c78786..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/env_cached.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh -# generated from catkin/cmake/templates/env.sh.in - -if [ $# -eq 0 ] ; then - /bin/echo "Usage: env.sh COMMANDS" - /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." - exit 1 -fi - -# ensure to not use different shell type which was set before -CATKIN_SHELL=sh - -# source setup_cached.sh from same directory as this file -_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) -. "$_CATKIN_SETUP_DIR/setup_cached.sh" -exec "$@" diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/generate_cached_setup.py b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/generate_cached_setup.py deleted file mode 100644 index fb32ec3559237ae87020cc5af1192a5f447ea3c1..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/generate_cached_setup.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import print_function -import argparse -import os -import stat -import sys - -# find the import for catkin's python package - either from source space or from an installed underlay -if os.path.exists(os.path.join('/opt/ros/kinetic/share/catkin/cmake', 'catkinConfig.cmake.in')): - sys.path.insert(0, os.path.join('/opt/ros/kinetic/share/catkin/cmake', '..', 'python')) -try: - from catkin.environment_cache import generate_environment_script -except ImportError: - # search for catkin package in all workspaces and prepend to path - for workspace in "/opt/ros/kinetic".split(';'): - python_path = os.path.join(workspace, 'lib/python2.7/dist-packages') - if os.path.isdir(os.path.join(python_path, 'catkin')): - sys.path.insert(0, python_path) - break - from catkin.environment_cache import generate_environment_script - -code = generate_environment_script('/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/env.sh') - -output_filename = '/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/setup_cached.sh' -with open(output_filename, 'w') as f: - #print('Generate script for cached setup "%s"' % output_filename) - f.write('\n'.join(code)) - -mode = os.stat(output_filename).st_mode -os.chmod(output_filename, mode | stat.S_IXUSR) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/.rosinstall b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/.rosinstall deleted file mode 100644 index 6fb13afde30c0c58db22d5c1c2c468bc35158da8..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/.rosinstall +++ /dev/null @@ -1,2 +0,0 @@ -- setup-file: - local-name: /usr/local/setup.sh diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/_setup_util.py b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/_setup_util.py deleted file mode 100755 index 656a97e4ea09c3b33e6dcd4dde1e724436207333..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/_setup_util.py +++ /dev/null @@ -1,290 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Software License Agreement (BSD License) -# -# Copyright (c) 2012, Willow Garage, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -'''This file generates shell code for the setup.SHELL scripts to set environment variables''' - -from __future__ import print_function -import argparse -import copy -import errno -import os -import platform -import sys - -CATKIN_MARKER_FILE = '.catkin' - -system = platform.system() -IS_DARWIN = (system == 'Darwin') -IS_WINDOWS = (system == 'Windows') - -# subfolder of workspace prepended to CMAKE_PREFIX_PATH -ENV_VAR_SUBFOLDERS = { - 'CMAKE_PREFIX_PATH': '', - 'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': ['lib', os.path.join('lib', 'x86_64-linux-gnu')], - 'PATH': 'bin', - 'PKG_CONFIG_PATH': [os.path.join('lib', 'pkgconfig'), os.path.join('lib', 'x86_64-linux-gnu', 'pkgconfig')], - 'PYTHONPATH': 'lib/python2.7/dist-packages', -} - - -def rollback_env_variables(environ, env_var_subfolders): - ''' - Generate shell code to reset environment variables - by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH. - This does not cover modifications performed by environment hooks. - ''' - lines = [] - unmodified_environ = copy.copy(environ) - for key in sorted(env_var_subfolders.keys()): - subfolders = env_var_subfolders[key] - if not isinstance(subfolders, list): - subfolders = [subfolders] - value = _rollback_env_variable(unmodified_environ, key, subfolders) - if value is not None: - environ[key] = value - lines.append(assignment(key, value)) - if lines: - lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH')) - return lines - - -def _rollback_env_variable(environ, name, subfolders): - ''' - For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. - - :param subfolders: list of str '' or subfoldername that may start with '/' - :returns: the updated value of the environment variable. - ''' - value = environ[name] if name in environ else '' - env_paths = [path for path in value.split(os.pathsep) if path] - value_modified = False - for subfolder in subfolders: - if subfolder: - if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)): - subfolder = subfolder[1:] - if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)): - subfolder = subfolder[:-1] - for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True): - path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path - path_to_remove = None - for env_path in env_paths: - env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path - if env_path_clean == path_to_find: - path_to_remove = env_path - break - if path_to_remove: - env_paths.remove(path_to_remove) - value_modified = True - new_value = os.pathsep.join(env_paths) - return new_value if value_modified else None - - -def _get_workspaces(environ, include_fuerte=False, include_non_existing=False): - ''' - Based on CMAKE_PREFIX_PATH return all catkin workspaces. - - :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool`` - ''' - # get all cmake prefix paths - env_name = 'CMAKE_PREFIX_PATH' - value = environ[env_name] if env_name in environ else '' - paths = [path for path in value.split(os.pathsep) if path] - # remove non-workspace paths - workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))] - return workspaces - - -def prepend_env_variables(environ, env_var_subfolders, workspaces): - ''' - Generate shell code to prepend environment variables - for the all workspaces. - ''' - lines = [] - lines.append(comment('prepend folders of workspaces to environment variables')) - - paths = [path for path in workspaces.split(os.pathsep) if path] - - prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '') - lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix)) - - for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']): - subfolder = env_var_subfolders[key] - prefix = _prefix_env_variable(environ, key, paths, subfolder) - lines.append(prepend(environ, key, prefix)) - return lines - - -def _prefix_env_variable(environ, name, paths, subfolders): - ''' - Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items. - ''' - value = environ[name] if name in environ else '' - environ_paths = [path for path in value.split(os.pathsep) if path] - checked_paths = [] - for path in paths: - if not isinstance(subfolders, list): - subfolders = [subfolders] - for subfolder in subfolders: - path_tmp = path - if subfolder: - path_tmp = os.path.join(path_tmp, subfolder) - # skip nonexistent paths - if not os.path.exists(path_tmp): - continue - # exclude any path already in env and any path we already added - if path_tmp not in environ_paths and path_tmp not in checked_paths: - checked_paths.append(path_tmp) - prefix_str = os.pathsep.join(checked_paths) - if prefix_str != '' and environ_paths: - prefix_str += os.pathsep - return prefix_str - - -def assignment(key, value): - if not IS_WINDOWS: - return 'export %s="%s"' % (key, value) - else: - return 'set %s=%s' % (key, value) - - -def comment(msg): - if not IS_WINDOWS: - return '# %s' % msg - else: - return 'REM %s' % msg - - -def prepend(environ, key, prefix): - if key not in environ or not environ[key]: - return assignment(key, prefix) - if not IS_WINDOWS: - return 'export %s="%s$%s"' % (key, prefix, key) - else: - return 'set %s=%s%%%s%%' % (key, prefix, key) - - -def find_env_hooks(environ, cmake_prefix_path): - ''' - Generate shell code with found environment hooks - for the all workspaces. - ''' - lines = [] - lines.append(comment('found environment hooks in workspaces')) - - generic_env_hooks = [] - generic_env_hooks_workspace = [] - specific_env_hooks = [] - specific_env_hooks_workspace = [] - generic_env_hooks_by_filename = {} - specific_env_hooks_by_filename = {} - generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh' - specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None - # remove non-workspace paths - workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))] - for workspace in reversed(workspaces): - env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d') - if os.path.isdir(env_hook_dir): - for filename in sorted(os.listdir(env_hook_dir)): - if filename.endswith('.%s' % generic_env_hook_ext): - # remove previous env hook with same name if present - if filename in generic_env_hooks_by_filename: - i = generic_env_hooks.index(generic_env_hooks_by_filename[filename]) - generic_env_hooks.pop(i) - generic_env_hooks_workspace.pop(i) - # append env hook - generic_env_hooks.append(os.path.join(env_hook_dir, filename)) - generic_env_hooks_workspace.append(workspace) - generic_env_hooks_by_filename[filename] = generic_env_hooks[-1] - elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext): - # remove previous env hook with same name if present - if filename in specific_env_hooks_by_filename: - i = specific_env_hooks.index(specific_env_hooks_by_filename[filename]) - specific_env_hooks.pop(i) - specific_env_hooks_workspace.pop(i) - # append env hook - specific_env_hooks.append(os.path.join(env_hook_dir, filename)) - specific_env_hooks_workspace.append(workspace) - specific_env_hooks_by_filename[filename] = specific_env_hooks[-1] - env_hooks = generic_env_hooks + specific_env_hooks - env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace - count = len(env_hooks) - lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count)) - for i in range(count): - lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i])) - lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i])) - return lines - - -def _parse_arguments(args=None): - parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.') - parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context') - return parser.parse_known_args(args=args)[0] - - -if __name__ == '__main__': - try: - try: - args = _parse_arguments() - except Exception as e: - print(e, file=sys.stderr) - sys.exit(1) - - # environment at generation time - CMAKE_PREFIX_PATH = '/opt/ros/kinetic'.split(';') - # prepend current workspace if not already part of CPP - base_path = os.path.dirname(__file__) - if base_path not in CMAKE_PREFIX_PATH: - CMAKE_PREFIX_PATH.insert(0, base_path) - CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH) - - environ = dict(os.environ) - lines = [] - if not args.extend: - lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS) - lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH) - lines += find_env_hooks(environ, CMAKE_PREFIX_PATH) - print('\n'.join(lines)) - - # need to explicitly flush the output - sys.stdout.flush() - except IOError as e: - # and catch potential "broken pipe" if stdout is not writable - # which can happen when piping the output to a file but the disk is full - if e.errno == errno.EPIPE: - print(e, file=sys.stderr) - sys.exit(2) - raise - - sys.exit(0) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/env.sh b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/env.sh deleted file mode 100755 index 8aa9d244ae9475039027a5f25a8d41a46174cddf..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/env.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env sh -# generated from catkin/cmake/templates/env.sh.in - -if [ $# -eq 0 ] ; then - /bin/echo "Usage: env.sh COMMANDS" - /bin/echo "Calling env.sh without arguments is not supported anymore. Instead spawn a subshell and source a setup file manually." - exit 1 -fi - -# ensure to not use different shell type which was set before -CATKIN_SHELL=sh - -# source setup.sh from same directory as this file -_CATKIN_SETUP_DIR=$(cd "`dirname "$0"`" > /dev/null && pwd) -. "$_CATKIN_SETUP_DIR/setup.sh" -exec "$@" diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-extras.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-extras.cmake deleted file mode 100644 index f69e8b591bc3045be0cd226dd28e9cf33f330005..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-extras.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(protocol_MESSAGE_FILES "msg/Broadcast.msg") -set(protocol_SERVICE_FILES "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-paths.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-paths.cmake deleted file mode 100644 index 32a5a8f4843d7485a74ddc766be669ba32f9a224..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-paths.cmake +++ /dev/null @@ -1,4 +0,0 @@ -# generated from genmsg/cmake/pkg-msg-paths.cmake.installspace.in - -_prepend_path("${protocol_DIR}/.." "msg" protocol_MSG_INCLUDE_DIRS UNIQUE) -set(protocol_MSG_DEPENDENCIES std_msgs) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol.pc b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol.pc deleted file mode 100644 index 2bef32e563bc270687cbc59d7472d32d52a10e46..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol.pc +++ /dev/null @@ -1,8 +0,0 @@ -prefix=/usr/local - -Name: protocol -Description: Description of protocol -Version: 0.0.0 -Cflags: -I/usr/local/include -Libs: -L/usr/local/lib -Requires: diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig-version.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig-version.cmake deleted file mode 100644 index 7fd9f993a719934b0f7ee411b86bce935627eec0..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig-version.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# generated from catkin/cmake/template/pkgConfig-version.cmake.in -set(PACKAGE_VERSION "0.0.0") - -set(PACKAGE_VERSION_EXACT False) -set(PACKAGE_VERSION_COMPATIBLE False) - -if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_EXACT True) - set(PACKAGE_VERSION_COMPATIBLE True) -endif() - -if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_COMPATIBLE True) -endif() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig.cmake deleted file mode 100644 index 3c2e058d8028894be3393eace3e8683bf8a9ca39..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig.cmake +++ /dev/null @@ -1,198 +0,0 @@ -# generated from catkin/cmake/template/pkgConfig.cmake.in - -# append elements to a list and remove existing duplicates from the list -# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig -# self contained -macro(_list_append_deduplicate listname) - if(NOT "${ARGN}" STREQUAL "") - if(${listname}) - list(REMOVE_ITEM ${listname} ${ARGN}) - endif() - list(APPEND ${listname} ${ARGN}) - endif() -endmacro() - -# append elements to a list if they are not already in the list -# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig -# self contained -macro(_list_append_unique listname) - foreach(_item ${ARGN}) - list(FIND ${listname} ${_item} _index) - if(_index EQUAL -1) - list(APPEND ${listname} ${_item}) - endif() - endforeach() -endmacro() - -# pack a list of libraries with optional build configuration keywords -# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig -# self contained -macro(_pack_libraries_with_build_configuration VAR) - set(${VAR} "") - set(_argn ${ARGN}) - list(LENGTH _argn _count) - set(_index 0) - while(${_index} LESS ${_count}) - list(GET _argn ${_index} lib) - if("${lib}" MATCHES "^(debug|optimized|general)$") - math(EXPR _index "${_index} + 1") - if(${_index} EQUAL ${_count}) - message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library") - endif() - list(GET _argn ${_index} library) - list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}") - else() - list(APPEND ${VAR} "${lib}") - endif() - math(EXPR _index "${_index} + 1") - endwhile() -endmacro() - -# unpack a list of libraries with optional build configuration keyword prefixes -# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig -# self contained -macro(_unpack_libraries_with_build_configuration VAR) - set(${VAR} "") - foreach(lib ${ARGN}) - string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}") - list(APPEND ${VAR} "${lib}") - endforeach() -endmacro() - - -if(protocol_CONFIG_INCLUDED) - return() -endif() -set(protocol_CONFIG_INCLUDED TRUE) - -# set variables for source/devel/install prefixes -if("FALSE" STREQUAL "TRUE") - set(protocol_SOURCE_PREFIX /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol) - set(protocol_DEVEL_PREFIX /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel) - set(protocol_INSTALL_PREFIX "") - set(protocol_PREFIX ${protocol_DEVEL_PREFIX}) -else() - set(protocol_SOURCE_PREFIX "") - set(protocol_DEVEL_PREFIX "") - set(protocol_INSTALL_PREFIX /usr/local) - set(protocol_PREFIX ${protocol_INSTALL_PREFIX}) -endif() - -# warn when using a deprecated package -if(NOT "" STREQUAL "") - set(_msg "WARNING: package 'protocol' is deprecated") - # append custom deprecation text if available - if(NOT "" STREQUAL "TRUE") - set(_msg "${_msg} ()") - endif() - message("${_msg}") -endif() - -# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project -set(protocol_FOUND_CATKIN_PROJECT TRUE) - -if(NOT "include " STREQUAL " ") - set(protocol_INCLUDE_DIRS "") - set(_include_dirs "include") - if(NOT " " STREQUAL " ") - set(_report "Check the issue tracker '' and consider creating a ticket if the problem has not been reported yet.") - elseif(NOT " " STREQUAL " ") - set(_report "Check the website '' for information and consider reporting the problem.") - else() - set(_report "Report the problem to the maintainer 'philipp <philipp@todo.todo>' and request to fix the problem.") - endif() - foreach(idir ${_include_dirs}) - if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir}) - set(include ${idir}) - elseif("${idir} " STREQUAL "include ") - get_filename_component(include "${protocol_DIR}/../../../include" ABSOLUTE) - if(NOT IS_DIRECTORY ${include}) - message(FATAL_ERROR "Project 'protocol' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. ${_report}") - endif() - else() - message(FATAL_ERROR "Project 'protocol' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/usr/local/${idir}'. ${_report}") - endif() - _list_append_unique(protocol_INCLUDE_DIRS ${include}) - endforeach() -endif() - -set(libraries "") -foreach(library ${libraries}) - # keep build configuration keywords, target names and absolute libraries as-is - if("${library}" MATCHES "^(debug|optimized|general)$") - list(APPEND protocol_LIBRARIES ${library}) - elseif(TARGET ${library}) - list(APPEND protocol_LIBRARIES ${library}) - elseif(IS_ABSOLUTE ${library}) - list(APPEND protocol_LIBRARIES ${library}) - else() - set(lib_path "") - set(lib "${library}-NOTFOUND") - # since the path where the library is found is returned we have to iterate over the paths manually - foreach(path /usr/local/lib;/opt/ros/kinetic/lib) - find_library(lib ${library} - PATHS ${path} - NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - if(lib) - set(lib_path ${path}) - break() - endif() - endforeach() - if(lib) - _list_append_unique(protocol_LIBRARY_DIRS ${lib_path}) - list(APPEND protocol_LIBRARIES ${lib}) - else() - # as a fall back for non-catkin libraries try to search globally - find_library(lib ${library}) - if(NOT lib) - message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'protocol'? Did you find_package() it before the subdirectory containing its code is included?") - endif() - list(APPEND protocol_LIBRARIES ${lib}) - endif() - endif() -endforeach() - -set(protocol_EXPORTED_TARGETS "protocol_generate_messages_cpp;protocol_generate_messages_eus;protocol_generate_messages_lisp;protocol_generate_messages_nodejs;protocol_generate_messages_py") -# create dummy targets for exported code generation targets to make life of users easier -foreach(t ${protocol_EXPORTED_TARGETS}) - if(NOT TARGET ${t}) - add_custom_target(${t}) - endif() -endforeach() - -set(depends "") -foreach(depend ${depends}) - string(REPLACE " " ";" depend_list ${depend}) - # the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls - list(GET depend_list 0 protocol_dep) - list(LENGTH depend_list count) - if(${count} EQUAL 1) - # simple dependencies must only be find_package()-ed once - if(NOT ${protocol_dep}_FOUND) - find_package(${protocol_dep} REQUIRED NO_MODULE) - endif() - else() - # dependencies with components must be find_package()-ed again - list(REMOVE_AT depend_list 0) - find_package(${protocol_dep} REQUIRED NO_MODULE ${depend_list}) - endif() - _list_append_unique(protocol_INCLUDE_DIRS ${${protocol_dep}_INCLUDE_DIRS}) - - # merge build configuration keywords with library names to correctly deduplicate - _pack_libraries_with_build_configuration(protocol_LIBRARIES ${protocol_LIBRARIES}) - _pack_libraries_with_build_configuration(_libraries ${${protocol_dep}_LIBRARIES}) - _list_append_deduplicate(protocol_LIBRARIES ${_libraries}) - # undo build configuration keyword merging after deduplication - _unpack_libraries_with_build_configuration(protocol_LIBRARIES ${protocol_LIBRARIES}) - - _list_append_unique(protocol_LIBRARY_DIRS ${${protocol_dep}_LIBRARY_DIRS}) - list(APPEND protocol_EXPORTED_TARGETS ${${protocol_dep}_EXPORTED_TARGETS}) -endforeach() - -set(pkg_cfg_extras "protocol-msg-extras.cmake") -foreach(extra ${pkg_cfg_extras}) - if(NOT IS_ABSOLUTE ${extra}) - set(extra ${protocol_DIR}/${extra}) - endif() - include(${extra}) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.bash b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.bash deleted file mode 100644 index ff47af8f30bcc54efd5892530c84c4159250d4a3..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.bash +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -# generated from catkin/cmake/templates/setup.bash.in - -CATKIN_SHELL=bash - -# source setup.sh from same directory as this file -_CATKIN_SETUP_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) -. "$_CATKIN_SETUP_DIR/setup.sh" diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.sh b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.sh deleted file mode 100644 index a45b1cbe0c0fe443f2e998246dd64a180a6dbd1e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env sh -# generated from catkin/cmake/template/setup.sh.in - -# Sets various environment variables and sources additional environment hooks. -# It tries it's best to undo changes from a previously sourced setup file before. -# Supported command line options: -# --extend: skips the undoing of changes from a previously sourced setup file -# (in plain sh shell which does't support arguments for sourced scripts you -# can set the environment variable `CATKIN_SETUP_UTIL_ARGS=--extend` instead) - -# since this file is sourced either use the provided _CATKIN_SETUP_DIR -# or fall back to the destination set at configure time -: ${_CATKIN_SETUP_DIR:=/usr/local} -_SETUP_UTIL="$_CATKIN_SETUP_DIR/_setup_util.py" -unset _CATKIN_SETUP_DIR - -if [ ! -f "$_SETUP_UTIL" ]; then - echo "Missing Python script: $_SETUP_UTIL" - return 22 -fi - -# detect if running on Darwin platform -_UNAME=`uname -s` -_IS_DARWIN=0 -if [ "$_UNAME" = "Darwin" ]; then - _IS_DARWIN=1 -fi -unset _UNAME - -# make sure to export all environment variables -export CMAKE_PREFIX_PATH -if [ $_IS_DARWIN -eq 0 ]; then - export LD_LIBRARY_PATH -else - export DYLD_LIBRARY_PATH -fi -unset _IS_DARWIN -export PATH -export PKG_CONFIG_PATH -export PYTHONPATH - -# remember type of shell if not already set -if [ -z "$CATKIN_SHELL" ]; then - CATKIN_SHELL=sh -fi - -# invoke Python script to generate necessary exports of environment variables -# use TMPDIR if it exists, otherwise fall back to /tmp -if [ -d "${TMPDIR}" ]; then - _TMPDIR="${TMPDIR}" -else - _TMPDIR=/tmp -fi -_SETUP_TMP=`mktemp "${_TMPDIR}/setup.sh.XXXXXXXXXX"` -unset _TMPDIR -if [ $? -ne 0 -o ! -f "$_SETUP_TMP" ]; then - echo "Could not create temporary file: $_SETUP_TMP" - return 1 -fi -CATKIN_SHELL=$CATKIN_SHELL "$_SETUP_UTIL" $@ $CATKIN_SETUP_UTIL_ARGS >> "$_SETUP_TMP" -_RC=$? -if [ $_RC -ne 0 ]; then - if [ $_RC -eq 2 ]; then - echo "Could not write the output of '$_SETUP_UTIL' to temporary file '$_SETUP_TMP': may be the disk if full?" - else - echo "Failed to run '\"$_SETUP_UTIL\" $@': return code $_RC" - fi - unset _RC - unset _SETUP_UTIL - rm -f "$_SETUP_TMP" - unset _SETUP_TMP - return 1 -fi -unset _RC -unset _SETUP_UTIL -. "$_SETUP_TMP" -rm -f "$_SETUP_TMP" -unset _SETUP_TMP - -# source all environment hooks -_i=0 -while [ $_i -lt $_CATKIN_ENVIRONMENT_HOOKS_COUNT ]; do - eval _envfile=\$_CATKIN_ENVIRONMENT_HOOKS_$_i - unset _CATKIN_ENVIRONMENT_HOOKS_$_i - eval _envfile_workspace=\$_CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE - unset _CATKIN_ENVIRONMENT_HOOKS_${_i}_WORKSPACE - # set workspace for environment hook - CATKIN_ENV_HOOK_WORKSPACE=$_envfile_workspace - . "$_envfile" - unset CATKIN_ENV_HOOK_WORKSPACE - _i=$((_i + 1)) -done -unset _i - -unset _CATKIN_ENVIRONMENT_HOOKS_COUNT diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.zsh b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.zsh deleted file mode 100644 index 9f780b741031d8037b90514441a80f9fed39d02b..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.zsh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env zsh -# generated from catkin/cmake/templates/setup.zsh.in - -CATKIN_SHELL=zsh - -# source setup.sh from same directory as this file -_CATKIN_SETUP_DIR=$(builtin cd -q "`dirname "$0"`" > /dev/null && pwd) -emulate -R zsh -c 'source "$_CATKIN_SETUP_DIR/setup.sh"' diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake deleted file mode 100644 index afa3badef85fd915368f03d73d598b0208a34436..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake +++ /dev/null @@ -1 +0,0 @@ -set(ORDERED_PATHS "/opt/ros/kinetic/lib") \ No newline at end of file diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/package.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/package.cmake deleted file mode 100644 index 012c0cbfe20d765239e3694ef68f278b966ece2a..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/package.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(_CATKIN_CURRENT_PACKAGE "protocol") -set(protocol_VERSION "0.0.0") -set(protocol_MAINTAINER "philipp <philipp@todo.todo>") -set(protocol_PACKAGE_FORMAT "2") -set(protocol_BUILD_DEPENDS "roscpp" "std_msgs" "message_generation") -set(protocol_BUILD_EXPORT_DEPENDS "roscpp" "std_msgs") -set(protocol_BUILDTOOL_DEPENDS "catkin") -set(protocol_BUILDTOOL_EXPORT_DEPENDS ) -set(protocol_EXEC_DEPENDS "roscpp" "std_msgs" "message_runtime") -set(protocol_RUN_DEPENDS "roscpp" "std_msgs" "message_runtime") -set(protocol_TEST_DEPENDS ) -set(protocol_DOC_DEPENDS ) -set(protocol_URL_WEBSITE "") -set(protocol_URL_BUGTRACKER "") -set(protocol_URL_REPOSITORY "") -set(protocol_DEPRECATED "") \ No newline at end of file diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/pkg.develspace.context.pc.py b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/pkg.develspace.context.pc.py deleted file mode 100644 index 2021ba2d882a7b6336fbef155db8e5874a4011ac..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/pkg.develspace.context.pc.py +++ /dev/null @@ -1,8 +0,0 @@ -# generated from catkin/cmake/template/pkg.context.pc.in -CATKIN_PACKAGE_PREFIX = "" -PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include".split(';') if "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include" != "" else [] -PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') -PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] -PROJECT_NAME = "protocol" -PROJECT_SPACE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel" -PROJECT_VERSION = "0.0.0" diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/pkg.installspace.context.pc.py b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/pkg.installspace.context.pc.py deleted file mode 100644 index b077fcec5ae40133aab27fa4397426ac5f696d4e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/pkg.installspace.context.pc.py +++ /dev/null @@ -1,8 +0,0 @@ -# generated from catkin/cmake/template/pkg.context.pc.in -CATKIN_PACKAGE_PREFIX = "" -PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/usr/local/include".split(';') if "/usr/local/include" != "" else [] -PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') -PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] -PROJECT_NAME = "protocol" -PROJECT_SPACE_DIR = "/usr/local" -PROJECT_VERSION = "0.0.0" diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.develspace.in b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.develspace.in deleted file mode 100644 index c69fbd83074242e3783c55da7d4a288d034e3a3c..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.develspace.in +++ /dev/null @@ -1,2 +0,0 @@ -set(protocol_MESSAGE_FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg") -set(protocol_SERVICE_FILES "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.installspace.in b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.installspace.in deleted file mode 100644 index f69e8b591bc3045be0cd226dd28e9cf33f330005..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.installspace.in +++ /dev/null @@ -1,2 +0,0 @@ -set(protocol_MESSAGE_FILES "msg/Broadcast.msg") -set(protocol_SERVICE_FILES "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/setup_cached.sh b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/setup_cached.sh deleted file mode 100755 index 1ef9d62a5df3d1be4f4a78047f9a603c8f241315..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/setup_cached.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env sh -# generated from catkin/python/catkin/environment_cache.py - -# based on a snapshot of the environment before and after calling the setup script -# it emulates the modifications of the setup script without recurring computations - -# new environment variables - -# modified environment variables -export CMAKE_PREFIX_PATH="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel:$CMAKE_PREFIX_PATH" -export ROSLISP_PACKAGE_DIRECTORIES="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/common-lisp" -export ROS_PACKAGE_PATH="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol:$ROS_PACKAGE_PATH" \ No newline at end of file diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/_setup_util.py.stamp b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/_setup_util.py.stamp deleted file mode 100755 index 656a97e4ea09c3b33e6dcd4dde1e724436207333..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/_setup_util.py.stamp +++ /dev/null @@ -1,290 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# Software License Agreement (BSD License) -# -# Copyright (c) 2012, Willow Garage, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -'''This file generates shell code for the setup.SHELL scripts to set environment variables''' - -from __future__ import print_function -import argparse -import copy -import errno -import os -import platform -import sys - -CATKIN_MARKER_FILE = '.catkin' - -system = platform.system() -IS_DARWIN = (system == 'Darwin') -IS_WINDOWS = (system == 'Windows') - -# subfolder of workspace prepended to CMAKE_PREFIX_PATH -ENV_VAR_SUBFOLDERS = { - 'CMAKE_PREFIX_PATH': '', - 'LD_LIBRARY_PATH' if not IS_DARWIN else 'DYLD_LIBRARY_PATH': ['lib', os.path.join('lib', 'x86_64-linux-gnu')], - 'PATH': 'bin', - 'PKG_CONFIG_PATH': [os.path.join('lib', 'pkgconfig'), os.path.join('lib', 'x86_64-linux-gnu', 'pkgconfig')], - 'PYTHONPATH': 'lib/python2.7/dist-packages', -} - - -def rollback_env_variables(environ, env_var_subfolders): - ''' - Generate shell code to reset environment variables - by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH. - This does not cover modifications performed by environment hooks. - ''' - lines = [] - unmodified_environ = copy.copy(environ) - for key in sorted(env_var_subfolders.keys()): - subfolders = env_var_subfolders[key] - if not isinstance(subfolders, list): - subfolders = [subfolders] - value = _rollback_env_variable(unmodified_environ, key, subfolders) - if value is not None: - environ[key] = value - lines.append(assignment(key, value)) - if lines: - lines.insert(0, comment('reset environment variables by unrolling modifications based on all workspaces in CMAKE_PREFIX_PATH')) - return lines - - -def _rollback_env_variable(environ, name, subfolders): - ''' - For each catkin workspace in CMAKE_PREFIX_PATH remove the first entry from env[NAME] matching workspace + subfolder. - - :param subfolders: list of str '' or subfoldername that may start with '/' - :returns: the updated value of the environment variable. - ''' - value = environ[name] if name in environ else '' - env_paths = [path for path in value.split(os.pathsep) if path] - value_modified = False - for subfolder in subfolders: - if subfolder: - if subfolder.startswith(os.path.sep) or (os.path.altsep and subfolder.startswith(os.path.altsep)): - subfolder = subfolder[1:] - if subfolder.endswith(os.path.sep) or (os.path.altsep and subfolder.endswith(os.path.altsep)): - subfolder = subfolder[:-1] - for ws_path in _get_workspaces(environ, include_fuerte=True, include_non_existing=True): - path_to_find = os.path.join(ws_path, subfolder) if subfolder else ws_path - path_to_remove = None - for env_path in env_paths: - env_path_clean = env_path[:-1] if env_path and env_path[-1] in [os.path.sep, os.path.altsep] else env_path - if env_path_clean == path_to_find: - path_to_remove = env_path - break - if path_to_remove: - env_paths.remove(path_to_remove) - value_modified = True - new_value = os.pathsep.join(env_paths) - return new_value if value_modified else None - - -def _get_workspaces(environ, include_fuerte=False, include_non_existing=False): - ''' - Based on CMAKE_PREFIX_PATH return all catkin workspaces. - - :param include_fuerte: The flag if paths starting with '/opt/ros/fuerte' should be considered workspaces, ``bool`` - ''' - # get all cmake prefix paths - env_name = 'CMAKE_PREFIX_PATH' - value = environ[env_name] if env_name in environ else '' - paths = [path for path in value.split(os.pathsep) if path] - # remove non-workspace paths - workspaces = [path for path in paths if os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE)) or (include_fuerte and path.startswith('/opt/ros/fuerte')) or (include_non_existing and not os.path.exists(path))] - return workspaces - - -def prepend_env_variables(environ, env_var_subfolders, workspaces): - ''' - Generate shell code to prepend environment variables - for the all workspaces. - ''' - lines = [] - lines.append(comment('prepend folders of workspaces to environment variables')) - - paths = [path for path in workspaces.split(os.pathsep) if path] - - prefix = _prefix_env_variable(environ, 'CMAKE_PREFIX_PATH', paths, '') - lines.append(prepend(environ, 'CMAKE_PREFIX_PATH', prefix)) - - for key in sorted([key for key in env_var_subfolders.keys() if key != 'CMAKE_PREFIX_PATH']): - subfolder = env_var_subfolders[key] - prefix = _prefix_env_variable(environ, key, paths, subfolder) - lines.append(prepend(environ, key, prefix)) - return lines - - -def _prefix_env_variable(environ, name, paths, subfolders): - ''' - Return the prefix to prepend to the environment variable NAME, adding any path in NEW_PATHS_STR without creating duplicate or empty items. - ''' - value = environ[name] if name in environ else '' - environ_paths = [path for path in value.split(os.pathsep) if path] - checked_paths = [] - for path in paths: - if not isinstance(subfolders, list): - subfolders = [subfolders] - for subfolder in subfolders: - path_tmp = path - if subfolder: - path_tmp = os.path.join(path_tmp, subfolder) - # skip nonexistent paths - if not os.path.exists(path_tmp): - continue - # exclude any path already in env and any path we already added - if path_tmp not in environ_paths and path_tmp not in checked_paths: - checked_paths.append(path_tmp) - prefix_str = os.pathsep.join(checked_paths) - if prefix_str != '' and environ_paths: - prefix_str += os.pathsep - return prefix_str - - -def assignment(key, value): - if not IS_WINDOWS: - return 'export %s="%s"' % (key, value) - else: - return 'set %s=%s' % (key, value) - - -def comment(msg): - if not IS_WINDOWS: - return '# %s' % msg - else: - return 'REM %s' % msg - - -def prepend(environ, key, prefix): - if key not in environ or not environ[key]: - return assignment(key, prefix) - if not IS_WINDOWS: - return 'export %s="%s$%s"' % (key, prefix, key) - else: - return 'set %s=%s%%%s%%' % (key, prefix, key) - - -def find_env_hooks(environ, cmake_prefix_path): - ''' - Generate shell code with found environment hooks - for the all workspaces. - ''' - lines = [] - lines.append(comment('found environment hooks in workspaces')) - - generic_env_hooks = [] - generic_env_hooks_workspace = [] - specific_env_hooks = [] - specific_env_hooks_workspace = [] - generic_env_hooks_by_filename = {} - specific_env_hooks_by_filename = {} - generic_env_hook_ext = 'bat' if IS_WINDOWS else 'sh' - specific_env_hook_ext = environ['CATKIN_SHELL'] if not IS_WINDOWS and 'CATKIN_SHELL' in environ and environ['CATKIN_SHELL'] else None - # remove non-workspace paths - workspaces = [path for path in cmake_prefix_path.split(os.pathsep) if path and os.path.isfile(os.path.join(path, CATKIN_MARKER_FILE))] - for workspace in reversed(workspaces): - env_hook_dir = os.path.join(workspace, 'etc', 'catkin', 'profile.d') - if os.path.isdir(env_hook_dir): - for filename in sorted(os.listdir(env_hook_dir)): - if filename.endswith('.%s' % generic_env_hook_ext): - # remove previous env hook with same name if present - if filename in generic_env_hooks_by_filename: - i = generic_env_hooks.index(generic_env_hooks_by_filename[filename]) - generic_env_hooks.pop(i) - generic_env_hooks_workspace.pop(i) - # append env hook - generic_env_hooks.append(os.path.join(env_hook_dir, filename)) - generic_env_hooks_workspace.append(workspace) - generic_env_hooks_by_filename[filename] = generic_env_hooks[-1] - elif specific_env_hook_ext is not None and filename.endswith('.%s' % specific_env_hook_ext): - # remove previous env hook with same name if present - if filename in specific_env_hooks_by_filename: - i = specific_env_hooks.index(specific_env_hooks_by_filename[filename]) - specific_env_hooks.pop(i) - specific_env_hooks_workspace.pop(i) - # append env hook - specific_env_hooks.append(os.path.join(env_hook_dir, filename)) - specific_env_hooks_workspace.append(workspace) - specific_env_hooks_by_filename[filename] = specific_env_hooks[-1] - env_hooks = generic_env_hooks + specific_env_hooks - env_hooks_workspace = generic_env_hooks_workspace + specific_env_hooks_workspace - count = len(env_hooks) - lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_COUNT', count)) - for i in range(count): - lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d' % i, env_hooks[i])) - lines.append(assignment('_CATKIN_ENVIRONMENT_HOOKS_%d_WORKSPACE' % i, env_hooks_workspace[i])) - return lines - - -def _parse_arguments(args=None): - parser = argparse.ArgumentParser(description='Generates code blocks for the setup.SHELL script.') - parser.add_argument('--extend', action='store_true', help='Skip unsetting previous environment variables to extend context') - return parser.parse_known_args(args=args)[0] - - -if __name__ == '__main__': - try: - try: - args = _parse_arguments() - except Exception as e: - print(e, file=sys.stderr) - sys.exit(1) - - # environment at generation time - CMAKE_PREFIX_PATH = '/opt/ros/kinetic'.split(';') - # prepend current workspace if not already part of CPP - base_path = os.path.dirname(__file__) - if base_path not in CMAKE_PREFIX_PATH: - CMAKE_PREFIX_PATH.insert(0, base_path) - CMAKE_PREFIX_PATH = os.pathsep.join(CMAKE_PREFIX_PATH) - - environ = dict(os.environ) - lines = [] - if not args.extend: - lines += rollback_env_variables(environ, ENV_VAR_SUBFOLDERS) - lines += prepend_env_variables(environ, ENV_VAR_SUBFOLDERS, CMAKE_PREFIX_PATH) - lines += find_env_hooks(environ, CMAKE_PREFIX_PATH) - print('\n'.join(lines)) - - # need to explicitly flush the output - sys.stdout.flush() - except IOError as e: - # and catch potential "broken pipe" if stdout is not writable - # which can happen when piping the output to a file but the disk is full - if e.errno == errno.EPIPE: - print(e, file=sys.stderr) - sys.exit(2) - raise - - sys.exit(0) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/interrogate_setup_dot_py.py.stamp b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/interrogate_setup_dot_py.py.stamp deleted file mode 100644 index 02954de2b2b675f15d2a355d31bc0a8e37e3c484..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/interrogate_setup_dot_py.py.stamp +++ /dev/null @@ -1,253 +0,0 @@ -#!/usr/bin/env python - -# Software License Agreement (BSD License) -# -# Copyright (c) 2012, Willow Garage, Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# * Neither the name of Willow Garage, Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -from __future__ import print_function -import os -import runpy -import sys - -import distutils.core -try: - import setuptools -except ImportError: - pass - -from argparse import ArgumentParser - - -def _get_locations(pkgs, package_dir): - """ - based on setuptools logic and the package_dir dict, builds a dict - of location roots for each pkg in pkgs. - See http://docs.python.org/distutils/setupscript.html - - :returns: a dict {pkgname: root} for each pkgname in pkgs (and each of their parents) - """ - # package_dir contains a dict {package_name: relativepath} - # Example {'': 'src', 'foo': 'lib', 'bar': 'lib2'} - # - # '' means where to look for any package unless a parent package - # is listed so package bar.pot is expected at lib2/bar/pot, - # whereas package sup.dee is expected at src/sup/dee - # - # if package_dir does not state anything about a package, - # setuptool expects the package folder to be in the root of the - # project - locations = {} - allprefix = package_dir.get('', '') - for pkg in pkgs: - parent_location = None - splits = pkg.split('.') - # we iterate over compound name from parent to child - # so once we found parent, children just append to their parent - for key_len in range(len(splits)): - key = '.'.join(splits[:key_len + 1]) - if key not in locations: - if key in package_dir: - locations[key] = package_dir[key] - elif parent_location is not None: - locations[key] = os.path.join(parent_location, splits[key_len]) - else: - locations[key] = os.path.join(allprefix, key) - parent_location = locations[key] - return locations - - -def generate_cmake_file(package_name, version, scripts, package_dir, pkgs, modules): - """ - Generates lines to add to a cmake file which will set variables - - :param version: str, format 'int.int.int' - :param scripts: [list of str]: relative paths to scripts - :param package_dir: {modulename: path} - :pkgs: [list of str] python_packages declared in catkin package - :modules: [list of str] python modules - """ - prefix = '%s_SETUP_PY' % package_name - result = [] - result.append(r'set(%s_VERSION "%s")' % (prefix, version)) - result.append(r'set(%s_SCRIPTS "%s")' % (prefix, ';'.join(scripts))) - - # Remove packages with '.' separators. - # - # setuptools allows specifying submodules in other folders than - # their parent - # - # The symlink approach of catkin does not work with such submodules. - # In the common case, this does not matter as the submodule is - # within the containing module. We verify this assumption, and if - # it passes, we remove submodule packages. - locations = _get_locations(pkgs, package_dir) - for pkgname, location in locations.items(): - if not '.' in pkgname: - continue - splits = pkgname.split('.') - # hack: ignore write-combining setup.py files for msg and srv files - if splits[1] in ['msg', 'srv']: - continue - # check every child has the same root folder as its parent - root_name = splits[0] - root_location = location - for _ in range(len(splits) - 1): - root_location = os.path.dirname(root_location) - if root_location != locations[root_name]: - raise RuntimeError( - "catkin_export_python does not support setup.py files that combine across multiple directories: %s in %s, %s in %s" % (pkgname, location, root_name, locations[root_name])) - - # If checks pass, remove all submodules - pkgs = [p for p in pkgs if '.' not in p] - - resolved_pkgs = [] - for pkg in pkgs: - resolved_pkgs += [locations[pkg]] - - result.append(r'set(%s_PACKAGES "%s")' % (prefix, ';'.join(pkgs))) - result.append(r'set(%s_PACKAGE_DIRS "%s")' % (prefix, ';'.join(resolved_pkgs).replace("\\", "/"))) - - # skip modules which collide with package names - filtered_modules = [] - for modname in modules: - splits = modname.split('.') - # check all parents too - equals_package = [('.'.join(splits[:-i]) in locations) for i in range(len(splits))] - if any(equals_package): - continue - filtered_modules.append(modname) - module_locations = _get_locations(filtered_modules, package_dir) - - result.append(r'set(%s_MODULES "%s")' % (prefix, ';'.join(['%s.py' % m.replace('.', '/') for m in filtered_modules]))) - result.append(r'set(%s_MODULE_DIRS "%s")' % (prefix, ';'.join([module_locations[m] for m in filtered_modules]).replace("\\", "/"))) - - return result - - -def _create_mock_setup_function(package_name, outfile): - """ - Creates a function to call instead of distutils.core.setup or - setuptools.setup, which just captures some args and writes them - into a file that can be used from cmake - - :param package_name: name of the package - :param outfile: filename that cmake will use afterwards - :returns: a function to replace disutils.core.setup and setuptools.setup - """ - - def setup(*args, **kwargs): - ''' - Checks kwargs and writes a scriptfile - ''' - if 'version' not in kwargs: - sys.stderr.write("\n*** Unable to find 'version' in setup.py of %s\n" % package_name) - raise RuntimeError("version not found in setup.py") - version = kwargs['version'] - package_dir = kwargs.get('package_dir', {}) - - pkgs = kwargs.get('packages', []) - scripts = kwargs.get('scripts', []) - modules = kwargs.get('py_modules', []) - - unsupported_args = [ - 'entry_points', - 'exclude_package_data', - 'ext_modules ', - 'ext_package', - 'include_package_data', - 'namespace_packages', - 'setup_requires', - 'use_2to3', - 'zip_safe'] - used_unsupported_args = [arg for arg in unsupported_args if arg in kwargs] - if used_unsupported_args: - sys.stderr.write("*** Arguments %s to setup() not supported in catkin devel space in setup.py of %s\n" % (used_unsupported_args, package_name)) - - result = generate_cmake_file(package_name=package_name, - version=version, - scripts=scripts, - package_dir=package_dir, - pkgs=pkgs, - modules=modules) - with open(outfile, 'w') as out: - out.write('\n'.join(result)) - - return setup - - -def main(): - """ - Script main, parses arguments and invokes Dummy.setup indirectly. - """ - parser = ArgumentParser(description='Utility to read setup.py values from cmake macros. Creates a file with CMake set commands setting variables.') - parser.add_argument('package_name', help='Name of catkin package') - parser.add_argument('setupfile_path', help='Full path to setup.py') - parser.add_argument('outfile', help='Where to write result to') - - args = parser.parse_args() - - # print("%s" % sys.argv) - # PACKAGE_NAME = sys.argv[1] - # OUTFILE = sys.argv[3] - # print("Interrogating setup.py for package %s into %s " % (PACKAGE_NAME, OUTFILE), - # file=sys.stderr) - - # print("executing %s" % args.setupfile_path) - - # be sure you're in the directory containing - # setup.py so the sys.path manipulation works, - # so the import of __version__ works - os.chdir(os.path.dirname(os.path.abspath(args.setupfile_path))) - - # patch setup() function of distutils and setuptools for the - # context of evaluating setup.py - try: - fake_setup = _create_mock_setup_function(package_name=args.package_name, - outfile=args.outfile) - - distutils_backup = distutils.core.setup - distutils.core.setup = fake_setup - try: - setuptools_backup = setuptools.setup - setuptools.setup = fake_setup - except NameError: - pass - - runpy.run_path(args.setupfile_path) - finally: - distutils.core.setup = distutils_backup - try: - setuptools.setup = setuptools_backup - except NameError: - pass - -if __name__ == '__main__': - main() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/package.xml.stamp b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/package.xml.stamp deleted file mode 100644 index ad7243ddfdc874b38192342330dfa5c10cd544a8..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/package.xml.stamp +++ /dev/null @@ -1,66 +0,0 @@ -<?xml version="1.0"?> -<package format="2"> - <name>protocol</name> - <version>0.0.0</version> - <description>The protocol package</description> - - <!-- One maintainer tag required, multiple allowed, one person per tag --> - <!-- Example: --> - <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> --> - <maintainer email="philipp@todo.todo">philipp</maintainer> - - - <!-- One license tag required, multiple allowed, one license per tag --> - <!-- Commonly used license strings: --> - <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> - <license>TODO</license> - - - <!-- Url tags are optional, but multiple are allowed, one per tag --> - <!-- Optional attribute type can be: website, bugtracker, or repository --> - <!-- Example: --> - <!-- <url type="website">http://wiki.ros.org/protocol</url> --> - - - <!-- Author tags are optional, multiple are allowed, one per tag --> - <!-- Authors do not have to be maintainers, but could be --> - <!-- Example: --> - <!-- <author email="jane.doe@example.com">Jane Doe</author> --> - - - <!-- The *depend tags are used to specify dependencies --> - <!-- Dependencies can be catkin packages or system dependencies --> - <!-- Examples: --> - <!-- Use depend as a shortcut for packages that are both build and exec dependencies --> - <!-- <depend>roscpp</depend> --> - <!-- Note that this is equivalent to the following: --> - <!-- <build_depend>roscpp</build_depend> --> - <!-- <exec_depend>roscpp</exec_depend> --> - <!-- Use build_depend for packages you need at compile time: --> - <!-- <build_depend>message_generation</build_depend> --> - <!-- Use build_export_depend for packages you need in order to build against this package: --> - <!-- <build_export_depend>message_generation</build_export_depend> --> - <!-- Use buildtool_depend for build tool packages: --> - <!-- <buildtool_depend>catkin</buildtool_depend> --> - <!-- Use exec_depend for packages you need at runtime: --> - <!-- <exec_depend>message_runtime</exec_depend> --> - <!-- Use test_depend for packages you need only for testing: --> - <!-- <test_depend>gtest</test_depend> --> - <!-- Use doc_depend for packages you need only for building documentation: --> - <!-- <doc_depend>doxygen</doc_depend> --> - <buildtool_depend>catkin</buildtool_depend> - <build_depend>roscpp</build_depend> - <build_depend>std_msgs</build_depend> - <build_depend>message_generation</build_depend> - <build_export_depend>roscpp</build_export_depend> - <build_export_depend>std_msgs</build_export_depend> - <exec_depend>roscpp</exec_depend> - <exec_depend>std_msgs</exec_depend> - <exec_depend>message_runtime</exec_depend> - - <!-- The export tag contains other, unspecified, tags --> - <export> - <!-- Other tools can request additional information be placed here --> - - </export> -</package> diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/pkg-genmsg.cmake.em.stamp b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/pkg-genmsg.cmake.em.stamp deleted file mode 100644 index f02628ffbd7abc1e9b5c22d15f6d61e8bb930b42..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/pkg-genmsg.cmake.em.stamp +++ /dev/null @@ -1,166 +0,0 @@ -# generated from genmsg/cmake/pkg-genmsg.cmake.em - -@{ -import os -import sys - -import genmsg -import genmsg.base -genmsg.base.log_verbose('GENMSG_VERBOSE' in os.environ) -import genmsg.deps -import genmsg.gentools - -# split incoming variables -messages = messages_str.split(';') if messages_str != '' else [] -services = services_str.split(';') if services_str != '' else [] -dependencies = dependencies_str.split(';') if dependencies_str != '' else [] -dep_search_paths = dep_include_paths_str.split(';') if dep_include_paths_str != '' else [] - -dep_search_paths_dict = {} -dep_search_paths_tuple_list = [] -is_even = True -for val in dep_search_paths: - if is_even: - dep_search_paths_dict.setdefault(val, []) - val_prev = val - is_even = False - else: - dep_search_paths_dict[val_prev].append(val) - dep_search_paths_tuple_list.append((val_prev, val)) - is_even = True -dep_search_paths = dep_search_paths_dict - -if not messages and not services: - print('message(WARNING "Invoking generate_messages() without having added any message or service file before.\nYou should either add add_message_files() and/or add_service_files() calls or remove the invocation of generate_messages().")') - -msg_deps = {} -msg_dep_types = {} -for m in messages: - try: - _deps = genmsg.deps.find_msg_dependencies_with_type(pkg_name, m, dep_search_paths) - msg_deps[m] = [d[1] for d in _deps] - msg_dep_types[m] = [d[0] for d in _deps] - except genmsg.MsgNotFound as e: - print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (m, str(e).replace('"', '\\"'))) - -srv_deps = {} -srv_dep_types = {} -for s in services: - try: - _deps = genmsg.deps.find_srv_dependencies_with_type(pkg_name, s, dep_search_paths) - srv_deps[s] = [d[1] for d in _deps] - srv_dep_types[s] = [d[0] for d in _deps] - except genmsg.MsgNotFound as e: - print('message(FATAL_ERROR "Could not find messages which \'%s\' depends on. Did you forget to specify generate_messages(DEPENDENCIES ...)?\n%s")' % (s, str(e).replace('"', '\\"'))) - -}@ -message(STATUS "@(pkg_name): @(len(messages)) messages, @(len(services)) services") - -set(MSG_I_FLAGS "@(';'.join(["-I%s:%s" % (dep, dir) for dep, dir in dep_search_paths_tuple_list]))") - -# Find all generators -@[if langs]@ -@[for l in langs.split(';')]@ -find_package(@l REQUIRED) -@[end for]@ -@[end if]@ - -add_custom_target(@(pkg_name)_generate_messages ALL) - -# verify that message/service dependencies have not changed since configure -@{all_deps = dict(list(msg_deps.items()) + list(srv_deps.items()))} -@{all_dep_types = dict(list(msg_dep_types.items()) + list(srv_dep_types.items()))} -@[for f in all_deps.keys()]@ -@{dep_types = ':'.join(all_dep_types[f]).replace('\\','/')} -get_filename_component(_filename "@(f)" NAME_WE) -add_custom_target(_@(pkg_name)_generate_messages_check_deps_${_filename} - COMMAND ${CATKIN_ENV} ${PYTHON_EXECUTABLE} ${GENMSG_CHECK_DEPS_SCRIPT} "@(pkg_name)" "@(f)" "@(dep_types)" -) -@[end for]@# messages and services - -# -# langs = @langs -# - -@[if langs]@ -@[for l in langs.split(';')]@ -### Section generating for lang: @l -### Generating Messages -@[for m in msg_deps.keys()]@ -_generate_msg_@(l[3:])(@pkg_name - "@m" - "${MSG_I_FLAGS}" - "@(';'.join(msg_deps[m]).replace("\\","/"))" - ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name -) -@[end for]@# messages - -### Generating Services -@[for s in srv_deps.keys()]@ -_generate_srv_@(l[3:])(@pkg_name - "@s" - "${MSG_I_FLAGS}" - "@(';'.join(srv_deps[s]).replace("\\","/"))" - ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name -) -@[end for]@# services - -### Generating Module File -_generate_module_@(l[3:])(@pkg_name - ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name - "${ALL_GEN_OUTPUT_FILES_@(l[3:])}" -) - -add_custom_target(@(pkg_name)_generate_messages_@(l[3:]) - DEPENDS ${ALL_GEN_OUTPUT_FILES_@(l[3:])} -) -add_dependencies(@(pkg_name)_generate_messages @(pkg_name)_generate_messages_@(l[3:])) - -# add dependencies to all check dependencies targets -@[for f in all_deps.keys()]@ -get_filename_component(_filename "@(f)" NAME_WE) -add_dependencies(@(pkg_name)_generate_messages_@(l[3:]) _@(pkg_name)_generate_messages_check_deps_${_filename}) -@[end for]@# messages and services - -# target for backward compatibility -add_custom_target(@(pkg_name)_@(l)) -add_dependencies(@(pkg_name)_@(l) @(pkg_name)_generate_messages_@(l[3:])) - -# register target for catkin_package(EXPORTED_TARGETS) -list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS @(pkg_name)_generate_messages_@(l[3:])) - -@[end for]@# langs -@[end if]@ - -@[if langs]@ -@[for l in langs.split(';')]@ - -if(@(l)_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name) -@[if l == 'genpy']@ - install(CODE "execute_process(COMMAND \"@(PYTHON_EXECUTABLE)\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name\")") -@[end if]@ - # install generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name - DESTINATION ${@(l)_INSTALL_DIR} -@[if l == 'genpy' and package_has_static_sources]@ - # skip all init files - PATTERN "__init__.py" EXCLUDE - PATTERN "__init__.pyc" EXCLUDE - ) - # install init files which are not in the root folder of the generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@pkg_name - DESTINATION ${@(l)_INSTALL_DIR} - FILES_MATCHING - REGEX "${CATKIN_DEVEL_PREFIX}/${@(l)_INSTALL_DIR}/@(pkg_name)/.+/__init__.pyc?$" -@[end if]@ - ) -endif() -@[for d in dependencies]@ -if(TARGET @(d)_generate_messages_@(l[3:])) - add_dependencies(@(pkg_name)_generate_messages_@(l[3:]) @(d)_generate_messages_@(l[3:])) -endif() -@[end for]@# dependencies -@[end for]@# langs -@[end if]@ diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/pkg.pc.em.stamp b/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/pkg.pc.em.stamp deleted file mode 100644 index a4f72576cf4d2c8eac34ff317c7a5e21fd23fc43..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/stamps/protocol/pkg.pc.em.stamp +++ /dev/null @@ -1,8 +0,0 @@ -prefix=@PROJECT_SPACE_DIR - -Name: @(CATKIN_PACKAGE_PREFIX + PROJECT_NAME) -Description: Description of @PROJECT_NAME -Version: @PROJECT_VERSION -Cflags: @(' '.join(['-I%s' % include for include in PROJECT_PKG_CONFIG_INCLUDE_DIRS])) -Libs: -L@PROJECT_SPACE_DIR/lib @(' '.join(PKG_CONFIG_LIBRARIES_WITH_PREFIX)) -Requires: @(PROJECT_CATKIN_DEPENDS) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg-context.py b/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg-context.py deleted file mode 100644 index 334467b6f0a3f7a17861a1eeb5c93b7d69c63935..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg-context.py +++ /dev/null @@ -1,11 +0,0 @@ -# generated from genmsg/cmake/pkg-genmsg.context.in - -messages_str = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" -services_str = "" -pkg_name = "protocol" -dependencies_str = "std_msgs" -langs = "gencpp;geneus;genlisp;gennodejs;genpy" -dep_include_paths_str = "protocol;/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg;std_msgs;/opt/ros/kinetic/share/std_msgs/cmake/../msg" -PYTHON_EXECUTABLE = "/usr/bin/python" -package_has_static_sources = '' == 'TRUE' -genmsg_check_deps_script = "/opt/ros/kinetic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py" diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg.cmake deleted file mode 100644 index 2a48d3dd004fb12b71239a4c17ef26c715eff685..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg.cmake +++ /dev/null @@ -1,250 +0,0 @@ -# generated from genmsg/cmake/pkg-genmsg.cmake.em - -message(STATUS "protocol: 1 messages, 0 services") - -set(MSG_I_FLAGS "-Iprotocol:/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg;-Istd_msgs:/opt/ros/kinetic/share/std_msgs/cmake/../msg") - -# Find all generators -find_package(gencpp REQUIRED) -find_package(geneus REQUIRED) -find_package(genlisp REQUIRED) -find_package(gennodejs REQUIRED) -find_package(genpy REQUIRED) - -add_custom_target(protocol_generate_messages ALL) - -# verify that message/service dependencies have not changed since configure - - - -get_filename_component(_filename "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" NAME_WE) -add_custom_target(_protocol_generate_messages_check_deps_${_filename} - COMMAND ${CATKIN_ENV} ${PYTHON_EXECUTABLE} ${GENMSG_CHECK_DEPS_SCRIPT} "protocol" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" "" -) - -# -# langs = gencpp;geneus;genlisp;gennodejs;genpy -# - -### Section generating for lang: gencpp -### Generating Messages -_generate_msg_cpp(protocol - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" - "${MSG_I_FLAGS}" - "" - ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/protocol -) - -### Generating Services - -### Generating Module File -_generate_module_cpp(protocol - ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/protocol - "${ALL_GEN_OUTPUT_FILES_cpp}" -) - -add_custom_target(protocol_generate_messages_cpp - DEPENDS ${ALL_GEN_OUTPUT_FILES_cpp} -) -add_dependencies(protocol_generate_messages protocol_generate_messages_cpp) - -# add dependencies to all check dependencies targets -get_filename_component(_filename "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" NAME_WE) -add_dependencies(protocol_generate_messages_cpp _protocol_generate_messages_check_deps_${_filename}) - -# target for backward compatibility -add_custom_target(protocol_gencpp) -add_dependencies(protocol_gencpp protocol_generate_messages_cpp) - -# register target for catkin_package(EXPORTED_TARGETS) -list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS protocol_generate_messages_cpp) - -### Section generating for lang: geneus -### Generating Messages -_generate_msg_eus(protocol - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" - "${MSG_I_FLAGS}" - "" - ${CATKIN_DEVEL_PREFIX}/${geneus_INSTALL_DIR}/protocol -) - -### Generating Services - -### Generating Module File -_generate_module_eus(protocol - ${CATKIN_DEVEL_PREFIX}/${geneus_INSTALL_DIR}/protocol - "${ALL_GEN_OUTPUT_FILES_eus}" -) - -add_custom_target(protocol_generate_messages_eus - DEPENDS ${ALL_GEN_OUTPUT_FILES_eus} -) -add_dependencies(protocol_generate_messages protocol_generate_messages_eus) - -# add dependencies to all check dependencies targets -get_filename_component(_filename "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" NAME_WE) -add_dependencies(protocol_generate_messages_eus _protocol_generate_messages_check_deps_${_filename}) - -# target for backward compatibility -add_custom_target(protocol_geneus) -add_dependencies(protocol_geneus protocol_generate_messages_eus) - -# register target for catkin_package(EXPORTED_TARGETS) -list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS protocol_generate_messages_eus) - -### Section generating for lang: genlisp -### Generating Messages -_generate_msg_lisp(protocol - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" - "${MSG_I_FLAGS}" - "" - ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/protocol -) - -### Generating Services - -### Generating Module File -_generate_module_lisp(protocol - ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/protocol - "${ALL_GEN_OUTPUT_FILES_lisp}" -) - -add_custom_target(protocol_generate_messages_lisp - DEPENDS ${ALL_GEN_OUTPUT_FILES_lisp} -) -add_dependencies(protocol_generate_messages protocol_generate_messages_lisp) - -# add dependencies to all check dependencies targets -get_filename_component(_filename "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" NAME_WE) -add_dependencies(protocol_generate_messages_lisp _protocol_generate_messages_check_deps_${_filename}) - -# target for backward compatibility -add_custom_target(protocol_genlisp) -add_dependencies(protocol_genlisp protocol_generate_messages_lisp) - -# register target for catkin_package(EXPORTED_TARGETS) -list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS protocol_generate_messages_lisp) - -### Section generating for lang: gennodejs -### Generating Messages -_generate_msg_nodejs(protocol - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" - "${MSG_I_FLAGS}" - "" - ${CATKIN_DEVEL_PREFIX}/${gennodejs_INSTALL_DIR}/protocol -) - -### Generating Services - -### Generating Module File -_generate_module_nodejs(protocol - ${CATKIN_DEVEL_PREFIX}/${gennodejs_INSTALL_DIR}/protocol - "${ALL_GEN_OUTPUT_FILES_nodejs}" -) - -add_custom_target(protocol_generate_messages_nodejs - DEPENDS ${ALL_GEN_OUTPUT_FILES_nodejs} -) -add_dependencies(protocol_generate_messages protocol_generate_messages_nodejs) - -# add dependencies to all check dependencies targets -get_filename_component(_filename "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" NAME_WE) -add_dependencies(protocol_generate_messages_nodejs _protocol_generate_messages_check_deps_${_filename}) - -# target for backward compatibility -add_custom_target(protocol_gennodejs) -add_dependencies(protocol_gennodejs protocol_generate_messages_nodejs) - -# register target for catkin_package(EXPORTED_TARGETS) -list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS protocol_generate_messages_nodejs) - -### Section generating for lang: genpy -### Generating Messages -_generate_msg_py(protocol - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" - "${MSG_I_FLAGS}" - "" - ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/protocol -) - -### Generating Services - -### Generating Module File -_generate_module_py(protocol - ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/protocol - "${ALL_GEN_OUTPUT_FILES_py}" -) - -add_custom_target(protocol_generate_messages_py - DEPENDS ${ALL_GEN_OUTPUT_FILES_py} -) -add_dependencies(protocol_generate_messages protocol_generate_messages_py) - -# add dependencies to all check dependencies targets -get_filename_component(_filename "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg" NAME_WE) -add_dependencies(protocol_generate_messages_py _protocol_generate_messages_check_deps_${_filename}) - -# target for backward compatibility -add_custom_target(protocol_genpy) -add_dependencies(protocol_genpy protocol_generate_messages_py) - -# register target for catkin_package(EXPORTED_TARGETS) -list(APPEND ${PROJECT_NAME}_EXPORTED_TARGETS protocol_generate_messages_py) - - - -if(gencpp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/protocol) - # install generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${gencpp_INSTALL_DIR}/protocol - DESTINATION ${gencpp_INSTALL_DIR} - ) -endif() -if(TARGET std_msgs_generate_messages_cpp) - add_dependencies(protocol_generate_messages_cpp std_msgs_generate_messages_cpp) -endif() - -if(geneus_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${geneus_INSTALL_DIR}/protocol) - # install generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${geneus_INSTALL_DIR}/protocol - DESTINATION ${geneus_INSTALL_DIR} - ) -endif() -if(TARGET std_msgs_generate_messages_eus) - add_dependencies(protocol_generate_messages_eus std_msgs_generate_messages_eus) -endif() - -if(genlisp_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/protocol) - # install generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genlisp_INSTALL_DIR}/protocol - DESTINATION ${genlisp_INSTALL_DIR} - ) -endif() -if(TARGET std_msgs_generate_messages_lisp) - add_dependencies(protocol_generate_messages_lisp std_msgs_generate_messages_lisp) -endif() - -if(gennodejs_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${gennodejs_INSTALL_DIR}/protocol) - # install generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${gennodejs_INSTALL_DIR}/protocol - DESTINATION ${gennodejs_INSTALL_DIR} - ) -endif() -if(TARGET std_msgs_generate_messages_nodejs) - add_dependencies(protocol_generate_messages_nodejs std_msgs_generate_messages_nodejs) -endif() - -if(genpy_INSTALL_DIR AND EXISTS ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/protocol) - install(CODE "execute_process(COMMAND \"/usr/bin/python\" -m compileall \"${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/protocol\")") - # install generated code - install( - DIRECTORY ${CATKIN_DEVEL_PREFIX}/${genpy_INSTALL_DIR}/protocol - DESTINATION ${genpy_INSTALL_DIR} - ) -endif() -if(TARGET std_msgs_generate_messages_py) - add_dependencies(protocol_generate_messages_py std_msgs_generate_messages_py) -endif() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/cmake_install.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/cmake_install.cmake deleted file mode 100644 index a1eeb11ef5f7eca67cd432be0dbd3071778949e1..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/cmake_install.cmake +++ /dev/null @@ -1,183 +0,0 @@ -# Install script for directory: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Debug") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Install shared libraries without execute permission? -if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - set(CMAKE_INSTALL_SO_NO_EXE "1") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - - if (NOT EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}") - file(MAKE_DIRECTORY "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}") - endif() - if (NOT EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/.catkin") - file(WRITE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/.catkin" "") - endif() -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES - "/usr/local/_setup_util.py") - if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) - message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() - if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) - message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() -file(INSTALL DESTINATION "/usr/local" TYPE PROGRAM FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/_setup_util.py") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES - "/usr/local/env.sh") - if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) - message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() - if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) - message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() -file(INSTALL DESTINATION "/usr/local" TYPE PROGRAM FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/env.sh") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES - "/usr/local/setup.bash") - if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) - message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() - if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) - message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() -file(INSTALL DESTINATION "/usr/local" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.bash") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES - "/usr/local/setup.sh") - if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) - message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() - if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) - message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() -file(INSTALL DESTINATION "/usr/local" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.sh") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES - "/usr/local/setup.zsh") - if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) - message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() - if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) - message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() -file(INSTALL DESTINATION "/usr/local" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/setup.zsh") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES - "/usr/local/.rosinstall") - if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION) - message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() - if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION) - message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}") - endif() -file(INSTALL DESTINATION "/usr/local" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/.rosinstall") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/protocol/msg" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/msg/Broadcast.msg") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/protocol/cmake" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-paths.cmake") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/include" TYPE DIRECTORY FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include/protocol") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/roseus/ros" TYPE DIRECTORY FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/roseus/ros/protocol") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/common-lisp/ros" TYPE DIRECTORY FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/common-lisp/ros/protocol") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/gennodejs/ros" TYPE DIRECTORY FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/gennodejs/ros/protocol") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - execute_process(COMMAND "/usr/bin/python" -m compileall "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/python2.7/dist-packages/protocol") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/python2.7/dist-packages" TYPE DIRECTORY FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/python2.7/dist-packages/protocol") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol.pc") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/protocol/cmake" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocol-msg-extras.cmake") -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/protocol/cmake" TYPE FILE FILES - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig.cmake" - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/protocolConfig-version.cmake" - ) -endif() - -if("${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT) - file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/share/protocol" TYPE FILE FILES "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/package.xml") -endif() - -if(NOT CMAKE_INSTALL_LOCAL_ONLY) - # Include the install script for each subdirectory. - include("/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/cmake_install.cmake") - -endif() - -if(CMAKE_INSTALL_COMPONENT) - set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") -else() - set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") -endif() - -string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT - "${CMAKE_INSTALL_MANIFEST_FILES}") -file(WRITE "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}" - "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/CMakeDirectoryInformation.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/CMakeDirectoryInformation.cmake deleted file mode 100644 index 7e3d25065d08d74fcd6e313135f2c23f430da204..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/CMakeDirectoryInformation.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Relative path conversion top directories. -set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/usr/src/gtest") -set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug") - -# Force unix paths in dependencies. -set(CMAKE_FORCE_UNIX_PATHS 1) - - -# The C and CXX include file regular expressions for this directory. -set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") -set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") -set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) -set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/DependInfo.cmake deleted file mode 100644 index 99261f3694a0eb169cce9c3cdb2df15ab8693550..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/DependInfo.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - "CXX" - ) -# The set of files for implicit dependencies of each language: -set(CMAKE_DEPENDS_CHECK_CXX - "/usr/src/gtest/src/gtest-all.cc" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o" - ) -set(CMAKE_CXX_COMPILER_ID "GNU") - -# Preprocessor definitions for this target. -set(CMAKE_TARGET_DEFINITIONS_CXX - "GTEST_CREATE_SHARED_LIBRARY=1" - ) - -# The include file search paths: -set(CMAKE_CXX_TARGET_INCLUDE_PATH - "/usr/src/gtest/include" - "/usr/src/gtest" - ) - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/build.make deleted file mode 100644 index f1902ff562f211f86e4d869d83ca757b9cb6266e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/build.make +++ /dev/null @@ -1,113 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Include any dependencies generated for this target. -include gtest/CMakeFiles/gtest.dir/depend.make - -# Include the progress variables for this target. -include gtest/CMakeFiles/gtest.dir/progress.make - -# Include the compile flags for this target's objects. -include gtest/CMakeFiles/gtest.dir/flags.make - -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o: gtest/CMakeFiles/gtest.dir/flags.make -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o: /usr/src/gtest/src/gtest-all.cc - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/gtest.dir/src/gtest-all.cc.o -c /usr/src/gtest/src/gtest-all.cc - -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.i: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/gtest.dir/src/gtest-all.cc.i" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/src/gtest/src/gtest-all.cc > CMakeFiles/gtest.dir/src/gtest-all.cc.i - -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.s: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/gtest.dir/src/gtest-all.cc.s" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/src/gtest/src/gtest-all.cc -o CMakeFiles/gtest.dir/src/gtest-all.cc.s - -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires: - -.PHONY : gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires - -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires - $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides.build -.PHONY : gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides - -gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.provides.build: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o - - -# Object files for target gtest -gtest_OBJECTS = \ -"CMakeFiles/gtest.dir/src/gtest-all.cc.o" - -# External object files for target gtest -gtest_EXTERNAL_OBJECTS = - -gtest/libgtest.so: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o -gtest/libgtest.so: gtest/CMakeFiles/gtest.dir/build.make -gtest/libgtest.so: gtest/CMakeFiles/gtest.dir/link.txt - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX shared library libgtest.so" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/gtest.dir/link.txt --verbose=$(VERBOSE) - -# Rule to build all files generated by this target. -gtest/CMakeFiles/gtest.dir/build: gtest/libgtest.so - -.PHONY : gtest/CMakeFiles/gtest.dir/build - -gtest/CMakeFiles/gtest.dir/requires: gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o.requires - -.PHONY : gtest/CMakeFiles/gtest.dir/requires - -gtest/CMakeFiles/gtest.dir/clean: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && $(CMAKE_COMMAND) -P CMakeFiles/gtest.dir/cmake_clean.cmake -.PHONY : gtest/CMakeFiles/gtest.dir/clean - -gtest/CMakeFiles/gtest.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" /usr/src/gtest "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : gtest/CMakeFiles/gtest.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/cmake_clean.cmake deleted file mode 100644 index 3fcee237269ffb3fa8b2b5bb0c5f865266a2fe0e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/gtest.dir/src/gtest-all.cc.o" - "libgtest.pdb" - "libgtest.so" -) - -# Per-language clean rules from dependency scanning. -foreach(lang CXX) - include(CMakeFiles/gtest.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/depend.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/depend.make deleted file mode 100644 index 37ac348dbdee84ac90462c82dae3a4f7ca757dc1..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/depend.make +++ /dev/null @@ -1,2 +0,0 @@ -# Empty dependencies file for gtest. -# This may be replaced when dependencies are built. diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/flags.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/flags.make deleted file mode 100644 index 22cec53a9aa4a82fc4486e6d592dcf2ae70d7ad1..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/flags.make +++ /dev/null @@ -1,10 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# compile CXX with /usr/bin/c++ -CXX_FLAGS = -g -fPIC -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers - -CXX_DEFINES = -DGTEST_CREATE_SHARED_LIBRARY=1 -Dgtest_EXPORTS - -CXX_INCLUDES = -I/usr/src/gtest/include -I/usr/src/gtest - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/link.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/link.txt deleted file mode 100644 index 531526d8f8eef5ca40c5de8dd38f9efd42a68655..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/link.txt +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/c++ -fPIC -g -shared -Wl,-soname,libgtest.so -o libgtest.so CMakeFiles/gtest.dir/src/gtest-all.cc.o -L"/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/src" -Wl,-rpath,"/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/src" -lpthread diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/progress.make deleted file mode 100644 index abadeb0c3abaa81d622026fcd3ae096d03dd29b7..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 1 -CMAKE_PROGRESS_2 = 2 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake deleted file mode 100644 index 8cf1fbcb5b712d6ccf0772eae021ecd94c6c3b40..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake +++ /dev/null @@ -1,28 +0,0 @@ -# The set of languages for which implicit dependencies are needed: -set(CMAKE_DEPENDS_LANGUAGES - "CXX" - ) -# The set of files for implicit dependencies of each language: -set(CMAKE_DEPENDS_CHECK_CXX - "/usr/src/gtest/src/gtest_main.cc" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" - ) -set(CMAKE_CXX_COMPILER_ID "GNU") - -# Preprocessor definitions for this target. -set(CMAKE_TARGET_DEFINITIONS_CXX - "GTEST_CREATE_SHARED_LIBRARY=1" - ) - -# The include file search paths: -set(CMAKE_CXX_TARGET_INCLUDE_PATH - "/usr/src/gtest/include" - "/usr/src/gtest" - ) - -# Targets to which this target links. -set(CMAKE_TARGET_LINKED_INFO_FILES - "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest.dir/DependInfo.cmake" - ) - -# Fortran module output directory. -set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/build.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/build.make deleted file mode 100644 index 68394a72e78d51198e1f859c4808e8566361f614..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/build.make +++ /dev/null @@ -1,114 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Delete rule output on recipe failure. -.DELETE_ON_ERROR: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -# Include any dependencies generated for this target. -include gtest/CMakeFiles/gtest_main.dir/depend.make - -# Include the progress variables for this target. -include gtest/CMakeFiles/gtest_main.dir/progress.make - -# Include the compile flags for this target's objects. -include gtest/CMakeFiles/gtest_main.dir/flags.make - -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o: gtest/CMakeFiles/gtest_main.dir/flags.make -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o: /usr/src/gtest/src/gtest_main.cc - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -c /usr/src/gtest/src/gtest_main.cc - -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.i: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/gtest_main.dir/src/gtest_main.cc.i" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /usr/src/gtest/src/gtest_main.cc > CMakeFiles/gtest_main.dir/src/gtest_main.cc.i - -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.s: cmake_force - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/gtest_main.dir/src/gtest_main.cc.s" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /usr/src/gtest/src/gtest_main.cc -o CMakeFiles/gtest_main.dir/src/gtest_main.cc.s - -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires: - -.PHONY : gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires - -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires - $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides.build -.PHONY : gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides - -gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.provides.build: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o - - -# Object files for target gtest_main -gtest_main_OBJECTS = \ -"CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" - -# External object files for target gtest_main -gtest_main_EXTERNAL_OBJECTS = - -gtest/libgtest_main.so: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -gtest/libgtest_main.so: gtest/CMakeFiles/gtest_main.dir/build.make -gtest/libgtest_main.so: gtest/libgtest.so -gtest/libgtest_main.so: gtest/CMakeFiles/gtest_main.dir/link.txt - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX shared library libgtest_main.so" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/gtest_main.dir/link.txt --verbose=$(VERBOSE) - -# Rule to build all files generated by this target. -gtest/CMakeFiles/gtest_main.dir/build: gtest/libgtest_main.so - -.PHONY : gtest/CMakeFiles/gtest_main.dir/build - -gtest/CMakeFiles/gtest_main.dir/requires: gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.requires - -.PHONY : gtest/CMakeFiles/gtest_main.dir/requires - -gtest/CMakeFiles/gtest_main.dir/clean: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" && $(CMAKE_COMMAND) -P CMakeFiles/gtest_main.dir/cmake_clean.cmake -.PHONY : gtest/CMakeFiles/gtest_main.dir/clean - -gtest/CMakeFiles/gtest_main.dir/depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" /usr/src/gtest "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/DependInfo.cmake" --color=$(COLOR) -.PHONY : gtest/CMakeFiles/gtest_main.dir/depend - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/cmake_clean.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/cmake_clean.cmake deleted file mode 100644 index 24048f35a317d8fa438e6cfb678bf8b0a7200b8f..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/cmake_clean.cmake +++ /dev/null @@ -1,10 +0,0 @@ -file(REMOVE_RECURSE - "CMakeFiles/gtest_main.dir/src/gtest_main.cc.o" - "libgtest_main.pdb" - "libgtest_main.so" -) - -# Per-language clean rules from dependency scanning. -foreach(lang CXX) - include(CMakeFiles/gtest_main.dir/cmake_clean_${lang}.cmake OPTIONAL) -endforeach() diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/depend.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/depend.make deleted file mode 100644 index 1d67c1ab524a35ba28518428e16051e4728c8c11..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/depend.make +++ /dev/null @@ -1,2 +0,0 @@ -# Empty dependencies file for gtest_main. -# This may be replaced when dependencies are built. diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/flags.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/flags.make deleted file mode 100644 index ef7981c277825101c448e772c261e50c76991280..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/flags.make +++ /dev/null @@ -1,10 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# compile CXX with /usr/bin/c++ -CXX_FLAGS = -g -fPIC -Wall -Wshadow -DGTEST_HAS_PTHREAD=1 -fexceptions -Wextra -Wno-unused-parameter -Wno-missing-field-initializers - -CXX_DEFINES = -DGTEST_CREATE_SHARED_LIBRARY=1 -Dgtest_main_EXPORTS - -CXX_INCLUDES = -I/usr/src/gtest/include -I/usr/src/gtest - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/link.txt b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/link.txt deleted file mode 100644 index 4aedcbc963abae423efd0e71ff58532542c1c87f..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/link.txt +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/c++ -fPIC -g -shared -Wl,-soname,libgtest_main.so -o libgtest_main.so CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -L"/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/src" -Wl,-rpath,"/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/src:/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest" -lpthread libgtest.so -lpthread diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/progress.make b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/progress.make deleted file mode 100644 index 8c8fb6fbbc138d8387b9ed9bdb2088ee8aa036f6..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/gtest_main.dir/progress.make +++ /dev/null @@ -1,3 +0,0 @@ -CMAKE_PROGRESS_1 = 3 -CMAKE_PROGRESS_2 = 4 - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/progress.marks b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/progress.marks deleted file mode 100644 index 573541ac9702dd3969c9bc859d2b91ec1f7e6e56..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/progress.marks +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CTestTestfile.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CTestTestfile.cmake deleted file mode 100644 index f6487963c9513d009149a025e8c63f2155f062a5..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CTestTestfile.cmake +++ /dev/null @@ -1,6 +0,0 @@ -# CMake generated Testfile for -# Source directory: /usr/src/gtest -# Build directory: /home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest -# -# This file includes the relevant testing commands required for -# testing this directory and lists subdirectories to be tested as well. diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile deleted file mode 100644 index 4e2326d023862d5b1fcbf068be089b9ae1027f4e..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile +++ /dev/null @@ -1,288 +0,0 @@ -# CMAKE generated file: DO NOT EDIT! -# Generated by "Unix Makefiles" Generator, CMake Version 3.9 - -# Default target executed when no arguments are given to make. -default_target: all - -.PHONY : default_target - -# Allow only one "make -f Makefile2" at a time, but pass parallelism. -.NOTPARALLEL: - - -#============================================================================= -# Special targets provided by cmake. - -# Disable implicit rules so canonical targets will work. -.SUFFIXES: - - -# Remove some rules from gmake that .SUFFIXES does not remove. -SUFFIXES = - -.SUFFIXES: .hpux_make_needs_suffix_list - - -# Suppress display of executed commands. -$(VERBOSE).SILENT: - - -# A target that is always out of date. -cmake_force: - -.PHONY : cmake_force - -#============================================================================= -# Set environment variables for the build. - -# The shell in which to execute make rules. -SHELL = /bin/sh - -# The CMake executable. -CMAKE_COMMAND = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake - -# The command to remove a file. -RM = /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E remove -f - -# Escaping for special characters. -EQUALS = = - -# The top-level source directory on which CMake was run. -CMAKE_SOURCE_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol" - -# The top-level build directory on which CMake was run. -CMAKE_BINARY_DIR = "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" - -#============================================================================= -# Targets provided globally by CMake. - -# Special rule for the target install/strip -install/strip: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip - -# Special rule for the target install/strip -install/strip/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake -.PHONY : install/strip/fast - -# Special rule for the target install/local -install/local: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local - -# Special rule for the target install/local -install/local/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake -.PHONY : install/local/fast - -# Special rule for the target install -install: preinstall - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -P cmake_install.cmake -.PHONY : install - -# Special rule for the target install -install/fast: preinstall/fast - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -P cmake_install.cmake -.PHONY : install/fast - -# Special rule for the target list_install_components -list_install_components: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" -.PHONY : list_install_components - -# Special rule for the target list_install_components -list_install_components/fast: list_install_components - -.PHONY : list_install_components/fast - -# Special rule for the target edit_cache -edit_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. -.PHONY : edit_cache - -# Special rule for the target edit_cache -edit_cache/fast: edit_cache - -.PHONY : edit_cache/fast - -# Special rule for the target test -test: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/ctest --force-new-ctest-process $(ARGS) -.PHONY : test - -# Special rule for the target test -test/fast: test - -.PHONY : test/fast - -# Special rule for the target rebuild_cache -rebuild_cache: - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." - /home/philipp/jetbrains/clion-2017.3.1/bin/cmake/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) -.PHONY : rebuild_cache - -# Special rule for the target rebuild_cache -rebuild_cache/fast: rebuild_cache - -.PHONY : rebuild_cache/fast - -# The main all target -all: cmake_check_build_system - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/CMakeFiles/progress.marks" - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f CMakeFiles/Makefile2 gtest/all - $(CMAKE_COMMAND) -E cmake_progress_start "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/CMakeFiles" 0 -.PHONY : all - -# The main clean target -clean: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f CMakeFiles/Makefile2 gtest/clean -.PHONY : clean - -# The main clean target -clean/fast: clean - -.PHONY : clean/fast - -# Prepare targets for installation. -preinstall: all - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f CMakeFiles/Makefile2 gtest/preinstall -.PHONY : preinstall - -# Prepare targets for installation. -preinstall/fast: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f CMakeFiles/Makefile2 gtest/preinstall -.PHONY : preinstall/fast - -# clear depends -depend: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 -.PHONY : depend - -# Convenience name for target. -gtest/CMakeFiles/gtest_main.dir/rule: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest_main.dir/rule -.PHONY : gtest/CMakeFiles/gtest_main.dir/rule - -# Convenience name for target. -gtest_main: gtest/CMakeFiles/gtest_main.dir/rule - -.PHONY : gtest_main - -# fast build rule for target. -gtest_main/fast: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/build -.PHONY : gtest_main/fast - -# Convenience name for target. -gtest/CMakeFiles/gtest.dir/rule: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f CMakeFiles/Makefile2 gtest/CMakeFiles/gtest.dir/rule -.PHONY : gtest/CMakeFiles/gtest.dir/rule - -# Convenience name for target. -gtest: gtest/CMakeFiles/gtest.dir/rule - -.PHONY : gtest - -# fast build rule for target. -gtest/fast: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/build -.PHONY : gtest/fast - -src/gtest-all.o: src/gtest-all.cc.o - -.PHONY : src/gtest-all.o - -# target to build an object file -src/gtest-all.cc.o: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.o -.PHONY : src/gtest-all.cc.o - -src/gtest-all.i: src/gtest-all.cc.i - -.PHONY : src/gtest-all.i - -# target to preprocess a source file -src/gtest-all.cc.i: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.i -.PHONY : src/gtest-all.cc.i - -src/gtest-all.s: src/gtest-all.cc.s - -.PHONY : src/gtest-all.s - -# target to generate assembly for a file -src/gtest-all.cc.s: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest.dir/build.make gtest/CMakeFiles/gtest.dir/src/gtest-all.cc.s -.PHONY : src/gtest-all.cc.s - -src/gtest_main.o: src/gtest_main.cc.o - -.PHONY : src/gtest_main.o - -# target to build an object file -src/gtest_main.cc.o: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -.PHONY : src/gtest_main.cc.o - -src/gtest_main.i: src/gtest_main.cc.i - -.PHONY : src/gtest_main.i - -# target to preprocess a source file -src/gtest_main.cc.i: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.i -.PHONY : src/gtest_main.cc.i - -src/gtest_main.s: src/gtest_main.cc.s - -.PHONY : src/gtest_main.s - -# target to generate assembly for a file -src/gtest_main.cc.s: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(MAKE) -f gtest/CMakeFiles/gtest_main.dir/build.make gtest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.s -.PHONY : src/gtest_main.cc.s - -# Help Target -help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... clean" - @echo "... depend" - @echo "... install/strip" - @echo "... install/local" - @echo "... install" - @echo "... list_install_components" - @echo "... edit_cache" - @echo "... test" - @echo "... gtest_main" - @echo "... rebuild_cache" - @echo "... gtest" - @echo "... src/gtest-all.o" - @echo "... src/gtest-all.i" - @echo "... src/gtest-all.s" - @echo "... src/gtest_main.o" - @echo "... src/gtest_main.i" - @echo "... src/gtest_main.s" -.PHONY : help - - - -#============================================================================= -# Special targets to cleanup operation of make. - -# Special rule to run CMake to check the build system integrity. -# No rule that depends on this can have commands that come from listfiles -# because they might be regenerated. -cmake_check_build_system: - cd "/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug" && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 -.PHONY : cmake_check_build_system - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/cmake_install.cmake b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/cmake_install.cmake deleted file mode 100644 index 52d3946da2cd3940174011a31dba7127c851c9bf..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/cmake_install.cmake +++ /dev/null @@ -1,34 +0,0 @@ -# Install script for directory: /usr/src/gtest - -# Set the install prefix -if(NOT DEFINED CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "/usr/local") -endif() -string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") - -# Set the install configuration name. -if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) - if(BUILD_TYPE) - string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" - CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") - else() - set(CMAKE_INSTALL_CONFIG_NAME "Debug") - endif() - message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") -endif() - -# Set the component getting installed. -if(NOT CMAKE_INSTALL_COMPONENT) - if(COMPONENT) - message(STATUS "Install component: \"${COMPONENT}\"") - set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") - else() - set(CMAKE_INSTALL_COMPONENT) - endif() -endif() - -# Install shared libraries without execute permission? -if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) - set(CMAKE_INSTALL_SO_NO_EXE "1") -endif() - diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/gtest.cbp b/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/gtest.cbp deleted file mode 100644 index 114134a7a54940a3d2e7543afd7efa34b4c011da..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/gtest.cbp +++ /dev/null @@ -1,573 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<CodeBlocks_project_file> - <FileVersion major="1" minor="6"/> - <Project> - <Option title="gtest"/> - <Option makefile_is_custom="1"/> - <Option compiler="gcc"/> - <Option virtualFolders="CMake Files\;CMake Files\..\;CMake Files\..\..\;CMake Files\..\..\..\;CMake Files\..\..\..\..\;CMake Files\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\..\..\usr\;CMake Files\..\..\..\..\..\..\..\..\..\usr\src\;CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\;CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\em\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\;CMake Files\cmake-build-debug\;CMake Files\cmake-build-debug\catkin\;CMake Files\cmake-build-debug\catkin\catkin_generated\;CMake Files\cmake-build-debug\catkin\catkin_generated\version\;CMake Files\cmake-build-debug\catkin_generated\;CMake Files\cmake-build-debug\catkin_generated\installspace\;CMake Files\cmake-build-debug\devel\;CMake Files\cmake-build-debug\devel\share\;CMake Files\cmake-build-debug\devel\share\protocol\;CMake Files\cmake-build-debug\devel\share\protocol\cmake\;CMake Files\cmake-build-debug\cmake\;"/> - <Build> - <Target title="all"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 all"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest_main"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest_main.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest_main"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest_main/fast"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest_main.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest_main/fast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest/fast"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest/fast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - </Build> - <Unit filename="/usr/src/gtest/src/gtest-all.cc"> - <Option target="gtest"/> - </Unit> - <Unit filename="/usr/src/gtest/src/gtest_main.cc"> - <Option target="gtest_main"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/CMakeLists.txt"> - <Option virtualFolder="CMake Files\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/package.xml"> - <Option virtualFolder="CMake Files\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/CMakeLists.txt"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/CMakeLists.txt"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/cmake/internal_utils.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/cmake/internal_utils.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/package.xml"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/all.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/assert.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/atomic_configure_file.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_add_env_hooks.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_destinations.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_download.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_generate_environment.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_libraries.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_metapackage.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/debug_message.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/em_expand.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/python.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/empy.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/find_program_required.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/legacy.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/list_append_deduplicate.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/list_append_unique.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/list_insert_in_workspace_order.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/stamp.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/string_starts_with.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_python_setup.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/interrogate_setup_dot_py.py"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/platform/lsb.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/platform/ubuntu.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/platform/windows.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/tests.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/catkin_download_test_data.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/nosetests.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/tools/doxygen.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/tools/libraries.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/generate_cached_setup.py.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\em\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\em\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp/cmake/roscppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp/cmake/roscppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp/cmake/roscpp-msg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rostime/cmake/rostimeConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rostime/cmake/rostimeConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosconsole/cmake/rosconsole-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgs-msg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-paths.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcpp-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_generation/cmake/message_generationConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_generation/cmake/message_generationConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencpp-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-paths.cmake.develspace.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-paths.cmake.installspace.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-extras.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-extras.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-genmsg.context.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-genmsg.cmake.em"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneus-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlisp-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejs-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpy-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin/catkin_generated/version/package.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin\catkin_generated\version\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/package.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.develspace.in"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.installspace.in"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/_setup_util.py"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\installspace\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/protocol/cmake/protocol-msg-paths.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\devel\share\protocol\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\cmake\"/> - </Unit> - </Project> -</CodeBlocks_project_file> diff --git a/modules/catkin_ws/src/protocol/cmake-build-debug/protocol.cbp b/modules/catkin_ws/src/protocol/cmake-build-debug/protocol.cbp deleted file mode 100644 index 09cff1a4c4b365c9aba3856b29362ba7ca43a7d8..0000000000000000000000000000000000000000 --- a/modules/catkin_ws/src/protocol/cmake-build-debug/protocol.cbp +++ /dev/null @@ -1,1081 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<CodeBlocks_project_file> - <FileVersion major="1" minor="6"/> - <Project> - <Option title="protocol"/> - <Option makefile_is_custom="1"/> - <Option compiler="gcc"/> - <Option virtualFolders="CMake Files\;CMake Files\..\;CMake Files\..\..\;CMake Files\..\..\..\;CMake Files\..\..\..\..\;CMake Files\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\..\..\;CMake Files\..\..\..\..\..\..\..\..\..\usr\;CMake Files\..\..\..\..\..\..\..\..\..\usr\src\;CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\;CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\em\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\;CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\;CMake Files\cmake-build-debug\;CMake Files\cmake-build-debug\catkin\;CMake Files\cmake-build-debug\catkin\catkin_generated\;CMake Files\cmake-build-debug\catkin\catkin_generated\version\;CMake Files\cmake-build-debug\catkin_generated\;CMake Files\cmake-build-debug\catkin_generated\installspace\;CMake Files\cmake-build-debug\devel\;CMake Files\cmake-build-debug\devel\share\;CMake Files\cmake-build-debug\devel\share\protocol\;CMake Files\cmake-build-debug\devel\share\protocol\cmake\;CMake Files\cmake-build-debug\cmake\;"/> - <Build> - <Target title="all"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 all"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="install/local"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 install/local"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="install"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 install"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="list_install_components"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 list_install_components"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="rebuild_cache"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 rebuild_cache"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="edit_cache"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 edit_cache"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="test"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 test"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_genpy"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_genpy"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_generate_messages_nodejs"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_generate_messages_nodejs"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="listener"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol/listener" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol"/> - <Option object_output="./"/> - <Option type="1"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DROS_PACKAGE_NAME="protocol""/> - <Add option="-DROSCONSOLE_BACKEND_LOG4CXX"/> - <Add directory="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include"/> - <Add directory="/opt/ros/kinetic/include"/> - <Add directory="/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 listener"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="listener/fast"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol/listener" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol"/> - <Option object_output="./"/> - <Option type="1"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DROS_PACKAGE_NAME="protocol""/> - <Add option="-DROSCONSOLE_BACKEND_LOG4CXX"/> - <Add directory="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include"/> - <Add directory="/opt/ros/kinetic/include"/> - <Add directory="/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 listener/fast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_genlisp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_genlisp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_gennodejs"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_gennodejs"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_generate_messages_lisp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_generate_messages_lisp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_gencpp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_gencpp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_generate_messages_cpp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_generate_messages_cpp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="roscpp_generate_messages_py"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 roscpp_generate_messages_py"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="rosgraph_msgs_generate_messages_eus"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 rosgraph_msgs_generate_messages_eus"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="talker"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol/talker" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol"/> - <Option object_output="./"/> - <Option type="1"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DROS_PACKAGE_NAME="protocol""/> - <Add option="-DROSCONSOLE_BACKEND_LOG4CXX"/> - <Add directory="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include"/> - <Add directory="/opt/ros/kinetic/include"/> - <Add directory="/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 talker"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="talker/fast"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol/talker" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/lib/protocol"/> - <Option object_output="./"/> - <Option type="1"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DROS_PACKAGE_NAME="protocol""/> - <Add option="-DROSCONSOLE_BACKEND_LOG4CXX"/> - <Add directory="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/include"/> - <Add directory="/opt/ros/kinetic/include"/> - <Add directory="/opt/ros/kinetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 talker/fast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="clean_test_results"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean_test_results"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="std_msgs_generate_messages_nodejs"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 std_msgs_generate_messages_nodejs"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="roscpp_generate_messages_cpp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 roscpp_generate_messages_cpp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="install/strip"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 install/strip"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="_protocol_generate_messages_check_deps_Broadcast"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 _protocol_generate_messages_check_deps_Broadcast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="roscpp_generate_messages_eus"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 roscpp_generate_messages_eus"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_generate_messages_py"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_generate_messages_py"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="doxygen"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 doxygen"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="run_tests"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 run_tests"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_generate_messages_eus"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_generate_messages_eus"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="std_msgs_generate_messages_cpp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 std_msgs_generate_messages_cpp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="rosgraph_msgs_generate_messages_cpp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 rosgraph_msgs_generate_messages_cpp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="download_extra_data"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 download_extra_data"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="std_msgs_generate_messages_lisp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 std_msgs_generate_messages_lisp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="rosgraph_msgs_generate_messages_nodejs"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 rosgraph_msgs_generate_messages_nodejs"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="roscpp_generate_messages_nodejs"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 roscpp_generate_messages_nodejs"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="tests"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 tests"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="rosgraph_msgs_generate_messages_lisp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 rosgraph_msgs_generate_messages_lisp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="rosgraph_msgs_generate_messages_py"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 rosgraph_msgs_generate_messages_py"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="std_msgs_generate_messages_py"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 std_msgs_generate_messages_py"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="roscpp_generate_messages_lisp"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 roscpp_generate_messages_lisp"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="std_msgs_generate_messages_eus"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 std_msgs_generate_messages_eus"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_geneus"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_geneus"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="protocol_generate_messages"> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug"/> - <Option type="4"/> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 protocol_generate_messages"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest_main"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest_main.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest_main"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest_main/fast"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest_main.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest_main/fast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - <Target title="gtest/fast"> - <Option output="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/libgtest.so" prefix_auto="0" extension_auto="0"/> - <Option working_dir="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest"/> - <Option object_output="./"/> - <Option type="3"/> - <Option compiler="gcc"/> - <Compiler> - <Add option="-DGTEST_CREATE_SHARED_LIBRARY=1"/> - <Add directory="/usr/src/gtest/include"/> - <Add directory="/usr/src/gtest"/> - <Add directory="/usr/include/c++/5"/> - <Add directory="/usr/include/x86_64-linux-gnu/c++/5"/> - <Add directory="/usr/include/c++/5/backward"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include"/> - <Add directory="/usr/local/include"/> - <Add directory="/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed"/> - <Add directory="/usr/include/x86_64-linux-gnu"/> - <Add directory="/usr/include"/> - </Compiler> - <MakeCommands> - <Build command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 gtest/fast"/> - <CompileFile command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 "$file""/> - <Clean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - <DistClean command="/usr/bin/make -j4 -f "/home/philipp/hu/Hochautomatisiertes\ Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/gtest/Makefile" VERBOSE=1 clean"/> - </MakeCommands> - </Target> - </Build> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/listener.cpp"> - <Option target="listener"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/src/talker.cpp"> - <Option target="talker"/> - </Unit> - <Unit filename="/usr/src/gtest/src/gtest-all.cc"> - <Option target="gtest"/> - </Unit> - <Unit filename="/usr/src/gtest/src/gtest_main.cc"> - <Option target="gtest_main"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/CMakeLists.txt"> - <Option virtualFolder="CMake Files\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/package.xml"> - <Option virtualFolder="CMake Files\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/CMakeLists.txt"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/CMakeLists.txt"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/cmake/internal_utils.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../usr/src/gtest/cmake/internal_utils.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\usr\src\gtest\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/package.xml"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/all.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/assert.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/atomic_configure_file.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_add_env_hooks.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_destinations.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_download.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_generate_environment.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_install_python.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_libraries.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_metapackage.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_package.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/debug_message.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/em_expand.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/python.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/empy.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/find_program_required.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/legacy.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/list_append_deduplicate.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/list_append_unique.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/list_insert_in_workspace_order.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/stamp.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/string_starts_with.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkin_python_setup.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/interrogate_setup_dot_py.py"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/platform/lsb.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/platform/ubuntu.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/platform/windows.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\platform\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/tests.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/catkin_download_test_data.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/gtest.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/test/nosetests.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\test\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/tools/doxygen.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/tools/libraries.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/tools/rt.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\tools\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/_setup_util.py.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.bash.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/setup.zsh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/rosinstall.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/generate_cached_setup.py.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/env.sh.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkg.context.pc.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/templates/pkgConfig-version.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\templates\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\em\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/catkin/cmake/em/pkg.pc.em"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\catkin\cmake\em\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp/cmake/roscppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp/cmake/roscppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp/cmake/roscpp-msg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/cpp_common/cmake/cpp_commonConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\cpp_common\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_runtime/cmake/message_runtimeConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_runtime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_serialization/cmake/roscpp_serializationConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_serialization\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/roscpp_traits/cmake/roscpp_traitsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\roscpp_traits\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rostime/cmake/rostimeConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rostime/cmake/rostimeConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rostime\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosconsole/cmake/rosconsoleConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosconsole/cmake/rosconsole-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosconsole\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/rosgraph_msgs/cmake/rosgraph_msgs-msg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\rosgraph_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/std_msgs/cmake/std_msgs-msg-paths.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\std_msgs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/xmlrpcpp/cmake/xmlrpcpp-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\xmlrpcpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_generation/cmake/message_generationConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/message_generation/cmake/message_generationConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\message_generation\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencpp-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gencpp/cmake/gencppConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gencpp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsg-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/genmsgConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-paths.cmake.develspace.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-paths.cmake.installspace.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-extras.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-msg-extras.cmake.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-genmsg.context.in"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genmsg/cmake/pkg-genmsg.cmake.em"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genmsg\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneus-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/geneus/cmake/geneusConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\geneus\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlisp-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genlisp/cmake/genlispConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genlisp\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejs-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/gennodejs/cmake/gennodejsConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\gennodejs\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpy-extras.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig-version.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/../../../../../../../../../opt/ros/kinetic/share/genpy/cmake/genpyConfig.cmake"> - <Option virtualFolder="CMake Files\..\..\..\..\..\..\..\..\..\opt\ros\kinetic\share\genpy\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin/catkin_generated/version/package.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin\catkin_generated\version\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/ordered_paths.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/package.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.develspace.in"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/protocol-msg-extras.cmake.installspace.in"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/catkin_generated/installspace/_setup_util.py"> - <Option virtualFolder="CMake Files\cmake-build-debug\catkin_generated\installspace\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/devel/share/protocol/cmake/protocol-msg-paths.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\devel\share\protocol\cmake\"/> - </Unit> - <Unit filename="/home/philipp/hu/Hochautomatisiertes Fahren/Repo/modules/catkin_ws/src/protocol/cmake-build-debug/cmake/protocol-genmsg.cmake"> - <Option virtualFolder="CMake Files\cmake-build-debug\cmake\"/> - </Unit> - </Project> -</CodeBlocks_project_file>