本文整理汇总了C++中IDriver::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ IDriver::GetName方法的具体用法?C++ IDriver::GetName怎么用?C++ IDriver::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDriver
的用法示例。
在下文中一共展示了IDriver::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RegisterDriver
//++ ------------------------------------------------------------------------------------
// Details: Register a driver with *this Driver Manager. Call SetUseThisDriverToDoWork()
// inform the manager which driver is the one to the work. The manager calls
// the driver's init function which must be successful in order to complete the
// registration.
// Type: Method.
// Args: vrDriver - (R) The driver to register.
// vrDriverID - (R) The driver's ID to lookup by.
// Return: MIstatus::success - Functional succeeded.
// MIstatus::failure - Functional failed.
// Throws: None.
//--
bool CMIDriverMgr::RegisterDriver( const IDriver & vrDriver, const CMIUtilString & vrDriverID )
{
if( HaveDriverAlready( vrDriver ) )
return MIstatus::success;
IDriver * pDriver = const_cast< IDriver * >( &vrDriver );
if( !pDriver->SetId( vrDriverID ) )
return MIstatus::failure;
if( !pDriver->DoInitialize() )
{
SetErrorDescriptionn( MIRSRC( IDS_DRIVERMGR_DRIVER_ERR_INIT ), pDriver->GetName().c_str(), vrDriverID.c_str(), pDriver->GetError().c_str() );
return MIstatus::failure;
}
MapPairDriverIdToDriver_t pr( vrDriverID, pDriver );
m_mapDriverIdToDriver.insert( pr );
return MIstatus::success;
}