本文整理匯總了C++中GetInfo函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetInfo函數的具體用法?C++ GetInfo怎麽用?C++ GetInfo使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetInfo函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: cellMouseGetInfo
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;
}
示例2: if
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;
}
示例3: MCONTACT
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;
}
示例4: CreateElement
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);
}
}
}
示例5: cellPadSetPortSetting
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;
}
示例6: Syn_Printf
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;
}
示例7: SetInfo
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)));
}
示例8: cellKbGetInfo
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;
}
示例9: switch
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());
}
}
}
示例10: GetInfo
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;
}
}
示例11: cellPadClearBuf
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;
}
示例12: LoadRegisterGPR
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));
}
}
示例13: cellPadPeriphGetInfo
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;
}
示例14: switch
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());
}
}
}
示例15: GetInfo
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);
}
}