void wxsGridBagSizer::OnBuildSizerCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: { AddHeader(_T("<wx/gbsizer.h>"),GetInfo().ClassName,hfInPCH); Codef(_T("%C(%s, %s);\n"), #if wxCHECK_VERSION(3, 0, 0) VGap.GetPixelsCode(GetCoderContext()).wx_str(), HGap.GetPixelsCode(GetCoderContext()).wx_str()); #else VGap.GetPixelsCode(GetCoderContext()).c_str(), HGap.GetPixelsCode(GetCoderContext()).c_str()); #endif wxArrayInt Cols = GetArray(GrowableCols); for ( size_t i=0; i<Cols.Count(); i++ ) { Codef(_T("%AAddGrowableCol(%d);\n"),Cols[i]); } wxArrayInt Rows = GetArray(GrowableRows); for ( size_t i=0; i<Rows.Count(); i++ ) { Codef(_T("%AAddGrowableRow(%d);\n"),Rows[i]); } return; } case wxsUnknownLanguage: // fall-through default: { wxsCodeMarks::Unknown(_T("wxsGridBagSizer::OnBuildSizerCreatingCode"),GetLanguage()); } } }
MCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName) { MCONTACT hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD, 0, 0)); if (hContact) { if (0 == Proto_AddToContact(hContact, QUOTES_PROTOCOL_NAME)) { tstring sProvName = GetInfo().m_sName; db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_PROVIDER, sProvName.c_str()); db_set_ts(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_SYMBOL, rsName.c_str()); db_set_ts(hContact, LIST_MODULE_NAME, CONTACT_LIST_NAME, rsName.c_str()); mir_cslock lck(m_cs); m_aContacts.push_back(hContact); } else { CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0); hContact = NULL; } } return hContact; }
s32 cellMouseGetInfo(vm::ptr<CellMouseInfo> info) { sys_io.trace("cellMouseGetInfo(info=*0x%x)", info); const auto handler = fxm::get<MouseHandlerBase>(); if (!handler) { return CELL_MOUSE_ERROR_UNINITIALIZED; } const MouseInfo& current_info = handler->GetInfo(); info->max_connect = current_info.max_connect; info->now_connect = current_info.now_connect; info->info = current_info.info; for (u32 i=0; i<CELL_MAX_MICE; i++) info->vendor_id[i] = current_info.vendor_id[i]; for (u32 i=0; i<CELL_MAX_MICE; i++) info->product_id[i] = current_info.product_id[i]; for (u32 i=0; i<CELL_MAX_MICE; i++) info->status[i] = current_info.status[i]; return CELL_OK; }
error_code cellKbGetInfo(vm::ptr<CellKbInfo> info) { sys_io.trace("cellKbGetInfo(info=*0x%x)", info); const auto handler = fxm::get<KeyboardHandlerBase>(); if (!handler) return CELL_KB_ERROR_UNINITIALIZED; const KbInfo& current_info = handler->GetInfo(); info->max_connect = current_info.max_connect; info->now_connect = current_info.now_connect; info->info = current_info.info; for (u32 i=0; i<CELL_KB_MAX_KEYBOARDS; i++) { info->status[i] = current_info.status[i]; } return CELL_OK; }
void wxsGauge::OnBuildCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: { AddHeader(_T("<wx/gauge.h>"),GetInfo().ClassName,hfInPCH); Codef(_T("%C(%W, %I, %d, %P, %S, %T, %V, %N);\n"),Range); if ( Value ) Codef(_T("%ASetValue(%d);\n"),Value); if ( Shadow ) Codef(_T("%ASetShadowWidth(%d);\n"),Shadow); if ( Bezel ) Codef(_T("%ASetBezelFace(%d);\n"),Bezel); BuildSetupWindowCode(); return; } default: { wxsCodeMarks::Unknown(_T("wxsGauge::OnBuildCreatingCode"),GetLanguage()); } } }
void VkAccount::handleUserState (qulonglong id, bool isOnline) { if (!Entries_.contains (id)) { qWarning () << Q_FUNC_INFO << "unknown user" << id; Conn_->RerequestFriends (); return; } auto entry = Entries_.value (id); auto info = entry->GetInfo (); info.IsOnline_ = isOnline; entry->UpdateInfo (info); entry->UpdateAppInfo ({}, {}); if (isOnline) Conn_->RequestUserAppId (id); }
void CBCGPRibbonConstructor::ConstructTabElements (CBCGPRibbonBar& bar, const CBCGPRibbonInfo::XRibbonBar& info) const { int i = 0; for (i = 0; i < info.m_TabElements.m_arButtons.GetSize (); i++) { CBCGPBaseRibbonElement* pElement = CreateElement (*(const CBCGPRibbonInfo::XElement*)info.m_TabElements.m_arButtons[i]); if (pElement != NULL) { CBCGPRibbonButton* pButton = DYNAMIC_DOWNCAST (CBCGPRibbonButton, pElement); if (pButton != NULL && pButton->GetImageIndex (FALSE) != -1) { SetIcon (*pButton, CBCGPBaseRibbonElement::RibbonImageLarge, GetInfo().GetRibbonBar ().m_Images.m_Image, FALSE); } ASSERT_VALID (pElement); bar.AddToTabs (pElement); } } }
s32 cellPadSetPortSetting(u32 port_no, u32 port_setting) { sys_io.trace("cellPadSetPortSetting(port_no=%d, port_setting=0x%x)", port_no, port_setting); const auto handler = fxm::get<PadHandlerBase>(); if (!handler) return CELL_PAD_ERROR_UNINITIALIZED; const PadInfo& rinfo = handler->GetInfo(); if (port_no >= rinfo.max_connect) return CELL_PAD_ERROR_INVALID_PARAMETER; if (port_no >= rinfo.now_connect) return CELL_PAD_ERROR_NO_DEVICE; std::vector<Pad>& pads = handler->GetPads(); pads[port_no].m_port_setting = port_setting; return CELL_OK; }
bool CSynapseClientVFS::RequestAPI( APIDescriptor_t *pAPI ) { if ( !strcmp( pAPI->major_name, VFS_MAJOR ) ) { _QERFileSystemTable* pTable = static_cast<_QERFileSystemTable*>( pAPI->mpTable ); pTable->m_pfnInitDirectory = &vfsInitDirectory; pTable->m_pfnShutdown = &vfsShutdown; pTable->m_pfnFreeFile = &vfsFreeFile; pTable->m_pfnGetDirList = &vfsGetDirList; pTable->m_pfnGetFileList = &vfsGetFileList; pTable->m_pfnClearFileDirList = &vfsClearFileDirList; pTable->m_pfnGetFileCount = &vfsGetFileCount; pTable->m_pfnLoadFile = &vfsLoadFile; pTable->m_pfnLoadFullPathFile = &vfsLoadFullPathFile; pTable->m_pfnExtractRelativePath = &vfsExtractRelativePath; pTable->m_pfnGetFullPath = &vfsGetFullPath; pTable->m_pfnBasePromptPath = &vfsBasePromptPath; return true; } Syn_Printf( "ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo() ); return false; }
void CCrossDlg::SelectCombo(int Sel) { CComboBox& Combo = (Sel == SEL_A ? m_NameA : m_NameB); Combo.GetWindowText(m_ComboText); // in case selection is canceled int Item = Combo.GetCurSel(); if (Item == LB_ERR) return; if (Item < SELS - 1) { if (SaveCheck(Sel)) { int Src = Combo.GetItemData(Item); // retrieve selection index SetInfo(Sel, Src == SEL_DOC ? m_Frm->GetDoc()->m_Patch : GetInfo(Src)); GetName(Src, m_ComboText); // combo gets new text via post message m_Frm->OnNewParms(Sel); // update parameters dialog } } else { if (Open(Sel, m_Frm->GetPlaylist().GetPath(Item - (SELS - 1)))) GetName(Sel, m_ComboText); // combo gets new text via post message } // posting WM_SETTEXT to combo doesn't work, combo still overwrites our text PostMessage(UWM_SETTEXT, WPARAM(Combo.m_hWnd), LPARAM(LPCTSTR(m_ComboText))); }
bool CSynapseClientSample::RequestAPI (APIDescriptor_t *pAPI) { if (!strcmp(pAPI->major_name, PLUGIN_MAJOR)) { _QERPluginTable* pTable= static_cast<_QERPluginTable*>(pAPI->mpTable); pTable->m_pfnQERPlug_Init = QERPlug_Init; pTable->m_pfnQERPlug_GetName = QERPlug_GetName; pTable->m_pfnQERPlug_GetCommandList = QERPlug_GetCommandList; pTable->m_pfnQERPlug_Dispatch = QERPlug_Dispatch; return true; } else if (!strcmp(pAPI->major_name, TOOLBAR_MAJOR)) { _QERPlugToolbarTable* pTable= static_cast<_QERPlugToolbarTable*>(pAPI->mpTable); pTable->m_pfnToolbarButtonCount = &ToolbarButtonCount; pTable->m_pfnGetToolbarButton = &GetToolbarButton; return true; } Syn_Printf("ERROR: RequestAPI( '%s' ) not found in '%s'\n", pAPI->major_name, GetInfo()); return false; }
void udtPatternSearchPlugIn::FindPlayerInServerCommand(const udtCommandCallbackArg& info, udtBaseParser& parser) { const udtPatternSearchArg pi = GetInfo(); if(pi.PlayerNameRules == NULL || !info.IsConfigString) { return; } const s32 firstPlayerCsIdx = idConfigStringIndex::FirstPlayer(parser._inProtocol); const s32 playerIndex = info.ConfigStringIndex - firstPlayerCsIdx; if(playerIndex < 0 || playerIndex >= ID_MAX_CLIENTS) { return; } if(playerIndex == _trackedPlayerIndex && info.IsEmptyConfigString) { // The player we had selected just left! // We'll try to find the right player to track next snapshot. _trackedPlayerIndex = S32_MIN; return; } if(_trackedPlayerIndex != S32_MIN) { // Avoid switching to another player if the current one is still around. return; } udtVMScopedStackAllocator allocatorScope(*TempAllocator); udtString playerName; if(GetPlayerName(playerName, *TempAllocator, parser, info.ConfigStringIndex) && MatchesRules(*TempAllocator, playerName, pi.PlayerNameRules, pi.PlayerNameRuleCount, parser._inProtocol)) { _trackedPlayerIndex = playerIndex; } }
void CBCGPDashboardConstructor::Construct (CBCGPDashboard& dashboard) const { const CBCGPGaugeInfo::XDashboard& infoDashboard = GetInfo ().GetDashboard (); for (int i = 0; i < infoDashboard.m_arElements.GetSize (); i++) { CBCGPGaugeInfo::XElement& info = (CBCGPGaugeInfo::XElement&)*infoDashboard.m_arElements[i]; CBCGPGaugeImpl* pElement = CreateElement (info); if (pElement != NULL) { ASSERT_VALID (pElement); // dashboard.Add(pElement); } } if (!infoDashboard.m_Rect.IsRectEmpty ()) { // dashboard.SetRect (infoDashboard.m_Rect, TRUE, FALSE); } }
void wxsStaticText::OnBuildCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: { AddHeader(_T("<wx/stattext.h>"),GetInfo().ClassName,hfInPCH); #if wxCHECK_VERSION(2, 9, 0) Codef(_T("%C(%W, %I, %t, %P, %S, %T, %N);\n"),Label.wx_str()); #else Codef(_T("%C(%W, %I, %t, %P, %S, %T, %N);\n"),Label.c_str()); #endif BuildSetupWindowCode(); return; } default: { wxsCodeMarks::Unknown(_T("wxsStaticText::OnBuildCreatingCode"),GetLanguage()); } } }
error_code cellPadPeriphGetInfo(vm::ptr<CellPadPeriphInfo> info) { sys_io.trace("cellPadPeriphGetInfo(info=*0x%x)", info); const auto handler = fxm::get<pad_thread>(); if (!handler) return CELL_PAD_ERROR_UNINITIALIZED; if (!info) return CELL_PAD_ERROR_INVALID_PARAMETER; const PadInfo& rinfo = handler->GetInfo(); std::memset(info.get_ptr(), 0, sizeof(CellPadPeriphInfo)); info->max_connect = rinfo.max_connect; info->now_connect = rinfo.now_connect; info->system_info = rinfo.system_info; const auto& pads = handler->GetPads(); // TODO: Support other types of controllers for (u32 i = 0; i < CELL_PAD_MAX_PORT_NUM; ++i) { if (i >= pads.size()) break; info->port_status[i] = pads[i]->m_port_status; pads[i]->m_port_status &= ~CELL_PAD_STATUS_ASSIGN_CHANGES; info->port_setting[i] = pads[i]->m_port_setting; info->device_capability[i] = pads[i]->m_device_capability; info->device_type[i] = pads[i]->m_device_type; info->pclass_type[i] = CELL_PAD_PCLASS_TYPE_STANDARD; info->pclass_profile[i] = 0x0; } return CELL_OK; }
void wxsDirDialog::OnBuildCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: { AddHeader(_T("<wx/dirdlg.h>"),GetInfo().ClassName,hfInPCH); #if wxCHECK_VERSION(2, 9, 0) Codef(_T("%C(%W, %t, %t, %T, %P, %S, %N);\n"),m_Message.wx_str(),m_DefaultPath.wx_str()); #else Codef(_T("%C(%W, %t, %t, %T, %P, %S, %N);\n"),m_Message.c_str(),m_DefaultPath.c_str()); #endif BuildSetupWindowCode(); return; } default: { wxsCodeMarks::Unknown(_T("wxsDirDialog::OnBuildCreatingCode"),GetLanguage()); } } }
error_code cellPadClearBuf(u32 port_no) { sys_io.trace("cellPadClearBuf(port_no=%d)", port_no); const auto handler = fxm::get<pad_thread>(); if (!handler) return CELL_PAD_ERROR_UNINITIALIZED; if (port_no >= CELL_MAX_PADS) return CELL_PAD_ERROR_INVALID_PARAMETER; const auto& pads = handler->GetPads(); if (port_no >= pads.size() || port_no >= handler->GetInfo().max_connect) return CELL_PAD_ERROR_NO_DEVICE; const auto pad = pads[port_no]; if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED)) return CELL_PAD_ERROR_NO_DEVICE; // Set 'm_buffer_cleared' to force a resend of everything // might as well also reset everything in our pad 'buffer' to nothing as well pad->m_buffer_cleared = true; pad->m_analog_left_x = pad->m_analog_left_y = pad->m_analog_right_x = pad->m_analog_right_y = 128; pad->m_digital_1 = pad->m_digital_2 = 0; pad->m_press_right = pad->m_press_left = pad->m_press_up = pad->m_press_down = 0; pad->m_press_triangle = pad->m_press_circle = pad->m_press_cross = pad->m_press_square = 0; pad->m_press_L1 = pad->m_press_L2 = pad->m_press_R1 = pad->m_press_R2 = 0; // ~399 on sensor y is a level non moving controller pad->m_sensor_y = 399; pad->m_sensor_x = pad->m_sensor_z = pad->m_sensor_g = 512; return CELL_OK; }
virtual void LoadRegisterGPR(x86_gpr_reg to,u32 from) { if (IsRegAllocated(from)) { fprinfo* r1= GetInfo(from); if ((x86_caps.sse_2) && (r1->Loaded==true) && (r1->WritenBack==false)) { x86_sse_reg freg=GetRegister(XMM0,from,RA_DEFAULT); assert(freg!=XMM0); x86e->Emit(op_movd_xmm_to_r32,to,freg); } else { WriteBackRegister(from); x86e->Emit(op_mov32,to,GetRegPtr(from)); } } else { x86e->Emit(op_mov32,to,GetRegPtr(from)); } }
bool CCrossDlg::FadeTo(const CPatch& Patch, LPCTSTR Name, double Secs, bool RandPhase) { if (!m_Frm->IsVeejay() && !SaveCheck()) return(FALSE); m_Play = FALSE; // halt fader first, without updating UI double Pos = GetPos(); bool Fwd = Pos <= .5; // set fade direction int Src = SEL_A + !Fwd; // index of source int Dst = SEL_A + Fwd; // index of destination if (Pos > 0 && Pos < 1) { // if fader is between A and B SetInfo(Src, GetInfo(SEL_MIX)); // copy mix to source SetName(Src, m_MixName); // set source name to mix m_Frm->OnNewParms(Src); // update parameters dialog } SetPos(!Fwd); // move fader to source SetInfo(Dst, Patch); // copy arg to destination SetName(Dst, Name); // set destination file name SetSeconds(Secs); if (Secs) Play(TRUE); // start fading to new patch else { Play(FALSE); SetPos(Fwd); // jump to new patch m_Frm->GetView()->FlushHistory(); // prevent glitch } if (RandPhase) { TimerHook(); // make mod freqs non-zero so randomize phase works for (int i = 0; i < ROWS; i++) { // if modulator is unused in source, but active in destination if (!m_Info[Src].m_Row[i].Freq && m_Info[Dst].m_Row[i].Freq) m_Frm->GetView()->SetPhase(i, double(rand()) / RAND_MAX); // randomize phase } } if (m_Frm->GetPatchMode() == CMainFrame::PM_FULL) m_Frm->SetPatch(Patch); // restore master and main settings m_Frm->OnNewParms(Dst); // update parameters dialog return(TRUE); }
/*! \brief Create the dialogue. * * \return void * */ void wxsRichTextStyleOrganiserDialog::OnBuildCreatingCode() { wxString sFlags; wxString sStyleSheetName = GetCoderContext()->GetUniqueName(_T("richTextStyleSheet")); switch(GetLanguage()) { case wxsCPP: AddHeader(_T(" <wx/richtext/richtextstyledlg.h>"), GetInfo().ClassName, 0); for(int i = 0; arrStyleValueNames[i]; i++) { if((m_iFlags & arrStyleValues[i]) == arrStyleValues[i]) { sFlags << arrStyleValueNames[i] << _T("|"); } } if(sFlags.IsEmpty()) { sFlags = _T("0"); } else { sFlags.RemoveLast(); } AddDeclaration(wxString::Format(wxT("wxRichTextStyleSheet *%s;"), sStyleSheetName.wx_str())); Codef(_T("\t%s = new wxRichTextStyleSheet;\n"), sStyleSheetName.wx_str()); Codef(_T("%C(%s, %s, NULL, %W, %I, %t, ") wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_POSITION, ") wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_SIZE, ") wxT("SYMBOL_WXRICHTEXTSTYLEORGANISERDIALOG_STYLE);\n"), sFlags.wx_str(), sStyleSheetName.wx_str(), m_sCaption.wx_str()); BuildSetupWindowCode(); break; case wxsUnknownLanguage: // fall-through default: wxsCodeMarks::Unknown(_T("wxsRichTextStyleOrganiserDialog::OnBuildCreatingCode"), GetLanguage()); } }
ArpMessage& ArpMessage::Update(const BMessage& msg) { if( this ) ArpUpdateMessage(*this, msg); #if 0 if( this ) { char* name; type_code type; long count; for( int32 i=0; !msg.GetInfo(B_ANY_TYPE,i,&name,&type,&count); i++ ) { bool all_gone = false; for( int32 j=0; j<count; j++ ) { const void* data; ssize_t size; if( !msg.FindData(name,type,j,&data,&size) ) { if( !all_gone && ReplaceData(name,type,j,data,size) ) { long cnt=0; type_code mtype = type; if( !GetInfo(name,&mtype,&cnt) ) { for( int32 k=cnt-1; k>=j; k-- ) { RemoveData(name,k); } } all_gone = true; } if( all_gone ) { AddData(name,type,data,size); } } } } } #endif return *this; }
void CSystemDlg::ShowSelectWindow() { switch (m_tab.GetCurSel()) { case 0: m_info.ShowWindow(SW_HIDE); m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_SHOW); m_list_dialupass.ShowWindow(SW_HIDE); if (m_list_process.GetItemCount() == 0) GetProcessList(); break; case 1: m_info.ShowWindow(SW_HIDE); m_list_windows.ShowWindow(SW_SHOW); m_list_process.ShowWindow(SW_HIDE); m_list_dialupass.ShowWindow(SW_HIDE); if (m_list_windows.GetItemCount() == 0) GetWindowsList(); break; case 2: m_info.ShowWindow(SW_HIDE); m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_HIDE); m_list_dialupass.ShowWindow(SW_SHOW); if (m_list_dialupass.GetItemCount() == 0) GetDialupassList(); break; case 3: m_info.ShowWindow(SW_SHOW); m_list_windows.ShowWindow(SW_HIDE); m_list_process.ShowWindow(SW_HIDE); m_list_dialupass.ShowWindow(SW_HIDE); if (m_info.GetItemCount() == 0) GetInfo(); break; } }
Frontend *Frontend::Create( Adapter &adapter, int adapter_id, int frontend_id, int config_id ) { std::string name; fe_delivery_system_t delsys; if( !GetInfo( adapter_id, frontend_id, &delsys, &name )) return NULL; switch( delsys ) { case SYS_UNDEFINED: case SYS_DSS: case SYS_DVBH: case SYS_ISDBT: case SYS_ISDBS: case SYS_ISDBC: case SYS_DMBTH: case SYS_CMMB: case SYS_DAB: case SYS_TURBO: ::LogError( "%d.%d Delivery system %s not supported", adapter_id, frontend_id, delivery_system_name[delsys] ); return NULL; case SYS_ATSC: case SYS_ATSCMH: return new Frontend_ATSC( adapter, name, adapter_id, frontend_id, config_id ); break; case SYS_DVBT: case SYS_DVBT2: return new Frontend_DVBT( adapter, name, adapter_id, frontend_id, config_id ); case SYS_DVBC_ANNEX_A: case SYS_DVBC_ANNEX_B: case SYS_DVBC_ANNEX_C: return new Frontend_DVBC( adapter, name, adapter_id, frontend_id, config_id ); case SYS_DVBS: case SYS_DVBS2: return new Frontend_DVBS( adapter, name, adapter_id, frontend_id, config_id ); } return NULL; }
void wxsSashWindow::OnBuildCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: AddHeader(_T("<wx/sashwin.h>"),GetInfo().ClassName, 0); Codef(_T("%C(%W, %I, %P, %S, %T, %N);\n")); BuildSetupWindowCode(); AddChildrenCode(); Codef( _T("%ASetSashVisible(wxSASH_TOP, %b);\n"), mTop); Codef( _T("%ASetSashVisible(wxSASH_BOTTOM, %b);\n"), mBottom); Codef( _T("%ASetSashVisible(wxSASH_LEFT, %b);\n"), mLeft); Codef( _T("%ASetSashVisible(wxSASH_RIGHT, %b);\n"), mRight); break; case wxsUnknownLanguage: // fall-through default: wxsCodeMarks::Unknown(_T("wxsSashWindow::OnBuildCreatingCode"),GetLanguage()); } }
void CMainWnd::OnPlayPrev() { BOOL fPlay = MAP_GetStatus(m_hMap) != MAP_STATUS_STOP; // ファイル再生の時に再生時間が2秒以上なら先頭に // 2秒未満の場合は前の曲 FILEINFO* pInfo = GetInfo(GetCurrentFile()); if (pInfo && !IsURL(pInfo->szPath)) { long lCurrent = MAP_GetCurrent(m_hMap); if (fPlay && lCurrent > 2000) { MAP_Seek(m_hMap, 0); return; } } int nPrev = GetPrevIndex(); if (nPrev == OPEN_NONE) return; Open(nPrev); if (fPlay) Play(); }
void IndexTuner::DropIndexes(storage::DataTable* table) { oid_t index_count = table->GetIndexCount(); // Go over indices oid_t index_itr; for (index_itr = 0; index_itr < index_count; index_itr++) { auto index = table->GetIndex(index_itr); auto index_metadata = index->GetMetadata(); auto average_index_utility = index_metadata->GetUtility(); auto index_oid = index->GetOid(); // Check if index utility below threshold and drop if needed if (average_index_utility < index_utility_threshold) { LOG_TRACE("Dropping index : %s", index_metadata->GetInfo().c_str()); table->DropIndexWithOid(index_oid); // Update index count index_count = table->GetIndexCount(); } } }
void udtPatternSearchPlugIn::ProcessSnapshotMessage(const udtSnapshotCallbackArg& info, udtBaseParser& parser) { const udtPatternSearchArg pi = GetInfo(); if(pi.PlayerIndex == (s32)udtPlayerIndex::FirstPersonPlayer) { idPlayerStateBase* const ps = GetPlayerState(info.Snapshot, parser._inProtocol); if(ps != NULL) { _trackedPlayerIndex = ps->clientNum; } } else if(pi.PlayerIndex == S32_MIN && pi.PlayerNameRules != NULL) { FindPlayerInConfigStrings(parser); } for(u32 i = 0, count = _analyzers.GetSize(); i < count; ++i) { _analyzers[i]->ProcessSnapshotMessage(info, parser); } }
void udtPatternSearchPlugIn::ProcessGamestateMessage(const udtGamestateCallbackArg& info, udtBaseParser& parser) { const udtPatternSearchArg& pi = GetInfo(); _trackedPlayerIndex = S32_MIN; if(pi.PlayerNameRules != NULL) { FindPlayerInConfigStrings(parser); } else if(pi.PlayerIndex >= 0 && pi.PlayerIndex < 64) { _trackedPlayerIndex = pi.PlayerIndex; } else if(pi.PlayerIndex == (s32)udtPlayerIndex::DemoTaker) { _trackedPlayerIndex = info.ClientNum; } for(u32 i = 0, count = _analyzers.GetSize(); i < count; ++i) { _analyzers[i]->ProcessGamestateMessage(info, parser); } }
void wxsToggleButton::OnBuildCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: { AddHeader(_T("<wx/tglbtn.h>"),GetInfo().ClassName,0); #if wxCHECK_VERSION(2, 9, 0) Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Label.wx_str()); #else Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Label.c_str()); #endif if ( IsChecked ) Codef(_T("%ASetValue(%b);\n"),true); BuildSetupWindowCode(); return; } default: { wxsCodeMarks::Unknown(_T("wxsToggleButton::OnBuildCreatingCode"),GetLanguage()); } } }
void wxsTextCtrl::OnBuildCreatingCode() { switch ( GetLanguage() ) { case wxsCPP: { AddHeader(_T("<wx/textctrl.h>"),GetInfo().ClassName,hfInPCH); #if wxCHECK_VERSION(2, 9, 0) Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Text.wx_str()); #else Codef(_T("%C(%W, %I, %t, %P, %S, %T, %V, %N);\n"),Text.c_str()); #endif if ( MaxLength > 0 ) Codef(_T("%ASetMaxLength(%d);\n"),MaxLength); BuildSetupWindowCode(); return; } default: { wxsCodeMarks::Unknown(_T("wxsTextCtrl::OnBuildCreatingCode"),GetLanguage()); } } }