本文整理汇总了C++中deleteAll函数的典型用法代码示例。如果您正苦于以下问题:C++ deleteAll函数的具体用法?C++ deleteAll怎么用?C++ deleteAll使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deleteAll函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: deleteAll
void MusicDataDownloadThread::downLoadFinished()
{
if(!m_file)
{
deleteAll();
return;
}
m_timer.stop();
m_file->flush();
m_file->close();
QVariant redirectionTarget = m_reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
if(m_reply->error())
{
m_file->remove();
}
else if(!redirectionTarget.isNull())
{
m_redirection = true;
m_reply->deleteLater();
m_file->open(QIODevice::WriteOnly);
m_file->resize(0);
startRequest(m_reply->url().resolved(redirectionTarget.toUrl()));
return;
}
else
{
emit downLoadDataChanged("Data");
M_LOGGER_INFO("data download has finished!");
}
deleteAll();
}
开发者ID:zyl001,项目名称:TTKMusicplayer,代码行数:32,代码来源:musicdatadownloadthread.cpp
示例2: deleteAll
void HCTree::deleteAll(HCNode *root) {
if (root == 0) return;
deleteAll(root->c0);
deleteAll(root->c1);
delete(root);
root = 0;
}
开发者ID:thomasqian,项目名称:huffman_code,代码行数:7,代码来源:HCTree.cpp
示例3: gzclose
void Parser::close(void) {
if (file) {
gzclose(file);
file = NULL;
}
deleteAll(calls);
deleteAll(functions);
deleteAll(structs);
deleteAll(enums);
deleteAll(bitmasks);
}
开发者ID:pzick,项目名称:apitrace,代码行数:12,代码来源:trace_parser.cpp
示例4: deleteAllWorld
void deleteAllWorld(){
deleteAll(wWalls);
deleteAll(wEntities);
deleteAll(wSoftEntities);
//delete every light and set it to null
for(int i=0; i<LIGHT_COUNT;i++){
if(wLights[i]!=NULL){
delete wLights[i];
wLights[i]=NULL;
}
}
}
开发者ID:howard355,项目名称:cs174a_term_project,代码行数:13,代码来源:world.cpp
示例5: deleteAll
void MusicRadioSongsThread::downLoadFinished()
{
if(m_reply == nullptr)
{
deleteAll();
return;
}
if(m_reply->error() == QNetworkReply::NoError)
{
QByteArray bytes = m_reply->readAll();
#ifdef MUSIC_QT_5
QJsonParseError jsonError;
QJsonDocument parseDoucment = QJsonDocument::fromJson(bytes, &jsonError);
///Put the data into Json
if(jsonError.error != QJsonParseError::NoError ||
!parseDoucment.isObject())
{
deleteAll();
return ;
}
QJsonObject jsonObject = parseDoucment.object();
if(jsonObject.contains("data"))
{
jsonObject = jsonObject.value("data").toObject();
if(jsonObject.contains("songList"))
{
QJsonArray array = jsonObject.value("songList").toArray();
foreach(QJsonValue value, array)
{
if(!value.isObject())
{
continue;
}
QJsonObject object = value.toObject();
m_songInfo.m_songUrl = object.value("songLink").toString();
m_songInfo.m_songName = object.value("songName").toString();
m_songInfo.m_artistName = object.value("artistName").toString();
m_songInfo.m_songPicUrl = object.value("songPicRadio").toString();
m_songInfo.m_albumName = object.value("albumName").toString();
QString lrcLink = object.value("lrcLink").toString();
if(!lrcLink.contains( LRC_PREFIX ))
{
lrcLink = LRC_PREFIX + lrcLink;
}
m_songInfo.m_lrcUrl = lrcLink;
}
}
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:50,代码来源:musicradiosongsthread.cpp
示例6: while
/*!
The SLRefGroup::shapeInit checks the validity of the referenced node. To avoid
endless loops a refShape node is not allowed to refShape its ancestors. An
ancestor of a refShape node is group node followed along the previous pointers
with lower depth than the depth of the refShape node.
*/
void SLRefGroup::shapeInit(SLSceneView* sv)
{
// cummulate wm with referenced wm
SLShape* ref = (SLShape*)_refGroup;
_wm *= ref->m();
_wmI.setMatrix(_wm.inverse());
_wmN.setMatrix(_wmI.mat3());
_wmN.transpose();
// check circular references
SLNode* parent = this->parent();
while (parent)
{ if (parent==_refGroup)
SL_EXIT_MSG("Reference node produces a never ending loop.");
parent = parent->parent();
}
// set transparency flag
_aabb.hasAlpha(((SLShape*)_refGroup)->aabb()->hasAlpha());
// delete all child references
if (_first) deleteAll();
// loop through the referenced group and add a SLRefShape or SLRefGroup
SLNode* current = ((SLGroup*)_refGroup)->first();
while (current)
{ if (typeid(*current)==typeid(SLGroup))
addNode(new SLRefGroup((SLGroup*)current, name()+"_"+current->name()));
else addNode(new SLRefShape((SLShape*)current, name()+"_"+current->name()));
((SLShape*)_last)->wm(_wm);
((SLShape*)_last)->depth(depth()+1);
((SLShape*)_last)->shapeInit(sv);
current = current->next();
}
}
开发者ID:heweitykc,项目名称:opengl,代码行数:41,代码来源:SLRefGroup.cpp
示例7: writeSettings
PluginManager::~PluginManager()
{
writeSettings();
stopAll();
deleteAll();
qDeleteAll(m_pluginSpecs);
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:7,代码来源:plugin_manager.cpp
示例8: deleteAll
void Parser::setBookmark(const ParseBookmark &bookmark) {
file->setCurrentOffset(bookmark.offset);
next_call_no = bookmark.next_call_no;
// Simply ignore all pending calls
deleteAll(calls);
}
开发者ID:netconstructor,项目名称:apitrace,代码行数:7,代码来源:trace_parser.cpp
示例9: main
int main(int argc, char *argv[]){
if(argc<3){
printf("useage:./solve file time_limit\n");
return 0;
}
srand(11);
read_inst(argv[1]);
int time_limit=atoi(argv[2]);
//solveIP(10);
solveLP();
cpu_time();
int cnt=0;
double ratio=0.5;
int i=len_rdCost1-1;
double maxRdc=0.0;
maxIte=n*10;
while(cpu_time()<time_limit && maxRdc<UB-LB-EPSILON){
double t_remain=time_limit-cpu_time();
if(t_remain<EPSILON) break;
if(i<0) maxRdc= UB - LB;
else maxRdc=rdCost_sort1[i].value-EPSILON;
printf("iteration %d, cup_time:%lf, maxRdc %lf, LB =%lf\n", cnt, cpu_time(),maxRdc, LB);
solveIP(t_remain,cnt, maxRdc);
cnt++;
printf("--------------\n\n");
i--;
//while(i>=0&&rdCost_sort1[i].value<maxRdc+0.1){i--;}
}
printf("best LB is %lf, cpu_time %lf\n", LB, cpu_time());
deleteAll();
return 0;
}
开发者ID:AiTeamUSTC,项目名称:ipge,代码行数:32,代码来源:mmkp.cpp
示例10: M_LOGGER_INFO
void MusicDownLoadQueryKWThread::startToPage(int offset)
{
if(!m_manager)
{
return;
}
M_LOGGER_INFO(QString("%1 startToPage %2").arg(getClassName()).arg(offset));
deleteAll();
QUrl musicUrl = MusicUtils::Algorithm::mdII(KW_SONG_SEARCH_URL, false)
.arg(m_searchText).arg(offset).arg(m_pageSize);
m_interrupt = true;
m_pageTotal = 0;
m_pageIndex = offset;
QNetworkRequest request;
request.setUrl(musicUrl);
request.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
request.setRawHeader("User-Agent", MusicUtils::Algorithm::mdII(KW_UA_URL_1, ALG_UA_KEY, false).toUtf8());
setSslConfiguration(&request);
m_reply = m_manager->get(request);
connect(m_reply, SIGNAL(finished()), SLOT(downLoadFinished()));
connect(m_reply, SIGNAL(error(QNetworkReply::NetworkError)), SLOT(replyError(QNetworkReply::NetworkError)));
}
开发者ID:jinting6949,项目名称:TTKMusicplayer,代码行数:26,代码来源:musicdownloadquerykwthread.cpp
示例11: findMax
void MAX7219::displayText(){
//printf("Start displayText()\n");
vector<MAX7219::Punkt> ausgabe = MAX7219::text;
//printf("vector übergeben\n");
int displayIndex=0;
int maxX = findMax(MAX7219::text);
//printf("maxX: %d\n", maxX);
//printf("Start while\n");
while(displayIndex-2 < maxX)
{
deleteAll();
MAX7219_buffer_out();
int zweiDimArray[8][8] = {0};
//printf("displayIndex: %d\n", displayIndex);
//zweiDimArray[8][8] = { 0 };
for(int i = 0; i < ausgabe.size();i++){
if(ausgabe.at(i).x<displayIndex+8 && ausgabe.at(i).x>=displayIndex)
{
zweiDimArray[ausgabe.at(i).x - displayIndex][ausgabe.at(i).y] = 1;
}
}
displayIndex++;
//printf("Print Led\n");
displayZeichen(zweiDimArray);
MAX7219_buffer_out(); // Output the buffer
//usleep(200000);
usleep(200000);
}
//printf("Ende displayText()\n");
}
开发者ID:haukerehme,项目名称:Gewaechshaussteuerung,代码行数:33,代码来源:max7219led.cpp
示例12: cleanUp
/*------------------------------------------------------------*/
void cleanUp( void )
{
#if defined(SHOW_OBJECTS_AT_EXIT)
MyObject* t;
t = head;
while( t != NULL ) {
switch( t->type ) {
case OBJ_RECTANGLE:
printf( "\nRectangle with coordinates (%d,%d) and (%d,%d)\n",
t->x0, t->y0, t->x1, t->y1 );
break;
case OBJ_SQUARE:
printf( "\nSquare with coordinates (%d,%d) and (%d,%d)\n",
t->x0, t->y0, t->x1, t->y1 );
break;
default:
printf( "\nUnknown object type found.\n" );
break;
}; // switch.
// always show the colors for all objects.
printf( "Colors: Red - %f, Green - %f, Blue - %f\n",
t->r, t->g, t->b );
t = t->next;
}// while
#endif
deleteAll();
// post any quitting messages...
printf( "Good bye\n" );
}
开发者ID:jasonfsmitty,项目名称:psu_projects,代码行数:34,代码来源:p1.cpp
示例13: deleteAll
returnValue BoxConstraint::init( const Grid& grid_ ){
deleteAll();
grid = grid_;
nb = 0;
var = 0;
index = 0;
blb = 0;
bub = 0;
residuumXL = new DMatrix[grid.getNumPoints()];
residuumXU = new DMatrix[grid.getNumPoints()];
residuumXAL = new DMatrix[grid.getNumPoints()];
residuumXAU = new DMatrix[grid.getNumPoints()];
residuumPL = new DMatrix[1 ];
residuumPU = new DMatrix[1 ];
residuumUL = new DMatrix[grid.getNumPoints()];
residuumUU = new DMatrix[grid.getNumPoints()];
residuumWL = new DMatrix[grid.getNumPoints()];
residuumWU = new DMatrix[grid.getNumPoints()];
return SUCCESSFUL_RETURN;
}
开发者ID:OspreyX,项目名称:acado,代码行数:25,代码来源:box_constraint.cpp
示例14: handleMenu
/*------------------------------------------------------------*/
void handleMenu( int value )
{
switch( value ) {
case MENU_EDIT:
p_state = EDIT_OBJ;
break;
case MENU_DELETE:
p_state = DELETE_OBJ;
break;
case MENU_CLEAR:
deleteAll();
break;
case MENU_SWAP:
#if defined(SHOW_TEXT_STEPS)
printf( "Swapping buffers.\n" );
#endif
glutSwapBuffers();
glutSwapBuffers();
break;
case MENU_EXIT:
cleanUp();
exit(0);
};
}
开发者ID:jasonfsmitty,项目名称:psu_projects,代码行数:26,代码来源:p1.cpp
示例15: tr
void VideoCapture::onSave()
{
myTimer.stop();
QString fileFormat="mpg";
QString initialPath = QDir::currentPath() + "/"+myFileName+"." + fileFormat;
QString fileName = QFileDialog::getSaveFileName(myParent, tr("Save As"),
initialPath,
tr("%1 Files (*.%2);;All Files (*)")
.arg(QString(fileFormat.toUpper()))
.arg(QString(fileFormat)));
if (fileName.isEmpty())
{
return;
}
else
{
// QMessageBox::information(0, "start", fileName);
/* for (int i = 1; i<=myFrame;i++)
{
QString fn = myFileName+QString::number(i).rightJustified (5, '0');
QImage img;
bool ok;
ok = img.load (fn+".bmp");
if (!ok)
{
QMessageBox::warning (0, "gif", fn+".bmp");
}
ok = img.save(fn+".jpg");
if (!ok)
{
QMessageBox::warning (0, "jpeg", fn+".jpg");
}
// QFile::remove (fn+".bmp");
}
*/
int sW = Options::VideoWidth;
int sH = Options::VideoHeight;
int r = Options::VideoRate;
QString command;
QString keys = //" -t "+ QString::number(endTime)+
QString::number(sW) + " "+QString::number(sH)+" " + QString::number(r);
QString bat = QCoreApplication::applicationDirPath ()+"/";
command = bat + "mpeg.bat "+myFileName+" "+ fileName + " "+ keys;// +" >a.txt";
// "D:/PRADISWORK/bin/debug-vc6/ffmpeg.exe -f image2 -i "+myFileName+"%%05d.bmp -target vcd -sameq -y "+ fileName + " >a.txt";
command = command.replace("\\","/");
// qWarning(command);
// system ("cd "+);
// QMessageBox::warning (0, "jpeg", command);
system(command.toAscii().data());
deleteAll();
}
};
开发者ID:laduga,项目名称:pradis,代码行数:59,代码来源:VideoCapture.cpp
示例16: qDebug
DLXSolver::~DLXSolver()
{
#ifdef DLX_LOG
qDebug() << "DLXSolver destructor entered";
#endif
deleteAll();
delete mCorner;
}
开发者ID:KDE,项目名称:ksudoku,代码行数:8,代码来源:dlxsolver.cpp
示例17: deleteAll
EvaluationPoint& EvaluationPoint::operator=( const EvaluationPoint& rhs ) {
if( this != &rhs ) {
deleteAll();
copy(rhs);
}
return *this;
}
开发者ID:drewm1980,项目名称:acado,代码行数:8,代码来源:evaluation_point.cpp
示例18: deleteAll
template <typename T> TevaluationPoint<T>& TevaluationPoint<T>::operator=( const TevaluationPoint<T>& rhs ){
if( this != &rhs ){
deleteAll();
copy(rhs);
}
return *this;
}
开发者ID:ThomasBesselmann,项目名称:acado,代码行数:8,代码来源:t_evaluation_point.hpp
示例19: deleteAll
CFunction& CFunction::operator=( const CFunction& arg ){
if ( this != &arg ){
deleteAll();
copy(arg);
}
return *this;
}
开发者ID:OspreyX,项目名称:acado,代码行数:8,代码来源:c_function.cpp
示例20: QString
void MusicData2DownloadThread::dataGetFinished()
{
if(!m_dataReply)
{
return;
}
m_timer.stop();
if(m_dataReply->error() == QNetworkReply::NoError)
{
QByteArray bytes = m_dataReply->readAll();
#ifdef MUSIC_QT_5
QJsonParseError jsonError;
QJsonDocument parseDoucment = QJsonDocument::fromJson(bytes, &jsonError);
if(jsonError.error != QJsonParseError::NoError || !parseDoucment.isObject())
{
return ;
}
QJsonObject jsonObject = parseDoucment.object();
if(jsonObject.value("code").toInt() == 1)
{
m_url = jsonObject.value("data").toObject().value("singerPic").toString();
#else
QScriptEngine engine;
QScriptValue sc = engine.evaluate("value=" + QString(bytes));
if(sc.property("code").toInt32() == 1)
{
m_url = sc.property("data").property("singerPic").toString();
#endif
emit data2urlHasChanged(m_url);
MusicDataDownloadThread::startToDownload();
}
else
{
deleteAll();
}
}
}
void MusicData2DownloadThread::dataReplyError(QNetworkReply::NetworkError)
{
emit musicDownLoadFinished("The data2 create failed");
deleteAll();
}
开发者ID:DchunWang,项目名称:TTKMusicplayer,代码行数:45,代码来源:musicdata2downloadthread.cpp
注:本文中的deleteAll函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论