本文整理汇总了C++中GetCurrent函数的典型用法代码示例。如果您正苦于以下问题:C++ GetCurrent函数的具体用法?C++ GetCurrent怎么用?C++ GetCurrent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetCurrent函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ToHead
/******************************************************************************
void IFXKeyTrack::Filter(F32 deltatime)
remove track entries too close in time
******************************************************************************/
void IFXKeyTrack::Filter(F32 deltatime)
{
//I32 original=GetNumberElements();
IFXListContext basecontext,nextcontext;
IFXKeyFrame *base,*next;
ToHead(basecontext);
while((base=GetCurrent(basecontext)) != NULL)
{
nextcontext=basecontext;
PostIncrement(nextcontext);
if(IsAtTail(nextcontext))
break;
next=GetCurrent(nextcontext);
if( (next->Time()-base->Time()) < deltatime )
{
Delete(next);
}
else
{
PostIncrement(basecontext);
}
}
}
开发者ID:ClinicalGraphics,项目名称:MathGL,代码行数:34,代码来源:IFXKeyTrack.cpp
示例2: switch
void
ParamListGL::Special(int key, int /*x*/, int /*y*/)
{
switch(key) {
case GLUT_KEY_DOWN:
Increment();
break;
case GLUT_KEY_UP:
Decrement();
break;
case GLUT_KEY_RIGHT:
GetCurrent()->Increment();
break;
case GLUT_KEY_LEFT:
GetCurrent()->Decrement();
break;
case GLUT_KEY_HOME:
GetCurrent()->Reset();
break;
case GLUT_KEY_END:
GetCurrent()->SetPercentage(1.0);
break;
}
glutPostRedisplay();
}
开发者ID:Feinbube,项目名称:hybridNet,代码行数:25,代码来源:paramgl.cpp
示例3: GetCurrent
eOSState cMenuBrowseFiles::Info(void)
{
if (GetCurrent() && !GetCurrent()->IsDir()) {
cString filename = cString::sprintf("%s/%s", *m_CurrentDir, GetCurrent()->Name());
return AddSubMenu(new cMetainfoMenu(filename));
}
return osContinue;
}
开发者ID:flensrocker,项目名称:vdr-plugin-xineliboutput,代码行数:8,代码来源:menu.c
示例4: error
bool LEVELSELECT::addDirectoryListEntry(char* directoryName)
{
if (strlen(directoryName)+1 > MAX_PATH)
{
error("LEVELSELECT::addLevelListEntry", "Parameter directoryName too long. Max length is MAX_PATH (%d).", MAX_PATH);
return false;
}
LEVELDIRECTORY *lastDirectory = GetCurrent()->GetDirectory();
LEVELDIRECTORY *newDirectory;
//get last directory
if (lastDirectory != NULL)
{
while (lastDirectory->next != NULL)
{
lastDirectory = lastDirectory->next;
}
}
newDirectory = (LEVELDIRECTORY*)malloc(sizeof(LEVELDIRECTORY));
newDirectory->prev = lastDirectory;
newDirectory->next = NULL;
if (lastDirectory != NULL)
{
lastDirectory->next = newDirectory;
newDirectory->index = lastDirectory->index+1;
}
else
{
newDirectory->index = 0;
}
if (strcmp(directoryName, "..")==0)
{
strcpy(newDirectory->name, "");
}
else
{
strcpy(newDirectory->name, directoryName);
}
GetCurrent()->GetDirectoryPath(newDirectory->path, newDirectory->name);
if (GetCurrent()->GetDirectory() == NULL)
GetCurrent()->currentDirectory = newDirectory;
return true;
}
开发者ID:Mathias-Gartner,项目名称:Sokorun,代码行数:48,代码来源:levelselect.cpp
示例5: GetCurrent
void subPageSpells::Del()
{
School *school = currentSchool;
if ( school->spells.size() == 1 )
{
currentSpell->Clear();
GetCurrent();
return;
}
spellItr = school->spells.erase(spellItr);
delete currentSpell;
currentSpell = *spellItr;
GetCurrent();
}
开发者ID:q4a,项目名称:scourge,代码行数:16,代码来源:subpagespells.cpp
示例6: SetCurrent
void subPageSpells::Next(unsigned int n)
{
SetCurrent();
std::vector<Spell*> *pSpells = ¤tSchool->spells;
if ( n > (pSpells->size()-spellNumber) && n!=1 )
{
spellItr = pSpells->end();
spellItr--;
currentSpell = *spellItr;
spellNumber = pSpells->size();
return;
}
for ( ; n > 0; n-- )
{
spellItr++;
spellNumber++;
if ( spellItr == pSpells->end() )
{
spellItr = pSpells->begin();
spellNumber = 1;
}
currentSpell = *spellItr;
}
GetCurrent();
}
开发者ID:q4a,项目名称:scourge,代码行数:29,代码来源:subpagespells.cpp
示例7: NS_GetCurrentThread
bool
TaskQueue::IsCurrentThreadIn()
{
bool in = NS_GetCurrentThread() == mRunningThread;
MOZ_ASSERT(in == (GetCurrent() == this));
return in;
}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:7,代码来源:TaskQueue.cpp
示例8: runner
nsresult
TaskQueue::DispatchLocked(already_AddRefed<nsIRunnable> aRunnable,
DispatchMode aMode, DispatchFailureHandling aFailureHandling,
DispatchReason aReason)
{
nsCOMPtr<nsIRunnable> r = aRunnable;
AbstractThread* currentThread;
if (aReason != TailDispatch && (currentThread = GetCurrent()) && RequiresTailDispatch(currentThread)) {
currentThread->TailDispatcher().AddTask(this, r.forget(), aFailureHandling);
return NS_OK;
}
mQueueMonitor.AssertCurrentThreadOwns();
if (mIsFlushing && aMode == AbortIfFlushing) {
return NS_ERROR_ABORT;
}
if (mIsShutdown) {
return NS_ERROR_FAILURE;
}
mTasks.push(r.forget());
if (mIsRunning) {
return NS_OK;
}
nsRefPtr<nsIRunnable> runner(new Runner(this));
nsresult rv = mPool->Dispatch(runner.forget(), NS_DISPATCH_NORMAL);
if (NS_FAILED(rv)) {
NS_WARNING("Failed to dispatch runnable to run TaskQueue");
return rv;
}
mIsRunning = true;
return NS_OK;
}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:33,代码来源:TaskQueue.cpp
示例9: GetCurrent
Size DockCont::GetMinSize() const
{
if (ignoreminsize) return Size(0, 0);
Size sz = tabbar.GetCount() ? GetCurrent().GetMinSize() : Size(0, 0);
sz = AddFrameSize(sz);
return sz;
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:7,代码来源:DockCont.cpp
示例10: GetCurrent
int CoroutineMgr::Yield(int coid )
{
Coroutine * cur = GetCurrent();
if(!cur)
{
LOG_FATAL("current co is null !");
return -1;
}
Coroutine * co = Find(coid);
if(0 == coid)
{
//switch to prev
co = cur->from;
}
if(!co)
{
LOG_FATAL("current from co is null !");
return -1;
}
if(cur->bState == Coroutine::COROUTINE_STATUS_RUNNING)
{
cur->bState = Coroutine::COROUTINE_STATUS_SUSPEND;
}
co->bState = Coroutine::COROUTINE_STATUS_RUNNING;
SetCurrent(co);
LOG_INFO("co = %d is yield schedule next = %d for = %d",cur->iID,co->iID,coid);
swapcontext(&(cur->ctx),&(co->ctx));
return retval;
}
开发者ID:jj4jj,项目名称:ssukits,代码行数:29,代码来源:Coroutine.cpp
示例11: GetCurrent
void VirtualHost::UpdateSerializationSizeLimit() {
const VirtualHost *vh = GetCurrent();
assert(vh);
if (vh->m_runtimeOption.serializationSizeLimit != StringData::MaxSize) {
VariableSerializer::serializationSizeLimit =
vh->m_runtimeOption.serializationSizeLimit;
}
}
开发者ID:SinnerShanky,项目名称:hhvm,代码行数:8,代码来源:virtual-host.cpp
示例12: GetCurrent
const vector<string> &VirtualHost::GetAllowedDirectories() {
const VirtualHost *vh = GetCurrent();
ASSERT(vh);
if (!vh->m_runtimeOption.allowedDirectories.empty()) {
return vh->m_runtimeOption.allowedDirectories;
}
return RuntimeOption::AllowedDirectories;
}
开发者ID:yongki,项目名称:hiphop-php,代码行数:8,代码来源:virtual_host.cpp
示例13: Unbind
void Shader::Unbind()
{
if(GetCurrent() != nullptr)
{
glUseProgram(0);
SetCurrent(nullptr);
}
}
开发者ID:jjiezheng,项目名称:lfant,代码行数:8,代码来源:Shader.cpp
示例14: Bind
void Shader::Bind()
{
if(GetCurrent() != this)
{
glUseProgram(id);
SetCurrent(this);
}
}
开发者ID:jjiezheng,项目名称:lfant,代码行数:8,代码来源:Shader.cpp
示例15: DrawMeter
void FProgress::DrawMeter(CDC& dc, FRect& rcPaint)
{
//fill the unavailable
int nLines = rcPaint.Width() / (gLineDistance + gPenWidth) + 1;
int nAvailLines = (int)GetAvail((double)nLines) ;
int nCurrLines = (int)GetCurrent((double)nLines);
assert(nAvailLines >= nCurrLines);
int x = rcPaint.left;
int y = rcPaint.top;
dc.MoveTo(x, y);
int lh = rcPaint.Height() - 0;
int mh = lh;
int nPenIndex = 2;
dc.SelectPen(m_Pens[nPenIndex]);
dword dwStyle = GetWindowLong(GWL_STYLE);
for (int k = 0; k < nLines; k++)
{
if (k == nCurrLines)
{
if (k < nAvailLines)
dc.SelectPen(m_Pens[1]);
else
dc.SelectPen(m_Pens[0]);
if (dwStyle & PROG_LARGER_CURRENT)
{
lh = lh / 2;
y += lh / 2;
dc.MoveTo(x, y);
}
}
else if (k == nAvailLines)
{
dc.SelectPen(m_Pens[0]);
}
if (dwStyle & PROG_GROWING)
{
double dblNow = (double)k / (double)nLines;
lh = (int)(mh * dblNow);
y = mh - lh;
dc.MoveTo(x, y);
}
dc.LineTo(x, y + lh);
x += gLineDistance;
x += gPenWidth;
dc.MoveTo(x, y);
}
}
开发者ID:codeboost,项目名称:libertv,代码行数:57,代码来源:FControls.cpp
示例16: Command
void VListWin::SetNoCurrent()
{
if ( current == -1 ) { return; }
current = -1;
Command( CMD_ITEM_CHANGED, GetCurrent(), this, 0 );
if ( IsVisible() ) { Invalidate(); }
}
开发者ID:0-wiz-0,项目名称:WCMCommander,代码行数:9,代码来源:swl_vlist.cpp
示例17: lock
BOOL CPlayer::Rew(long lSkip)
{
CAutoLock lock(&m_csecInterface);
if (m_fOpen == OPEN_NONE)
return FALSE;
LONG lTime = GetCurrent();
lTime -= lSkip;
return Seek(lTime);
}
开发者ID:sfengtfw,项目名称:sxplayer,代码行数:10,代码来源:player.cpp
示例18: memcpy
unsigned int Buffer::Read( void* pData, int iSize )
{
if ( m_iPos + iSize > m_iSize ) { return 0; }
if ( iSize == 0 ) { return 0; }
memcpy( pData, GetCurrent(), iSize );
m_iPos += iSize;
return iSize;
}
开发者ID:Bo98,项目名称:bootil,代码行数:10,代码来源:Buffer.cpp
示例19: IsCurrentThreadIn
virtual bool IsCurrentThreadIn() override
{
// Compare NSPR threads so that this works after shutdown when
// NS_GetCurrentThread starts returning null.
PRThread* thread = nullptr;
mTarget->GetPRThread(&thread);
bool in = PR_GetCurrentThread() == thread;
MOZ_ASSERT(in == (GetCurrent() == this));
return in;
}
开发者ID:MoonchildProductions,项目名称:Pale-Moon,代码行数:10,代码来源:AbstractThread.cpp
示例20: GetCurrent
// GetCurrent
Entry *
NameIndexEntryIterator::GetCurrent(uint8 *buffer, size_t *keyLength)
{
Entry *entry = GetCurrent();
if (entry) {
strncpy((char*)buffer, entry->GetName(), kMaxIndexKeyLength);
*keyLength = strlen(entry->GetName());
}
return entry;
}
开发者ID:looncraz,项目名称:haiku,代码行数:11,代码来源:NameIndex.cpp
注:本文中的GetCurrent函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论