⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wg_debug.h

📁 一个小巧的嵌入式图形系统wGUI, 可以用VC编译
💻 H
字号:
// wg_debug.h//// wGui debug classes and code////// Copyright (c) 2002 Rob Wiskow// rob-dev@boxedchaos.com//// This library is free software; you can redistribute it and/or// modify it under the terms of the GNU Lesser General Public// License as published by the Free Software Foundation; either// version 2.1 of the License, or (at your option) any later version.//// This library 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// Lesser General Public License for more details.//// You should have received a copy of the GNU Lesser General Public// License along with this library; if not, write to the Free Software// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA//// this is for useful debugging functions and classes#ifndef _WG_DEBUG_H_#define _WG_DEBUG_H_#include <iostream>namespace wGui{#ifdef DEBUG//! The trace function is for outputting informational strings to std::cerr//! In non-debug builds, Trace will do nothing (it's #defined to nothing)//! \param sMessage The message to output to std::cerrinline void Trace(const std::string sMessage){		std::cerr << "Trace: " << sMessage << std::endl;}//! TraceIf will output sMessage to std::cerr if bTest is true//! In non-debug builds, TraceIf will do nothing (it's #defined to nothing)//! \param bTest A boolean that indicates if the message should be output//! \param sMessage The message to output to std::cerrinline void TraceIf(bool bTest, const std::string sMessage){	if (bTest)	{		std::cerr << "Trace: " << sMessage << std::endl;	}}//! DEBUG_ONLY is a macro for marking code as only being included in DEBUG builds#define DEBUG_ONLY(s) s#else // DEBUG#define Trace(s)#define TraceIf(b, s)#define DEBUG_ONLY(s)#endif // DEBUG}#endif // _WG_DEBUG_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -