예제 #1
0
CUICellItem::~CUICellItem()
{
	if(m_b_destroy_childs)
		delete_data	(m_childs);

	delete_data		(m_custom_draw);
}
예제 #2
0
void CUIGameCustom::OnFrame() 
{
	CDialogHolder::OnFrame();
	st_vec_it it = m_custom_statics.begin();
	st_vec_it it_e = m_custom_statics.end();
	for(;it!=it_e;++it)
		(*it)->Update();

	std::sort(	it, it_e, predicate_sort_stat );

	
	while(!m_custom_statics.empty() && !m_custom_statics.back()->IsActual())
	{
		delete_data					(m_custom_statics.back());
		m_custom_statics.pop_back	();
	}
	
	if(g_b_ClearGameCaptions)
	{
		delete_data				(m_custom_statics);
		g_b_ClearGameCaptions	= false;
	}
	m_window->Update();

	//update windows
	if( GameIndicatorsShown() && psHUD_Flags.is(HUD_DRAW|HUD_DRAW_RT) )
		UIMainIngameWnd->Update	();

	m_pMessagesWnd->Update();
}
CGameSpawnConstructor::~CGameSpawnConstructor	()
{
	delete_data						(m_level_spawns);
	delete_data						(m_spawn_graph);
	xr_delete						(m_game_graph);
	xr_delete						(m_game_info);
	xr_delete						(m_patrol_path_storage);
}
예제 #4
0
CExtraContentFilter::~CExtraContentFilter()
{
	for (u32 i=0; i<aDataPacks.size(); i++)
	{
		delete_data(aDataPacks[i]);
	}
	delete_data(aDataPacks);
}
예제 #5
0
CUIGameSP::~CUIGameSP() 
{
	delete_data(InventoryMenu);
	delete_data(PdaMenu);	
	delete_data(TalkMenu);
	delete_data(UICarBodyMenu);
	delete_data(UIChangeLevelWnd);
}
예제 #6
0
CUIGameCTA::~CUIGameCTA()
{
    delete_data	(m_pUITeamSelectWnd);
    delete_data	(m_pBuySpawnMsgBox);
    xr_delete	(m_voteStatusWnd);
    xr_delete	(m_pCurBuyMenu);
    xr_delete	(m_pCurSkinMenu);
}
예제 #7
0
void CUISequencer::Destroy()
{
	Device.seqFrame.Remove		(this);
	Device.seqRender.Remove		(this);
	delete_data					(m_items);
	delete_data					(m_UIWindow);
	IR_Release					();
	m_bActive					= false;
	m_pStoredInputReceiver		= NULL;
}
예제 #8
0
파일: UIMMShniaga.cpp 프로젝트: 2asoft/xray
CUIMMShniaga::~CUIMMShniaga()
{
	xr_delete(m_magnifier);
	xr_delete(m_shniaga);
	xr_delete(m_view);
	xr_delete(m_sound);

	delete_data(m_buttons);
	delete_data(m_buttons_new);
}
예제 #9
0
CGameSpy_Full::~CGameSpy_Full()
{
	delete_data(m_pGSA);
	delete_data(m_pGS_Patching);
	delete_data(m_pGS_HTTP);
	delete_data(m_pGS_SB);

	if (m_hGameSpyDLL)
	{
		FreeLibrary(m_hGameSpyDLL);
		m_hGameSpyDLL = NULL;
	}
}
예제 #10
0
		std::string SqliteDao::save()
		{
			int ret = 0;

			start_transaction();

            int table_num = table_manager_->get_schema_manager()->get_table_num();

            for (int i = 0; i < table_num; i++)
            {
			    db_mm::TableIndex* table_index = table_manager_->get_table_index(i);
			    db_mm::TableIndex::RowIndexIter row_iter = table_index->iter();

                if (!table_index->has_data())
                {
                    continue;
                }

			    db_mm::RowIndex* row_index = NULL;

			    while (0 == row_iter.get_next(row_index) && 0 == ret)
			    {
			    	if (db_mm::DELETE_ROW == row_index->get_row_stat())
			    	{
			    		ret = delete_data(row_index);
			    	}

			    	else if (db_mm::UPDATE_ROW == row_index->get_row_stat())
			    	{
			    		if (0 == ret && 0 == (ret = delete_data(row_index)))
			    		{
			    			ret = insert_data(row_index);
			    		}
			    	}
			    }
            }

			if (0 == ret)
			{
				commit();
			}

			else
			{
				error_msg_ = sqlite3_errmsg(sqlite_);
				roll_back();
			}

			return error_msg_;
		}
