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


C++ Match类代码示例

本文整理汇总了C++中Match的典型用法代码示例。如果您正苦于以下问题:C++ Match类的具体用法?C++ Match怎么用?C++ Match使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: qWarning

void ShtServer::onMatchFinished(const QString &uuid)
{
    qWarning() << "OnMatchFinished, uuid: " << uuid;
    Match *m = findMatch(uuid);
    matches.removeOne(m);
    m->deleteLater();
}
开发者ID:illogica,项目名称:Sht,代码行数:7,代码来源:shtserver.cpp

示例2: main

void main() {

	int gamesettings[7] = {0};
	Player players[2] = {Player(), Player()};
	Match match;
	match = Match();

	SetUpGame(gamesettings, players);

	for (int i = gamesettings[gamestoplay]; i > 0; i--) {
		match.Play(players, gamesettings);
	}

	cout << players[0].GetName() << "\t:\t" << players[1].GetName() << endl << endl;
	cout << players[0].matchwins << "\t:\t" << players[1].matchwins << endl << endl;
	for (int i = 0; i < 7; i++) {
		cout << "7\t:\t" << i << "\t:\t" << (float)(players[0].windensity[i]*100)/gamesettings[gamestoplay] << "%" << endl;
	}
	for (int i = 0; i < 7; i++) {
		cout << i << "\t:\t7\t:\t" << (float)(players[1].windensity[i]*100)/gamesettings[gamestoplay] << "%" << endl;
	}

	while(true){}



}
开发者ID:Steelbadger,项目名称:FiveOhOneDarts,代码行数:27,代码来源:Game.cpp

示例3: _T

void MatchView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();

	// TODO: 在此添加专用代码和/或调用基类
	list_match.SetExtendedStyle(LVS_EX_FULLROWSELECT);

	list_match.InsertColumn(0, _T("比赛名称"), LVCFMT_CENTER);
	list_match.InsertColumn(1, _T("举办时间"), LVCFMT_CENTER);

	CHeaderCtrl* pHeader = list_match.GetHeaderCtrl();
	int nCurrWidth, nColHdrWidth;
	ASSERT(pHeader);
	list_match.SetRedraw(FALSE);
	for(int iCurrCol = 0; iCurrCol < pHeader->GetItemCount(); ++iCurrCol){
		list_match.SetColumnWidth(iCurrCol, LVSCW_AUTOSIZE);
		nCurrWidth = list_match.GetColumnWidth(iCurrCol);
		list_match.SetColumnWidth(iCurrCol, LVSCW_AUTOSIZE_USEHEADER);
		nColHdrWidth = list_match.GetColumnWidth(iCurrCol);
		list_match.SetColumnWidth(iCurrCol, max(nCurrWidth, nColHdrWidth));
	}
	list_match.SetRedraw(TRUE);
	list_match.Invalidate();

	Match mat;
	mat._meeting.ID = this->meetingID;
	vector<Match> v_match = mat.Query();
	vector<Match>::iterator i_d;
	for(i_d = v_match.begin(); i_d != v_match.end(); ++i_d){
		AddMatToList(&(*i_d));
	}
}
开发者ID:zhqing007,项目名称:Match,代码行数:32,代码来源:MeetingManagerView.cpp

示例4: write

bool IndexParseData::write(const std::function<bool(const String &)> &write, const Match &match) const
{
    auto process = [&write, &match](const String &str, const Sources &sss) {
        if (!sss.isEmpty()) {
            if (!write(str + ":"))
                return false;

            for (const auto &ss : sss) {
                const Path file = Location::path(ss.first);
                if (match.isEmpty() || match.match(file)) {
                    write("  " + file + ":");
                    for (const auto &s : ss.second) {
                        if (!write("    " + s.toString()))
                            return false;
                    }
                }
            }
        }
        return true;
    };
    if (!process("Sources", sources))
        return false;

    for (const auto &commands : compileCommands) {
        if (!process(Location::path(commands.first), commands.second.sources))
            return false;
    }
    return true;
}
开发者ID:Andersbakken,项目名称:rtags,代码行数:29,代码来源:IndexParseData.cpp

示例5: convert

void Generator::convert(const Match & match,const GroebnerRule & r1,
         const GroebnerRule & r2,Polynomial & result) const {
  result.doubleProduct(match.const_left1(),r1.RHS(),match.const_right1());
  Polynomial temp;
  temp.doubleProduct(match.const_left2(),r2.RHS(),match.const_right2());
  result -= temp;
};
开发者ID:lolmid,项目名称:2015-2016,代码行数:7,代码来源:Generator.cpp

示例6: operator

 bool operator() (const Match& a, const Match& b) const {
     Location la = a.getTarget();
     Location lb = b.getTarget();
     
     long sa = score(la);
     long sb = score(lb);
     
     return sa < sb;
 }
