当前位置: 首页>>代码示例>>C++>>正文


C++ This函数代码示例

本文整理汇总了C++中This函数的典型用法代码示例。如果您正苦于以下问题:C++ This函数的具体用法?C++ This怎么用?C++ This使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了This函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: moe

HRESULT __stdcall RTFEditor::RichEditOleCallback::ShowContainerUI(BOOL fShow)
{
	if ( fShow)
	{
		
		mol::punk<IOleInPlaceFrame> frame;
		if ( moe()->axFrameSite )
		{
			moe()->axFrameSite.queryInterface(&frame);
			if ( frame )
			{
				frame->SetBorderSpace(0);
			}
		}
		
		mol::Ribbon::ribbon()->mode(10);
		This()->rtf_.redraw();
	}
	else
	{
		mol::Ribbon::ribbon()->mode(0);
		if (!This()->shuttingDown_)
		{
			This()->rtf_.redraw();
		}
	}
	return S_OK;
}
开发者ID:littlemole,项目名称:moe,代码行数:28,代码来源:rtf.cpp

示例2: textDoc

HRESULT __stdcall RTFEditor::RTFDocument::get_Length( long* d)
{
	if (!d )
		return E_INVALIDARG;

	*d = 0;

	if ( This()->richEditOle )
	{
		mol::punk<ITextDocument> textDoc(This()->richEditOle);
		if ( textDoc )
		{
			mol::punk<ITextRange> range;
			long start = 0;
			long end = 0;
			HRESULT hr = textDoc->Range( start,start,&range);
			if ( range)
			{
				hr = range->Expand(tomStory,NULL);
				hr = range->GetEnd(&end);
				*d = end;
			}		
		}
	}
	return S_OK;
}
开发者ID:littlemole,项目名称:moe,代码行数:26,代码来源:rtf.cpp

示例3: _ASSERT

STDMETHODIMP CoFoldersMonitor::CPFolderMonitorEvents::Unadvise(DWORD dwCookie)
{
	HRESULT hr = S_OK;

	do 
	{
		IFoldersMonitorEvents *pEvents = (IFoldersMonitorEvents*)dwCookie;
		_ASSERT(pEvents);

		ScopedLock<CsLock> cs(This()->m_adviseLock);

		EventsListeners::iterator it = 
			std::find(This()->m_events.begin(), This()->m_events.end(), pEvents);

		if (it == This()->m_events.end())
		{
			// the cookie does not correspond to a valid connection
			hr = CONNECT_E_NOCONNECTION;
			break;
		}

		// release the connection
		pEvents->Release();
		pEvents = nullptr;

		This()->m_events.erase(it);
	} while (0);

	return S_OK;
}
开发者ID:FlorinLozneanu,项目名称:FoldersMonitorServer,代码行数:30,代码来源:FoldersMonitorServerImpl.cpp

示例4: This

