您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ti函数代码示例

51自学网 2021-06-03 08:49:47
  C++
这篇教程C++ ti函数代码示例写得很实用,希望能帮到您。

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

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

示例1: ti

SubstitutionsSubstitutions::operator*(const Substitution &s) const{    // composition    Substitutions composition;    // iterators    ListIterator<Substitution *> ti(*psubs);    // apply substitutions    for ( ; !ti.done(); ti++)    {        Substitution newsub = (*ti())*s;        if (!newsub.isDegenerate())        {            MustBeTrue(composition.insert(newsub) == OK);        }    }    // copy any substitutions not in the original    int found = 0;    for (ti.reset() ; !ti.done(); ti++)    {        if (ti()->variable == s.variable)        {            found = 1;            break;        }    }    if (!found)    {        MustBeTrue(composition.insert(s) == OK);    }    return(composition);}
开发者ID:ombt,项目名称:ombt,代码行数:35,


示例2: tCommentTokens

static void tCommentTokens() {    TextInput::Settings settings;    settings.generateCommentTokens = true;    {        TextInput ti(TextInput::FROM_STRING, "/* comment 1 */  //comment 2", settings);        CHECK_BLOCK_COMMENT_TOKEN(ti, " comment 1 ", 1, 1);        CHECK_LINE_COMMENT_TOKEN(ti, "comment 2", 1, 18);    }    {        TextInput ti(TextInput::FROM_STRING, "/*/n comment/n 1 */  //comment 2", settings);        CHECK_BLOCK_COMMENT_TOKEN(ti, "/n comment/n 1 ", 1, 1);        CHECK_LINE_COMMENT_TOKEN(ti, "comment 2", 3, 8);    }    settings.otherCommentCharacter = '#';    settings.otherCommentCharacter2 = ';';    {        TextInput ti(TextInput::FROM_STRING, "/* comment 1 *//n;comment 2/n#comment 3  //some text", settings);        CHECK_BLOCK_COMMENT_TOKEN(ti, " comment 1 ", 1, 1);        CHECK_LINE_COMMENT_TOKEN(ti, "comment 2", 2, 1);        CHECK_LINE_COMMENT_TOKEN(ti, "comment 3  //some text", 3, 1);    }}
开发者ID:elfprince13,项目名称:G3D10,代码行数:26,


示例3: ti

int task_module::do_update_acceptable_task_list(player_obj *player, out_stream &os){  static int t_int_vect[MAX_TASK_NUM];  int add_len = 0;  int del_len = 0;  // head:add               tail:del  ilist<int> &tl = task_config::instance()->get_all_task_list();  for (ilist_node<int> *itor = tl.head();       itor != NULL;       itor = itor->next_)  {    int task_cid = itor->value_;    bool in_acpt_list = task_module::is_in_acceptable_list(player, task_cid);    const task_cfg_obj *tco = task_config::instance()->find(task_cid);    if (NULL == tco) continue;    if (!task_module::can_accept(player, tco))    {      if (in_acpt_list)      {        del_len++;        t_int_vect[MAX_TASK_NUM - del_len] = task_cid;        player->task_data_->task_acceptable_list_.remove(task_cid);      }    }else    {      if (!in_acpt_list)      {        t_int_vect[add_len] = task_cid;        add_len++;        player->task_data_->task_acceptable_list_.push_back(task_cid);      }    }  }  int total = add_len + del_len;  if (0 == total) return 0;  if (total >= 127)  {    e_log->wning("char %d update task list is too large [%d]!",                 player->id(), total);    total = 126;  }  for (int i = 0; i < add_len; ++i)  {    task_info ti(player->id(), t_int_vect[i], TASK_ST_ACCEPTABLE);    task_module::do_fetch_task_info(player, TASK_ADD, &ti, os);  }  for (int i = MAX_TASK_NUM - del_len; i < MAX_TASK_NUM; ++i)  {    task_info ti(player->id(), t_int_vect[i], TASK_ST_ACCEPTABLE);    task_module::do_fetch_task_info(player, TASK_DEL, &ti, os);  }  return total;}
开发者ID:chenbk85,项目名称:gserver,代码行数:57,


示例4: timer

voidGenericRWLockImpl<IdT, CompareT>::acquireReadLock(const IdT id, const Timeout& timeout){	TimeoutTimer timer(timeout);	NonRecursiveMutexLock l(m_guard);	typename IdMap::iterator info = m_lockerInfo.find(id);	if (info != m_lockerInfo.end())	{		LockerInfo& ti(info->second);		// id already have a read or write lock, so just increment.		BLOCXX_ASSERT(ti.isReader() || ti.isWriter());		++ti.readCount;		return;	}	// id is a new reader	while (!m_canRead || m_numWriters > 0)	{		if (!m_waiting_readers.timedWait(l, timer.asAbsoluteTimeout()))		{			BLOCXX_THROW(TimeoutException, "Timeout while waiting for read lock.");		}	}	// Increase the reader count	LockerInfo lockerInfo;	lockerInfo.readCount = 1;	lockerInfo.writeCount = 0;	m_lockerInfo.insert(typename IdMap::value_type(id, lockerInfo));	++m_numReaders;}
开发者ID:besser82,项目名称:libblocxx-deb,代码行数:34,


示例5: return

bool LLNotificationsListener::Forwarder::matchType(const LLSD& filter, const std::string& type) const{    // Decide whether this notification matches filter:    // undefined: forward all notifications    if (filter.isUndefined())    {        return true;    }    // array of string: forward any notification matching any named type    if (filter.isArray())    {        for (LLSD::array_const_iterator ti(filter.beginArray()), tend(filter.endArray());             ti != tend; ++ti)        {            if (ti->asString() == type)            {                return true;            }        }        // Didn't match any entry in the array        return false;    }    // string: forward only the specific named type    return (filter.asString() == type);}
开发者ID:Katharine,项目名称:kittyviewer,代码行数:25,


示例6: ti

void GPUProgram::BindingTable::parse(const std::string& code) {    bindingArray.resize(0);    TextInput ti(TextInput::FROM_STRING, code);        while (ti.hasMore()) {        Token t = ti.read();        // Scan for "#"        while (! symbolMatch(t, "#") && ti.hasMore()) {            t = ti.read();        }            if (ti.hasMore()) {            // Read the comment line            Token t = ti.peek();            if (t.type() == Token::SYMBOL) {                ti.readSymbol();                if (t.string() == "var") {                    parseVariable(ti);                } else if (t.string() == "const") {                                        parseConstant(ti);                }            }        }    }}
开发者ID:luaman,项目名称:g3d-cpp,代码行数:30,


示例7: os

//== do_xx methodint task_module::do_send_task_list_2_client(player_obj *player){  out_stream os(client::send_buf, client::send_buf_len);  char *cnt_ptr = os.wr_ptr();  *cnt_ptr = 0;  os << (char)0;  task_info_map_itor itor = player->task_data_->task_info_map_.begin();  for (int n = 0;       itor != player->task_data_->task_info_map_.end() && n < 127;       ++itor, ++n)  {    task_module::do_fetch_task_info(player, TASK_ADD, itor->second, os);    (*cnt_ptr)++;  }  ilist_node<int> *acpt_itor = player->task_data_->task_acceptable_list_.head();  for (; acpt_itor != NULL; acpt_itor = acpt_itor->next_)  {    task_info ti(player->id(), acpt_itor->value_, TASK_ST_ACCEPTABLE);    task_module::do_fetch_task_info(player, TASK_ADD, &ti, os);    (*cnt_ptr)++;   }  return player->send_respond_ok(NTF_TASK_UPDATE, &os);}
开发者ID:chenbk85,项目名称:gserver,代码行数:26,


示例8: ti

  void volume_file_info::calcMinMax(unsigned int var, unsigned int time) const  {    thread_info ti(BOOST_CURRENT_FUNCTION);    volume vol;    const uint64 maxdim = 128; //read in 128^3 chunks    for(unsigned int off_z = 0; off_z < ZDim(); off_z+=maxdim)      for(unsigned int off_y = 0; off_y < YDim(); off_y+=maxdim)	for(unsigned int off_x = 0; off_x < XDim(); off_x+=maxdim)	  {	    dimension read_dim(std::min(XDim()-off_x,maxdim),			       std::min(YDim()-off_y,maxdim),			       std::min(ZDim()-off_z,maxdim));	    readVolumeFile(vol,filename(),var,time,			   off_x,off_y,off_z,read_dim);	    if(off_x==0 && off_y==0 && off_z==0)	      {		_data._min[var][time] = vol.min();		_data._max[var][time] = vol.max();	      }	    else	      {		if(_data._min[var][time] > vol.min())		  _data._min[var][time] = vol.min();		if(_data._max[var][time] < vol.max())		  _data._max[var][time] = vol.max();	      }	  }    _data._minIsSet[var][time] = true;    _data._maxIsSet[var][time] = true;  }
开发者ID:transfix,项目名称:trans-cvc,代码行数:32,


示例9: ti

/* static */void wxToolTip::UpdateVisibility(){    wxToolInfo ti(NULL, 0, wxRect());    ti.uFlags = 0;    if ( !SendTooltipMessage(ms_hwndTT, TTM_GETCURRENTTOOL, &ti) )        return;    wxWindow* const associatedWindow = wxFindWinFromHandle(ti.hwnd);    if ( !associatedWindow )        return;    bool hideTT = false;    if ( !associatedWindow->IsShownOnScreen() )    {        // If the associated window or its parent is hidden, the tooltip        // shouldn't remain shown.        hideTT = true;    }    else    {        // Even if it's not hidden, it could also be iconized.        wxTopLevelWindow* const            frame = wxDynamicCast(wxGetTopLevelParent(associatedWindow), wxTopLevelWindow);        if ( frame && frame->IsIconized() )            hideTT = true;    }    if ( hideTT )        ::ShowWindow(ms_hwndTT, SW_HIDE);}
开发者ID:Asmodean-,项目名称:Ishiiruka,代码行数:33,


示例10: finishTask

void Step::        finishTask(Step::ptr step, int taskid, pBuffer result){    Interval result_interval;    if (result)        result_interval = result->getInterval ();    TASKINFO TaskInfo ti(format("Step::finishTask %2% on %1%")              % step.raw ()->operation_name()              % result_interval);    if (result) {        // Result must have the same number of channels and sample rate as previous cache.        // Call deprecateCache(Interval::Interval_ALL) to erase the cache when chainging number of channels or sample rate.        step.raw ()->cache_->put (result);    }    auto self = step.write ();    int matched_task = self->running_tasks.count (taskid);    if (1 != matched_task) {        Log("C = %d, taskid = %x on %s") % matched_task % taskid % self->operation_name ();        EXCEPTION_ASSERT_EQUALS( 1, matched_task );    }    Intervals expected_output = self->running_tasks[ taskid ];    Intervals update_miss = expected_output - result_interval;    self->not_started_ |= update_miss;    if (!result) {        TASKINFO TaskInfo(format("The task was cancelled. Restoring %1% for %2%")                 % update_miss                 % self->operation_name());    } else {        if (update_miss) {            TaskInfo(format("These samples were supposed to be updated by the task but missed: %1% by %2%")                     % update_miss                     % self->operation_name());        }        if (result_interval - expected_output) {            // These samples were not supposed to be updated by the task but were calculated anyway            TaskInfo(format("Unexpected extras: %1% = (%2%) - (%3%) from %4%")                     % (result_interval - expected_output)                     % result_interval                     % expected_output                     % self->operation_name());            // The samples are still marked as invalid. Would need to remove the            // extra calculated samples from not_started_ but that would fail            // in a situation where deprecatedCache is called after the task has            // been created. So not_started_ can't be modified here (unless calls            // to deprecatedCache were tracked).        }    }    self->running_tasks.erase ( taskid );    self.unlock ();    step.raw ()->wait_for_tasks_.notify_all ();}
开发者ID:davidhesselbom,项目名称:freq,代码行数:60,


示例11: main

void main(){ThreadedTree t;t.setup();ThreadedInorderIterator ti(t);ti.Inorder();}
开发者ID:ChenBoTang,项目名称:fds,代码行数:7,


示例12: DoCleanup

void DoCleanup( void ){	int num_threads = 0, num_processes = 0;	char process_name[1024];	for ( PROCESS_ITER pi(Processes); pi; pi.Next() )	{		PROCESS *p = pi;		if (p->IsSignalled())			continue;		num_processes++;		fprintf(stderr, "process %04lx ", p->Id);		if (p->Exe)		{			//fprintf(stderr, "%ws/n",  (((PE_SECTION *)(p->Exe))->ImageFileName).Buffer);			SPrintUnicodeString(process_name, 1024, &(((PE_SECTION *)(p->Exe))->ImageFileName));			fprintf(stderr, "%s/n", process_name);		}		else			fprintf(stderr, "noname/n");		for ( SIBLING_ITER ti(p->Threads); ti; ti.Next() )		{			THREAD *t = ti;			if (t->IsSignalled())				continue;			fprintf(stderr, "/tthread %04lx/n", t->TraceId());			num_threads++;		}	}	if (num_threads || num_processes)		fprintf(stderr, "%d threads %d processes left/n", num_threads, num_processes);}
开发者ID:bragin,项目名称:ring3k,代码行数:33,


示例13: replyFinished

void SendFeedbackDialog::        replyFinished(QNetworkReply* reply){    QString s = reply->readAll();    TaskInfo ti("SendFeedback reply");    TaskInfo("%s", s.replace("//r//n","/n").replace("/r","").toStdString().c_str());    if (QNetworkReply::NoError != reply->error())    {        TaskInfo("SendFeedback error=%s (code %d)",                 QNetworkReply::NoError == reply->error()?"no error":reply->errorString().toStdString().c_str(),                 (int)reply->error());    }    if (QNetworkReply::NoError != reply->error())        QMessageBox::warning(dynamic_cast<QWidget*>(parent()), "Could not send feedback", reply->errorString() + "/n" + s);    else if (s.contains("sorry", Qt::CaseInsensitive) ||             s.contains("error", Qt::CaseInsensitive) ||             s.contains("fatal", Qt::CaseInsensitive) ||             s.contains("fail", Qt::CaseInsensitive) ||             s.contains("html", Qt::CaseInsensitive) ||             !s.contains("sendfeedback finished", Qt::CaseInsensitive))    {        QMessageBox::warning(dynamic_cast<QWidget*>(parent()), "Could not send feedback", s);    }    else    {        QDialog::accept();        QMessageBox::information(dynamic_cast<QWidget*>(parent()), "Feedback", "Your input has been sent. Thank you!");        ui->textEditMessage->setText ("");        ui->lineEditAttachFile->setText ("");    }    setEnabled( true );}
开发者ID:aveminus,项目名称:freq,代码行数:34,


示例14: assert

void ToonzImageData::getData(TRasterP &copiedRaster, double &dpiX, double &dpiY,							 std::vector<TRectD> &rects, std::vector<TStroke> &strokes, std::vector<TStroke> &originalStrokes,							 TAffine &transformation, TPalette *targetPalette) const{	if (!m_copiedRaster || (m_rects.empty() && m_strokes.empty()))		return;	copiedRaster = m_copiedRaster->clone();	dpiX = m_dpiX;	dpiY = m_dpiY;	assert(m_palette);	int i;	for (i = 0; i < (int)m_rects.size(); i++)		rects.push_back(m_rects[i]);	for (i = 0; i < (int)m_strokes.size(); i++)		strokes.push_back(m_strokes[i]);	for (i = 0; i < (int)m_originalStrokes.size(); i++)		originalStrokes.push_back(m_originalStrokes[i]);	transformation = m_transformation;	TRasterCM32P cmRas = copiedRaster;	if (!targetPalette)		targetPalette = new TPalette();	if (!cmRas)		return;	std::set<int> usedStyles(m_usedStyles);	TToonzImageP ti(cmRas, cmRas->getBounds());	if (usedStyles.size() == 0)		ToonzImageUtils::getUsedStyles(usedStyles, ti);	std::map<int, int> indexTable;	mergePalette(targetPalette, indexTable, m_palette, usedStyles);	ToonzImageUtils::scrambleStyles(ti, indexTable);	ti->setPalette(m_palette.getPointer());}
开发者ID:CroW-CZ,项目名称:opentoonz,代码行数:35,


示例15: draw

void TooltipView::        draw(){    if (!model_->comment)        return;    if (!initialized)        initialize();    //if (visible)    {        drawMarkers();        if (model_->automarking == TooltipModel::AutoMarkerWorking)        {            TaskInfo ti("TooltipView doesn't have all data yet");            std::string prev_html = model_->comment->html();            model_->showToolTip( model_->pos() );            std::string html = model_->comment->html();            if (model_->automarking != TooltipModel::AutoMarkerWorking)                TaskInfo("TooltipView just finished/n%s", html.c_str());            else if(html != prev_html)                TaskInfo("Changed tooltip/n%s", html.c_str());            render_view_->redraw();            emit tooltipChanged();        }    }}
开发者ID:aveminus,项目名称:freq,代码行数:33,


示例16: r_ti

voidr_ti(int argc, Rune **argv){	USED(argc);	br();	ti(evalscale(argv[1], 'm'));}
开发者ID:00001,项目名称:plan9port,代码行数:7,


示例17: PostLoad

  //  // Obj::PostLoad  //  // Post Load the Obj  //  void Obj::PostLoad()  {    // Resolve tag specific location messages    for (BinTree<Location>::Iterator gi(&tags); *gi; gi++)    {      (*gi)->PostLoad();    }    // Resovle type specific location messages    for (BinTree<Location>::Iterator ti(&types); *ti; ti++)    {      (*ti)->PostLoad();    }    // Resolve category specific location messages    for (List<PropertyLocation>::Iterator pi(&properties); *pi; pi++)    {      (*pi)->PostLoad();    }    // Resolve default location (if there is one)    if (defaultLocation)    {      defaultLocation->PostLoad();    }  }
开发者ID:grasmanek94,项目名称:darkreign2,代码行数:31,


示例18: test_specialize_transforms_ivars_to_slots

  void test_specialize_transforms_ivars_to_slots() {    CompiledMethod* cm = CompiledMethod::create(state);    Tuple* tup = Tuple::from(state, 1, state->symbol("@blah"));    cm->literals(state, tup);    InstructionSequence* iseq = InstructionSequence::create(state, 3);    iseq->opcodes()->put(state, 0, Fixnum::from(InstructionSequence::insn_push_ivar));    iseq->opcodes()->put(state, 1, Fixnum::from(0));    iseq->opcodes()->put(state, 2, Fixnum::from(InstructionSequence::insn_push_nil));    cm->iseq(state, iseq);    VMMethod* vmm = new VMMethod(state, cm);    Object::Info ti(ObjectType);    ti.slots[state->symbol("@blah")->index()] = 5;    ti.slot_locations.resize(6);    ti.slot_locations[5] = 33;    vmm->specialize(state, cm, &ti);    TS_ASSERT_EQUALS(vmm->total, 3U);    TS_ASSERT_EQUALS(vmm->opcodes[0], static_cast<unsigned int>(InstructionSequence::insn_push_my_offset));    TS_ASSERT_EQUALS(vmm->opcodes[1], 33U);    TS_ASSERT_EQUALS(vmm->opcodes[2], static_cast<unsigned int>(InstructionSequence::insn_push_nil));  }
开发者ID:jefflembeck,项目名称:rubinius,代码行数:25,


示例19: tfunc1

static void tfunc1() {    // Basic line number checking test.  Formerly would skip over line    // numbers (i.e., report 1, 3, 5, 7 as the lines for the tokens), because    // the newline would be consumed, pushed back to the input stream, then    // consumed again (reincrementing the line number.)    {        TextInput ti(TextInput::FROM_STRING, "foo/nbar/nbaz/n");        CHECK_SYM_TOKEN(ti, "foo", 1, 1);        CHECK_SYM_TOKEN(ti, "bar", 2, 1);        CHECK_SYM_TOKEN(ti, "baz", 3, 1);        CHECK_END_TOKEN(ti,        4, 1);    }	    CHECK_ONE_SPECIAL_SYM("@");    CHECK_ONE_SPECIAL_SYM("(");    CHECK_ONE_SPECIAL_SYM(")");    CHECK_ONE_SPECIAL_SYM(",");    CHECK_ONE_SPECIAL_SYM(";");    CHECK_ONE_SPECIAL_SYM("{");    CHECK_ONE_SPECIAL_SYM("}");    CHECK_ONE_SPECIAL_SYM("[");    CHECK_ONE_SPECIAL_SYM("]");    CHECK_ONE_SPECIAL_SYM("#");    CHECK_ONE_SPECIAL_SYM("$");    CHECK_ONE_SPECIAL_SYM("?");}
开发者ID:elfprince13,项目名称:G3D10,代码行数:26,


示例20: ti

bool GlobePicker::_intersectBound(iiMath::bound b, int recLevel, iiMath::matrix4 &modelMat){	bool ret = false;	iiMath::bound bc;	PatchIdentity d;	Utils::boundingBoxToPatch(b, d);	double elev = 0;		if(globeConfig::instance()->isUseElev())	{		TextureInterpolator ti( d );		elev = ti.sample(0.5,0.5);	}	iiMath::vec3 n = Utils::WGS84_to_Cartesian( iiMath::vec3(b.center().y(), b.center().x(), elev) );	iiMath::vec3 v = n * (_R * _T);	iiMath::vec3 n1 = Utils::WGS84_to_Cartesian( iiMath::vec3(b.center().y() + b.radius(), b.center().x() + b.radius(), elev) );	iiMath::vec3 v1 = n1 * (_R * _T);	bc.set( v.v, (v-v1).length() );	iiMath::bound bb = calcNewBound(bc, modelMat);	if (intersect(bb))	{		if(recLevel > 8)		{			double latc = b.center().y();			double lngc = b.center().x();			if(lastHit.lat==0)				lastHit.lat = latc;			else				lastHit.lat = (lastHit.lat + latc) / 2.0;			if(lastHit.lng==0)				lastHit.lng = lngc;			else				lastHit.lng = (lastHit.lng + lngc) / 2.0;			return true;		}		iiMath::bound b0, b1, b2, b3;		double radius2 = (b.radius()/2.0) * 1.4;		b0.set(iiMath::vec3(b.center().x()-radius2, b.center().y()-radius2, elev), radius2);		b1.set(iiMath::vec3(b.center().x()+radius2, b.center().y()-radius2, elev), radius2);		b2.set(iiMath::vec3(b.center().x()-radius2, b.center().y()+radius2, elev), radius2);		b3.set(iiMath::vec3(b.center().x()+radius2, b.center().y()+radius2, elev), radius2);		int nextLevel = recLevel+1;		bool r0, r1, r2, r3;		r0 = _intersectBound(b0, nextLevel, modelMat);		r1 = _intersectBound(b1, nextLevel, modelMat);		r2 = _intersectBound(b2, nextLevel, modelMat);		r3 = _intersectBound(b3, nextLevel, modelMat);		ret = (r0 || r1 || r2 || r3);	}	return ret;}
开发者ID:gfbipnet,项目名称:amigoclient,代码行数:60,


示例21: QDialog

ExportAudioDialog::ExportAudioDialog(        Sawe::Project* project,        SelectionModel* selection_model,        RenderView* render_view        )            :    QDialog(project->mainWindow()),    ui(new Ui::ExportAudioDialog),    project(project),    selection_model(selection_model),    render_view(render_view),    total(0),    drawnFinished_(false){    EXCEPTION_ASSERTX(false, "not implemented: exportTarget");    TaskInfo ti("ExportAudioDialog");    ui->setupUi(this);    update_timer.setSingleShot( true );    update_timer.setInterval( 100 );    connect( &update_timer, SIGNAL( timeout() ), SLOT( callUpdate() ) );    setupGui();}
开发者ID:aveminus,项目名称:freq,代码行数:25,


示例22: runTests

//..// Now, we write a test function, 'runTest', to verify our simple wrapper// type.  We start by wrapping a simple 'int' value://..    void runTests()    {        int i = 42;        Wrapper<int> ti(i);  const Wrapper<int>& TI = ti;        ASSERT(42 == i);        ASSERT(42 == TI.value());        ti.value() = 13;        ASSERT(42 == i);        ASSERT(13 == TI.value());//..// Finally, we test 'Wrapper' with a reference type://..        Wrapper<int&> tr(i);  const Wrapper<int&>& TR = tr;        ASSERT(42 == i);        ASSERT(42 == TR.value());        tr.value() = 13;        ASSERT(13 == i);        ASSERT(13 == TR.value());        i = 42;        ASSERT(42 == i);        ASSERT(42 == TR.value());    }
开发者ID:AlexTalks,项目名称:bde,代码行数:30,


示例23: GetClientRect

void      TUrlLink::SetTooltip(TTooltip* tooltip){  // Cleanup; via Condemned list if tooltip was created  //  if (Tooltip) {    if (Tooltip->GetHandle())      Tooltip->SendMessage(WM_CLOSE);    else      delete Tooltip;  }  // Store new tooltip and create if necessary  //  Tooltip = tooltip;  if (Tooltip) {    if(GetHandle() && !Tooltip->GetHandle()) {      // Make sure tooltip is disabled so it does not take input focus      Tooltip->ModifyStyle(0,WS_DISABLED);      Tooltip->Create();      TRect rect;       GetClientRect(rect);      TToolInfo ti(*this, rect, TOOLTIP_ID);      ti.SetText(UrlAddress.c_str());      Tooltip->AddTool(ti);    }  }}
开发者ID:Meridian59,项目名称:Meridian59,代码行数:28,


示例24: exec

void SaweTestClass::        exec(){    TaskTimer ti("%s::%s", vartype(*this).c_str(), __FUNCTION__, NULL);    Sawe::Application::global_ptr()->exec();}
开发者ID:gustafsson,项目名称:freq-integration,代码行数:7,


示例25: btTriangleMesh

btCollisionShape* VRPhysics::getConcaveShape() {    btTriangleMesh* tri_mesh = new btTriangleMesh();    vector<OSG::VRObject*> geos = vr_obj->getObjectListByType("Geometry");    int N = 0;	for (unsigned int j = 0; j<geos.size(); j++) {        OSG::VRGeometry* geo = (OSG::VRGeometry*)geos[j];        if (geo == 0) continue;        if (geo->getMesh() == 0) continue;        OSG::TriangleIterator ti(geo->getMesh());        btVector3 vertexPos[3];        while(!ti.isAtEnd()) {            for (int i=0;i<3;i++) {                OSG::Pnt3f p = ti.getPosition(i);                for (int j=0;j<3;j++) vertexPos[i][j] = p[j];            }            tri_mesh->addTriangle(vertexPos[0]*scale[0], vertexPos[1]*scale[1], vertexPos[2]*scale[2]);            ++ti;            N++;        }    }    if (N == 0) return 0;    //cout << "/nConstruct Concave shape for " << vr_obj->getName() << endl;    btBvhTriangleMeshShape* shape = new btBvhTriangleMeshShape(tri_mesh, true);    return shape;}
开发者ID:AntonChalakov,项目名称:polyvr,代码行数:30,


示例26: ti

boolTempo_Point::edit ( float *tempo ){    Tempo_Point_Editor ti( tempo );    return ti.sucess();}
开发者ID:0mk,项目名称:non,代码行数:7,


示例27: ti

void ExternalAligner::read_alignment(Strings& rows,                                     const std::string& file) const {    TimeIncrementer ti(this);    boost::shared_ptr<std::istream> aligned = name_to_istream(file);    AlignmentReader reader(rows, *aligned);    reader.read_all_sequences();}
开发者ID:npge,项目名称:npge,代码行数:7,


示例28: getchar

void Sphere::readInUnitSphere(){	ifstream file;	file.open("data/objects/sphere.tri");	if(!file.is_open()){		cout<<"Cannot read in data/objects/sphere.tri!/n"<<flush;		getchar();	}	int nPoint;	file >> nPoint;	for(int i = 0; i < nPoint; i++){		double x,y,z;		file >> x;		file >> y;		file >> z;		MyPoint3D p(x,y,z);		points.push_back(p);	}	int nIndex;	file >> nIndex;	for(int i = 0; i < nIndex; i++){		int i0,i1,i2;		file >> i0;		file >> i1;		file >> i2;		TriFaceIndex ti(i0,i1,i2);		indexes.push_back(ti);	}	file.close();}
开发者ID:RGrant92,项目名称:Klampt,代码行数:29,


示例29: layoutAboutToBeChanged

void DataFilesModel::sort(int column, Qt::SortOrder order){    // TODO: Make this more efficient    emit layoutAboutToBeChanged();    QList<EsmFile *> sortedFiles;    QMultiMap<QString, QString> timestamps;    foreach (EsmFile *file, mFiles)        timestamps.insert(file->modified().toString(Qt::ISODate), file->fileName());    QMapIterator<QString, QString> ti(timestamps);    while (ti.hasNext()) {        ti.next();        QModelIndex index = indexFromItem(findItem(ti.value()));        if (!index.isValid())            continue;        EsmFile *file = item(index.row());        if (!file)            continue;        sortedFiles.append(file);    }    mFiles.clear();    mFiles = sortedFiles;    emit layoutChanged();}
开发者ID:JordanMilne,项目名称:openmw,代码行数:35,



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


C++ tic函数代码示例
C++ throw_wrong_arguments_nr函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。