开发者ID:darwin,项目名称:libsikuli,代码行数:9,代码来源:region.cpp

示例7: SerializeMatch

 void SerializeMatch(Writer &writer, const Match &match) {
     writer.StartObject();
     writer.Key("startEA");
     writer.Uint(match.getStartEA().getValue());
     writer.Key("endEA");
     writer.Uint(match.getEndEA().getValue());
     writer.Key("patternName");
     writer.String(match.getPatternName());
     writer.EndObject();
 }
开发者ID:toco,项目名称:IdiomMatcher,代码行数:10,代码来源:MatchPersistence.cpp

示例8:

Match * UserHandler::getMatch() {
    for (int i = 0; i < shared_data_->match_list.size(); i++) {
        Match * m = shared_data_->match_list.at(i);
        if ((m->getClubs()[0] == manager_->getClub()) || (m->getClubs()[1] == manager_->getClub())) {
            return m;
        }
    }

    return NULL;
}
开发者ID:C4ptainCrunch,项目名称:info-f-209,代码行数:10,代码来源:UserHandler.cpp

示例9: main

int main(void)
{

    Time t (6,34,25);
    Match m;
    m.printTime(t);
    //printTime(t);
    system("pause");
    return 0;
}
开发者ID:VincentLiu2015,项目名称:friendfun2,代码行数:10,代码来源:main.cpp

示例10: OnBnClickedBuMDel

void MatchView::OnBnClickedBuMDel()
{
	// TODO: 在此添加控件通知处理程序代码
	if(MessageBox(_T("确定删除所选比赛吗?"), _T("确认"), MB_YESNO | MB_ICONQUESTION) == IDNO)
		return;
	int n_se = list_match.GetSelectionMark();
	Match mat;
	mat.ID = list_match.GetItemData(n_se);
	mat.Delete();
	list_match.DeleteItem(n_se);
}
开发者ID:zhqing007,项目名称:Match,代码行数:11,代码来源:MeetingManagerView.cpp

示例11: linkToMatch

bool BracketVisElement::linkToMatch(const Match& ma) const
{
  Category myCat = getLinkedCategory();
  if (ma.getCategory() != myCat) return false;

  // lock the database before writing
  DbLockHolder lh{db, DatabaseAccessRoles::MainThread};

  row.update(BV_MATCH_REF, ma.getId());
  return true;
}
开发者ID:Foorgol,项目名称:QTournament,代码行数:11,代码来源:BracketVisData.cpp

示例12: drawMatch

  void PairWiseDrawer::drawMatch(const Match& m, const Color3ub& c, bool drawLine) const
  {
    drawFeature(0, m.x(), c);
    drawFeature(1, m.y(), c);

    if(drawLine)
    {
      Vector2f a,b;
      a = scale(0)*m.posX(); b = scale(1)*(m.posY()+offF(1));
      DO::drawLine(a, b, c);
    }
  }
开发者ID:pmoulon,项目名称:DO-CV,代码行数:12,代码来源:PairWiseDrawer.cpp

示例13: i

/** removes player from players list and removes
 *  all matches which he/she had participated
 */
void Group::removePlayer( Player player )
{
  _players.removeOne( player );
  QMutableListIterator<Match> i( _matches );
  while( i.hasNext() ) {
    Match m = i.next();
    if ( ( m.playerA() == player ) ||
         ( m.playerB() == player ) ) {
      i.remove();
    }
  }
}
开发者ID:yapavelkurochkin,项目名称:tournament,代码行数:15,代码来源:group.cpp

示例14: earnedRating

/** \return earned rating for 'p' player. i.e. the sum of
 *          earned points per each match.
 */
double Group::earnedRating( Player p ) const
{
  double total = 0.0;
  for ( int i = 0; i < _matches.count(); i++) {
    Match m = _matches.at( i );

    if ( m.participated( p ) && m.played() ) {
      total += m.earnedRating( p );
    }
  }

  return total;
}
开发者ID:yapavelkurochkin,项目名称:tournament,代码行数:16,代码来源:group.cpp

示例15: query

bool DataBase::_insertMatch(const Match &match) {
  QSqlQuery query(_db);
  query.prepare("insert into Match (match_id, time_stamp, game_type)"\
		" values(?, ?, ?)");
  query.addBindValue(match.getId());
  query.addBindValue(match.getDate().toTime_t());
  query.addBindValue(static_cast<int>(match.getMatchType()));
  if (!query.exec()) {
    qCritical() << "Could not insert match!\n";
    return false;
  }
  return _insertMatchDetails(match.getDetails());
}
开发者ID:cabelitos,项目名称:DotaMetrics,代码行数:13,代码来源:DataBase.cpp


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