TheChess
|
00001 /* 00002 * thechess, chess game web application written in C++ and based on Wt 00003 * Copyright (C) 2010 Boris Nagaev 00004 * 00005 * thechess is licensed under the GNU GPL Version 2. 00006 * Other versions of the GPL do not apply. 00007 * See the LICENSE file for terms of use. 00008 */ 00009 00010 #ifndef THECHESS_UTILS_HPP_ 00011 #define THECHESS_UTILS_HPP_ 00012 00013 #include <string> 00014 #include <ostream> 00015 00016 namespace thechess { 00017 00018 std::string expand_path(const std::string& path); 00019 std::string first_file(const char* const files[], const int files_size); 00020 00021 class PlainTextWritter { 00022 public: 00023 PlainTextWritter(std::ostream& out, const short cpl=79); 00024 void write_word(const std::string& word); 00025 private: 00026 std::ostream& out_; 00027 const unsigned short cpl_; 00028 unsigned short current_cpl_; 00029 }; 00030 00031 } 00032 00033 #endif 00034