Esempio n. 1
0
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;
		}
	}

}
Esempio n. 2
0
FWadCollection::~FWadCollection ()
{
	DeleteAll();
}
Esempio n. 3
0
CByteOutputStream::~CByteOutputStream()
{
	DeleteAll();
}
Esempio n. 4
0
/**--------------------------------------------------------------------------<BR>
C2DPolygonSet::MakeCopy
\brief Makes a copy of the set provided.
<P>---------------------------------------------------------------------------*/
void C2DPolygonSet::MakeCopy( const C2DPolygonSet& Other)
{
	DeleteAll( );
	AddCopy(Other);

}
CFunctionCollection::~CFunctionCollection() {
  DeleteAll(true, true);
  assert(_function_map.size() == 0);
}
Esempio n. 6
0
/**
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);
}
Esempio n. 7
0
void CNpcStateTransitMgr::UnloadConfig()
{
	DeleteAll();
}
 ~LIST(void){DeleteAll();}
Esempio n. 9
0
CObjectManager::CObjectManager ( OBJECT_OPTIONS &opt )
{

   FKKM = 0;
   FComPort = 0;//принтера
   FScannerPort = 0;
   FPultPort = 0;
   FPrinterPort = 0;

   FKKMPort = 0;
   FPrinterPortS = 0;
   FPultPortS = 0;
   FScannerPortS = 0;

   FCardReader = 0;
   FTRK = 0;
   FGoldCrown = 0;
   FMagRead = 0;
   m_MifareCard = 0;

   m_pStruna = NULL;

   TErrInfo ErrInfo;
   ErrInfo.UUnum = 850;
   ErrInfo.Kind = HardError;
   ErrInfo.ErrCode = -1;

/*   FComPort = new TComPort;
   FComPort->ComName = opt.PrintComName;
   FScannerPort = new TComPort;
   FScannerPort->ComName = opt.CardReadComName;*/

   InitializeCriticalSection ( &cs );

/*   opt.KKMType = PRINTER_MSTAR;
   opt.KKMComName = "COM2";
   opt.PrintBaudRate = 0;//115200;*/

