mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[wpiutil] Struct: Change from GetTypeString() to GetTypeName() (#6872)
This makes it easier to define schemas when the type name is non-trivial (e.g., templated structs). This is breaking for a) custom struct implementations and b) anything calling `wpi::Struct<T>::GetTypeString(info...)` in C++ directly. In both cases, it's a simple translation: For A, rename `GetTypeString()` to `GetTypeName()` and remove the struct: at the beginning, and for B, use `wpi::GetStructTypeString<T>(info...)` instead.
This commit is contained in:
@@ -15,8 +15,8 @@ public class ChassisSpeedsStruct implements Struct<ChassisSpeeds> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:ChassisSpeeds";
|
||||
public String getTypeName() {
|
||||
return "ChassisSpeeds";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,8 +15,8 @@ public class DifferentialDriveKinematicsStruct implements Struct<DifferentialDri
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:DifferentialDriveKinematics";
|
||||
public String getTypeName() {
|
||||
return "DifferentialDriveKinematics";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,8 @@ public class DifferentialDriveWheelPositionsStruct
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:DifferentialDriveWheelPositions";
|
||||
public String getTypeName() {
|
||||
return "DifferentialDriveWheelPositions";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,8 +15,8 @@ public class DifferentialDriveWheelSpeedsStruct implements Struct<DifferentialDr
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:DifferentialDriveWheelSpeeds";
|
||||
public String getTypeName() {
|
||||
return "DifferentialDriveWheelSpeeds";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,8 @@ public class MecanumDriveKinematicsStruct implements Struct<MecanumDriveKinemati
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:MecanumDriveKinematics";
|
||||
public String getTypeName() {
|
||||
return "MecanumDriveKinematics";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,8 +15,8 @@ public class MecanumDriveWheelPositionsStruct implements Struct<MecanumDriveWhee
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:MecanumDriveWheelPositions";
|
||||
public String getTypeName() {
|
||||
return "MecanumDriveWheelPositions";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,8 +15,8 @@ public class MecanumDriveWheelSpeedsStruct implements Struct<MecanumDriveWheelSp
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:MecanumDriveWheelSpeeds";
|
||||
public String getTypeName() {
|
||||
return "MecanumDriveWheelSpeeds";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,8 @@ public class SwerveModulePositionStruct implements Struct<SwerveModulePosition>
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:SwerveModulePosition";
|
||||
public String getTypeName() {
|
||||
return "SwerveModulePosition";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,8 +16,8 @@ public class SwerveModuleStateStruct implements Struct<SwerveModuleState> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString() {
|
||||
return "struct:SwerveModuleState";
|
||||
public String getTypeName() {
|
||||
return "SwerveModuleState";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user