本文整理汇总了C++中DT函数的典型用法代码示例。如果您正苦于以下问题:C++ DT函数的具体用法?C++ DT怎么用?C++ DT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
try {
QApplication app(argc, argv);
app.setOrganizationName(ORG_NAME);
app.setApplicationName(APP_NAME);
int mainRows, mainCols, subRows, subCols;
{
QSettings settings(app.organizationName(), app.applicationName());
settings.beginGroup("grid");
mainRows = settings.value("mainRows", VIDEO_MAIN_ROWS).toInt();
mainCols = settings.value("mainCols", VIDEO_MAIN_COLS).toInt();
subRows = settings.value( "subRows", VIDEO_SUB_ROWS ).toInt();
subCols = settings.value( "subCols", VIDEO_SUB_ROWS ).toInt();
settings.endGroup();
}
Frontend* win = new Frontend(mainRows, mainCols, subRows, subCols);
// calculator.Run();
win->start();
app.exec();
delete win;
DT("Frontend exit from main");
app.exit(0);
}
catch (EX e) {
DT("Frontend exception (%s)", e.what());
}
return 0;
}
示例2: _dbgSigHandler
// THE signal handler
static void _dbgSigHandler(int sig)
{
DT("Debug: signal #%d (%s) catched", sig, strsignal(sig));
switch(sig) {
// all signals to trace are "cased" here
case SIGABRT:
case SIGSEGV:
case SIGBUS :
case SIGILL :
case SIGFPE :
DBG_BTRACE2(2, false); // in release mode no dump occurs
break;
default:
//DBG_BTRACE(2, false); // uncomment just for testing backtrace dump on all signals
break;
}
//DT("looking for prev sig handler");
SigMap::const_iterator is = _sigMap.find(sig);
if(is != _sigMap.end()) {
//DT("prev sig handler found");
sighandler_t h = is->second;
if(h && h!=SIG_ERR) {
h(sig); // exec previously defined signal handler
DT("prev sig handler executed");
}
}
//DT("shutdown...");
_dbgSigShutdown(sig);
//DT("shutdown DONE");
exit(sig);
//DT("exit!!!!");
}
示例3: sort_elem
static int sort_elem(t_list **alst)
{
t_list *t[3] = {*alst, (*alst)->next, *alst};
if (DT(*(((T_FP *)(t[0]->CT))->td), *(((T_FP *)(t[1]->CT))->td)) < 0)
{
t[0]->next = t[1]->next;
t[1]->next = t[0];
*alst = t[1];
}
t[0] = t[1];
t[1] = t[1]->next;
while (t[1])
{
if (DT(*(((T_FP *)(t[0]->CT))->td), *(((T_FP *)(t[1]->CT))->td)) < 0)
{
t[0]->next = t[1]->next;
t[1]->next = t[0];
t[2]->next = t[1];
return (1);
}
t[2] = t[0];
t[0] = t[1];
t[1] = t[1]->next;
}
return (0);
}
示例4: switch
AnyTensor AnyTensor::vertcat(const std::vector<AnyScalar>& v) {
switch (AnyScalar::type(v)) {
case TENSOR_DOUBLE: return DT(AnyScalar::as_double(v), {static_cast<int>(v.size())});
case TENSOR_SX: return ST(SX::vertcat(AnyScalar::as_SX(v)), {static_cast<int>(v.size())});
case TENSOR_MX: return MT(MX::vertcat(AnyScalar::as_MX(v)), {static_cast<int>(v.size())});
default: tensor_assert(false); return DT();
}
}
示例5: DT
CFrame*
CFrameTable::Create(CComPtr<IHTMLDocument2> document)
{
DT(TRACE_I(FS(_T("C_FrameTable::Create(doc=%08X)"), document)));
if (GetFrameId(document)!=NULL_FRAME) return Find(document);
CFrame* pkFrame = new CFrame(document, *this);
// !!! don't dispatch mesages here
CFrame* res = Insert(pkFrame);
ATLASSERT(res);
if (!res) delete pkFrame;
DT(Dump());
// ok free to dispatch messages
return res;
}
示例6: Sleep
STDMETHODIMP
CUpgradrScriptDebugger::OnConnectDebugger(IApplicationDebugger __RPC_FAR *pad)
{
Sleep(0);
DT(TRACE_W("CUpgradrScriptDebugger::OnConnectDebugger()"));
return S_OK;
}
示例7: DT
STDMETHODIMP
CUpgradrHelperbar::GetWindow(HWND *phwnd)
{
DT(TRACE_I(FS(_T("Helperbar[%08X]: GetWindow(%08X)"), this, phwnd)));
*phwnd = m_MainWindow;
return S_OK;
}
示例8: DT
STDMETHODIMP
CXRefreshToolbar::GetWindow(HWND *phwnd)
{
DT(TRACE_I(FS(_T("Toolbar[%08X]: GetWindow(%08X)"), this, phwnd)));
*phwnd = m_Toolbar;
return S_OK;
}
示例9: m_kToolbar
// CUpgradrToolbar
CUpgradrToolbar::CUpgradrToolbar():
m_kToolbar(TOOLBARCLASSNAME, this, ALT_MAP_TB_TOOLBAR),
m_dwBandId(0),
m_dwViewMode(0),
m_iToolbarHeight(22)
{
DT(TRACE_I(FS(_T("Toolbar[%08X]: constructor"), this)));
CBitmap toolbar;
CBitmap mask;
m_kAccelerator.LoadAccelerators(MAKEINTRESOURCE(IDR_ACCELERATOR1));
if (m_kAccelerator.IsNull()) throw CUpgradrWindowsError(GetLastError());
toolbar.LoadBitmap(MAKEINTRESOURCE(IDB_TOOLBAR));
if (toolbar.IsNull()) throw CUpgradrWindowsError(GetLastError());
mask.LoadBitmap(MAKEINTRESOURCE(IDB_TOOLBARMASK));
if (mask.IsNull()) throw CUpgradrWindowsError(GetLastError());
CDPIHelper::ScaleBitmap(toolbar);
CDPIHelper::ScaleBitmap(mask);
int width = (int)CDPIHelper::ScaleX(16);
int height = (int)CDPIHelper::ScaleY(16);
m_kImageList.Create(width, height, ILC_COLOR24 | ILC_MASK, 3, 3);
if (m_kImageList.IsNull()) throw CUpgradrWindowsError(GetLastError());
if (m_kImageList.Add(toolbar, mask) == -1) throw CUpgradrWindowsError(GetLastError());
}
示例10: DT
STDMETHODIMP
CUpgradrToolbar::SetSite(IUnknown *pUnknownSite)
{
DT(TRACE_I(FS(_T("Toolbar[%08X]: SetSite(%08X)"), this, pUnknownSite)));
try {
if (!!pUnknownSite)
{
// attach the window
HWND hMyWindow;
CComPtr<IUnknown> site(pUnknownSite);
CComQIPtr<IOleWindow> window(site);
window->GetWindow(&hMyWindow);
if (!hMyWindow)
{
TRACE_E(FS(_T("Toolbar[%08X]: Cannot retrieve toolbar base window"), this));
return E_FAIL;
}
SubclassWindow(hMyWindow);
// get a WebBrowser reference
CComQIPtr<IServiceProvider> serviceProvider(site);
serviceProvider->QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, (void**)&m_spWebBrowser);
site->QueryInterface(IID_IInputObjectSite, (void**)&m_spSite);
// create main window
CreateMainWindow();
}
}
catch (CUpgradrRuntimeError &ex)
{
HandleError(ex.ErrorMessage());
return E_FAIL;
}
return S_OK;
}
示例11: m_BrowserId
CXRefreshBHO::CXRefreshBHO():
m_BrowserId(NULL_BROWSER),
m_Logger(NULL_BROWSER),
m_ConnectionManager(this),
m_Paused(false)
{
InitRoot();
DT(TRACE_I(FS(_T("BHO[%08X]: constructor"), this)));
}
示例12: erzhi
/****************************二值化******************************/
void erzhi(void)
{
uint8_t i;
DT();
for(i = 0;i <= 128;i++)
{
if(Pixel[i] > AverageValue) Pixel[i] = 255;
else Pixel[i] = 0;
}
}
示例13: m_BandId
// CUpgradrHelperbar
CUpgradrHelperbar::CUpgradrHelperbar():
m_BandId(0),
m_ViewMode(0),
m_BrowserId(NULL_BROWSER),
m_Toolbar(TOOLBARCLASSNAME, this, ALT_MAP_HELPERBAR_TOOLBAR),
m_UnpinButtonIndex(-1)
{
InitRoot();
DT(TRACE_I(FS(_T("Helperbar[%08X]: constructor"), this)));
}
示例14: DT
///диспетчер выполнения процесса определения масштаба страницы.
float GMainEditor::setScaleOCR(GBitmap *pechaImg_){
//cout<<"Start#1 "<<inputData.data["inputFile"]<<endl;
if(!pechaImg_){cout_<<"no open file"<<inputData.data["inputFile"]<<endl; return 1;}
pechaImg=pechaImg_;
float pageScale=1;
int border;
string str;
int print=0;
DT("@4_1");
//vectorBase[0].allVectorCount=0;
border=0;
if(!strArray.size()){
setBit=GBitset::createResize(pechaImg_,1,1,1);
DT("@4_2");
setBit->pageStringDetector(strArray,1); // Подпрограмма выделения строк и букв ПЕЧА ( РЕЛЬСЫ )
DT("@4_3");
border=setBit->border_size();
DT("@4_4");
setOCR=GBitsetOCR::createResize(pechaImg_,1,1);
//if(NewLetterOnlyBtn->Checked==true) {mode=NEWLETTERINBOOK;}else{mode=ALL_LETTER;}
str=fileName(inputData.data["inputFile"]); DT("@@@ file="<<str);
setOCR->setData(
aliKali,
strArray,
correctionTable,
logicProcessor,
iLeft,
iTop,
border,
OCR_NORMALISATION);
}
//fontEditor->setLanguage();
pageScale=setOCR->setScaleOCR(logicProcessor, OCR_NORMALISATION);
return pageScale;
//cout<<"done "<<inputData.data["inputFile"]<<endl;
}//________________________________________________________________________________________________________________
示例15: erzhi
/****************************二值化******************************/
void erzhi(void)
{
uint8_t i;
// unsigned char AverageValue;
DT();
for(i=0;i<127;i++)
{
if(Pixel[i]>AverageValue) Pixel[i] = 255;
else Pixel[i] = 0;
}
}