TInt CCallDummyBase::HangUpHandler(TAny* aPtr)
	{
	This(aPtr)->SetUnowned();
	This(aPtr)->iFac->ResetPending( This(aPtr)->iHangUp);
	This(aPtr)->ReqCompleted(This(aPtr)->iHangUp.iTsyReqHandle,KErrNone);
	return KErrNone;
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:7,代码来源:ACQUIRE.CPP

示例5: __ASSERT_ALWAYS

TInt CCallDummyBase::NotifyHookChangeHandler(TAny* aPtr)
	{
	//test server Up call
	__ASSERT_ALWAYS(This(aPtr)->UpCallOption(20,NULL)==KErrNotSupported,TsyPanic(KTsyPanicUnexpectedReturnValue));
	This(aPtr)->iFac->ResetPending( This(aPtr)->iNotifyHookChange);
	This(aPtr)->ReqCompleted(This(aPtr)->iNotifyHookChange.iTsyReqHandle,KErrNone);
	return KErrNone;
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:8,代码来源:ACQUIRE.CPP

示例6: wxASSERT_MSG

void wxThread::Exit( ExitCode status )
{
    wxASSERT_MSG( This() == this,
                  wxT("wxThread::Exit() can only be called in the context of the same thread") );

    // don't enter m_critsect before calling OnExit() because the user code
    // might deadlock if, for example, it signals a condition in OnExit() (a
    // common case) while the main thread calls any of functions entering
    // m_critsect on us (almost all of them do)
    OnExit();

    MPTaskID threadid = m_internal->GetId();

    if ( IsDetached() )
    {
        delete this;
    }
    else // joinable
    {
        // update the status of the joinable thread
        wxCriticalSectionLocker lock( m_critsect );
        m_internal->SetState( STATE_EXITED );
    }

    MPTerminateTask( threadid, (long)status );
}
开发者ID:AaronDP,项目名称:wxWidgets,代码行数:26,代码来源:thread.cpp

示例7: Q_UNUSED

bool SFtpFileEngine::mkdir(const QString &dirName,
                           bool createParentDirectories) const
{
    Q_UNUSED(createParentDirectories);

    qDebug() << "mkdir()" << _fileName << dirName;

    SFtpFileEngine* This(const_cast<SFtpFileEngine *>(this));
    if (!This->sftpConnect())
        return false;

    QUrl url(PathComp::fixUrl(dirName));

    bool result = !libssh2_sftp_mkdir(_sftp_session,
                                      _textCodec->fromUnicode(
                                          url.path()).data(),
                                      LIBSSH2_SFTP_S_IRWXU |
                                      LIBSSH2_SFTP_S_IRGRP |
                                      LIBSSH2_SFTP_S_IXGRP |
                                      LIBSSH2_SFTP_S_IROTH |
                                      LIBSSH2_SFTP_S_IXOTH);

    This->sftpDisconnect();

    if (result)
        This->refreshFileInfoCache(url.path());

    return result;
}
开发者ID:komh,项目名称:kfw,代码行数:29,代码来源:sftpfileengine.cpp

示例8: wxCHECK_MSG

wxThreadError wxThread::Resume()
{
    wxCHECK_MSG( This() != this, wxTHREAD_MISC_ERROR,
                 _T("a thread can't resume itself") );

    wxCriticalSectionLocker lock(m_critsect);

    wxThreadState state = m_internal->GetState();

    switch ( state )
    {
        case STATE_PAUSED:
            wxLogTrace(TRACE_THREADS, _T("Thread %ld suspended, resuming."),
                       GetId());

            m_internal->Resume();

            return wxTHREAD_NO_ERROR;

        case STATE_EXITED:
            wxLogTrace(TRACE_THREADS, _T("Thread %ld exited, won't resume."),
                       GetId());
            return wxTHREAD_NO_ERROR;

        default:
            wxLogDebug(_T("Attempt to resume a thread which is not paused."));

            return wxTHREAD_MISC_ERROR;
    }
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:30,代码来源:threadpsx.cpp

示例9: This

/*
 * Manual page at function.def
 */
INT16 CGEN_PROTECTED CFunction::This()
{
  FNC_DELEGATE This();                                                          // Use a weird macro (see function.def)
  m_iAi     = NULL;                                                             // Clear activate instance
  m_bAiUsed = FALSE;                                                            // Declare virginal
  m_iAi2    = NULL;                                                             // Clear secondary activate instance
  return O_K;                                                                   // Have done
}
开发者ID:gitgun,项目名称:dLabPro,代码行数:11,代码来源:fnc_iam.cpp

示例10: DeRef

 hyresult DeRef() {
     Result res;
     
     TracerPtr tracer;
     res = This()->GetTracer(tracer.EditPtr());
     
     if(mCount > 0) {
         --mCount;
     }
     
     if(mCount == 0) {
         res = This()->Destruct();
         RETURN_IF_FAIL(res, tracer);
     }
     
     return res;
 }
开发者ID:hypershell,项目名称:libhysh-2,代码行数:17,代码来源:SimpleRefcounted.hpp

示例11: elapsed

 double elapsed()
 {
     if (!registered_on_exit_)
     {
         registered_on_exit_ = hpx::register_on_exit(
             util::bind(&accumulator_stats::print_stats, This()));
     }
     return timer_.elapsed();
 }
开发者ID:7ev3n,项目名称:hpx,代码行数:9,代码来源:block_profiler.hpp

示例12: DoSomethingDifferent

DoSomethingDifferent()
{
	This();
	Is();
	Not();
	A();
	Love();
	Song();
}
开发者ID:beanjunkie,项目名称:test,代码行数:9,代码来源:APFeature45.cpp

示例13: restart

 void restart()
 {
     if (!registered_on_exit_)
     {
         registered_on_exit_ = hpx::register_on_exit(
             util::bind(&accumulator_stats::print_stats, This()));
     }
     timer_.restart();
 }
开发者ID:7ev3n,项目名称:hpx,代码行数:9,代码来源:block_profiler.hpp

示例14: MaybeThis

 /**
  * Return the XPCLocaleCallbacks that's hidden away in |cx|, or null
  * if there isn't one. (This impl uses the locale callbacks struct
  * to store away its per-context data.)
  *
  * NB: If the returned XPCLocaleCallbacks hasn't yet been bound to a
  * thread, then a side effect of calling MaybeThis() is to bind it
  * to the calling thread.
  */
 static XPCLocaleCallbacks*
 MaybeThis(JSContext* cx)
 {
   JSLocaleCallbacks* lc = JS_GetLocaleCallbacks(cx);
   return (lc &&
           lc->localeToUpperCase == LocaleToUpperCase &&
           lc->localeToLowerCase == LocaleToLowerCase &&
           lc->localeCompare == LocaleCompare &&
           lc->localeToUnicode == LocaleToUnicode) ? This(cx) : nsnull;
 }
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:19,代码来源:xpclocale.cpp

示例15: switch

void Pdb::Data()
{
	switch(tab.Get()) {
	case TAB_AUTOS: Autos(); break;
	case TAB_LOCALS: Locals(); break;
	case TAB_THIS: This(); break;
	case TAB_WATCHES: Watches(); break;
	case TAB_EXPLORER: Explorer(); break;
	case TAB_MEMORY: memory.Refresh(); break;
	}
}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:11,代码来源:Data.cpp


注:本文中的This函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。