//   opt.KKMType = NOT_INSTALLED;
   switch ( opt.KKMType )
   {
      CKassMStar *MStar;
      CKassShtrihKKM *ShtrishKKM;

      case PRINTER_MSTAR:
         FKKMPort = new CSimpleCommPort;

         FKKMPort->SetCommPort ( opt.KKMComName );
         MStar = new CKassMStar ( opt.Owner, FKKMPort, opt.PrintBaudRate );
         FKKM = MStar;
         break;

      case KKM_STROKE:
			try
         {
         	ShtrishKKM = new CKassShtrihKKM ( opt.Owner, opt.KKMComName, opt.PrintBaudRate );
            FKKM = ShtrishKKM;
            ShtrishKKM->SetTextWidth ( 28 );
            ShtrishKKM->OpenCommPort();
         }catch ( ECommError &E )
         {
				//DeleteAll();
            //throw Exception( "Не удалось открыть порт ККМ Штрих: " +
            //   AnsiString ( E.what() ) );
            WriteErr ( "Не удалось открыть порт ККМ Штрих: " + AnsiString ( E.what() ) );
         }
         break;

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

      case NOT_INSTALLED:
         break;
      default:
         ErrInfo.ErrText = "Не известная ККМ";
         throw ErrInfo;
   }

   if ( ( KKM && opt.PrintBaudRate == 0 ) || ( KKM && opt.PrintBaudRate != 0 && ! KKM->TestKKM() ) )
      if ( ! KKM->SearchKKM() )
      {
         //ошибка поиска ккм
      }

   switch ( opt.KKMType )
   {
      TStringList *FormBuy, *FormReturnBuy;
      CKassMStar *MStar;

      case PRINTER_MSTAR:

         MStar = (CKassMStar*)FKKM;

         FormBuy = new TStringList;
         FormReturnBuy = new TStringList;
         if ( Data->GetPatternMStar (
            FormBuy,
            FormReturnBuy,
            &ErrInfo ) )
         {
            if(!FormBuy->Text.Trim().IsEmpty() )
               MStar->SetFormBuy ( FormBuy );
            else
                MStar->SetDefaultFormBuy();
            if(!FormReturnBuy->Text.Trim().IsEmpty() )
               MStar->SetFormReturnBuy ( FormReturnBuy );
            else
                MStar->SetDefaultReturnBuy();
         }
         else
         {
            MStar->SetDefaultFormBuy();
            MStar->SetDefaultReturnBuy();
//            WriteProt ( ErrInfo );
         }
         delete FormReturnBuy;
         delete FormBuy;
         break;
   }

   switch ( opt.PrinterType )
   {
      CKassShtrihKKM *ShtrishKKM;

      case PRINTER_MSTAR:
         if ( opt.KKMType == PRINTER_MSTAR )
            FPrinter = FKKM;
         else
         {
            FPrinterPortS = new CSimpleCommPort;
            FPrinterPortS->SetCommPort ( opt.PrintComName );
            FPrinter = new CKassMStar ( opt.Owner, FPrinterPortS, opt.PrintBaudRate );
            if ( opt.PrintBaudRate == 0 )
               ((CKassKKM*)FPrinter)->SearchKKM();
         }
         break;
      case PRINTER_FILE:
         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
            {
               FTRK = new CKassVesnaTRK ( opt.Owner, opt.PultComName, 9600 );
            }catch ( ECommError &E )
            {
               DeleteAll();
               throw Exception( "Не удалось открыть порт Весны: " +
                  AnsiString ( E.what() ) );

            }
            break;

         case PULT_AMUR_v2:
            FPultPortS = new CSimpleCommPort;
            CPultScannerCommand::SetDCBProperty ( FPultPortS );
            FPultPortS->SetCommPort ( opt.PultComName );
            pv2 = new CKassPult_v2 ( opt.Owner, FPultPortS, &cs, 2 );
            FTRK = pv2;
            pv2->AddColon ( 0, 0x10 );
            pv2->AddColon ( 1, 0x11 );
            break;

         case HEAD_AZT:
         	try
            {
				   FTRK = new CKassTRKAZT ( opt.Owner, opt.PultComName, opt.HeadBaudRate );
            }catch ( ECommError &E )
            {
		      	DeleteAll();
               throw Exception( "Не удалось открыть порт ТРК АЗТ: " +
                  AnsiString ( E.what() ) );
            }
         	break;

         case HEAD_STROKE_MINI_COMP:
         case HEAD_STROKE_TRK:
            try
            {
            	FTRK = new CKassStrokeAZS ( opt.Owner, opt.PultComName, opt.HeadBaudRate/*38400/*9600*/,
               	(opt.PultType == HEAD_STROKE_MINI_COMP) );
            }catch ( ECommError &E )
            {
					DeleteAll();
               throw Exception( "Не удалось открыть порт Штрих АЗС: " +
                  AnsiString ( E.what() ) );
            }
            break;

         case HEAD_DRESSER_WAYNE:
            try
            {
               FTRK = new KassTRKDresserWayne ( opt.Owner, opt.PultComName, opt.HeadBaudRate );
            }catch ( ECommError &E )
            {
					DeleteAll();
               throw Exception( "Не удалось открыть порт TRK Dresser Wayne: " +
                  AnsiString ( E.what() ) );
            }
            break;

         default:
            ErrInfo.ErrText = "Неизвестный пульт";
		   	DeleteAll();
            throw ErrInfo;
      }
   }else
   {
      FTRK = new CKassNoPult ( opt.Owner );
   }

   switch ( opt.CardReadType )
   {
      case CARD_READ_SCANNER:
/*         if ( opt.UnionScannerAndPult )
         {
            if (( opt.PultType != PULT_AMUR && opt.PultType != PULT_AMUR_v2 )
                 || !opt.ExistPult)
            {
               FScannerPortS = new CSimpleCommPort;
               CPultScannerCommand::SetDCBProperty ( FScannerPortS );
               FScannerPortS->SetCommPort ( opt.CardReadComName );
               scannerCardRead = new CScannerCardRead ( FScannerPortS, &cs );
            }else
               scannerCardRead = new CScannerCardRead ( FPultPortS, &cs );
         }
         else
         {
            FScannerPortS = new CSimpleCommPort;
            CPultScannerCommand::SetDCBProperty ( FScannerPortS );
            FScannerPortS->SetCommPort ( opt.CardReadComName );
            scannerCardRead = new CScannerCardRead ( FScannerPortS, 0 );
         }
         FCardReader = new TFormCardRead ( opt.Owner );
         FCardReader->PushScanner ( scannerCardRead) ; */
         AddScannerCardRead(opt);
         break;
      case NOT_INSTALLED:
         break;
      case CARD_READ_SIMPLE:
         /*simpleCardRead = new CSimpleCardRead ( opt.CardReadComName, 9600, 1, ONESTOPBIT, 8 );
         FCardReader = new TFormCardRead ( opt.Owner );
         FCardReader->PushScanner ( simpleCardRead) ;*/
         AddSimpleCardRead ( opt.Owner, opt.CardReadComName );
         break;

/*      case CARD_READ_COMBINE:
         if ( opt.UnionScannerAndPult )
         {
            if (( opt.PultType != PULT_AMUR && opt.PultType != PULT_AMUR_v2 )
                 || !opt.ExistPult)
            {
               FScannerPortS = new CSimpleCommPort;
               CPultScannerCommand::SetDCBProperty ( FScannerPortS );
               FScannerPortS->SetCommPort ( opt.CardReadComName );
               FCardReader = new CCombineCardRead ( opt.Owner, FScannerPortS, &cs, opt.CardReadComName, 9600, 1, ONESTOPBIT, 8 );
            }else
               FCardReader = new CCombineCardRead ( opt.Owner, FPultPortS, &cs, opt.CardReadComName, 9600, 1, ONESTOPBIT, 8 );
         }
         else
         {
            FScannerPortS = new CSimpleCommPort;
            CPultScannerCommand::SetDCBProperty ( FScannerPortS );
            FScannerPortS->SetCommPort ( opt.CardReadComName );
            FCardReader = new CCombineCardRead ( opt.Owner, FScannerPortS, 0, opt.CardReadComName, 9600, 1, ONESTOPBIT, 8 );
         }
         break; */
		case CARD_READ_COMBINE:
         AddScannerCardRead(opt);
         AddSimpleCardRead (opt.Owner, opt.CardReadComName );
      	break;

      default:
         //ErrInfo.ErrText = "Не известный сканер";
         //throw ErrInfo;
         WriteErr ( "Не известный сканер" );
   }

   if ( opt.bUseSecondScanner )
   {
      AddSimpleCardRead (opt.Owner, opt.SecondScannerCommName );
   }

   if ( opt.UseGoldCrown )
   {
      FGoldCrown = new CGoldCrown ( opt.GoldCrownComName );
   }


   if ( opt.MagReader )
   {
      CSimpleCardRead *simpleCardRead = new CSimpleCardRead ( opt.MagComName );
      FMagRead = new TFormCardRead (opt.Owner );
      FMagRead->PushScanner ( simpleCardRead );
   }


   if ( opt.UseMifareCard )
   {
      try
      {
         m_MifareCard = new CMifareCard ( "001DC001", opt.MifarePortName );
      }
      catch ( const TErrInfo &err )
      {
         opt.UseMifareCard = false;
         WriteProt ( err );
      }
   }

   switch ( opt.m_siu )
   {

   case siuStruna:
   	m_pStruna = new CListenStruna_v1 ( opt.StrunaCommName );
      if ( ! m_pStruna->StartListen() )
         WriteErr ( "Не удалось соединится со струной" );
      break;

   case siuIgla:
      m_pStruna = new LevelGageIgla ( opt.StrunaCommName );
      if ( ! m_pStruna->StartListen() )
         WriteErr ( "Не удалось соединится с Иглой" );
      break;

   case siuService:
      m_pStruna = new  LevelGageInet(opt.m_SIUIPAddress, opt.m_SIUPort);
      if ( ! m_pStruna->StartListen() )
         WriteErr ( "Не удалось соединится с Сервисом СИУ" );
      break;

   default:
      m_pStruna = NULL;
      break;
   }

   if ( opt.TerminalRegim )
   {
      m_TerminalServer = boost::shared_ptr<TerminalServer> ( new TerminalServer() );
   }

   if ( opt.SendSMSMode )
   {
      m_SMSSender = boost::shared_ptr<KassSMSSender> (
         new KassSMSSender(opt.PhoneCommPortName, opt.PhoneCommPortBaudRate ) );
   }

   int OpenPortNumber = 0;
   try
   {
      if ( FComPort )
         FComPort->Open ( );
      OpenPortNumber = 1;
      if ( FScannerPort )
         FScannerPort->Open ( );
      OpenPortNumber = 2;
      if ( FPrinterPort )
         FPrinterPort->Open ( );
      OpenPortNumber = 3;
      if ( FPultPort )
         FPultPort->Open ( );
      OpenPortNumber = 4;
      if ( FPrinterPortS )
         FPrinterPortS->OpenCommPort();
      OpenPortNumber = 5;
      if ( FKKMPort && FKKMPort->GetConnected() )
         FKKMPort->OpenCommPort();
      OpenPortNumber = 6;
      if ( FPultPortS )
         FPultPortS->OpenCommPort();
      OpenPortNumber = 7;
      if ( FScannerPortS )
         FScannerPortS->OpenCommPort();
   }
   catch ( ECommError E )
   {
      /*Информативное оповещение об ошибках ком порта
      30.11.2005        Ногин В.Г.*/
      AnsiString errinfo;
      switch ( OpenPortNumber )
      {
      case 0:
         errinfo = "Не удалось открыть ком порт, который кстати давно не используется, чёрт знает зачем мы его открываем: ";
   		DeleteAll();
         throw Exception( errinfo + AnsiString(E.what()) );
      case 1:
         errinfo = "Не удалось открыть ком порт, который кстати давно не используется, но был для сканера, чёрт знает зачем мы его открываем: ";
   		DeleteAll();
         throw Exception( errinfo + AnsiString(E.what()) );
      case 2:
         errinfo = "Не удалось открыть ком порт, который кстати давно не используется, но был судя по названию для принтера, чёрт знает зачем мы его открываем: ";
   		DeleteAll();
         throw Exception( errinfo + AnsiString(E.what()) );
      case 3:
         errinfo = "Не удалось открыть ком порт, который кстати давно не используется, но был для пульта, чёрт знает зачем мы его открываем: ";
   		DeleteAll();
         throw Exception( errinfo + AnsiString(E.what()) );
      case 4:
         errinfo = "Не удалось открыть ком порт принтера (M-Start ФР): ";
         WriteErr ( errinfo + AnsiString(E.what()) );
         break;
      case 5:
         errinfo = "Не удалось открыть ком порт ККМ (M-Start ФР): ";
         WriteErr ( errinfo + AnsiString(E.what()) );
         break;
      case 6:
         errinfo = "Не удалось открыть порт пульта: ";
   		DeleteAll();
         throw Exception( errinfo + AnsiString(E.what()) );
      case 7:
         errinfo = "Не уадлось открыть порт штрих кодового сканера: ";
         WriteErr ( errinfo + AnsiString(E.what()) );
         break;
      default:
   		DeleteAll();
         throw Exception( AnsiString(E.what()) );
      }
   }
}
Esempio n. 10
0
EVENT::~EVENT()
{
	DeleteAll();
}
Esempio n. 11
0
BOOL EVENT::LoadEvent(int zone)
{
	DWORD		length, count;
	CString		filename;
	CFile		pFile;
	BYTE		byte;
	char		buf[4096];
	char		first[1024];
	char		temp[1024];
	int			index = 0;
	int			t_index = 0;
	int			event_num;

	EVENT_DATA	*newData = NULL;
	EVENT_DATA	*eventData = NULL;

	filename.Format( ".\\MAP\\%d.evt", zone);

	m_Zone = zone;

	if( !pFile.Open( filename, CFile::modeRead) ) return TRUE;

	length = (DWORD)pFile.GetLength();
	
	CArchive in(&pFile, CArchive::load);

	count = 0;

	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;
}
Esempio n. 12
0
void EVENT::Init()
{
	DeleteAll();
}
Esempio n. 13
0
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;
}
Esempio n. 14
0
/////////////////////////////////////////////////////////////////////////////
// class CGXGridCellStylePtrArray
CGXGridCellStylePtrArray::~CGXGridCellStylePtrArray()
{
	DeleteAll();
}
Esempio n. 15
0
RCTypeArray::~RCTypeArray()
{
    DeleteAll();
}
Esempio n. 16
0
/*
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;
}
BasicTextureMgr::~BasicTextureMgr() {
	LOGI("MGR destruct");
	DeleteAll();
}
CSAPIConfig::~CSAPIConfig()
{
	DeleteAll();
}
Esempio n. 19
0
CNpcStateTransit::~CNpcStateTransit()
{
	DeleteAll();
}
SAPIRESULTCODE CSAPIConfig::SP_Uninit()
{
	DeleteAll();
	return SAPI_OK;
}
Esempio n. 21
0
CMemInfo::~CMemInfo()
{
	DeleteAll();
}
Esempio n. 22
0
CVehicleManager::~CVehicleManager ( void )
{
    DeleteAll ();
}
CFunctionCollection::CFunctionCollection(){
  _title = "";
  _path = "";
  _openPPL_library_correctly_loaded = false;
  DeleteAll(true, true);
}
Esempio n. 24
0
int main()
{
	//show_menu_main();
	BAN b[10];
	int iIndex =0;//No Data
	int choice;
label:	show_menu_main();
	printf("Input that you want choice : \n");
	scanf("%d",&choice);
	switch(choice){
	case 1:
		{
		Show_Create();
		InputMember(b,&iIndex,
			sizeof(b)/sizeof(b[0]));// Input run pointer point to iIndex address, get value iIndex ++
		goto label;
		break;
		}
	case 2:
		{
			Show_Output();
			PrintAll(b,iIndex);
			goto label;
			break;
		}
	case 3:
		Show_Searching();
		int chon;
		printf("Input choice that you searching!!!\n");
		scanf("%d",&chon);
		switch(chon){
		case 1:
			Searching_by_name(b,&iIndex);
			goto label;
			break;
		case 2:
			Searching_by_id(b,iIndex);
			goto label;
			break;
		}
	case 4:
		Show_Modify();
		Modify(b,iIndex);
		goto label;
		break;
	case 11:
		show_menu_EDIT();
		Edit(b,iIndex);
		goto label;
		break;
	case 5:
		show_list_delete();		
		//Delete(b,&iIndex);
		Delete_me(b,&iIndex);
		//PrintAll(b,iIndex);
		goto label;
		break;
	case 6:
		Show_delete_All();
		int de;
		printf("YOU WANT CHOICE ");
		scanf("%d",&de);
		switch(de){
		case 1:
			DeleteAll(b,&iIndex);
			goto label;
			break;
		case 2:
			goto label;
			break;
		}
	case 7:
		{
		show_menu_sort();
		int sort;
		printf("Please Input choice to sort data\n");
		scanf("%d",&sort);
		switch(sort){
		case 1:
			insertSort(b,iIndex);
			PrintAll(b,iIndex);
			goto label;
			break;
		case 2:
			sort_by_shell(b,iIndex);
			goto label;
			break;
		case 3:
			QuickSort(b,0,iIndex-1);
			PrintAll(b,iIndex);
			goto label;
			break;
		case 4:
			Merger_Sort_vision(b,0,iIndex-1);
			PrintAll(b,iIndex);
			goto label;
			break;
		}
		}
		break;
	case 8:
			save(b,iIndex);
			goto label;
		break;
	case 9:
		Show_data_read_file();
		ReadFile_1(b,iIndex,"ds.txt");
		goto label;
		break;
	case 10:
		exit(0);
		break;
	}
	return 0;
}
Esempio n. 25
0
CClientEffectManager::~CClientEffectManager ( )
{
    DeleteAll ();
}
Esempio n. 26
0
/***********************************************************************************
**
**	TreeViewModel::OnTreeChanging
**
***********************************************************************************/
void TreeViewModel::OnTreeChanging(OpTreeModel* tree_model)
{
	BeginChange();
	DeleteAll();
	// EndChange will be called in OnTreeChanged
}
Esempio n. 27
0
AseFile::~AseFile()
{
	DeleteAll();
}
Esempio n. 28
0
/***********************************************************************************
**
**	TreeViewModel::Clear
**
***********************************************************************************/
void TreeViewModel::Clear()
{
	m_hash_table.RemoveAll();
	DeleteAll();
}
Esempio n. 29
0
URLSearchParams::~URLSearchParams()
{
  DeleteAll();
}
Esempio n. 30
0
 ~TabPainter() {
     delete data;
     DeleteAll();
 }