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


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

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


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

示例1: ParseAlignment

SectionFieldAlignment SectionFieldDescriptor::ParseAlignment(wxString& value)
{
    if ( value.Cmp(_("L")) == 0 ) {
        return FA_LEFT;
    } else if ( value.Cmp(_("R")) == 0 ) {
        return FA_RIGHT;
    } else {
        throw wxString::Format(DESCRIPTOR_WRONG_ALIGNMENT + wxString(" %s"), value);
    }
}
开发者ID:Skier,项目名称:vault_repo,代码行数:10,代码来源:ComposerDescriptor.cpp

示例2: UpdateTrailer

void EdiComposer::UpdateTrailer(const wxString& recordType)
{
    if ( recordType.Cmp(ADDED) == 0 ) {
        GetTrailer().TotalAdds++;
    } else if( recordType.Cmp(CHANGED) == 0 ) {
        GetTrailer().TotalChanges++;
    } else if( recordType.Cmp(MOVED) == 0 ) {
        GetTrailer().TotalMoveHistory++;
    } else if( recordType.Cmp(REPLACED) == 0 ) {
        GetTrailer().TotalReplacements++;
    }
};
开发者ID:Skier,项目名称:vault_repo,代码行数:12,代码来源:EdiComposer.cpp

示例3: Append

int wxVListBoxComboPopup::Append(const wxString& item)
{
    int pos = (int)m_strings.GetCount();

    if ( m_combo->GetWindowStyle() & wxCB_SORT )
    {
        // Find position
        // TODO: Could be optimized with binary search
        wxArrayString strings = m_strings;
        unsigned int i;

        for ( i=0; i<strings.GetCount(); i++ )
        {
            if ( item.Cmp(strings.Item(i)) < 0 )
            {
                pos = (int)i;
                break;
            }
        }
    }

    Insert(item,pos);

    return pos;
}
开发者ID:tsiru,项目名称:pcsx2,代码行数:25,代码来源:odcombo.cpp

示例4: SelectAllTreeItems

void SelectAllTreeItems(const wxString &searchStr, wxTreeCtrl *tvCtrl,
  int SelImageIdx, const wxTreeItemId& idParent, wxTreeItemIdValue cookie)
{
	wxTreeItemId id;
	if (!cookie)
		id = tvCtrl->GetFirstChild(idParent, cookie);
	else
		id = tvCtrl->GetNextChild(idParent, cookie);

	if (!id.IsOk())
		return;
	if (searchStr.Cmp(wxEmptyString) == 0)
		tvCtrl->SetItemImage(id, SelImageIdx);
	else
	{
		if (tvCtrl->GetItemText(id).Upper().Contains(searchStr.Upper()))
		{
			tvCtrl->SetItemImage(id, SelImageIdx);
		}
	}

	if (tvCtrl->ItemHasChildren(id))
		SelectAllTreeItems(searchStr, tvCtrl, SelImageIdx, id);

	SelectAllTreeItems(searchStr, tvCtrl, SelImageIdx, idParent, cookie);

}
开发者ID:gkathire,项目名称:wxVCL,代码行数:27,代码来源:comctrls.cpp

示例5: getApnRule

bool
SbAccessFilterPolicy::setPath(wxString path)
{
	struct apn_rule *rule;

	rule = getApnRule();
	if ((rule == NULL) || path.IsEmpty()){
		return (false);
	}

	startChange();
	if (rule->rule.sbaccess.path != NULL) {
		free(rule->rule.sbaccess.path);
		rule->rule.sbaccess.path = NULL;
		setModified();
	}

	if (path.Cmp(wxT("any")) != 0) {
		rule->rule.sbaccess.path = strdup(path.fn_str());
		setModified();
	}

	finishChange();
	return (true);
}
开发者ID:genua,项目名称:anoubis,代码行数:25,代码来源:SbAccessFilterPolicy.cpp

示例6: equals

bool Identifier::equals(const wxString& rhs) const
{
    if (needsQuoting(textM))
        return (0 == rhs.Cmp(textM));
    else
        return (0 == rhs.CmpNoCase(textM));
}
开发者ID:DragonZX,项目名称:flamerobin,代码行数:7,代码来源:Identifier.cpp

示例7: CompareFiles

