本文整理汇总了C++中setNext函数的典型用法代码示例。如果您正苦于以下问题:C++ setNext函数的具体用法?C++ setNext怎么用?C++ setNext使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setNext函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例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;
}
示例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);
}
示例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 );
}
示例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);
}
示例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);
}
}
示例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);
}
示例8: initialize
void initialize(int32_t valueNumber, Relationship *rel, StoreRelationship *storeRel)
{
_valueNumber = valueNumber;
relationships.setFirst(rel);
storeRelationships.setFirst(storeRel);
setNext(NULL);
}
示例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;
}
}
示例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;
}
示例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;
}
示例12: setNext
void LevelManager::GameInToMainLayer()
{
setNext(false);
ResManager::getManager()->removeAllArmatureInfo();
LoadingLayer* layer = new LoadingLayer(Intent_GameIn2Main);
CCDirector::sharedDirector()->getRunningScene()->addChild(layer,1000);
layer->release();
}
示例13: setCardNumber
IOBooksInfo::IOBooksInfo() {
setCardNumber("");
setCode("");
setODate("");
setIDate("");
setNext(NULL);
setPrev(NULL);
}
示例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;
}
示例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;
}