예제 #1
0
		/// @brief Prints a value to a stream, with optional formatting parameters.
		/// @tparam TFmt If true, applies formatting.
		/// @tparam TResetFmt If true, resets current formatting before applying new one.
		template<bool TFmt, bool TResetFmt = true, typename T> inline void printFmt(std::ostream& mStream, const T& mValue,
			Console::Color mColor = Console::Color::Default, Console::Style mStyle = Console::Style::None)
		{
			if(TFmt)
			{
				if(TResetFmt) resetFmt(mStream);
				mStream << Console::setColorFG(mColor) << Console::setStyle(mStyle);
			}

			mStream << mValue;
		}
예제 #2
0
 inline void callStringifyImpl(std::ostream& mStream, const T& mValue)
 {
     if(TResetFmt) resetFmt(mStream);
     stringify<TFmt>(mStream, mValue);
     if(TResetFmt) resetFmt(mStream);
 }
예제 #3
0
파일: Utils.hpp 프로젝트: questor/git-ws
		template<bool TFmt, bool TResetFmt = true, typename T> inline void callStringifyImpl(std::ostream& mStream, const T& mValue)
		{
			if(TResetFmt) resetFmt(mStream);
			stringify<TFmt>(mStream, mValue);
			if(TResetFmt) resetFmt(mStream);
		}