1 /* sane - Scanner Access Now Easy. 2 3 Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt> 4 5 This file is part of the SANE package. 6 7 This program is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the 10 License, or (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, but 13 WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <https://www.gnu.org/licenses/>. 19 */ 20 21 #define DEBUG_DECLARE_ONLY 22 23 #include "status.h" 24 #include <iostream> 25 26 namespace genesys { 27 operator <<(std::ostream& out, Status status)28std::ostream& operator<<(std::ostream& out, Status status) 29 { 30 out << "Status{\n" 31 << " replugged: " << (status.is_replugged ? "yes" : "no") << '\n' 32 << " is_buffer_empty: " << (status.is_buffer_empty ? "yes" : "no") << '\n' 33 << " is_feeding_finished: " << (status.is_feeding_finished ? "yes" : "no") << '\n' 34 << " is_scanning_finished: " << (status.is_scanning_finished ? "yes" : "no") << '\n' 35 << " is_at_home: " << (status.is_at_home ? "yes" : "no") << '\n' 36 << " is_lamp_on: " << (status.is_lamp_on ? "yes" : "no") << '\n' 37 << " is_front_end_busy: " << (status.is_front_end_busy ? "yes" : "no") << '\n' 38 << " is_motor_enabled: " << (status.is_motor_enabled ? "yes" : "no") << '\n' 39 << "}\n"; 40 return out; 41 } 42 43 } // namespace genesys 44