예제 #11
0
CUIPdaWnd::~CUIPdaWnd()
{
	delete_data		(UIMapWnd);
	delete_data		(UIPdaContactsWnd);
	delete_data		(UIEncyclopediaWnd);
	delete_data		(UIDiaryWnd);
	delete_data		(UIActorInfo);
	delete_data		(UIStalkersRanking);
	delete_data		(UIEventsWnd);
	delete_data		(m_updatedSectionImage);
	delete_data		(m_oldSectionImage);
}
예제 #12
0
파일: hash.c 프로젝트: imr/ngspice
void nghash_empty(NGHASHPTR hashtable, void (*delete_data) (void *),
                  void (*delete_key) (void *))
{
    NGTABLEPTR *table, hptr , zapptr ;

    nghash_reset_stat(hashtable);

    table = hashtable->hash_table ;
    if( table ) {
        for( hptr = hashtable->thread ; hptr ; ) {
            zapptr = hptr ;
            hptr = hptr->thread_next ;

            /* execute user define delete function if requested */
            if( delete_data ) {
                delete_data (zapptr->data);
            }
            if( hashtable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) {
                /* we allocated this ourselves we can delete it */
                NGFREE( zapptr->key ) ;
            } else if( delete_key ) {
                delete_key (zapptr->key);
            }
            NGFREE( zapptr ) ;
        }
        memset(table, 0, (size_t) hashtable->size*sizeof(NGTABLEPTR)) ;
    }
    /* free decks associated with tree if they exist */
    hashtable->thread = NULL ; /* initialize list */
    hashtable->last_entry = NULL ; /* initialize list */
    hashtable->num_entries = 0 ;
} /* end nghash_empty() */
예제 #13
0
파일: tokenizer.c 프로젝트: Cadair/astropy
void delete_tokenizer(tokenizer_t *tokenizer)
{
    delete_data(tokenizer);
    free(tokenizer->comment_lines);
    free(tokenizer->buf);
    free(tokenizer);
}
예제 #14
0
파일: vector.hpp 프로젝트: barak/cppad
 /// free memory and set number of elements to zero
 void clear(void)
 {   length_ = 0;
     // check if there is old memory to be freed
     if( capacity_ > 0 )
         delete_data(data_);
     capacity_ = 0;
 }
