本文整理汇总了C++中wxString::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ wxString::Append方法的具体用法?C++ wxString::Append怎么用?C++ wxString::Append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxString
的用法示例。
在下文中一共展示了wxString::Append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deletingSelectedUpletConn
void SQLite::deletingSelectedUpletConn(SQLiteStatement *pStmt0, wxString uplet) {
// méthode ad hoc : suppose uplet bien "formé", cad 4 token - entre autres !
map <string, string> paramsDic;
wxString host, port, dbname, user, password;
wxStringTokenizer tokenizer(uplet, sep, wxTOKEN_STRTOK);
int ijk = 0;
while ( tokenizer.HasMoreTokens()) {
switch (ijk)
{
case 0: { paramsDic["host"] = wxString(tokenizer.GetNextToken()); break; }
case 1: { paramsDic["port"] = wxString(tokenizer.GetNextToken()); break; }
case 2: { paramsDic["dbname"] = wxString(tokenizer.GetNextToken()); break; }
case 3: { paramsDic["user"] = wxString(tokenizer.GetNextToken()); break; }
}
ijk = ijk + 1;
}
sql = "delete from ";
sql.Append(tblName);
sql.Append(" WHERE host='"); sql.Append(paramsDic["host"]);
sql.Append("' AND port='"); sql.Append(paramsDic["port"]);
sql.Append("' AND dbname='"); sql.Append(paramsDic["dbname"]);
sql.Append("' AND user='"); sql.Append(paramsDic["user"]);
sql.Append("';");
pStmt0->SqlStatement(string(sql.mb_str()));
}
示例2: WritePropertyClause
void wxPropertyValue::WritePropertyClause(wxString& stream) // Write this expression as a top-level clause
{
if (m_type != wxPropertyValueList)
return;
wxPropertyValue *node = m_value.first;
if (node)
{
node->WritePropertyType(stream);
stream.Append( wxT("(") );
node = node->m_next;
bool first = true;
while (node)
{
if (!first)
stream.Append( wxT(" ") );
node->WritePropertyType(stream);
node = node->m_next;
if (node)
stream.Append( wxT(",\n" ) );
first = false;
}
stream.Append( wxT(").\n\n") );
}
}
示例3: existConn
int SQLite::existConn(SQLiteStatement *pStmt0) {
// **** une connexion ? 0 : non ; >0 : oui
sql = "SELECT * FROM ";
sql.Append(tblName);
sql.Append(";");
pStmt0->Sql(string(sql.mb_str()));
return pStmt0->GetNumberOfRows();
}
示例4: deletingConnTbl
void SQLite::deletingConnTbl(SQLiteStatement *pStmt0) {
cout << "delConnTbl-in" << endl;
sql = "DELETE FROM ";
sql.Append(tblName);
sql.Append(";");
cout << "sql : " << sql << endl;
pStmt0->SqlStatement(string(sql.mb_str()));
cout << "delConnTbl-out" << endl;
}
示例5: SendNMEASentence
void NmeaConverter_pi::SendNMEASentence(wxString sentence)
{
sentence.Trim();
wxString Checksum = ComputeChecksum(sentence);
sentence = sentence.Append(wxT("*"));
sentence = sentence.Append(Checksum);
sentence = sentence.Append(wxT("\r\n"));
PushNMEABuffer(sentence);
}
示例6: BuildMemberList
int AutoCompData::BuildMemberList( const wxString& name, wxString& list ) const
{
// First find the object...
const AutoCompClass* found = FindClassOrObject( name );
if ( !found )
return 0;
// TODO: Should we add members of dupes?
// Now loop till we run out of base classes.
wxArrayString tempArray;
wxString temp;
size_t len = 0;
while ( found )
{
for ( int i=0; i < found->GetFunctions().GetCount(); i++ )
{
temp = found->GetFunctions()[i]->GetMethodName() + IDENT_FUNCTION;
len += temp.Len() + 1;
tempArray.Add( temp );
}
for ( int i=0; i < found->GetVars().GetCount(); i++ )
{
temp = found->GetVars()[i]->GetName() + IDENT_VAR;
len += temp.Len() + 1;
tempArray.Add( temp );
}
const wxString& base = found->GetBase();
if ( base.IsEmpty() )
break;
found = FindClassOrObject( base );
}
wxString last, member;
tempArray.Sort( CmpStringNoCase );
list.Alloc( len - 1 );
for ( int i=0; i < tempArray.GetCount(); i++ ) {
member = tempArray[i];
if ( member.CmpNoCase( last ) == 0 )
continue;
list.Append( member );
list.Append( ' ' );
last = member;
}
list.RemoveLast();
list.Shrink();
return (int)tempArray.GetCount();
}
示例7: SQLiteDatabase
SQLiteStatement *SQLite::ptrTableConnParams() {
SQLiteDatabase *pDatabase0 = new SQLiteDatabase(dbfile, SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, NULL); //!!! SQLITE_OPEN_CREATE nécessaire pour création
SQLiteStatement *pStmt0 = new SQLiteStatement(pDatabase0);
sql = "SELECT * FROM sqlite_master WHERE type='table' AND name='";
sql.Append(tblName);
sql.Append("';");
pStmt0->Sql(string(sql.mb_str()));
if (pStmt0->GetNumberOfRows() != 1) {
sql = "CREATE TABLE ";
sql.Append(tblName);
sql.Append(" (def integer, host VARCHAR(64), port VARCHAR(64), dbname VARCHAR(64), user VARCHAR(64), password VARCHAR(64));");
pStmt0->SqlStatement(string(sql.mb_str()));
}
return pStmt0;
}
示例8: ReadString
// utility function: read a wxString from a wxInputStream
static void ReadString(wxString& str, wxInputStream* s, wxMBConv& conv)
{
size_t streamSize = s->GetSize();
if (streamSize == ~(size_t)0)
{
const size_t bufSize = 4095;
char buffer[bufSize+1];
size_t lastRead;
do
{
s->Read(buffer, bufSize);
lastRead = s->LastRead();
buffer[lastRead] = 0;
str.Append(wxString(buffer, conv));
}
while (lastRead == bufSize);
}
else
{
char* src = new char[streamSize+1];
s->Read(src, streamSize);
src[streamSize] = 0;
str = wxString(src, conv);
delete[] src;
}
}
示例9: gettingAllUpletConn
wxArrayString SQLite::gettingAllUpletConn(SQLiteStatement *pStmt0) {
sql = "SELECT def, host, port, dbname, user FROM ";
sql.Append(tblName);
sql.Append(" order by def desc;");
pStmt0->Sql(string(sql.mb_str()));
wxArrayString uplets;
while(pStmt0->FetchRow()) {
wxString buf;
buf.Append(pStmt0->GetColumnString(1)); buf.Append(sep);
buf.Append(pStmt0->GetColumnString(2)); buf.Append(sep);
buf.Append(pStmt0->GetColumnString(3)); buf.Append(sep);
buf.Append(pStmt0->GetColumnString(4)); buf.Append(sep);
uplets.Add(buf);
}
return uplets;
}
示例10: ReturnStringPadName
void D_PAD::ReturnStringPadName( wxString& text ) const
{
#if 0 // m_Padname is not ASCII and not UTF8, it is LATIN1 basically, whatever
// 8 bit font is supported in KiCad plotting and drawing.
// Return pad name as wxString, assume it starts as a non-terminated
// utf8 character sequence
char temp[sizeof(m_Padname)+1]; // a place to terminate with '\0'
strncpy( temp, m_Padname, sizeof(m_Padname) );
temp[sizeof(m_Padname)] = 0;
text = FROM_UTF8( temp );
#else
text.Empty();
for( int ii = 0; ii < PADNAMEZ && m_Padname[ii]; ii++ )
{
// m_Padname is 8 bit KiCad font junk, do not sign extend
text.Append( (unsigned char) m_Padname[ii] );
}
#endif
}
示例11: existDefUpletConn
int SQLite::existDefUpletConn(SQLiteStatement *pStmt0) {
// **** une connexion par défaut existe ? 0 : non ; >0 : rowid de l'uplet de connexion par défaut
int rowidDef = 0;
sql = "SELECT rowid, def FROM ";
sql.Append(tblName);
sql.Append(" where def="); sql.Append(wxString::Format(wxT("%d"), 1)); sql.Append(";");
pStmt0->Sql(string(sql.mb_str()));
if (pStmt0->GetNumberOfRows() == 0) {
return rowidDef;
} else if (pStmt0->GetNumberOfRows() == 1) {
while(pStmt0->FetchRow()) {
return pStmt0->GetColumnInt(0);
}
}
return -9999;
}
示例12: treePrint
void treePrint(wxString name, bool bDirs=TRUE)
{
#if 0
for (int i=0; i<m_iTreeLevel*5; i++)
m_textCtrlInfo->AppendText(" ");
m_textCtrlInfo->AppendText("|--" + name + "\n");
#else
for (int i=0; i<m_iTreeLevel*5; i++)
m_strInfo.Append(" ");
if (bDirs)
m_strInfo.Append("|--" + name + "\n");
else
m_strInfo.Append("|--*" + name + "\n");
#endif
}
示例13: while
map <string, string> SQLite::gettingDefUpletConn(SQLiteStatement *pStmt0) {
sql = "SELECT rowid, def, host, port, dbname, user, password FROM ";
sql.Append(tblName);
sql.Append(" where def=");
sql.Append(wxString::Format(wxT("%d"), 1));
sql.Append(";");
pStmt0->Sql(string(sql.mb_str()));
map <string, string> paramsDic;
while(pStmt0->FetchRow()) {
paramsDic["host"] = pStmt0->GetColumnString(2);
paramsDic["port"] = pStmt0->GetColumnString(3);
paramsDic["dbname"] = pStmt0->GetColumnString(4);
paramsDic["user"] = pStmt0->GetColumnString(5);
paramsDic["password"] = pStmt0->GetColumnString(6);
}
return paramsDic;
}
示例14: DistributeNMEAMessage
void ConnectionHandler::DistributeNMEAMessage( wxString &message, wxString &sourcePort )
{
for ( size_t i = 0; i < Connections.Count(); i++ )
{
SerialConnection *conn = Connections[i];
if ( sourcePort != conn->GetPortName() ) //Not repeat to self
conn->SendNMEAMessage( message, sourcePort );
}
p_plugin->SendSentenceToCore( message.Append( _T("\r\n") ) );
}
示例15: SplitStringAlphaDigit
void nmeaSendObj::SplitStringAlphaDigit(wxString theStr, wxString &alpha, long &digiti)
{
wxString digit;
for ( unsigned int i = 0; i < theStr.length(); i++ )
if ( VarAlpha.Find(theStr.Mid(i,1)) != wxNOT_FOUND )
alpha.Append( theStr.Mid(i,1) );
else if ( VarDigit.Find(theStr.Mid(i,1)) != wxNOT_FOUND )
digit.Append( theStr.Mid(i,1) );
if(!digit.ToLong(&digiti)) { digiti=-1; }
}