Publisher interface: make it optional to implement all the interfaces

This commit is contained in:
Henri Rebecq 2019-09-23 11:06:59 +02:00
parent ae27474548
commit adf075d8e4

View File

@ -13,16 +13,16 @@ public:
Publisher() = default;
virtual ~Publisher() = default;
virtual void imageCallback(const ImagePtrVector& images, Time t) = 0;
virtual void imageCorruptedCallback(const ImagePtrVector& corrupted_images, Time t) = 0;
virtual void depthmapCallback(const DepthmapPtrVector& depthmaps, Time t) = 0;
virtual void opticFlowCallback(const OpticFlowPtrVector& optic_flows, Time t) = 0;
virtual void eventsCallback(const EventsVector& events) = 0;
virtual void poseCallback(const Transformation& T_W_B, const TransformationVector& T_W_Cs, Time t) = 0;
virtual void twistCallback(const AngularVelocityVector& ws, const LinearVelocityVector& vs, Time t) = 0;
virtual void imuCallback(const Vector3& acc, const Vector3& gyr, Time t) = 0;
virtual void cameraInfoCallback(const ze::CameraRig::Ptr& camera_rig, Time t) = 0;
virtual void pointcloudCallback(const PointCloudVector& pointclouds, Time t) = 0;
virtual void imageCallback(const ImagePtrVector& images, Time t) {}
virtual void imageCorruptedCallback(const ImagePtrVector& corrupted_images, Time t) {}
virtual void depthmapCallback(const DepthmapPtrVector& depthmaps, Time t) {}
virtual void opticFlowCallback(const OpticFlowPtrVector& optic_flows, Time t) {}
virtual void eventsCallback(const EventsVector& events) {}
virtual void poseCallback(const Transformation& T_W_B, const TransformationVector& T_W_Cs, Time t) {}
virtual void twistCallback(const AngularVelocityVector& ws, const LinearVelocityVector& vs, Time t) {}
virtual void imuCallback(const Vector3& acc, const Vector3& gyr, Time t) {}
virtual void cameraInfoCallback(const ze::CameraRig::Ptr& camera_rig, Time t) {}
virtual void pointcloudCallback(const PointCloudVector& pointclouds, Time t) {}
};