// ---------------------------------------------------------------------------
// 
//   Lily Engine alpha
// 
//   Copyright (c) 2010 Clifford Jolly
//     http://cliffjolly.com
//     cliff@cliffjolly.com
// 
// ---------------------------------------------------------------------------
// 
//   This program is free software; you can redistribute it and/or modify
//   it under the terms of the GNU General Public License as published by
//   the Free Software Foundation; either version 2 of the License, or
//   (at your option) any later version.
//  
//   This program is distributed in the hope that it will be useful, but
//   WITHOUT ANY WARRANTY; without even the implied warranty of
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
//   General Public License for more details.
// 
//   You should have received a copy of the GNU General Public License
//   along with this program; if not, write to the Free Software
//   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
//   USA
// -------------------------- END HEADER -------------------------------------

#ifndef CONSOLE_H
#define CONSOLE_H

#include <iostream>
#include <string>

namespace Console {
	/// Get an output stream. (Use like: out("something") << "blah" <<
	/// endl; )
	std::ostream &out(const std::string &outStreamName);
	
	/// Wrap a number to an output stream. In case you for some reason
	/// need to. It just converts to a string internally, though.
	std::ostream &out(int streamNum);
	
	/// Set VT100 attributes for a buffer. (The stuff that goes
	/// between the "<ESC>[" and the "m".) Each line is cleared with
	/// a "<ESC>[0m" after printing if this is set.
	void outSetAttribs(const std::string &outStreamName, const std::string &attribs);
	
	/// Set a prefix for a buffer. This will print immediately before a
	/// line's text. For example: "Error: " for an error output buffer.
	void outSetPrefix(const std::string &outStreamName, const std::string &prefix);
	
	/// Turn an output stream on or off.
	void outSetEnabled(const std::string &outStreamName, bool enabled);
	
	/// Turn on synced (outputs to cout in calling thread) flag.
	void outSetSynced(const std::string &outStreamName, bool synced);
};

#endif
