本文整理汇总了C++中DeviceInfo::getVendorId方法的典型用法代码示例。如果您正苦于以下问题:C++ DeviceInfo::getVendorId方法的具体用法?C++ DeviceInfo::getVendorId怎么用?C++ DeviceInfo::getVendorId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeviceInfo
的用法示例。
在下文中一共展示了DeviceInfo::getVendorId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ERROR_INFO
//.........这里部分代码省略.........
pReturn = new Camera_StarfishClass();
}
#endif
#if defined (SXV)
else if (choice.Find(_T("Starlight Xpress SXV")) + 1) {
pReturn = new Camera_SXVClass();
}
#endif
#if defined (OS_PL130)
else if (choice.Find(_T("Opticstar PL-130M")) + 1) {
Camera_OSPL130.Color=false;
Camera_OSPL130.Name=_T("Opticstar PL-130M");
pReturn = new Camera_OSPL130Class();
}
else if (choice.Find(_T("Opticstar PL-130C")) + 1) {
Camera_OSPL130.Color=true;
Camera_OSPL130.Name=_T("Opticstar PL-130C");
pReturn = new Camera_OSPL130Class();
}
#endif
#if defined (NEB_SBIG)
else if (choice.Find(_T("Nebulosity")) + 1) {
pReturn = new Camera_NebSBIGClass();
}
#endif
#if defined (SBIGROTATOR_CAMERA)
// must go above SBIG
else if (choice.Find(_T("SBIG Rotator")) + 1) {
pReturn = new Camera_SBIGRotatorClass();
}
#endif
#if defined (SBIG)
else if (choice.Find(_T("SBIG")) + 1) {
pReturn = new Camera_SBIGClass();
}
#endif
#if defined (FIREWIRE)
else if (choice.Find(_T("The Imaging Source (DCAM Firewire)")) + 1) {
pReturn = new Camera_FirewireClass();
}
#endif
#if defined (INOVA_PLC)
else if (choice.Find(_T("i-Nova PLC-M")) + 1) {
pReturn = new Camera_INovaPLCClass();
}
#endif
#if defined (INDI_CAMERA)
else if (choice.Find(_T("INDI Camera")) + 1) {
pReturn = new Camera_INDIClass();
}
#endif
#if defined (V4L_CAMERA)
else if (choice.Find(_T("V4L(2) Camera")) + 1) {
// There is at least ONE V4L(2) device ... let's find out exactly
DeviceInfo *deviceInfo = NULL;
if (1 == Camera_VIDEODEVICE.NumberOfDevices()) {
deviceInfo = Camera_VIDEODEVICE.GetDeviceAtIndex(0);
Camera_VIDEODEVICE.SetDevice(deviceInfo->getDeviceName());
Camera_VIDEODEVICE.SetVendor(deviceInfo->getVendorId());
Camera_VIDEODEVICE.SetModel(deviceInfo->getModelId());
Camera_VIDEODEVICE.Name = deviceInfo->getProduct();
} else {
wxArrayString choices;
int choice = 0;
if (-1 != (choice = wxGetSinglechoiceIndex(_("Select your camera"), _T("V4L(2) devices"), Camera_VIDEODEVICE.GetProductArray(choices)))) {
deviceInfo = Camera_VIDEODEVICE.GetDeviceAtIndex(choice);
Camera_VIDEODEVICE.SetDevice(deviceInfo->getDeviceName());
Camera_VIDEODEVICE.SetVendor(deviceInfo->getVendorId());
Camera_VIDEODEVICE.SetModel(deviceInfo->getModelId());
Camera_VIDEODEVICE.Name = deviceInfo->getProduct();
} else {
throw ERROR_INFO("Camerafactory invalid V4L choice");
}
}
pReturn = new Camera_VIDEODEVICEClass();
}
#endif
else {
throw ERROR_INFO("CameraFactory: Unknown camera choice");
}
}
catch (const wxString& Msg)
{
POSSIBLY_UNUSED(Msg);
if (pReturn)
{
delete pReturn;
pReturn = NULL;
}
}
return pReturn;
}