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


C++ record函数代码示例

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


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

示例1: check

	void check(const nscp_version &version, const Plugin::QueryRequestMessage::Request &request, Plugin::QueryResponseMessage::Response *response) {
		typedef filter filter_type;
		modern_filter::data_container data;
		modern_filter::cli_helper<filter_type> filter_helper(request, response, data);

		filter_type filter;
		filter_helper.add_options("", "", "", filter.get_filter_syntax(), "ignored");
		filter_helper.add_syntax("${status}: ${list}", filter.get_filter_syntax(), "${release}.${major}.${minor}.${build} (${date})", "version", "", "");

		if (!filter_helper.parse_options())
			return;

		if (!filter_helper.build_filter(filter))
			return;

		boost::shared_ptr<filter_obj> record(new filter_obj(version));
		filter.match(record);

		filter_helper.post_process(filter);
	}
开发者ID:wyrover,项目名称:nscp,代码行数:20,代码来源:CheckNSCP.cpp

示例2: p

void ESURegistrationTableManager::syncRecord(const QHostAddress &address)
{
    if( m_tableData.isEmpty() ) return;

    RegistrationPackageNET p(ESURegistrationEngine::SyncRegistrationTableMsg);
    p.records.enable = true;

    foreach( const RegistrationUserInfo& r, m_tableData ) {
        if( r.address == address ) {
            RegistrationPackageDataNET record(r);
            p.addRecord(record);
#ifdef ESU_NET_PROTO_SERVER
            esuNet.sendRegistrationMsg(p);
#else
            emit emitsendRegistrationMsg(p);
#endif
            break;
        }
    }
}
开发者ID:ArtemTheVan,项目名称:Rregistration,代码行数:20,代码来源:registration_table_manager.cpp

示例3: stateChanged

void AudioCaptureSession::setState(QMediaRecorder::State state)
{
    if (m_state == state)
        return;

    m_state = state;
    emit stateChanged(m_state);

    switch (m_state) {
    case QMediaRecorder::StoppedState:
        stop();
        break;
    case QMediaRecorder::PausedState:
        pause();
        break;
    case QMediaRecorder::RecordingState:
        record();
        break;
    }
}
开发者ID:xjohncz,项目名称:qt5,代码行数:20,代码来源:audiocapturesession.cpp

示例4: now_ms

void failure_detector::register_worker( ::dsn::rpc_address target, bool is_connected)
{
    uint64_t now = now_ms();

    /*
     * callers should use the fd::_lock necessarily
     */
    worker_record record(target, now);
    record.is_alive = is_connected ? true : false;

    auto ret = _workers.insert(std::make_pair(target, record));
    if ( ret.second )
    {
        dinfo("register worker[%s] successfully", target.to_string());
    }
    else
    {
        dinfo("worker[%s] already registered", target.to_string());
    }
}
开发者ID:Jupige,项目名称:rDSN,代码行数:20,代码来源:failure_detector.cpp

示例5: QVariant

QVariant MusicModel::data(const QModelIndex& item, int role) const{
  if(role == Qt::TextAlignmentRole){
    return QVariant(Qt::AlignLeft | Qt::AlignVCenter);
  }

  int durationColIndex = record().indexOf(DataStore::getLibDurationColName());
  QVariant actualData = QSqlQueryModel::data(item, role);
  if(item.column() == durationColIndex && role == Qt::DisplayRole){
    int seconds = actualData.toInt() % 60;
    int minutes = actualData.toInt() / 60;
    QString secondsString = seconds < 10 ? "0" + QString::number(seconds) :
      QString::number(seconds);
    return QString::number(minutes) + ":" + secondsString;
  }
  else{
    return actualData;
  }


}
开发者ID:houdekk,项目名称:UDJ,代码行数:20,代码来源:MusicModel.cpp

示例6: setPoem

void ZhscWidget::selectBookmark( QString bm )
{
  BookmarkList::Iterator it;

  for ( it = bml.begin(); it != bml.end(); ++it )
  {
    if ( (*it).content == bm )
    {
      sDynastyNo = (*it).dynastyno;
      sPoetNo = (*it).poetno;
      sPoemNo = (*it).poemno;

      setPoem();

      record();

      return;
    }
  }
}
开发者ID:liangqi,项目名称:zhsc-qt,代码行数:20,代码来源:zhscwidget.cpp

示例7: DEFINE_STATIC_LOCAL