예제 #15
0
void CSpaceRestrictionManager::clear						()
{
	m_clients->clear				();
	delete_data						(m_space_restrictions);

	CSpaceRestrictionHolder::clear	();
}
예제 #16
0
CInventoryItem::~CInventoryItem() 
{
	delete_data			(m_net_updateData);	
	static int destr_no = 0;
	u16 id = 0;
	if (m_object)
		id = m_object->ID();

	destr_no++;
	// Msg("* [%3d] destroying CInventoryItem 0x%08p #%5d '%s', m_object = %p ", destr_no, this, id, m_name.c_str(), m_object);			

#ifdef INV_NEW_SLOTS_SYSTEM
	R_ASSERT2((int)m_slots.size() >= 0, "m_slots.size() returned negative value inside destructor!"); // alpet: для детекта повреждения объекта
#endif


	bool B_GOOD			= (	!m_pCurrentInventory || 
							(std::find(	m_pCurrentInventory->m_all.begin(),m_pCurrentInventory->m_all.end(), this)==m_pCurrentInventory->m_all.end()) );
	if(!B_GOOD)
	{
		CObject* p	= object().H_Parent();
		Msg("inventory ptr is [%s]",m_pCurrentInventory?"not-null":"null");
		if(p)
			Msg("parent name is [%s]",p->Name_script());

			Msg("! ERROR item_id[%d] H_Parent=[%s][%d] [%d]",
				object().ID(),
				p ? p->Name_script() : "none",
				p ? p->ID() : -1,
				Device.dwFrame
				);
	}
}
예제 #17
0
double delete_test(OSyncEngine *engine, OSyncMember *member, int num, const char *objtype)
{
	printf("Test \"Delete %i\" starting", num);
	fflush(stdout);

	empty_all(engine);

	printf(".");
	fflush(stdout);
	int i = 0;
	for (i = 0; i < num; i++)
		add_data(member, objtype);
	printf(".");
	fflush(stdout);

	check_sync(engine, "None", num);

	printf(".");
	fflush(stdout);
	delete_data(member, objtype);
	printf(".");
	fflush(stdout);

	return check_sync(engine, "Delete", num);
}
예제 #18
0
void CUIGameTDM::UnLoad()
{
	inherited::UnLoad	();
	xr_delete			(m_team1_icon);
	xr_delete			(m_team2_icon);
	delete_data			(m_pUITeamSelectWnd);
}
예제 #19
0
파일: game.c 프로젝트: auduchinok/homework
void put_template(char *template_name, int x, int y)
{
	printf("Placing \"%s\" template at (%d, %d)\n", template_name, x, y);
	int i = 0;
	int j = 0;
	Template *t = get_template(template_name);

	if (t->width > width || t->height > height)
	{
		printf("The game field is too small to put the \"%s\" template.\n", template_name);
		delete_data();
		exit(3);
	}

	for (i = 0; i < t->height; i++)
	{
		for (j = 0; j < t->width; j++)
		{
			if (t->picture[i][j])
			{
				field[(y + i) % height][(x + j) % width] = 1;
			}
		}
	}

	delete_template(t);
}
예제 #20
0
void test_delete(splay_tree* t, int data){
  print_tree(*t);
  printf("\n");
  *t =delete_data(*t, data);
  print_tree(*t);
  printf("\n");
}
예제 #21
0
void CUIGameCTA::SetClGame(game_cl_GameState* g)
{
    inherited::SetClGame(g);
    m_game = smart_cast<game_cl_CaptureTheArtefact*>(g);
    VERIFY(m_game);

    /*if (m_pMapDesc)
    {
    	if (m_pMapDesc->IsShown())
    	{
    		m_pMapDesc->HideDialog();
    	}
    	delete_data(m_pMapDesc);
    }
    m_pMapDesc = xr_new<CUIMapDesc>();*/

    if (m_pBuySpawnMsgBox)
    {
        if (m_pBuySpawnMsgBox->IsShown())
        {
            m_pBuySpawnMsgBox->HideDialog();
        }
        delete_data(m_pBuySpawnMsgBox);
    }

    m_pBuySpawnMsgBox					= xr_new<CUIMessageBoxEx>();
    m_pBuySpawnMsgBox->InitMessageBox	("message_box_buy_spawn");
    m_pBuySpawnMsgBox->SetText			("");

    m_game->SetGameUI(this);
    m_pBuySpawnMsgBox->func_on_ok = CUIWndCallback::void_function(m_game, &game_cl_CaptureTheArtefact::OnBuySpawn);
}
예제 #22
0
int main()
{
	print_ll();
	insert_data(10);
	print_ll();

	insert_data(20);
	insert_data(30);
	insert_data(15);
	insert_data(40);
	insert_data(50);
	insert_data(25);
	insert_data(60);
	print_ll();

	delete_data(100);
	print_ll();

	delete_data(15);
	print_ll();

	delete_data(25);
	print_ll();

	delete_data(10);
	print_ll();

	delete_data(20);
	print_ll();

	delete_data(60);
	print_ll();

	delete_data(50);
	print_ll();

	delete_data(30);
	print_ll();

	delete_data(40);
	print_ll();

	delete_data(40);
	print_ll();

	return 0;
}
예제 #23
0
CUIDialogWndEx::~CUIDialogWndEx()
{
	try {
		delete_data(m_callbacks);
	}
	catch(...) {
	}
}
예제 #24
0
파일: ReadFlower.cpp 프로젝트: nixz/covise
void Application::paramChange(void *)
{
    //fprintf(stderr,"param change\n");
    int i;
    char msg[200];

    // clear data
    delete_data();

    // read data file name parameter
    if (!getFilename())
        return;

    // open the file
    if (!openFile())
        return;

    // read the file header
    if (!readFileHeader(fp, Title, &nVars, VarNames))
    {
        fclose(fp);
        return;
    }
    fclose(fp);
    sprintf(msg, "TITLE: \"%s\"", Title);
    Covise::sendInfo(msg);
    sprintf(msg, "%i VARIABLES", nVars);
    Covise::sendInfo(msg);

    // copy variable names to choice param
    //  Covise::update_choice_param ("datax", nVars+1, VarNames, 1);
    strcpy(msg, "(none)");
    if (nVars >= MAX_N_VARS)
    {
        Covise::sendError("Limit of maximum number of variables exceeded in ReadFlower");
        return;
    }
    for (i = 1; i < nVars + 1; i++)
    {
        strcat(msg, " ");
        strcat(msg, VarNames[i]);
    }
    if (!Covise::update_string_param("allVars", msg))
    {
        Covise::sendError("error at call 'update_string_param ()' in function 'paramChange'.");
        return;
    }

    strcpy(msg, VarNames[1]);
    for (i = 2; i < 4; i++)
    {
        strcat(msg, "/");
        strcat(msg, VarNames[i]);
    }
    Covise::update_string_param("gridselect", msg);

    preInitOK = TRUE;
}
예제 #25
0
void CCoverManager::clear					()
{
	if (!get_covers())
		return;

	covers().all			(m_nearest);
	delete_data				(m_nearest);
	m_covers->clear			();
}
예제 #26
0
//-----------------------------------------------------------------------------
// Tutorial Item
//-----------------------------------------------------------------------------
CUISequenceSimpleItem::~CUISequenceSimpleItem()
{
	SubItemVecIt _I			= m_subitems.begin	();
	SubItemVecIt _E			= m_subitems.end	();
	for(;_I!=_E;++_I)		_I->Stop			();
	m_subitems.clear		();
	m_sound.stop			();
	delete_data				(m_UIWindow);
}
예제 #27
0
CUISkinSelectorWnd::~CUISkinSelectorWnd()
{
	xr_delete(m_pCaption);
	xr_delete(m_pBackground);
	xr_delete(m_pFrames);
	xr_delete(m_pButtons[0]);
	xr_delete(m_pButtons[1]);
	xr_delete(m_pAnims[0]);
	xr_delete(m_pAnims[1]);
	xr_delete(m_pBtnAutoSelect);
	xr_delete(m_pBtnSpectator);
	xr_delete(m_pBtnBack);	
	for (int i = 0; i<4; i++)
		xr_delete(m_pImage[i]);

	delete_data(m_pExtraContentFilter);
	delete_data(m_skinsEnabled);
}
예제 #28
0
void CUIGameCustom::RemoveCustomStatic(LPCSTR id)
{
	st_vec::iterator it = std::find_if(m_custom_statics.begin(),m_custom_statics.end(), predicate_find_stat(id) );
	if(it!=m_custom_statics.end())
	{
			delete_data				(*it);
		m_custom_statics.erase	(it);
	}
}
예제 #29
0
ParameterField::~ParameterField() 
{
  delete_data();
  for (short i = 0; i < nofVariables; i++) {
    delete[] variableNames[i];
  }
  delete[] variableNames;

  delete fieldInfo;
}
예제 #30
0
파일: client.c 프로젝트: hriships/DS_ALGO
void test_delete(list_t *list)
{
	result_t delete_result;

	delete_result = delete_begin(list);
	assert(delete_result == SUCCESS && is_at_begining(list, 5) == FALSE);

	delete_result = delete_data(list, 50);
	assert(delete_result == SUCCESS && find(list, 50) == FALSE);

	delete_result = delete_data(list, 8);
	assert(delete_result == SUCCESS && find(list, 8) == FALSE);

	delete_result = delete_data(list, 80);
	assert(delete_result == ERROR);
	
	delete_result = delete_end(list);
	assert(delete_result == SUCCESS && is_at_end(list, 40) == FALSE);
}