int CComparisonManager::CompareFiles(const int dirSortMode, const wxString& local, const wxString& remote, bool localDir, bool remoteDir)
{
	switch (dirSortMode)
	{
	default:
		if (localDir)
		{
			if (!remoteDir)
				return -1;
		}
		else if (remoteDir)
			return 1;
		break;
	case 2:
		// Inline
		break;
	}

#ifdef __WXMSW__
	return local.CmpNoCase(remote);
#else
	return local.Cmp(remote);
#endif

	return 0;
}
开发者ID:juaristi,项目名称:filezilla,代码行数:26,代码来源:listingcomparison.cpp

示例8: sortfunc

static bool sortfunc(const wxString& a, const wxString& b)
{
#ifdef __WXMSW__
	return b.CmpNoCase(a) > 0;
#else
	return b.Cmp(a) > 0;
#endif
}
开发者ID:Hellcenturion,项目名称:MILF,代码行数:8,代码来源:LocalTreeView.cpp

示例9: sortfunc

static bool sortfunc(const wxString& a, const wxString& b)
{
	int cmp = a.CmpNoCase(b);

	if (!cmp)
		cmp = a.Cmp(b);

	return cmp < 0;
}
开发者ID:AbelTian,项目名称:filezilla,代码行数:9,代码来源:RemoteTreeView.cpp

示例10: set

bool ALMRunConfig::set(const wxString& name,const wxString &value)
{
	if (name.Cmp("Explorer") == 0)
		Explorer = value;
	else if (name.Cmp("Root") == 0)
	{
		Root = value;
		if (Root.empty())
			return false;
		wxSetWorkingDirectory(Root);
	}
	else if(name.Cmp("HotKey") == 0)
		HotKey = value;
	else if(name.Cmp("HotKeyReLoad") == 0)
		HotKeyReLoad = value;
	else
		return false;
	return ::wxSetEnv(wxT("ALMRUN_")+name.Upper(),value);
}
开发者ID:zdwzkl,项目名称:ALMRun,代码行数:19,代码来源:ALMRunConfig.cpp

示例11: ColumnPullDownSearcher

// 10個のプルダウン全て調べる
void WxSQLiteTest::ColumnPullDownSearcher(wxString& dataType, wxString& value)
{
	// それぞれのカラムを調べる
	if (!dataType.IsEmpty() && !value.IsEmpty()) {
		if (!dataType.Cmp(wxT("カラムを作らない")) == 0 && ColumnValidator(value)) {
			columnArray->Add(dataType);
			columnArray->Add(value.MakeUpper());
			wxMessageBox(dataType);
			wxMessageBox(value);
		}
	}
}
开发者ID:Hiroyuki-Nagata,项目名称:WxSQLiteTest,代码行数:13,代码来源:WxSQLiteTest.cpp

示例12: FindGroupByName

int IniParser::FindGroupByName(const wxString& name, bool caseSensitive) const
{
    for (int i = 0; i < GetGroupsCount(); ++i)
    {
        bool found = caseSensitive
                    ? name.Cmp(m_Array[i].name) == 0
                    : name.CmpNoCase(m_Array[i].name) == 0;
        if (found)
            return i;
    }
    return -1;
}
开发者ID:stahta01,项目名称:EmBlocks_old,代码行数:12,代码来源:cbiniparser.cpp

示例13: GetProjectCountByPath

int ProjectListBox::GetProjectCountByPath(wxString path)
{
    int count = 0;
    for(int i=0; i<this->GetItemCount(); i++)
    {
        if(path.Cmp(GetText(i,1))==0)
        {
            count++;
        }
    }
    return count;
}
开发者ID:ndevenish,项目名称:Hugin,代码行数:12,代码来源:ProjectListBox.cpp

示例14: getInternalGroupIndex

//-----------------------------------------------------------------------
int DialogResourceGroups::getInternalGroupIndex( const wxString& groupName ) const
{
    int rowsize = m_groupsGrid->GetRows();

    for ( int i = 0; i < rowsize; i++ )
    {
        const wxString rowname = m_groupsGrid->GetCellValue( i, 0 );
        if ( rowname.Cmp( groupName ) == 0 )
            return i;
    }

    return -1;
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:14,代码来源:DialogResourceGroups.cpp

示例15: Encode

wxString SectionFieldDescriptor::Encode(wxString& value, wxString& type)
{
   wxDateTime date;
   if ( type.Cmp("date") == 0 
        && value.Length() != 0 ) {
       if ( date.ParseFormat(value, "%Y/%m/%d") ) {
           return date.Format("%Y%m%d");
       } else {
           return value;
       }
   } else {
       return value;
   }
}
开发者ID:Skier,项目名称:vault_repo,代码行数:14,代码来源:ComposerDescriptor.cpp


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