void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, const String& type, const String& frameId)
{
    DEFINE_STATIC_LOCAL(String, program, (TimelineRecordType::Program));

    RefPtr<InspectorObject> record(prpRecord);
    record->setString("type", type);
    if (!frameId.isEmpty())
        record->setString("frameId", frameId);
    if (type != program)
        setHeapSizeStatistics(record.get());

    if (m_recordStack.isEmpty()) {
        // FIXME: runtimeCast is a hack. We do it because we can't build TimelineEvent directly now.
        RefPtr<TypeBuilder::Timeline::TimelineEvent> recordChecked = TypeBuilder::Timeline::TimelineEvent::runtimeCast(record.release());
        m_frontend->eventRecorded(recordChecked.release());
    } else {
        TimelineRecordEntry parent = m_recordStack.last();
        parent.children->pushObject(record.release());
    }
}
开发者ID:yoavweiss,项目名称:RespImg-WebKit,代码行数:20,代码来源:InspectorTimelineAgent.cpp

示例8: throw_if_reader

void db::add(const string & term_c, int doc_id, int freq)
{
	throw_if_reader();
	string term = term_c;
	fancy_term(term);
	auto descriptor = m_descriptors->find(term);
	if (descriptor == m_descriptors->end())
	{
		new_term(term);
	}
	descriptor = m_descriptors->find(term);
	uint cur = descriptor->second.cur;
	uint cur_in_clusters = cur - sizeof(file_header);
	//uint idx = cur_in_clusters % sizeof(cluster);
	cluster * added_cluster;
	cluster * cur_cluster = (cluster*)(((char*)m_cluster_space) + cur_in_clusters / sizeof(cluster) * sizeof(cluster));
	if (cur_cluster->cur_pos == CLUSTER_SIZE_RECORDS - 1)
	{
		//cluster is complete
		added_cluster = new_cluster();
		if (added_cluster == NULL)
		{
			add(term_c, doc_id, freq);
			return; //New file - new rules.
		}
		cur_cluster->next_cluster = ((char*)added_cluster) - m_work_file;
		//cur_in_clusters = ((char*)&(write_to->records)) - m_work_file;
	}
	term_record rec;
	rec.doc_id = doc_id;
	rec.freq = freq;
	record(cur, rec);
	descriptor->second.cur += sizeof(term_record);
	if (cur_cluster->next_cluster != (uint)(-1))
	{
		descriptor->second.cur = ((char*)&added_cluster->records) - m_work_file;
	}
	cur_cluster->cur_pos++;
	//cout << "[" << m_worker_id << "] Term " << term << " in doc " << doc_id
	//		<< " with freq " << freq << "\n";
}
开发者ID:gurux13,项目名称:clinic,代码行数:41,代码来源:db.cpp

示例9: main

void main(void) {
  char *entries[] = {"Replay", "Record", "From USB", "Halt", NULL};
  gui_text_menu_t menu;
  U8 res;

  /*
  U32 nulldata[EFC_PAGE_WORDS] = {0};
  for (res=128; res<140; res++)
    nx__efc_write_page(nulldata, res);
  */

  menu.entries = entries;
  menu.title = "Tag route";
  menu.active_mark = GUI_DEFAULT_TEXT_MARK;

  while (TRUE) {
    res = nx_gui_text_menu(menu);

    switch (res) {
      case 0:
        replay(ROUTE_FILE);
        break;
      case 1:
        record(ROUTE_FILE);
        break;
      case 2:
        usb_recv();
        break;
      case 3:
        return;
        break;
      default:
        continue;
        break;
    }

    nx_display_string("\nOk to go back");
    while (nx_avr_get_button() != BUTTON_OK);
    nx_systick_wait_ms(500);
  }
}
开发者ID:Jazzinghen,项目名称:NXoSPAM,代码行数:41,代码来源:main.c

示例10: emitMessage

