当前位置: 首页>>代码示例>>C++>>正文


C++ wxString::Empty方法代码示例

本文整理汇总了C++中wxString::Empty方法的典型用法代码示例。如果您正苦于以下问题:C++ wxString::Empty方法的具体用法?C++ wxString::Empty怎么用?C++ wxString::Empty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wxString的用法示例。


在下文中一共展示了wxString::Empty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DisplayCmpDoc

static void DisplayCmpDoc(wxString &  Name)
/*******************************************/
/* Routine de recherche et d'affichage de la doc du composant Name
	La liste des doc est pointee par MList
*/
{
ModList * Mod = MList;

	if ( ! Mod )
	{
		Name.Empty(); return;
	}

	/* Recherche de la description */
	while ( Mod )
	{
		if( ! Mod->m_Name.IsEmpty() && (Mod->m_Name.CmpNoCase(Name) == 0) ) break;
		Mod = Mod->Next;
	}

	if ( Mod )
	{
		Name = ! Mod->m_Doc.IsEmpty() ? Mod->m_Doc  : wxT("No Doc");
		Name += wxT("\nKeyW: ");
		Name += ! Mod->m_KeyWord.IsEmpty() ? Mod->m_KeyWord : wxT("No Keyword");
	}

	else Name = wxEmptyString;
}
开发者ID:BackupTheBerlios,项目名称:kicad-svn,代码行数:29,代码来源:loadcmp.cpp

示例2: cbRead

// Reads a wxString from a file. File must be open. File is closed automatically.
bool cbRead(wxFile& file, wxString& st, wxFontEncoding encoding)
{
    st.Empty();
    if (!file.IsOpened())
        return false;

    int len = file.Length();
    if (!len)
    {
        file.Close();
        return true;
    }

    char* buff = new char[len+1];
    if (!buff) // remark by killerbot : this is useless, since when out of mem --> exception (this is not malloc you know)
    {
        file.Close();
        return false;
    }
    file.Read((void*)buff, len);
    file.Close();
    buff[len]='\0';

    DetectEncodingAndConvert(buff, st, encoding);
    delete [] buff;

    return true;
}
开发者ID:stahta01,项目名称:codeblocks_https_metadata,代码行数:29,代码来源:globals.cpp

示例3: getAsString

bool CUserItem::getAsString( wxString& strUser )
{
    wxString wxstr;
    strUser.Empty();
        
    strUser += wxString::Format( _("%ld;"), getUserID() );
    strUser += getUser();
    strUser += _(";");
    // Protect password
    wxstr = getPassword();
    for ( int i=0; i<wxstr.Length(); i++ ) {
        strUser += _("*");
    }
    //strUser += getPassword();
    strUser += _(";");
    strUser += getFullname();
    strUser += _(";");
    vscp_writeFilterToString( getFilter(), wxstr );
    strUser += wxstr;
    strUser += _(";");
    vscp_writeMaskToString( getFilter(), wxstr );
    strUser += wxstr;
    strUser += _(";");
    strUser += getUserRightsAsString();
    strUser += _(";");
    strUser += getAllowedRemotesAsString();
    strUser += _(";");
    strUser += getAllowedEventsAsString();
    strUser += _(";");
    strUser += wxBase64Encode( getNote().mbc_str(), strlen( getNote().mbc_str() ) ); 	
    //strUser += getNote();
    
    return true;
}
开发者ID:,项目名称:,代码行数:34,代码来源:

示例4: runWizard

