本文整理汇总了C++中wyString::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ wyString::Add方法的具体用法?C++ wyString::Add怎么用?C++ wyString::Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wyString
的用法示例。
在下文中一共展示了wyString::Add方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
ExportAsSimpleSQL::AddColumnNames(ExportSQLData *data, wyString &value)
{
wyInt32 count;
value.Add("(");
for(count = 0; count < m_myres->field_count; count++)
{
if(data->m_selcol[count] == wyTrue)
value.AddSprintf("`%s`, ", m_myres->fields[count].name);
}
value.Strip(2); // Strip one for ',' and one for blank space
value.Add(") ");
}
示例2: OnError
// Function to get the path the selected item in a Treeview //
wyBool
FavoriteBase::SelItemPath(HWND htree, HTREEITEM item, wyString &fullpath, wyBool bFileFlag)
{
wyWChar data[MAX_PATH + 1] = {0};
wyWChar foldpath[MAX_PATH + 1] = {0};
TVITEM tvitem;
wyString path, temp, temp2, datastr, foldpathstr;
// application data path //
if(!pGlobals->m_configdirpath.GetLength())
{
if(!SUCCEEDED(::SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, foldpath)))
return OnError(_("Error in favorites"));
wcscat(foldpath ,L"\\SQLyog");
}
else
{
//wcscpy(foldpath, pGlobals->m_configdirpath.GetAsWideChar());
wcsncpy(foldpath, pGlobals->m_configdirpath.GetAsWideChar(), MAX_PATH);
foldpath[MAX_PATH] = '\0';
}
while(item)
{
tvitem.mask = TVIF_TEXT | TVIF_IMAGE;
tvitem.hItem = item;
tvitem.cchTextMax = MAX_PATH;
tvitem.pszText = data ;
TreeView_GetItem(htree, &tvitem);
datastr.SetAs(data);
if(tvitem.iImage != NFILE || !bFileFlag)
{
temp.Sprintf("\\%s", datastr.GetString());
if(path.GetLength() > 0)
{
temp2.SetAs(path);
path.Sprintf("\\%s%s", datastr.GetString(), temp2.GetString());
}
else
path.Sprintf("\\%s", datastr.GetString());
}
item = TreeView_GetParent(htree, item);
}
foldpathstr.SetAs(foldpath);
fullpath.SetAs(foldpathstr.GetString());
fullpath.Add(path.GetString());
return wyTrue;
}
示例3: row
void
EditorBase::AddNonResultMsg (Tunnel * tunnel, PMYSQL mysql, wyString& errorormsg, wyUInt32 timetaken )
{
wyUInt32 rowsret;
wyString newmsg;
rowsret = (wyUInt32)tunnel->mysql_affected_rows(*mysql);
VERIFY(newmsg.Sprintf(_("(%lu row(s) affected)\n(%lu ms taken)\n\n"), rowsret, timetaken ) < SIZE_1024);
errorormsg.Add(newmsg.GetString());
return;
}
示例4:
void
EditorBase::AddErrorMsg(Tunnel * tunnel, PMYSQL mysql, wyString& errorormsg, wyUInt32 timetaken)
{
wyUInt32 errnum;
wyString newerror;
errnum = tunnel->mysql_errno(*mysql);
/* it may happen that due to http error the errornumber is 0 so we return */
if(0 == errnum)
return;
VERIFY(newerror.Sprintf(_("Error Code: %d\n%s\n(%lu ms taken)\n\n"), errnum, tunnel->mysql_error(*mysql), timetaken) < SIZE_1024);
errorormsg.Add(newerror.GetString());
return;
}
示例5:
// Function creates a text buffer with all the properties and sends newly allocated buffer.
wyBool
TableMakerAdvProperties::GetAdvPropString( Tunnel *tunnel, PMYSQL mysql,
TableAdvPropValues* ptav, wyString& str)
{
wyBool ismysql41 = IsMySQL41(tunnel, mysql);
if(ptav->m_changed == wyFalse)
return wyFalse;
/* nCount += sprintf( szQuery+nCount, " ,type=%s ", ptav->szType );
This comma is not required, this is required in the alter stmt when this
stmt is not the first one. So we are checking it in the query builder
In the latest versions we need 'Engine' in place of 'Type'
*/
if(ptav->m_type.GetLength())
{
if(ismysql41 == wyTrue)
str.AddSprintf(" Engine=%s ", ptav->m_type.GetString());
else
str.AddSprintf(" Type=%s ", ptav->m_type.GetString());
}
if(ptav->m_checksum.CompareI(STR_DEFAULT) != 0)
str.AddSprintf("checksum=%s ", ptav->m_checksum.GetString());
if(ptav->m_auto_incr.GetLength())
str.AddSprintf("auto_increment=%s ", ptav->m_auto_incr.GetString());
if(ptav->m_avg_row.GetLength())
str.AddSprintf("avg_row_length=%s ", ptav->m_avg_row.GetString());
if(ptav->m_comment.GetLength())
str.AddSprintf("comment='%s' ", ptav->m_comment.GetString());
else
str.Add("comment='' ");
if(ptav->m_max_rows.GetLength())
str.AddSprintf("max_rows=%s ", ptav->m_max_rows.GetString());
if(ptav->m_min_rows.GetLength())
str.AddSprintf("min_rows=%s ", ptav->m_min_rows.GetString());
if(ptav->m_delay.CompareI(STR_DEFAULT) != 0)
str.AddSprintf("delay_key_write=%s ", ptav->m_delay.GetString());
if(ptav->m_rowformat.GetLength())
str.AddSprintf("row_format=%s ", ptav->m_rowformat.GetString());
if(ptav->m_chunks.GetLength())
str.AddSprintf("raid_chunks=%s ", ptav->m_chunks.GetString());
if(ptav->m_chunksize.GetLength())
str.AddSprintf("raid_chunksize=%s ", ptav->m_chunksize.GetString());
if(ismysql41 == wyTrue)
{
if(ptav->m_charset.GetLength() && ptav->m_charset.Compare(STR_DEFAULT) != 0)
str.AddSprintf("charset=%s ", ptav->m_charset.GetString());
if(ptav->m_collation.GetLength() && ptav->m_collation.Compare(STR_DEFAULT) != 0)
str.AddSprintf("collate=%s ", ptav->m_collation.GetString());
}
return wyTrue;
}