Line data Source code
1 : #ifndef TRAJECTORY_FACTORY_INTERFACE_H 2 : #define TRAJECTORY_FACTORY_INTERFACE_H 3 : 4 : #include <trajectory/TrajectoryBase.h> 5 : 6 : #include <memory> 7 : 8 : /** 9 : * @brief Abstract factory interface for constructing TrajectoryBase instances 10 : * 11 : * Concrete factories encapsulate trajectory-type-specific parameter parsing and 12 : * validation. Callers invoke build() to obtain a ready-to-use trajectory, or 13 : * nullptr if construction failed. 14 : */ 15 1 : class TrajectoryFactoryInterface { 16 : public: 17 0 : virtual ~TrajectoryFactoryInterface() = default; 18 : 19 : /** 20 : * @brief Builds and returns a trajectory with the factory's configured parameters 21 : * 22 : * @return Unique pointer to a constructed trajectory, or nullptr if construction failed 23 : */ 24 1 : virtual std::unique_ptr<TrajectoryBase> build() = 0; 25 : }; 26 : 27 : #endif // TRAJECTORY_FACTORY_INTERFACE_H