void FiPage::saveSplit()
{
  QString msg = "Split %5: Id=%1 Date=%2 Comment=%3 FI=%4";

  if(mSplitId > 0)
  {
    // FIXME Right now we have no fitting addSplit() function
    mFilu->updateField("sdate", mSplitDate->text(), "split", mSplitId);
    mFilu->updateField("sratio", mRatio->text(), "split", mSplitId);
    mFilu->updateField("scomment", mSplitComment->text(), "split", mSplitId);
    mFilu->updateField("quality", Filu::ePlatinum, "split", mSplitId);

    msg = msg.arg(mSplitId)
             .arg(mSplitDate->text())
             .arg(mSplitComment->text())
             .arg(mFi->name())
             .arg(tr("updated"));
  }
  else
  {
    mSplitId = mFilu->addSplit(mSymbol->text()
                             , mSplitDate->text()
                             , mRatio->text().toDouble()
                             , mSplitComment->text()
                             , Filu::ePlatinum);

    msg = msg.arg(mSplitId)
             .arg(mSplitDate->text())
             .arg(mSplitComment->text())
             .arg(mFi->name())
             .arg(tr("added"));
  }

  emitMessage(FUNC, msg);
  record(FUNC, msg);

  int id = mSplitId; // setSplitTable() will change mSplitId
  setSplitTable();
  mSplitView->selectRowWithValue(id, 3);
  loadBars();
}
开发者ID:loh-tar,项目名称:filu,代码行数:41,代码来源:FiPage.cpp

示例11: result

int result(char fir[],int plus) //算出结果 
{
    char c,ch;
    int x,y,i = 0;
    count1 = 0;
    count2 = 0;
    push2('#');
    while( fir[i]!='#' || optr[count2-1]!='#')
    {
        c = fir[i];
        if( isdigit(c) )
        {
            push1(c-'0');
            i++;
            continue;
        }
        if( isalpha(c) )
        {
            push1(c-'a'+plus);
            i++;
            continue;
        }
        if(c == '+' || c== '-'||c=='*' || c=='('||c==')'||c=='#')
        {
            switch( record(optr[count2-1],c) )
            {
                
                case -1: push2(c); i++; break;
                case 0 : pop2(); i++; break;
                case 1 : ch = pop2();
                         y = pop1();
                         x = pop1(); 
                         push1(computer(x,y,ch));
                         break;
            }
        }
        else
            i++;
    }
return opnd[count1-1];
}
开发者ID:WLBF,项目名称:OJ,代码行数:41,代码来源:expression.cpp

示例12: plugin_finish_type

void plugin_finish_type (tree t, void *_)
{
  fprintf(code_outputfile, "finish_type(\"%s\",\n", tree_code_name[TREE_CODE(t)]);
  //  printf("check1 pointer %p\n",t);
  //  printf("check2 as long %ul\n",t);
#ifdef USE_GTK
  gtk_add_node(t,tree_code_name[TREE_CODE(t)]);
#endif
  //  printf ( "after tcname:%s\n", tree_code_name[TREE_CODE(t)]);
  //  generic_callback(t, "user_data");   
  if (t)
    {
      record(t);      
    }
  else
    {
      printf ( "no record\n");
    }
  fprintf(code_outputfile,"0),//finish_type\n");
  //gcc_report_tree_visit(t);
}
开发者ID:h4ck3rm1k3,项目名称:gcc-introspector-plugin,代码行数:21,代码来源:codegen.c

示例13: data

QVariant CustomSqlModel::data(const QModelIndex &item, int role) const
{



    if ( role == Qt::TextColorRole){
        if (!record(item.row()).value(2).toString().isEmpty())
          return Qt::black;
        else return Qt::lightGray;


    }

    if ( role == Qt::DecorationRole)
        return mIcon;




    return QSqlQueryModel::data(item,role);
}
开发者ID:embangas,项目名称:spemed,代码行数:21,代码来源:customsqlmodel.cpp

示例14: process

    int
    process(const tendrils& inputs, const tendrils& outputs)
    {
      // Only start when we do have a frame
      if (frame->empty())
        return ecto::OK;

      switch (*command)
      {
        case Record::START:
        case Record::RESUME:
          record();
          break;
        case Record::PAUSE:
          break;
        case Record::STOP:
          stop();
          break;
      }
      return ecto::OK;
    }
开发者ID:imclab,项目名称:ecto_opencv,代码行数:21,代码来源:VideoWriter.cpp

示例15: LOGI

JNIEXPORT void JNICALL  Java_com_syouquan_script_ScriptEngine_nativeEventStartRecord
  (JNIEnv * env, jobject thiz )
{
	LOGI("---call native method---");

	if (in_record == 1)
	{
		LOGI("is in recoding");
		in_record = 0;
		return;
	}

	if (init() != 0)
	{
		printf("Init failed");
		return;
	}

	record();

}
开发者ID:WangMJ,项目名称:JIeC_Event_record_replay,代码行数:21,代码来源:record.c


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