- code.zip
- emilio
- Progetti di Visual studio
- Article
- GE_NLIB_3
|
//Misc.cpp : miscellaneous
#include "stdafx.h"
#include "Misc.h"
namespace GE_{ namespace NUtil{
#ifdef _DEBUG
GE_INLINE void STrace::operator() (LPCTSTR format, ...)
{
if(_filter < _Filter()) return;
TCHAR s[1024]; memset(s,0,sizeof(s));
int m = wsprintf(&s[0], "(%4u)", _filter);
memset(&s[m],'.',sizeof(TCHAR)*_Deep());
va_list params;
int n = wvsprintf(&s[_Deep()+m], format, va_start(params, format));
_RPT0(_CRT_WARN, &s[0]);
}
GE_INLINE void STrace::createmsg(const type_info& ti, LPVOID address)
{
operator()("Create %s @ %p\n", ti.name(), address);
}
GE_INLINE void STrace::deletemsg(const type_info& ti, LPVOID address)
{
operator()("Delete %s @ %p\n", ti.name(), address);
}
#else
GE_INLINE void STrace::operator() (LPCTSTR format, ...) {}
GE_INLINE void STrace::createmsg(const type_info& ti, LPVOID address) {}
GE_INLINE void STrace::deletemsg(const type_info& ti, LPVOID address) {}
#endif
}}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Born and living in Milan (Italy), I'm an engineer in electronics actually working in the ICT department of an important oil/gas & energy company as responsible for planning and engineering of ICT infrastructures.
Interested in programming since the '70s, today I still define architectures for the ICT, deploying dedicated specific client application for engineering purposes, working with C++, MFC, STL, and recently also C# and D.