当前位置: 首页>>代码示例>>C++>>正文


C++ DeleteAll函数代码示例

本文整理汇总了C++中DeleteAll函数的典型用法代码示例。如果您正苦于以下问题:C++ DeleteAll函数的具体用法?C++ DeleteAll怎么用?C++ DeleteAll使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DeleteAll函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ASSERT_VALID

void CGXGridCellStylePtrArrayPtrArray::Serialize(CArchive& ar)
{
	// Serializes only existing elements,
	// e.g.  1 xxx 2 xxx 3 xxx 7 xxx 22 xxx DWORD_MAX,
	// where xxx is a CGXGridCellStylePtrArray object and DWORD_MAX identifies the end of serialization

	static const WORD wVersion = 1;
	WORD wActualVersion = wVersion;

	ASSERT_VALID(this);

	if (ar.IsStoring())
	{
		ar << wVersion;
	}
	else
	{
		// Check for version first
		ar >> wActualVersion;
		if( wActualVersion != wVersion )
		{
			// Wrong version
#ifdef _DEBUG
			TRACE0( "Incompatible format while reading CGXGridCellStylePtrArrayPtrArray " );
			TRACE2("in %s at line %d\n", THIS_FILE, __LINE__);
			ASSERT(0);
			// ASSERTION-> Incompatible format while reading CGXGridCellStylePtrArrayPtrArray object ->END
#endif
			AfxThrowArchiveException(CArchiveException::badSchema);
			return;
		}
	}

	const DWORD dwTerm = 0xFFFFFFFF;

	if (ar.IsStoring())
	{
		// storing

		DWORD dwSize = (DWORD)GetSize();
		ar << dwSize;
		for (int index = 0; index <= GetUpperBound(); index++)
		{
			CGXGridCellStylePtrArray* pStylePtrArray = GetAt(index);
			if (pStylePtrArray)
			{
				ar << (DWORD) index;
				pStylePtrArray->Serialize(ar);
			}
		}
		ar << dwTerm;
	}
	else
	{
		// loading

		DeleteAll();

		DWORD dwSize;
		ar >> dwSize;

		SetSize((int) dwSize);

		DWORD dwIndex;
		ar >> dwIndex;

		while (dwIndex != dwTerm)
		{
			CGXGridCellStylePtrArray* pStylePtrArray = new CGXGridCellStylePtrArray;
			pStylePtrArray->Serialize(ar);

			SetAt((int) dwIndex, pStylePtrArray);

			// Next id
			ar >> dwIndex;
		}
	}

}
开发者ID:JaeJoonLee,项目名称:Common,代码行数:79,代码来源:GxGridCellData.cpp

示例2: DeleteAll

FWadCollection::~FWadCollection ()
{
	DeleteAll();
}
开发者ID:Krazygamr,项目名称:D-Touch,代码行数:4,代码来源:w_wad.cpp

示例3: DeleteAll

CByteOutputStream::~CByteOutputStream()
{
	DeleteAll();
}
开发者ID:xiaocongcc,项目名称:GameDemo,代码行数:4,代码来源:CByteOutputStream.cpp

示例4: DeleteAll

/**--------------------------------------------------------------------------<BR>
C2DPolygonSet::MakeCopy
\brief Makes a copy of the set provided.
<P>---------------------------------------------------------------------------*/
void C2DPolygonSet::MakeCopy( const C2DPolygonSet& Other)
{
	DeleteAll( );
	AddCopy(Other);

}
开发者ID:Ic3C0ld,项目名称:QtGeometry7316,代码行数:10,代码来源:C2DPolygonSet.cpp

示例5: DeleteAll

CFunctionCollection::~CFunctionCollection() {
  DeleteAll(true, true);
  assert(_function_map.size() == 0);
}
开发者ID:Haskabab,项目名称:openholdembot,代码行数:4,代码来源:CFunctionCollection.cpp

示例6: DeleteAll

/**
This is the component destructor.  After all references to the component
are released, it performs any necessary cleanup activities.
*/
CIFXMetaData::~CIFXMetaData()
{
	if (m_uMDCount)
		DeleteAll();
	delete(m_pMetaData);
}
开发者ID:ClinicalGraphics,项目名称:MathGL,代码行数:10,代码来源:CIFXMetaData.cpp

示例7: DeleteAll

void CNpcStateTransitMgr::UnloadConfig()
{
	DeleteAll();
}
开发者ID:svn2github,项目名称:ybtx,代码行数:4,代码来源:CNpcStateTransit.cpp

