.. _program_listing_file_src_navtk_inertial_MovementStatus.hpp: Program Listing for File MovementStatus.hpp =========================================== |exhale_lsh| :ref:`Return to documentation for file ` (``src/navtk/inertial/MovementStatus.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #pragma once #include #include namespace navtk { namespace inertial { enum class MovementStatus { INVALID, NOT_MOVING, POSSIBLY_MOVING, MOVING }; std::ostream& operator<<(std::ostream& os, const MovementStatus status); } // namespace inertial } // namespace navtk #ifndef NEED_DOXYGEN_EXHALE_WORKAROUND // Define a custom formatter so fmt (via spdlog) can format MovementStatus. template <> struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template constexpr auto format(const navtk::inertial::MovementStatus& input, FormatContext& ctx) const { switch (input) { case navtk::inertial::MovementStatus::INVALID: return fmt::format_to(ctx.out(), "INVALID"); case navtk::inertial::MovementStatus::NOT_MOVING: return fmt::format_to(ctx.out(), "NOT_MOVING"); case navtk::inertial::MovementStatus::POSSIBLY_MOVING: return fmt::format_to(ctx.out(), "POSSIBLY_MOVING"); case navtk::inertial::MovementStatus::MOVING: return fmt::format_to(ctx.out(), "MOVING"); } return fmt::format_to(ctx.out(), "Unknown enum value"); } }; #endif