bool CCanalConfObj::runWizard( wxWindow* parent,
                                    wxString& inputConfigString,
                                    uint32_t inputConfigFlags,
                                    wxString& resultConfigString, 
                                    uint32_t *presultConfigFlags )
{
    // Clear configuration data
    resultConfigString.Empty();

    CanalConfigWizard wizard( parent );
    wizard.CreateControls( this, inputConfigString, inputConfigFlags );
    wizard.Run(); 

    int pos = 0;
    while ( ( NULL != wizard.m_pgConfig[ pos ] ) && ( pos < MAX_PARAMETERS ) ) {
        resultConfigString += wizard.m_pgConfig[ pos ]->m_strValue;
        pos++;
        if ( ( NULL != wizard.m_pgConfig[ pos ] ) )  resultConfigString += _( ";" );
    }

    pos = 0;
    while ( ( NULL != wizard.m_pgConfigFlags[ pos ] ) && ( pos < MAX_FLAGS ) ) {
        *presultConfigFlags |= wizard.m_pgConfigFlags[ pos ]->m_value;
        pos++;
    }

    wizard.Destroy();
    return true;
}
开发者ID:ajje,项目名称:vscp,代码行数:29,代码来源:canalconfobj.cpp

示例5: ExplodeMessage

void SjLogGui::ExplodeMessage(const wxString& all___, unsigned long& severity, unsigned long& time, wxString& msg, wxString& scope)
{
	wxString temp;

	// get and strip severity
	temp = all___.BeforeFirst(wxT('|'));
	temp.ToULong(&severity);
	msg = all___.AfterFirst(wxT('|'));

	// get and strip time
	temp = msg.BeforeFirst(wxT('|'));
	temp.ToULong(&time);
	msg = msg.AfterFirst(wxT('|'));

	// now "msg" is message and optional scope enclosured by "[]"
	scope.Empty();
	int p = msg.Find(wxT('['), true/*from end*/);
	if( p!=-1 )
	{
		scope = msg.Mid(p+1);
		if( scope.Len()>=1 && scope.Last()==wxT(']') )
		{
			scope = scope.Left(scope.Len()-1);
			msg = msg.Left(p).Trim();
		}
	}

	// some finalizing translations (some stuff is logged before the translation system is available)
	if( msg.StartsWith(wxT("Loading "), &temp) )
	{
		msg.Printf(_("Loading %s"), temp.c_str());
	}
}
开发者ID:conradstorz,项目名称:silverjuke,代码行数:33,代码来源:console.cpp

示例6: sprintPinNetName

void NETLIST_EXPORTER::sprintPinNetName( wxString& aResult,
                                    const wxString& aNetNameFormat, NETLIST_OBJECT* aPin,
                                    bool aUseNetcodeAsNetName )
{
    int netcode = aPin->GetNet();

    // Not wxString::Clear(), which would free memory.  We want the worst
    // case wxString memory to grow to avoid reallocation from within the
    // caller's loop.
    aResult.Empty();

    if( netcode != 0 && aPin->GetConnectionType() == PAD_CONNECT )
    {
        if( aUseNetcodeAsNetName )
        {
            aResult.Printf( wxT("%d"), netcode );
        }
        else
        {
        aResult = aPin->GetNetName();

        if( aResult.IsEmpty() )     // No net name: give a name from net code
            aResult.Printf( aNetNameFormat.GetData(), netcode );
        }
    }
}
开发者ID:morio,项目名称:kicad-source-mirror,代码行数:26,代码来源:netlist_exporter.cpp

示例7: 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
}
开发者ID:james-sakalaukus,项目名称:kicad,代码行数:27,代码来源:class_pad.cpp

示例8: return

const wxString& RESPONSE::PlainEnglish( void )
{
    static wxString return_string;

    return_string.Empty();

    return ( return_string );
}
开发者ID:delatbabel,项目名称:LogbookKonni-1.2,代码行数:8,代码来源:response.cpp

示例9: inifile_trim

void inifile_trim( wxString& buffer )
{
	buffer.Trim(false);			// trims left side.

	if( buffer.Length() <= 1 )	// this I'm not sure about... - air
	{
		buffer.Empty();
		return;
	}

	if( buffer.Left( 2 ) == L"//" )
	{
		buffer.Empty();
		return;
	}

	buffer.Trim(true);			// trims right side.
}
开发者ID:BradleyKarkanen,项目名称:pcsx2,代码行数:18,代码来源:Patch.cpp