示例8:

 ~LIST(void){DeleteAll();}
开发者ID:aditya-agarwal,项目名称:Skype-Android,代码行数:1,代码来源:AttributeContainer.hpp

示例9: InitializeCriticalSection


//.........这里部分代码省略.........
         FPrinter = new CKassPrinterFile ( opt.PrintComName );
         break;
      case NOT_INSTALLED:
         break;
      case KKM_STROKE:
         if ( opt.KKMType == KKM_STROKE )
            FPrinter = FKKM;
         else
         {
            ShtrishKKM = new CKassShtrihKKM ( opt.Owner, opt.PrintComName, opt.PrintBaudRate );
//            ShtrishKKM->SetTextWidth ( 28 );
            ShtrishKKM->OpenCommPort();
            FPrinter = ShtrishKKM;
         }
         break;

      case KKM_PRIM:
         if ( opt.KKMType == KKM_PRIM )
            FPrinter = FKKM;
         else
            try
            {
               FPrinter = new CKassPrim ( opt.Owner, opt.PrintComName, opt.PrintBaudRate );
            } catch ( ECommError &E )
            {
					//DeleteAll();
               //throw Exception( "Не удалось открыть порт ККМ Прим: " +
               //   AnsiString ( E.what() ) );
               WriteErr ( "Не удалось открыть порт ККМ Прим: " + AnsiString (E.what()) );
            }
         break;

      default:
			DeleteAll();
         ErrInfo.ErrText = "Не известный принтер";
         throw ErrInfo;
   }

   AnsiString Foot, Head;
   if ( Data->GetTicketAttr ( &Head, &Foot, &ErrInfo ) )
   {
      FPrinter->SetHead ( Head );
      FPrinter->SetFoot ( Foot );
   }
