本文整理汇总了C++中setNext函数的典型用法代码示例。如果您正苦于以下问题:C++ setNext函数的具体用法?C++ setNext怎么用?C++ setNext使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setNext函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: lock
bool Page::deleteObj(long long headerpos)
{
//reading the Page
tasking::RWLockGuard<> lock(m_rwLock, tasking::WRITE);
auto l_header = reinterpret_cast<HeaderMetaData*>(static_cast<char*>(m_header) + headerpos);
auto l_oid = l_header->getOID();
//start delete by calculating the start position and passing the hash of the obj name
deleteObj(l_header->getObjektType(), static_cast<char*>(m_body) + l_header->getPos());
//now its delete put the freetype ptr to the start
//of the "prepared" deleted object
auto l_free = m_free;
while (l_free->getNext() == 0)
l_free = reinterpret_cast<FreeType*>(reinterpret_cast<char*>(l_free) + l_free->getNext());
// now l_Free is the last element;
l_free->setNext(dist(l_free, static_cast<char*>(m_body) + l_header->getPos()));
// Delete header
l_free = m_headerFree;
while (l_free->getNext() == 0)
l_free = reinterpret_cast<FreeType*>(reinterpret_cast<char*>(l_free) + l_free->getNext());
//now we have the last free element of the header
//insert free type with the right size
auto l_deletedHeader = new(l_header) FreeType(sizeof(HeaderMetaData));
//set the freeType pointer to it
l_free->setNext(dist(l_free, l_deletedHeader));
//delete the obj of the idx
index::ObjectIndex::getInstance().erase(l_oid);
//do NOT delete the Meta! it is way faster to
//insert with meta then without so keep the data
return true;
}
开发者ID:JIM-DB,项目名称:Server,代码行数:34,代码来源:page.cpp
示例2: setXIntersect
SET
setXIntersect(SET A,SET B)
{
SET set;
void *e;
if (! (A->cmp && B->cmp) )
return NULL; /* Both need a compare function */
/* Create new set */
if (! (set = setNew(A->cmp,A->ed,A->ord)))
{ XLOG(set); return NULL; }
/* Add elements of A only */
for (e = setFirst(A); e; e = setNext(A))
if (!setContains(B,e))
setAdd(set,e);
/* Add elements of B only */
for (e = setFirst(B); e; e = setNext(B))
if (!setContains(A,e))
setAdd(set,e);
return set;
}
开发者ID:jiajw0426,项目名称:easyscada,代码行数:25,代码来源:set.c
示例3: setNext
void setNext(TreeLinkNode *node, int depth, vector<TreeLinkNode*> &nexts) {
if (node == nullptr) return;
while ((int)nexts.size() <= depth) nexts.push_back(nullptr);
node->next = nexts[depth];
nexts[depth] = node;
setNext(node->right, depth + 1, nexts);
setNext(node->left, depth + 1, nexts);
}
开发者ID:GHScan,项目名称:DailyProjects,代码行数:8,代码来源:117_PopulatingNextRightPointersinEachNodeII.cpp
示例4: getParent
// updateData
// update data
void CWayPoint::updateData( CSerializable* pObj )
{
pObj->nextRecord();
CZone* pZone = (CZone*) getParent();
// next waypoint
long id = pObj->readLong();
CGameObject *p = pZone->searchObject( id );
if ( id != -1 && p )
{
if ( p && p->getObjectType() == CGameObject::WaypointObject )
{
((CWayPoint*)p)->setBack( this );
setNext( (CWayPoint*)p );
}
}
else
{
if ( m_next )
m_next->setBack( NULL );
setNext(NULL);
}
// prev waypoint
id = pObj->readLong();
p = pZone->searchObject( id );
if ( id != -1 && p )
{
if ( p && p->getObjectType() == CGameObject::WaypointObject )
{
((CWayPoint*)p)->setNext( this );
setBack( (CWayPoint*)p );
}
}
else
{
if ( m_back )
m_back->setNext( NULL );
setBack(NULL);
}
// wait time
m_timeWait = pObj->readLong();
CGameObject::updateData( pObj );
}
开发者ID:codeman001,项目名称:gsleveleditor,代码行数:51,代码来源:CWayPoint.cpp
示例5: cursorIsMoved
/*
* \bug fel om vi flyttas till att vara första barn..
*/
void CellCursor::moveBefore(Cell *current)
{
// 2006-04-27 AF,
cursorIsMoved();
removeFromCurrentPosition();
//Remove all widgets from currents parent.
current->parentCell()->removeCellWidgets();
//Move to new position.
if(current->hasParentCell())
{
setParentCell(current->parentCell());
if(!current->hasPrevious())
current->parentCell()->setChild(this);
else
current->previous()->setNext(this);
}
else
throw runtime_error("Could not insert before root");
setPrevious(current->previous());
current->setPrevious(this);
setNext(current);
//Insert widgets to parents layout.
parentCell()->addCellWidgets();
// TMP EMIT
emit changedPosition();
// emit positionChanged(x(), y(), 5, 5);
}
开发者ID:adrpo,项目名称:OMNotebook,代码行数:37,代码来源:cellcursor.cpp
示例6: qDebug
void MqttBridge::received(const QMQTT::Message &message){
//Now we have to pass on the different command to the DBUS command
//That will be done by emitting signals, as we have no
//knowlege of the dBus class, We will try to have a clean interface
qDebug()<<"Message Topic and payload "<<message.topic() << message.payload();
if (message.topic()==mediaPlayCommand) emit setPlay();
else if (message.topic()==mediaNextCommand) emit setNext();
else if (message.topic()==mediaPrevCommand) emit setPrevious();
else if (message.topic()==mediaVolumeCommand) {
double volume = message.payload().toDouble()/100;
emit setVolume(volume);
}
else if (message.topic()==mediaPlayIdCommand) {
QDBusObjectPath _path;
_path.setPath(message.payload());
emit setPlayId(_path);
}
else if (message.topic()==mediaPlayPauseCommand) emit setPlayPause();
else if (message.topic()==mediaRepeatCommand){
if (message.payload()=="0") emit setLoop("None");
else emit setLoop("Playlist");
}
else if (message.topic()==mediaMixCommand){
if (message.payload()=="0") emit setShuffle(false);
else emit setShuffle(true);
}
}
开发者ID:tipih,项目名称:mqtttodbudbridge,代码行数:31,代码来源:mqttbridge.cpp
示例7: connect
void StreamRender::setUrl(const QString url){
StreamPlay *streamplay= new StreamPlay;
connect(this, SIGNAL(next()),streamplay, SLOT(setNext()));
connect(this, SIGNAL(stop()),streamplay, SLOT(setStop()));
connect(streamplay, SIGNAL(Finish()),this, SLOT(StreamFree()));
streamplay->isFaderSolapar(FundirSolapar);
streamplay->isFaderStop(FundirParar);
streamplay->setFaderSec(Fundir);
streamplay->setDevice(Device);
streamplay->setUrl(url);
stream = streamplay->stream;
StreamMath *streammath = new StreamMath(stream);
segundos = streammath->Duracion();
Slider->setMaximum(segundos);
delete streammath;
Timer->start(Render);
}
开发者ID:jfperini,项目名称:iradit,代码行数:29,代码来源:StreamRender.cpp
示例8: initialize
void initialize(int32_t valueNumber, Relationship *rel, StoreRelationship *storeRel)
{
_valueNumber = valueNumber;
relationships.setFirst(rel);
storeRelationships.setFirst(storeRel);
setNext(NULL);
}
开发者ID:dinogun,项目名称:omr,代码行数:7,代码来源:OMRValuePropagation.hpp
示例9: switch
void Simulation::onKeyDownEvent(SDL_Keysym key)
{
switch (key.sym)
{
case SDLK_ESCAPE:
setNext(MENU);
break;
case SDLK_RETURN:
if (!gameRunning)
setNext(RESULTS);
break;
default: break;
}
}
开发者ID:Eldhelion,项目名称:Strategos,代码行数:16,代码来源:Simulation.cpp
示例10: sendBugReportPlease
size_t ReadsLayout::reverseComplement(size_t index) {
if (getNext(index) != 0) {
cout << "size_t ReadsLayout::reverseComplement(size_t index) problem\n";
sendBugReportPlease(cerr);
}
unsigned int reversePos = getPosition(index) + 1;
size_t pTmp;
size_t previous;
do {
setDirection(index, !getDirection(index));
setPosition(index, reversePos - getPosition(index));
//swap links
pTmp = getNext(index);
setNext(index, getPrevious(index));
setPrevious(index, pTmp);
previous = index;
index = getNext(index);
} while (index != 0);
return previous;
}
开发者ID:b-brankovics,项目名称:grabb,代码行数:25,代码来源:readsLayout.cpp
示例11: sis_final_context
int sis_final_context(int context)
{
int i;
for(i=0; i<MAX_CONTEXT; i++)
if(global_ppriv[i].used && (global_ppriv[i].context == context))
break;
if(i < MAX_CONTEXT){
set_t *set;
unsigned int item;
int retval;
DRM_DEBUG("find socket %d, context = %d\n", i, context);
/* Video Memory */
set = global_ppriv[i].sets[0];
retval = setFirst(set, &item);
while(retval){
DRM_DEBUG("free video memory 0x%x\n", item);
sis_free(item);
retval = setNext(set, &item);
}
setDestroy(set);
/* AGP Memory */
set = global_ppriv[i].sets[1];
retval = setFirst(set, &item);
while(retval){
DRM_DEBUG("free agp memory 0x%x\n", item);
mmFreeMem((PMemBlock)item);
retval = setNext(set, &item);
}
setDestroy(set);
global_ppriv[i].used = 0;
}
/* turn-off auto-flip */
/* TODO */
#if defined(SIS_STEREO)
flip_final();
#endif
return 1;
}
开发者ID:GunioRobot,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:46,代码来源:sis_mm.c
示例12: setNext
void LevelManager::GameInToMainLayer()
{
setNext(false);
ResManager::getManager()->removeAllArmatureInfo();
LoadingLayer* layer = new LoadingLayer(Intent_GameIn2Main);
CCDirector::sharedDirector()->getRunningScene()->addChild(layer,1000);
layer->release();
}
开发者ID:SongCF,项目名称:game-LostStar,代码行数:8,代码来源:LevelManager.cpp
示例13: setCardNumber
IOBooksInfo::IOBooksInfo() {
setCardNumber("");
setCode("");
setODate("");
setIDate("");
setNext(NULL);
setPrev(NULL);
}
开发者ID:AaccrraA,项目名称:Library,代码行数:8,代码来源:iobooksinfo.cpp
示例14: QFAppScriptRunnable
QFAppScriptRunnable *QFAppScriptRunnable::then(QJSValue condition,QJSValue script)
{
QFAppScriptRunnable* runnable = new QFAppScriptRunnable(this);
runnable->setEngine(m_engine.data());
runnable->setCondition(condition);
runnable->setScript(script);
setNext(runnable);
return runnable;
}
开发者ID:benlau,项目名称:quickflux,代码行数:9,代码来源:qfappscriptrunnable.cpp
示例15: setUnion1
SET
setUnion1(SET s1,SET s2)
{
SET set;
void *e;
set = setNew(s1->cmp,s1->ed,s1->ord);
if (!set)
{ XLOG(set); return NULL; }
for (e = setFirst(s1); e; e = setNext(s1))
setAdd(set,e); /* Blind copy of s1 */
for (e = setFirst(s2); e; e = setNext(s2))
setAdd(set,e); /* Call setAdd() to weed out duplicates */
return set;
}
开发者ID:jiajw0426,项目名称:easyscada,代码行数:19,代码来源:set.c
示例16: getNext
/*!
Inserts pL into the containment hierarchy after 'this'.
This is actually a general linked list insertion routine.
*/
void fl_ContainerLayout::_insertIntoList(fl_ContainerLayout * pL)
{
fl_ContainerLayout * pNext = getNext();
setNext(pL);
pL->setPrev(this);
pL->setNext(pNext);
if(pNext)
pNext->setPrev(pL);
}
开发者ID:tchx84,项目名称:debian-abiword-packages,代码行数:15,代码来源:fl_ContainerLayout.cpp
示例17: setUnion
SET
setUnion(SET set1,SET set2)
{
void *e;
/* Add all elements of set2 onto set1 */
for (e = setFirst(set2); e; e = setNext(set2))
setAdd(set1,e);
return set1;
}
开发者ID:jiajw0426,项目名称:easyscada,代码行数:11,代码来源:set.c
示例18: add_freelist
/* add_freelist the free block pointer to appropriate segregated free list */
void add_freelist (void *bp){
int index = getlist_index(GET_SIZE(HDRP(bp)));
setNext(bp, free_listp[index]);
setPrev(bp, NULL);
if (free_listp[index] != NULL)
setPrev(free_listp[index], bp);
free_listp[index] = bp;
return;
}
开发者ID:Frequently,项目名称:Malloc,代码行数:13,代码来源:malloc.c
示例19: delete_freelist
/*delete_freelist Remove the allocated block pointer from its assigned segregated free list */
void delete_freelist (void *bp){
int index = getlist_index(GET_SIZE(HDRP(bp)));
if (getPrev(bp) != NULL)
setNext(getPrev(bp),getNext(bp));
else
free_listp[index] = getNext(bp);
if (getNext(bp) != NULL)
setPrev(getNext(bp), getPrev(bp));
return;
}
开发者ID:Frequently,项目名称:Malloc,代码行数:14,代码来源:malloc.c
示例20: reverse
Node* reverse(Node* root){
/*BEGIN SOLUTION*/
Node* prev = NULL;
while(root != NULL){
Node* temp = getNext(root);
setNext(root, prev);
prev = root;
root = temp;
}
return prev;
/*END SOLUTION*/
/*STUB: return root; */
}
开发者ID:ceekurssi,项目名称:testikurssi,代码行数:13,代码来源:source.c
注:本文中的setNext函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论