示例10: StringPadName

void D_PAD::StringPadName( wxString& text ) const
{
    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] );
    }
}
开发者ID:corecode,项目名称:kicad-source-mirror,代码行数:10,代码来源:class_pad.cpp

示例11: getUserAsString

bool CUserList::getUserAsString( CUserItem *pUserItem, wxString& strUser )
{
    wxString wxstr;
    strUser.Empty();
    
    // Check pointer
    if ( NULL == pUserItem ) return false;
    
    return pUserItem->getAsString( strUser );    
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例12: Split

void BatchCommands::Split(const wxString & str, wxString & command, wxString & param)
{
   int splitAt;

   command.Empty();
   param.Empty();

   if (str.IsEmpty()) {
      return;
   }

   splitAt = str.Find(wxT(':'));
   if (splitAt < 0) {
      return;
   }

   command = str.Mid(0, splitAt);
   param = str.Mid(splitAt + 1);

   return;
}
开发者ID:JordanGraves,项目名称:TabMagic,代码行数:21,代码来源:BatchCommands.cpp

示例13: DisplayCmpDoc

static void DisplayCmpDoc( wxString& aName )
{
    FOOTPRINT_INFO* module_info = MList.GetModuleInfo( aName );

    if( !module_info )
    {
        aName.Empty();
        return;
    }

    aName  = _( "Description: " ) + module_info->GetDoc();
    aName += _( "\nKey words: " ) + module_info->GetKeywords();
}
开发者ID:johnbeard,项目名称:kicad-source-mirror,代码行数:13,代码来源:loadcmp.cpp

示例14: GetQuickInfo

bool SjColumnMixer::GetQuickInfo(const wxString& url,
                                 wxString& trackName, wxString& leadArtistName, wxString& albumName,
                                 long& playtimeMs)
{
	int  m;
	bool ok = FALSE;

	m_tempInfo.m_trackName.Empty();
	m_tempInfo.m_leadArtistName.Empty();
	m_tempInfo.m_playtimeMs = 0;

	// first, try the "A-Z" module (normally the largest module)
	if( m_libraryModule )
	{
		ok = m_libraryModule->GetTrackInfo(url, m_tempInfo, SJ_TI_QUICKINFO, FALSE/*no log*/);
	}

	// then, try the other modules
	if( !ok )
	{
		for( m = 0; m < m_moduleCount; m++ )
		{
			wxASSERT(m_modules[m]);
			if( m_modules[m] != m_libraryModule )
			{
				ok = m_modules[m]->GetTrackInfo(url, m_tempInfo, SJ_TI_QUICKINFO, FALSE/*no log*/);
				if( ok )
				{
					break;
				}
			}
		}
	}

	// done so far
	if( ok )
	{
		trackName = m_tempInfo.m_trackName;
		leadArtistName = m_tempInfo.m_leadArtistName;
		albumName = m_tempInfo.m_albumName;
		playtimeMs = m_tempInfo.m_playtimeMs;
		return TRUE;
	}
	else
	{
		trackName = url;
		leadArtistName.Empty();
		playtimeMs = 0;
		return FALSE;
	}
}
开发者ID:antonivich,项目名称:Silverjuke,代码行数:51,代码来源:columnmixer.cpp

示例15: return

 wxString& talker_id( const wxString &sentence )
{
   static wxString return_string;

   return_string.Empty();

   if ( sentence.Len() >= 3 )
   {
      if ( sentence[ 0 ] == '$' )
      {
         return_string = sentence.Mid( 1, 2 );
      }
   }

   return( return_string );
}
开发者ID:AluOne,项目名称:OpenCPN,代码行数:16,代码来源:talkerid.cpp


注:本文中的wxString::Empty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。