Skip to content

Commit 6416931

Browse files
committed
fable: Move fable/json/with_boost.hpp to fable/utility/boost_optional.hpp
BREAKING CHANGE: This commit renames a public header file and requires that you rename your #include statements: - #include <fable/json/with_boost.hpp> + #include <fable/utility/boost_optional.hpp>
1 parent 9d7752e commit 6416931

File tree

9 files changed

+19
-18
lines changed

9 files changed

+19
-18
lines changed

fable/include/fable/schema/optional.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030
#include <boost/optional.hpp> // for optional<>
3131

32-
#include <fable/json/with_boost.hpp> // for to_json, from_json
33-
#include <fable/schema/interface.hpp> // for Base<>, Box
32+
#include <fable/schema/interface.hpp> // for Base<>, Box
33+
#include <fable/utility/boost_optional.hpp> // for to_json, from_json
3434

3535
namespace fable {
3636
namespace schema {

fable/include/fable/schema/passthru.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929
#include <boost/optional.hpp> // for optional<>
3030

31-
#include <fable/json/with_boost.hpp> // for to_json, from_json
32-
#include <fable/schema/ignore.hpp> // for Ignore
33-
#include <fable/schema/interface.hpp> // for Base<>, Box
31+
#include <fable/schema/ignore.hpp> // for Ignore
32+
#include <fable/schema/interface.hpp> // for Base<>, Box
33+
#include <fable/utility/boost_optional.hpp> // for to_json, from_json
3434

3535
namespace fable {
3636
namespace schema {

fable/include/fable/json/with_boost.hpp renamed to fable/include/fable/utility/boost_optional.hpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,16 @@
1616
* SPDX-License-Identifier: Apache-2.0
1717
*/
1818
/**
19-
* \file fable/json/with_boost.hpp
20-
* \see fable/json.hpp
19+
* \file fable/utility/boost_optional.hpp
2120
*
2221
* This file contains specializations of `nlohmann::adl_serializer` for boost
2322
* types in order to provide serialization for third-party types.
2423
*/
2524

2625
#pragma once
2726

28-
#include <nlohmann/json.hpp>
29-
30-
#include <boost/optional.hpp>
27+
#include <boost/optional.hpp> // for optional<>
28+
#include <nlohmann/json.hpp> // for adl_serializer<>, json
3129

3230
/*
3331
* In order to provide serialization for third-party types, we need to either

models/include/cloe/component/actuator.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <boost/optional.hpp> // for optional
2525
#include <cloe/component.hpp> // for Component
2626
#include <fable/json.hpp> // for Json
27+
#include <fable/utility/boost_optional.hpp>
2728

2829
namespace cloe {
2930

models/include/cloe/component/driver_request.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#pragma once
2323

2424
#include <cloe/component.hpp> // for Component, Json
25+
#include <fable/utility/boost_optional.hpp>
2526

2627
namespace cloe {
2728

models/include/cloe/component/latlong_actuator.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424

2525
#pragma once
2626

27-
#include <boost/optional.hpp> // for optional<>
28-
#include <fable/json/with_boost.hpp> // for to_json
27+
#include <boost/optional.hpp> // for optional<>
28+
#include <fable/utility/boost_optional.hpp> // for to_json
2929

3030
#include <cloe/component.hpp> // for Component, Json
3131
#include <cloe/component/actuator.hpp> // for Actuator

models/include/cloe/component/vehicle_state_model.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323

2424
#include <functional> // for function
2525

26-
#include <boost/optional.hpp> // for optional<>
26+
#include <boost/optional.hpp> // for optional<>
27+
#include <fable/utility/boost_optional.hpp> // for to_json
2728

28-
#include <fable/json/with_boost.hpp> // for to_json
2929
#include <cloe/component.hpp> // for Component, Json
3030
#include <cloe/component/object.hpp> // for Object
3131

models/src/cloe/utility/actuation_state.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include <string>
2626

27-
#include <fable/json/with_boost.hpp>
27+
#include <fable/utility/boost_optional.hpp>
2828

2929
#include <cloe/core.hpp>
3030

optional/vtd/src/vtd_binding.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <boost/optional.hpp> // for optional<>
3434
#include <boost/property_tree/ptree.hpp> // for ptree
3535
#include <boost/property_tree/xml_parser.hpp> // for read_xml
36-
#include <fable/json/with_boost.hpp> // for to_json
36+
#include <fable/utility/boost_optional.hpp> // for to_json
3737

3838
#include <cloe/core/abort.hpp> // for AbortFlag, abort_checkpoint
3939
#include <cloe/plugin.hpp> // for EXPORT_CLOE_PLUGIN
@@ -45,9 +45,9 @@
4545
#include <cloe/vehicle.hpp> // for Vehicle
4646

4747
#include "rdb_transceiver_tcp.hpp" // for RdbTransceiverTcpFactory
48+
#include "scp_action.hpp" // for ScpActionFactory
4849
#include "scp_messages.hpp" // for scp::*
4950
#include "scp_transceiver.hpp" // for ScpTransceiver
50-
#include "scp_action.hpp" // for ScpActionFactory
5151
#include "task_control.hpp" // for TaskControl
5252
#include "vtd_conf.hpp" // for VtdConfiguration
5353
#include "vtd_vehicle.hpp" // for VtdVehicle
@@ -668,7 +668,8 @@ class VtdBinding : public cloe::Simulator {
668668
continue;
669669
}
670670
auto& obj = it.second;
671-
boost::optional<boost::property_tree::ptree&> properties_avail = obj.get_child("Vehicle").get_child_optional("Properties");
671+
boost::optional<boost::property_tree::ptree&> properties_avail =
672+
obj.get_child("Vehicle").get_child_optional("Properties");
672673
if (!properties_avail) {
673674
continue;
674675
}

0 commit comments

Comments
 (0)