本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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 );
}
示例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;
}
示例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;
}
}
示例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
}
示例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;
}
示例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();
}
示例12: DoSomethingDifferent
DoSomethingDifferent()
{
This();
Is();
Not();
A();
Love();
Song();
}
示例13: restart
void restart()
{
if (!registered_on_exit_)
{
registered_on_exit_ = hpx::register_on_exit(
util::bind(&accumulator_stats::print_stats, This()));
}
timer_.restart();
}
示例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;
}
示例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;
}
}