franta-hg@28: /**
franta-hg@28: * parameter-lister
franta-hg@28: * Copyright © 2015 František Kučera (frantovo.cz)
franta-hg@28: *
franta-hg@28: * This program is free software: you can redistribute it and/or modify
franta-hg@28: * it under the terms of the GNU General Public License as published by
franta-hg@28: * the Free Software Foundation, either version 3 of the License, or
franta-hg@28: * (at your option) any later version.
franta-hg@28: *
franta-hg@28: * This program is distributed in the hope that it will be useful,
franta-hg@28: * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@28: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@28: * GNU General Public License for more details.
franta-hg@28: *
franta-hg@28: * You should have received a copy of the GNU General Public License
franta-hg@28: * along with this program. If not, see .
franta-hg@28: */
franta-hg@11: #ifndef TERMINALCODES_H
franta-hg@11: #define TERMINALCODES_H
franta-hg@1:
franta-hg@1: #include
franta-hg@3:
franta-hg@1: namespace info {
franta-hg@3: namespace globalcode {
franta-hg@3: namespace parameterLister {
franta-hg@3: namespace terminalCodes {
franta-hg@1:
franta-hg@3: enum Code {
franta-hg@3: FG_RED = 31,
franta-hg@3: FG_GREEN = 32,
franta-hg@3: FG_BLUE = 34,
franta-hg@3: FG_DEFAULT = 39,
franta-hg@3: BG_RED = 41,
franta-hg@3: BG_GREEN = 42,
franta-hg@3: BG_BLUE = 44,
franta-hg@3: BG_DEFAULT = 49
franta-hg@3: };
franta-hg@1:
franta-hg@3: class Modifier {
franta-hg@3: Code code;
franta-hg@3: public:
franta-hg@1:
franta-hg@3: Modifier(Code code) : code(code) {
franta-hg@3: }
franta-hg@1:
franta-hg@3: friend std::ostream&
franta-hg@3: operator<<(std::ostream& os, const Modifier& mod) {
franta-hg@3: return os << "\033[" << mod.code << "m";
franta-hg@1: }
franta-hg@3: };
franta-hg@3:
franta-hg@3: }
franta-hg@3: }
franta-hg@3: }
franta-hg@1: }
franta-hg@1:
franta-hg@11: #endif /* TERMINALCODES_H */
franta-hg@1: