Changeset 2052
- Timestamp:
- Sep 6, 2009, 6:59:15 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/StreamRedirect.h
r2051 r2052 64 64 std::basic_istream<charT, traits>& is2, 65 65 bool active=true); 66 67 /** 68 Constructor for istream 69 70 If \a active is false, the class does nothing. 71 */ 72 BasicStreamRedirect(std::basic_istream<charT, traits>& os1, 73 const std::string& file, bool active=true); 66 74 67 75 /** … … 142 150 template<class charT, class traits> 143 151 BasicStreamRedirect<charT, traits>:: 152 BasicStreamRedirect(std::basic_istream<charT, traits>& is, 153 const std::string& file, bool active) 154 : buf_(NULL), ifs_(NULL), ios_(NULL), ofs_(NULL) 155 { 156 if (active) { 157 ifs_ = new std::basic_ifstream<charT, traits>(file.c_str()); 158 init(is, *ofs_, active); 159 } 160 } 161 162 163 template<class charT, class traits> 164 BasicStreamRedirect<charT, traits>:: 144 165 BasicStreamRedirect(std::basic_ostream<charT, traits>& os1, 145 166 std::basic_ostream<charT, traits>& os2, bool active) … … 152 173 template<class charT, class traits> 153 174 BasicStreamRedirect<charT, traits>:: 154 BasicStreamRedirect(std::basic_ostream<charT, traits>& os 1,175 BasicStreamRedirect(std::basic_ostream<charT, traits>& os, 155 176 const std::string& file, bool active) 156 177 : buf_(NULL), ifs_(NULL), ios_(NULL), ofs_(NULL) … … 158 179 if (active) { 159 180 ofs_ = new std::basic_ofstream<charT, traits>(file.c_str()); 160 init(os 1, *ofs_, active);181 init(os, *ofs_, active); 161 182 } 162 183 }
Note: See TracChangeset
for help on using the changeset viewer.