Doxygen Generated Documentation of Ben-Jose Trainable SAT Solver Library
bj_stream.h
1 
2 
3 /*************************************************************
4 
5 This file is part of ben-jose.
6 
7 ben-jose is free software: you can redistribute it and/or modify
8 it under the terms of the version 3 of the GNU General Public
9 License as published by the Free Software Foundation.
10 
11 ben-jose is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with ben-jose. If not, see <http://www.gnu.org/licenses/>.
18 
19 ------------------------------------------------------------
20 
21 Copyright (C) 2007-2012, 2014-2016. QUIROGA BELTRAN, Jose Luis.
22 Id (cedula): 79523732 de Bogota - Colombia.
23 See https://github.com/joseluisquiroga/ben-jose
24 
25 ben-jose is free software thanks to The Glory of Our Lord
26  Yashua Melej Hamashiaj.
27 Our Resurrected and Living, both in Body and Spirit,
28  Prince of Peace.
29 
30 ------------------------------------------------------------
31 
32 bj_stream.h
33 
34 Wrapper for ostream class.
35 
36 --------------------------------------------------------------*/
37 
38 
39 #ifndef BJ_STREAM_H
40 #define BJ_STREAM_H
41 
42 #include <iostream>
43 #include <sstream>
44 #include <fstream> // used for bj_ofstream
45 
46 #include "ch_string.h"
47 
48 #define DO_GETCHAR() getchar()
49 
50 #define CARRIAGE_RETURN ((char)13)
51 
52 #define bj_eol std::endl
53 #define bj_out std::cout
54 #define bj_err std::cerr
55 #define bj_dbg std::cout
56 
57 #define bj_fixed std::fixed
58 
59 typedef std::ostream bj_ostream;
60 
61 typedef std::ostringstream bj_ostr_stream;
62 
63 typedef std::ofstream bj_ofstream;
64 
65 void
66 bj_ofstream_open(ch_string& path, bj_ofstream& stm, bool append);
67 
68 
69 #endif // BJ_STREAM_H
70 
71