本文整理汇总了C++中IString::isAlphanumeric方法的典型用法代码示例。如果您正苦于以下问题:C++ IString::isAlphanumeric方法的具体用法?C++ IString::isAlphanumeric怎么用?C++ IString::isAlphanumeric使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IString
的用法示例。
在下文中一共展示了IString::isAlphanumeric方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: verifyAndSave
//*****************************************************************************
// CLASS GeneralPage :: verifyAndSave() - save database info
//*****************************************************************************
IBase :: Boolean GeneralPage :: verifyAndSave( IString& theString,
IString& theEntry,
const IString theName )
{
/* verify data for correctness */
if ((theName.length() == 0) && (employeeId.text().length() == 0 ))
return true;
// save person information
if ((theName.length() == 0 ) && (theName.isAlphanumeric()))
Key = employeeId.text();
else
Key = theName;
// prime the page from data area
setEmployeeData();
//-------------------------------------------------------------------------
// Save the query
// The key is either what was passed in or the employee number
//-------------------------------------------------------------------------
if (theName.length()>0)
employeeData.save(theName);
else
if ( (!isAquery) &&
(Key.length()> 0 ))
employeeData.save(Key);
return true;
}
示例2: verifyAndSave
/******************************************************************************
* Class AccountPage :: verifyAndSave - Save page information to the database *
******************************************************************************/
bool AccountPage::verifyAndSave( IString& theString,
IString& theEntry,
const IString saveName )
{
/*-----------------------------------------------------------------------------
| If there is no data or is a query, return. |
-----------------------------------------------------------------------------*/
if ( ( ! saveName.length() )
&& ( ! Key.length() )
|| isAquery )
return true;
/*-----------------------------------------------------------------------------
| If able to retrieve the container information, |
| save the information to the database based on the key or query name. |
-----------------------------------------------------------------------------*/
if ( setAcctData() )
{
if ( ( saveName.length() > 0 ) && ( saveName.isAlphanumeric() ) )
acctData.save( saveName );
else
if ( ( Key.length() > 0 ) && ( Key.isAlphanumeric() ) )
acctData.save( Key );
}
return true;
};