//   else
//      WriteProt ( ErrInfo );

   if ( opt.ExistPult )
   {
      switch ( opt.PultType )
      {
         CKassPult_v2 *pv2;
         CKassTRKAZT *azt;
         case NOT_INSTALLED:
            FTRK = new CKassNoPult ( opt.Owner );
            break;

         case PULT_AMUR:
            FPultPortS = new CSimpleCommPort;
            CPultScannerCommand::SetDCBProperty ( FPultPortS );
            FPultPortS->SetCommPort ( opt.PultComName );
            FTRK = new CKassPult_v1 ( opt.Owner, FPultPortS, &cs );
            break;

         case HEAD_VESNA:
            try
开发者ID:apdapd,项目名称:CBuilder,代码行数:67,代码来源:ObjectManager.cpp

示例10: DeleteAll

EVENT::~EVENT()
{
	DeleteAll();
}
开发者ID:tuku,项目名称:snoxd-koserver,代码行数:4,代码来源:EVENT.cpp

示例11: in


//.........这里部分代码省略.........

	while(count < length)
	{
		in >> byte;	count ++;

		if( (char)byte != '\r' && (char)byte != '\n' ) buf[index++] = byte;

		if(((char)byte == '\n' || count == length ) && index > 1 )
		{
			buf[index] = (BYTE) 0;

			t_index = 0;

			if( buf[t_index] == ';' || buf[t_index] == '/' )		// 주석에 대한 처리
			{
				index = 0;
				continue;
			}

			t_index += ParseSpace( first, buf + t_index );

//			if( !strcmp( first, "QUEST" ) )
			if( !strcmp( first, "EVENT" ) )
			{
				t_index += ParseSpace( temp, buf + t_index );	event_num = atoi( temp );

				if( newData )
				{
					delete newData;
					goto cancel_event_load;
				}

				if( m_arEvent.GetData(event_num) )
				{
					TRACE("Quest Double !!\n" );
					goto cancel_event_load;
				}

				eventData = new EVENT_DATA;
				eventData->m_EventNum = event_num;
				if( !m_arEvent.PutData( eventData->m_EventNum, eventData) ) {
					delete eventData;
					eventData = NULL;
				}
				newData = m_arEvent.GetData(event_num);
			}
			else if( !strcmp( first, "E" ) )
			{
				if( !newData )
				{
					goto cancel_event_load;
				}

				EXEC* newExec = new EXEC;

				newExec->Parse( buf + t_index );

				newData->m_arExec.push_back( newExec );				
			}
			else if( !strcmp( first, "A" ) )
			{
				if( !newData )
				{
					goto cancel_event_load;
				}

				LOGIC_ELSE* newLogicElse = new LOGIC_ELSE;

				newLogicElse->Parse_and( buf + t_index );

				newData->m_arLogicElse.push_back( newLogicElse );
			}
			else if( !strcmp( first, "END" ) )
			{
				if( !newData )
				{
					goto cancel_event_load;
				}

				newData = NULL;
			}

			index = 0;
		}
	}

	in.Close();
	pFile.Close();

	return TRUE;

cancel_event_load:
	CString str;
	str.Format( "QUEST INFO READ FAIL (%d)(%d)", zone, event_num );
	AfxMessageBox( str );
	in.Close();
	pFile.Close();
	DeleteAll();
	return FALSE;
}
开发者ID:tuku,项目名称:snoxd-koserver,代码行数:101,代码来源:EVENT.cpp

示例12: main

int main()
{
	HEAD* List = Create();

	SaveData data = { 0, 0, 0, 0 };
	
	EnQueue(List, data);

	char sel = 0;

	while (1)
	{
		printf("명령어 입력 : ");
		scanf("%s", &sel);

		switch (sel)
		{
		case '+':
			printf("Push 입력 : ");
			scanf("%d %d %d", &data.x, &data.y, &data.z);

			Push(List, data);
			PrintAll(List);
			break;
		case '-':
			Pop(List);
			PrintAll(List);
			break;
		case 'e':
			printf("EnQueue 입력 : ");
			scanf("%d %d %d", &data.x, &data.y, &data.z);

			EnQueue(List, data);
			PrintAll(List);
			break;
		case 'd':
			DeQueue(List);
			PrintAll(List);
			break;
		case 'l':
			printf("length of stack : %d \t length of queue : %d\n", stack_count, queue_count);
			break;
		case 'c':
			DeleteAll(List);
			break;
		case 'm':
			FindMaxNum(List);
			break;
		case 'n':
			FindMinNum(List);
			break;
		case 'q':
			break;
		default:
			break;
		}
	}
	

	return 0;
}
开发者ID:ricky626,项目名称:OpenGL-Programming,代码行数:61,代码来源:n_2.cpp

示例13: DeleteAll

/////////////////////////////////////////////////////////////////////////////
// class CGXGridCellStylePtrArray
CGXGridCellStylePtrArray::~CGXGridCellStylePtrArray()
{
	DeleteAll();
}
开发者ID:JaeJoonLee,项目名称:Common,代码行数:6,代码来源:GxGridCellData.cpp

示例14: DeleteAll

RCTypeArray::~RCTypeArray()
{
    DeleteAll();
}
开发者ID:fedor4ever,项目名称:linux_build,代码行数:4,代码来源:DATATYPE.CPP

示例15: switch

/*
QString Viewer::updateTlabel(){
    //if (task_id == TASK0)
     return QString::number(curTerr)+"/"+QString::number(terrains.size());
}
*/
bool Viewer::moveNext(){
    //qWarning("next %d!n",task_id);
    switch(task_id){

    case TASK0:
        {
            if (curTerr<terrains.size()-1){
                curTerr+=1;
                updateGL();
                emit updateTasklabel(QString::number(curTerr+1)+"/"+QString::number(terrains.size()));
                return true;
            }
            return false;
        }

    case TASK1:
        {
            endsubTask1();
            //qWarning("task ended!n");
            startsubTask1();
            updateGL();
            return true;
        }

    case TASK2:
        {
            if (terrains.size()>0){
                DeleteTerrain(curTerr);
                curTerr -= 1;

            }
                if (task_pos+1<task_files.size()){
                    task_pos+=1;
                    addTerrain(task_files[task_pos]);
                    emit updateTasklabel(QString::number(task_pos+1)+"/"+QString::number(task_files.size()));
                }
                else{

                    qWarning("Task 2  ended");
                    DeleteAll();
                    task_status = 1;
                    task_id = TASK0;
                    emit updateIDlabel("TASK "+QString::number(task_id));
                    emit updateTasklabel(QString::number(curTerr+1)+"/"+QString::number(terrains.size()));
                    emit taskIsNot0(false);
                    emit infoChanged(task0_info);

                    QMessageBox msgBox;
                    msgBox.setText("Thank you for participating to this experiment!\n  Let me know that you are done.");
                    msgBox.exec();

                }

                updateGL();


                return false;
        }

    }
    return false;
}
开发者ID:ftasse,项目名称:TerrainNavigator,代码行数:68,代码来源:interface.cpp


注:本文中的DeleteAll函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。