[json] Add forward definition header (#5676)

This commit is contained in:
PJ Reiniger
2023-09-22 16:01:27 -04:00
committed by GitHub
parent eab44534c3
commit dd5612fbee
32 changed files with 47 additions and 96 deletions

View File

@@ -5,13 +5,10 @@
#pragma once
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Pose3d.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
struct WPILIB_DLLEXPORT AprilTag {

View File

@@ -11,14 +11,11 @@
#include <units/length.h>
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/apriltag/AprilTag.h"
#include "frc/geometry/Pose3d.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**
* Class for representing a layout of AprilTags on a field and reading them from

View File

@@ -14,6 +14,7 @@
#include <vector>
#include <wpi/StringMap.h>
#include <wpi/json_fwd.h>
#include <wpi/mutex.h>
#include "PropertyImpl.h"
@@ -23,7 +24,6 @@ namespace wpi {
class Logger;
template <typename T>
class SmallVectorImpl;
class json;
} // namespace wpi
namespace cs {

View File

@@ -10,14 +10,11 @@
#include <string_view>
#include <wpi/Logger.h>
#include <wpi/json_fwd.h>
#include <wpi/mutex.h>
#include "SourceImpl.h"
namespace wpi {
class json;
} // namespace wpi
namespace cs {
class Frame;

View File

@@ -14,6 +14,7 @@
#include <wpi/Logger.h>
#include <wpi/condition_variable.h>
#include <wpi/json_fwd.h>
#include <wpi/mutex.h>
#include "Frame.h"
@@ -22,10 +23,6 @@
#include "PropertyContainer.h"
#include "cscore_cpp.h"
namespace wpi {
class json;
} // namespace wpi
namespace cs {
class Notifier;

View File

@@ -14,6 +14,7 @@
#include <vector>
#include <wpi/SmallVector.h>
#include <wpi/json_fwd.h>
#include "cscore_c.h"
@@ -23,10 +24,6 @@
#pragma warning(disable : 26495)
#endif
namespace wpi {
class json;
} // namespace wpi
/** CameraServer (cscore) namespace */
namespace cs {

View File

@@ -16,10 +16,7 @@
#include <wpi/StringMap.h>
#include <wpi/iterator_range.h>
namespace wpi {
class json;
} // namespace wpi
#include <wpi/json_fwd.h>
namespace glass {

View File

@@ -11,12 +11,13 @@
#include <string_view>
#include <vector>
#include <wpi/json_fwd.h>
#include "networktables/Topic.h"
namespace wpi {
template <typename T>
class SmallVectorImpl;
class json;
} // namespace wpi
namespace nt {

View File

@@ -8,11 +8,9 @@
#include <string>
#include <string_view>
#include "ntcore_cpp.h"
#include <wpi/json_fwd.h>
namespace wpi {
class json;
} // namespace wpi
#include "ntcore_cpp.h"
namespace nt {
class PubSubOptionsImpl;

View File

@@ -11,9 +11,10 @@
#include <string>
#include <string_view>
#include <wpi/json_fwd.h>
namespace wpi {
class Logger;
class json;
} // namespace wpi
namespace nt {

View File

@@ -9,8 +9,9 @@
#include <string>
#include <string_view>
#include <wpi/json_fwd.h>
namespace wpi {
class json;
class raw_ostream;
} // namespace wpi

View File

@@ -11,14 +11,12 @@
#include <utility>
#include <vector>
#include <wpi/json_fwd.h>
#include "networktables/NetworkTableType.h"
#include "ntcore_c.h"
#include "ntcore_cpp.h"
namespace wpi {
class json;
} // namespace wpi
namespace nt {
class GenericEntry;

View File

@@ -10,13 +10,11 @@
#include <string_view>
#include <vector>
#include <wpi/json_fwd.h>
#include "networktables/Topic.h"
#include "ntcore_cpp.h"
namespace wpi {
class json;
} // namespace wpi
namespace nt {
template <typename T>

View File

@@ -17,6 +17,8 @@
#include <variant>
#include <vector>
#include <wpi/json_fwd.h>
#include "networktables/NetworkTableValue.h"
#include "ntcore_c.h"
#include "ntcore_cpp_types.h"
@@ -24,7 +26,6 @@
namespace wpi {
template <typename T>
class SmallVectorImpl;
class json;
} // namespace wpi
namespace wpi::log {

View File

@@ -12,15 +12,12 @@
#include <WSProviderContainer.h>
#include <WSProvider_SimDevice.h>
#include <wpi/StringMap.h>
#include <wpi/json_fwd.h>
#include <wpinet/uv/Async.h>
#include <wpinet/uv/Loop.h>
#include <wpinet/uv/Tcp.h>
#include <wpinet/uv/Timer.h>
namespace wpi {
class json;
} // namespace wpi
namespace wpilibws {
class HALSimWSClientConnection;

View File

@@ -8,6 +8,7 @@
#include <utility>
#include <HALSimBaseWebSocketConnection.h>
#include <wpi/json_fwd.h>
#include <wpi/mutex.h>
#include <wpinet/WebSocket.h>
#include <wpinet/uv/Buffer.h>
@@ -15,10 +16,6 @@
#include "HALSimWS.h"
namespace wpi {
class json;
} // namespace wpi
namespace wpilibws {
class HALSimWS;

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <wpi/json.h>
#include <wpi/json_fwd.h>
namespace wpilibws {

View File

@@ -10,7 +10,7 @@
#include <string_view>
#include <hal/simulation/NotifyListener.h>
#include <wpi/json.h>
#include <wpi/json_fwd.h>
#include <wpi/mutex.h>
#include "WSBaseProvider.h"

View File

@@ -10,6 +10,7 @@
#include <utility>
#include <HALSimBaseWebSocketConnection.h>
#include <wpi/json_fwd.h>
#include <wpi/mutex.h>
#include <wpinet/HttpWebSocketServerConnection.h>
#include <wpinet/uv/AsyncFunction.h>
@@ -17,10 +18,6 @@
#include "HALSimWeb.h"
namespace wpi {
class json;
} // namespace wpi
namespace wpilibws {
class HALSimHttpConnection

View File

@@ -13,14 +13,11 @@
#include <WSProviderContainer.h>
#include <WSProvider_SimDevice.h>
#include <wpi/StringMap.h>
#include <wpi/json_fwd.h>
#include <wpinet/uv/Async.h>
#include <wpinet/uv/Loop.h>
#include <wpinet/uv/Tcp.h>
namespace wpi {
class json;
} // namespace wpi
namespace wpilibws {
class HALSimWeb : public std::enable_shared_from_this<HALSimWeb> {

View File

@@ -7,6 +7,7 @@
#include <fmt/format.h>
#include <wpi/Endian.h>
#include <wpi/MathExtras.h>
#include <wpi/json.h>
using namespace wpilibxrp;

View File

@@ -12,6 +12,7 @@
#include <HALSimBaseWebSocketConnection.h>
#include <WSProviderContainer.h>
#include <WSProvider_SimDevice.h>
#include <wpi/json_fwd.h>
#include <wpinet/uv/Async.h>
#include <wpinet/uv/Buffer.h>
#include <wpinet/uv/Loop.h>
@@ -20,10 +21,6 @@
#include "XRP.h"
namespace wpi {
class json;
} // namespace wpi
namespace wpilibxrp {
// This masquerades as a "WebSocket" so that we can reuse the

View File

@@ -9,7 +9,7 @@
#include <span>
#include <string>
#include <wpi/json.h>
#include <wpi/json_fwd.h>
#include <wpinet/raw_uv_ostream.h>
#define XRP_TAG_MOTOR 0x12

View File

@@ -8,15 +8,12 @@
#include <span>
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Transform2d.h"
#include "frc/geometry/Translation2d.h"
#include "frc/geometry/Twist2d.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**

View File

@@ -5,16 +5,13 @@
#pragma once
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Pose2d.h"
#include "frc/geometry/Transform3d.h"
#include "frc/geometry/Translation3d.h"
#include "frc/geometry/Twist3d.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**

View File

@@ -6,10 +6,7 @@
#include <Eigen/Core>
#include <wpi/SymbolExports.h>
namespace wpi {
class json;
} // namespace wpi
#include <wpi/json_fwd.h>
namespace frc {

View File

@@ -5,13 +5,10 @@
#pragma once
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "units/angle.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**

View File

@@ -6,15 +6,12 @@
#include <Eigen/Core>
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Quaternion.h"
#include "frc/geometry/Rotation2d.h"
#include "units/angle.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**

View File

@@ -8,14 +8,11 @@
#include <span>
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Rotation2d.h"
#include "units/length.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**

View File

@@ -5,15 +5,12 @@
#pragma once
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Rotation3d.h"
#include "frc/geometry/Translation2d.h"
#include "units/length.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**

View File

@@ -7,6 +7,7 @@
#include <vector>
#include <wpi/SymbolExports.h>
#include <wpi/json_fwd.h>
#include "frc/geometry/Pose2d.h"
#include "frc/geometry/Transform2d.h"
@@ -15,10 +16,6 @@
#include "units/time.h"
#include "units/velocity.h"
namespace wpi {
class json;
} // namespace wpi
namespace frc {
/**
* Represents a time-parameterized trajectory. The trajectory contains of

View File

@@ -0,0 +1,9 @@
// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#pragma once
namespace wpi {
class json;
} // namespace wpi