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

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

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

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

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

示例1: getQuery

void FindSequenceDialog::sequenceSearch ( bool invers )    {    bool cont = true ;    int a ;    wxString sub = getQuery() ;    p = 0 ;    if ( sub.IsEmpty() ) return ;    // Preparing sequence        wxString s = c->vec->getSequence() ;    if ( invers ) { s = c->vec->transformSequence ( true , true ) ; }    if ( c->vec->isCircular() )        {        wxString t ;        t = s ;        while ( t.length() < sub.length() ) t += _T(" ") ;        s += t.substr ( 0 , sub.length()-1 ) ;        }            while ( cont )        {        // Now we search...        a = subsearch ( s , sub , p ) ;        if ( a > -1 )            {            if ( lb->GetCount() > FIND_MAX ) return ;            p = a+1 ;            int from = a + 1 ;            int to = last + 1 ;            if ( to > c->vec->getSequenceLength() ) to -= c->vec->getSequenceLength() ;            wxString msg ;            if ( invers )               {               msg = _T(" (3'->5')") ;               int nt = c->vec->getSequenceLength() - from + 1 ;               int nf = c->vec->getSequenceLength() - to + 1 ;               from = nf ;               to = nt ;               }                lb->Append ( wxString::Format ( _T("%s: %d-%d%s") , txt("sequence").c_str() , from , to , msg.c_str() ) ) ;            vi.Add ( -1 ) ;            }        else            {            cont = false ;            }        }        }
开发者ID:magnusmanske,项目名称:gentle-m,代码行数:49,


示例2: while

bool TablatureDurationFont::read(XmlReader& e)      {      while (e.readNextStartElement()) {            const QStringRef& tag(e.name());            if (tag == "family")                  family = e.readElementText();            else if (tag == "displayName")                  displayName = e.readElementText();            else if (tag == "defaultPitch")                  defPitch = e.readDouble();            else if (tag == "duration") {                  QString val = e.attribute("value");                  QString txt(e.readElementText());                  QChar chr = txt[0];                  if (val == "longa")                        displayValue[TAB_VAL_LONGA] = chr;                  else if (val == "brevis")                        displayValue[TAB_VAL_BREVIS] = chr;                  else if (val == "semibrevis")                        displayValue[TAB_VAL_SEMIBREVIS] = chr;                  else if (val == "minima")                        displayValue[TAB_VAL_MINIMA] = chr;                  else if (val == "semiminima")                        displayValue[TAB_VAL_SEMIMINIMA] = chr;                  else if (val == "fusa")                        displayValue[TAB_VAL_FUSA] = chr;                  else if (val == "semifusa")                        displayValue[TAB_VAL_SEMIFUSA] = chr;                  else if (val == "32")                        displayValue[TAB_VAL_32] = chr;                  else if (val == "64")                        displayValue[TAB_VAL_64] = chr;                  else if (val == "128")                        displayValue[TAB_VAL_128] = chr;                  else if (val == "256")                        displayValue[TAB_VAL_256] = chr;                  else if (val == "dot")                        displayDot = chr;                  else                        e.unknown();                  }            else {                  e.unknown();                  return false;                  }            }      return true;      }
开发者ID:cymerio,项目名称:MuseScore,代码行数:49,


示例3: txt

/** * Called if window is hidden when it recieves a message. * Displays the message in a ballon-popup in the tray. * Also sets tray icon to be red, to indicate an unread message. * @brief MainWindow::displayTrayMsg * @param index Tabindex * @param text "{sender_name}|{message}" */void MainWindow::displayTrayMsg(int index, const QString& text){    lastUpdatedTab = index;    if(ui->actionBalloon_Notification->isChecked())    {        QStringList lst = text.split("|", QString::SkipEmptyParts);        if(lst.count() > 1)        {            QStringRef txt(&lst.at(1), 0, lst.at(1).length());            if(lst.at(1).length() > 20) txt = QStringRef(&lst.at(1), 0, 20);            trayIcon->showMessage(lst.at(0) + " says:", txt.toString());        }    }    trayIcon->setIcon(QIcon(APPLICATION_ICON_RED));}
开发者ID:s176251,项目名称:cpp_prosjekt_2014,代码行数:23,


示例4: ReadElement

      /// <summary>Reads a string tag</summary>      /// <param name="element">String 't' element</param>      /// <param name="page">Containing page</param>      /// <param name="v">Version of page</param>      /// <returns>New language string</returns>      /// <exception cref="Logic::FileFormatException">Missing element or attributes</exception>      /// <exception cref="Logic::ComException">COM Error</exception>      LanguageString  LanguageFileReader::ReadString(XmlNodePtr&  element, LanguagePage& page, GameVersion v)      {         // Verify string tag         ReadElement(element, L"t");         // Get text         wstring txt((WCHAR*)element->text);         // Convert octal addition entities         for (auto pos = txt.find(L"//053"); pos != wstring::npos; pos = txt.find(L"//053"))            txt.replace(pos, 4, L"+");         // Read ID+text         return LanguageString(_wtoi(ReadAttribute(element, L"id").c_str()), page.ID, txt, v);      }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:22,


示例5: fi

void QFEHelpEditorWidget::on_btnExecute_clicked(){    QFTemporaryFile f;    QFileInfo fi(currentScript);    if (QFile::exists(currentScript)) {        f.setFileTemplate(fi.absolutePath()+"/qfe_helpeditor_temp_XXXXXX.html.tmp");    }    if (f.open()) {        QTextStream txt(&f);        txt<<ui->edtScript->getEditor()->toPlainText();        f.close();        QFPluginServices::getInstance()->displayHelpWindow(f.fileName());    }}
开发者ID:jkriege2,项目名称:QuickFit3,代码行数:15,


示例6: f

void Recorder::writeLog(QString str){	//write to txt	QFile f("log.txt");	if (!f.open(QIODevice::WriteOnly | QIODevice::Text))	{		qDebug("Open Failed.");		return;	}	QTextStream txt(&f);	txt << str;	f.close();}
开发者ID:ming-hai,项目名称:EgoFinger.HCII.SCUT,代码行数:15,


示例7: txt

void urdfLink::verifyInertia(){	float c=0.0f;	for (int i=0;i<9;i++)		c+=fabs(inertia[i]);	if (c==0.0f)	{		std::string txt("ERROR: found an invalid inertia entry for link '"+ name+"'");		printToConsole(txt.c_str());		inertia[0]=0.001f;		inertia[4]=0.001f;		inertia[8]=0.001f;	}}
开发者ID:RhobanProject,项目名称:Vrep,代码行数:15,


示例8: txt

void tst_QTextBoundaryFinder::isAtWordStart(){    QString txt("The quick brown fox jumped over $the lazy. dog  I win!");    QList<int> start, end;    start << 0 << 4 << 10 << 16 << 20 << 27 << 32 << 33 << 37 << 41 << 43 << 48 << 50 << 53;    end << 3 << 9 << 15 << 19 << 26 << 31 << 33 << 36 << 41 << 42 << 46 << 49 << 53 << 54;    QTextBoundaryFinder finder(QTextBoundaryFinder::Word, txt);    for(int i=0; i < txt.length(); ++i) {        finder.setPosition(i);        QTextBoundaryFinder::BoundaryReasons r = finder.boundaryReasons();        // qDebug() << i << r;        QCOMPARE((r & QTextBoundaryFinder::StartWord) != 0, start.contains(i) == true);        QCOMPARE((r & QTextBoundaryFinder::EndWord) != 0, end.contains(i) == true);    }}
开发者ID:tsuibin,项目名称:emscripten-qt,代码行数:15,


示例9: facRoText

JSBool facRoText(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){          diaElemReadOnlyText txt("blah blah","Value:");            diaElem *elems[]={&txt   };  if(diaFactoryRun("Test FileRead",1,elems))  {    *rval = BOOLEAN_TO_JSVAL(1);      }else    *rval = BOOLEAN_TO_JSVAL(0);    return JS_TRUE;}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:15,


示例10: Dialog_GetPassword_Proc

static INT_PTR CALLBACK Dialog_GetPassword_Proc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam){    Dialog_GetPassword_Data *data;//[ ACCESSKEY_GROUP Password Dialog    if (WM_INITDIALOG == msg)    {        data = (Dialog_GetPassword_Data*)lParam;        win::SetText(hDlg, _TR("Enter password"));        SetWindowLongPtr(hDlg, GWLP_USERDATA, (LONG_PTR)data);        EnableWindow(GetDlgItem(hDlg, IDC_REMEMBER_PASSWORD), data->remember != NULL);        ScopedMem<WCHAR> txt(str::Format(_TR("Enter password for %s"), data->fileName));        SetDlgItemText(hDlg, IDC_GET_PASSWORD_LABEL, txt);        SetDlgItemText(hDlg, IDC_GET_PASSWORD_EDIT, L"");        SetDlgItemText(hDlg, IDC_STATIC, _TR("&Password:"));        SetDlgItemText(hDlg, IDC_REMEMBER_PASSWORD, _TR("&Remember the password for this document"));        SetDlgItemText(hDlg, IDOK, _TR("OK"));        SetDlgItemText(hDlg, IDCANCEL, _TR("Cancel"));        CenterDialog(hDlg);        SetFocus(GetDlgItem(hDlg, IDC_GET_PASSWORD_EDIT));        return FALSE;    }//] ACCESSKEY_GROUP Password Dialog    switch (msg)    {        case WM_COMMAND:            switch (LOWORD(wParam))            {                case IDOK:                    data = (Dialog_GetPassword_Data*)GetWindowLongPtr(hDlg, GWLP_USERDATA);                    assert(data);                    data->pwdOut = win::GetText(GetDlgItem(hDlg, IDC_GET_PASSWORD_EDIT));                    if (data->remember)                        *data->remember = BST_CHECKED == IsDlgButtonChecked(hDlg, IDC_REMEMBER_PASSWORD);                    EndDialog(hDlg, IDOK);                    return TRUE;                case IDCANCEL:                    EndDialog(hDlg, IDCANCEL);                    return TRUE;            }            break;    }    return FALSE;}
开发者ID:BianChengNan,项目名称:sumatrapdf,代码行数:48,


示例11: txt

void Client::commandStat(const std::string &arg){  if (this->user_ != NULL)    {      std::string txt(this->MailsInfo(this->user_->getName()));      this->response_.setCode("+Ok");      this->response_.setText(txt);      this->request_.resetRequest();    }  else    {      this->response_.setCode("-Err");      this->response_.setText("Permission denied");      this->request_.resetRequest();    }}
开发者ID:Rouxteur,项目名称:zouzouland,代码行数:16,


示例12: facText

JSBool facText(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){          char *foo=ADM_strdup("blah");      diaElemText txt(&foo,"Text",NULL);            diaElem *elems[]={&txt   };  if(diaFactoryRun("Test FileRead",1,elems))  {    *rval = BOOLEAN_TO_JSVAL(1);      }else    *rval = BOOLEAN_TO_JSVAL(0);    return JS_TRUE;}
开发者ID:BackupTheBerlios,项目名称:avidemux-svn,代码行数:16,


示例13: txt

bool		TextureManager::LoadTextureFromFile(const char *file){  std::ifstream	txt(file);  std::string	line;  std::string	name;  std::string	path;  while (getline(txt, line))    {      std::istringstream	ss(line);      getline(ss, name, ':');      getline(ss, path, '/n');      LoadTexture(name, path);    }  return (true);}
开发者ID:Titaneman,项目名称:Zappy,代码行数:16,


示例14: draw_chip_count

 void draw_chip_count(sf::RenderWindow & win, level const & lvl) {     auto & res = resource_manager::get();     auto & inv = lvl.chip.get<inventory>();          unsigned req_chips = lvl.chip_count()                         - inv.count(entity_id::computer_chip);     sf::Text txt(         "Chips Left:/n       " + std::to_string(req_chips)       , res[font_uid::arial]       , 25     );     txt.setPosition((float)chip_count_xpos, (float)chip_count_ypos);     txt.setColor(sf::Color::Red);     win.draw(txt); }
开发者ID:EricWF,项目名称:chips,代码行数:16,


示例15: myglGetString

const char* Configuration::ReplaceShader(int count, const char *const*srcs, const int *lengths){	if (vendor == VENDOR_UNKNOWN)	{		vendor = VENDOR_OTHER;		extern const char* myglGetString(int in);		const char *vendorstr = myglGetString(GL_VENDOR);		if (vendorstr)		{			string s(vendorstr);			for (unsigned i = 0; i < s.size(); i++) if (s[i] >= 'a' && s[i] <= 'z') s[i] -= 'a' - 'A';			if (s.find("ATI") != string::npos) vendor = VENDOR_ATI;			if (s.find("NVIDIA") != string::npos) vendor = VENDOR_NVIDIA;		}	}	string txt("");	for (int i = 0; i < count; i++)	{		if (lengths == 0 || lengths[i] < 1)			txt.append(srcs[i]);		else			txt.append(srcs[i], lengths[i]);	}	for (unsigned i = 0; i < _replacers.size(); i++)	{		Replacer &r = _replacers[i];		if (!(r.vendor == VENDOR_ALL || r.vendor == vendor))			continue;		size_t pos = 0;		int count = 0;		while ((pos = txt.find(r.src, pos)) != string::npos && count++ < 1000)		{			txt.replace(pos, r.src.size(), r.dst);			pos += r.dst.size();		}	}	int len = txt.size() + 1;	if (_bufferpos + len >= BUFFERSIZE)		_bufferpos = 0;	char *ret = &_buffer[_bufferpos];	strncpy_s(ret, BUFFERSIZE - _bufferpos, txt.c_str(), len);	_bufferpos += len;	return ret;}
开发者ID:psycholns,项目名称:gShaderReplacer,代码行数:47,


示例16: preloop

bool Kernel_base::loop(Interface_controlador& IC){	//Aquí se mide el tiempo desde el último paso por este loop...	controlador_fps.iniciar_paso_loop();	Input_base& input=acc_input();	preloop();	IC.preloop(input, paso_delta);	//Aquí se consume el tiempo desde el último paso en bloques de "paso_delta".	while(controlador_fps.consumir_loop(paso_delta) )	{		paso();						input.turno();		IC.loop(input, paso_delta);		Audio::procesar_cola_sonido();		if(IC.es_romper_loop()) break;	}	postloop();	IC.postloop(input, paso_delta);	controlador_fps.turno();	IC.dibujar(pantalla);if(mostrar_fps)	{#ifdef WINCOMPIL		std::string fps="FPS:"+parche_mingw::to_string(controlador_fps.acc_frames_contados())+"/n"+IC.acc_debug();#else		std::string fps="FPS:"+std::to_string(controlador_fps.acc_frames_contados())+"/n"+IC.acc_debug();#endif		DLibV::Representacion_texto_auto_estatica txt(DLibV::Gestor_superficies::obtener(acc_recurso_fps()), fps);		txt.establecer_posicion(pantalla.acc_w()-128, 6);		txt.volcar(pantalla);	}			pantalla.actualizar();	return !IC.es_abandonar_aplicacion();}
开发者ID:TheMarlboroMan,项目名称:winter-fgj5,代码行数:46,


示例17: main

int main(){int x;x= addition(5,7);//			X is herestd::cout<<"the number is "<<x<<std::endl;std::cout<<txt("word1", "word2")<<std::endl<<std::endl;baws();std::cout<<setY(777)<<std::endl;//end stuffstd::system("PAUSE");return EXIT_SUCCESS;}
开发者ID:TorgeirH90,项目名称:Programming,代码行数:17,


示例18: getOperatorType

short ItemExpr::codeGen(Generator * generator){  if (getOperatorType() == ITM_NATYPE ||      getOperatorType() == ITM_NAMED_TYPE_TO_ITEM)    {      Attributes ** attr;            if (generator->getExpGenerator()->genItemExpr(this, &attr, (1 + getArity()), -1) == 1)	return 0;      return 0;    }    NAString txt(getText());  txt += " should never reach ItemExpr::codeGen";  GenAssert(0, txt);  return -1;}
开发者ID:RuoYuHP,项目名称:incubator-trafodion,代码行数:17,


示例19: main

int main(int argc, char** argv) {	QApplication app(argc, argv);		QLineEdit txt("QLineEdit");	txt.installEventFilter(new MouseFilter(&txt));	txt.show();	QLabel lbl("QLabel");	lbl.installEventFilter(new MouseFilter(&lbl));	lbl.show();	QPushButton pcmd("QPushButton");	pcmd.installEventFilter(new MouseFilter(&pcmd));	pcmd.show();	app.exec();}
开发者ID:glazatkina,项目名称:qt_Labs,代码行数:17,


示例20: file

bool Editor::Open(QString filename){	QFile file(filename);	if (!file.open(QFile::ReadOnly)) {		ErrorMessage(tr("Cannot read file %1:/n%2.").arg(filename).arg(file.errorString()));					return false;	}	QTextStream in(&file);	QApplication::setOverrideCursor(Qt::WaitCursor);	QString txt(in.readAll());	setText(txt);	SetFileName(filename);	setModified(false);    lastModifiedTime = QFileInfo(filename).lastModified();		return true;}
开发者ID:massimiliano76,项目名称:mariamole,代码行数:18,


示例21: testPaths

void testPaths( const char *prompt, const QwtSpline &spline,    const QPolygonF& points1, const QPolygonF& points2 ){    const QPainterPath path1 = spline.painterPath( points1 );    const QPainterPath path2 = spline.painterPath( points2 );    if ( path1 != path2 )    {        QString txt( "Parametric Spline" );        if ( spline.boundaryType() != QwtSpline::ConditionalBoundaries )            txt += "(closed)";        txt += ": ";        txt += prompt;        txt += " => failed.";        qDebug() << qPrintable( txt );    }}
开发者ID:Au-Zone,项目名称:qwt,代码行数:18,


示例22: txt

void WordSearch::read_words(const string &file_name){    ifstream txt (file_name); /* file is aumatically open */    string one_line;    int line = 1;    string prev = "";    while (getline(txt, one_line)) {        /* change to lowercase */        transform(one_line.begin(), one_line.end(), one_line.begin(), ::tolower);        /* replace non-alpha with a space */        replace_if (one_line.begin(), one_line.end(),        	[] (const char c) {        	return !isalpha(c);        }, ' ');        istringstream tokens{one_line};        string word;        while (tokens >> word) {            if (word.length() < 3) continue;            if (ignored_words.find(word) == ignored_words.end()) {                wordCount++;                lengthMap[word.length()].insert(word);		wordFrequency[word]++;		wordFileMap[word].insert(file_name);		if (prev != "") {			predictWord[prev][word]++;		}                prev = word;            }        }        line++;    }    txt.close(); /* close the file */	for (auto iter = wordFrequency.begin(); iter != wordFrequency.end();iter++){		leastFrequent[iter->second].insert(iter->first);	}}
开发者ID:justinr776,项目名称:workspace2014,代码行数:44,


示例23: if

void urdfLink::setMeshFilename(std::string packagePath,std::string meshFilename,std::string choose){    std::cout << std::flush;	std::string meshFilename_alt; // we use an alternative filename... the package location is somewhat strangely defined sometimes!!	if (meshFilename.compare(0,10,"package://")==0) // condition added by Marc on 17/1/2014	{		meshFilename = meshFilename.substr(9,meshFilename.size()); //to delete de package:/ part		meshFilename_alt=meshFilename;		meshFilename = packagePath + meshFilename;		packagePath = packagePath.substr(0, packagePath.find_last_of("/"));		meshFilename_alt = packagePath + meshFilename_alt;	}	std::string extension = meshFilename.substr(meshFilename.size()-3,meshFilename.size());	int nExtension;	if(extension == "obj" || extension =="OBJ"){ nExtension = 0;}	else if(extension == "dxf" || extension == "DXF"){ nExtension = 1;}	else if(extension == "3ds" || extension == "3DS"){ nExtension = 2;}	else if(extension == "stl" || extension == "STL"){ nExtension = 4;}	else if(extension == "dae" || extension == "DAE"){ nExtension = 5;}	else	{		nExtension = -1;		std::string txt("ERROR: the extension '"+ extension +"' is not currently a supported.");		printToConsole(txt.c_str());	}	if(choose == "visual")	{        urdfElement &visual = currentVisual();		visual.meshFilename = meshFilename;		visual.meshFilename_alt = meshFilename_alt;		visual.meshExtension = nExtension;	}	if(choose == "collision")	{        urdfElement &collision = currentCollision();		collision.meshFilename = meshFilename;		collision.meshFilename_alt = meshFilename_alt;		collision.meshExtension = nExtension;	}}
开发者ID:RhobanProject,项目名称:Vrep,代码行数:43,


示例24: size

void PlayerBar::drawDungeonMap(sf::RenderWindow& mainWindow){	sf::RectangleShape dungeonMapRect;	int spaceBetweenDungeonRect = 1;	sf::Vector2f size(15,7);	dungeonMapRect.setFillColor(sf::Color(110, 93, 243));	dungeonMapRect.setSize(size);	std::stringstream pos;	pos << "LEVEL-" << (int)currentDungeon;	sf::Text txt(pos.str(), font);	txt.setPosition(bar.x+16, bar.y+16);	txt.setColor(sf::Color::White);	txt.setCharacterSize(14);	mainWindow.draw(txt);	mainWindow.draw(dungeonMap);	if (hasDungeonMap){		dungeonMapRect.setPosition(map.x + 56, map.y + 56);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 72, map.y + 56);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 72, map.y + 48);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 56, map.y + 48);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 40, map.y + 48);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 40, map.y + 56);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 24, map.y + 48);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 24, map.y + 56);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 56, map.y + 40);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 40, map.y + 40);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 56, map.y + 32);		mainWindow.draw(dungeonMapRect);		dungeonMapRect.setPosition(map.x + 72, map.y + 32);		mainWindow.draw(dungeonMapRect);	}	if (hasDungeonCompass)		mainWindow.draw(dungeonBossMarker);}
开发者ID:Easihh,项目名称:laughing-avenger,代码行数:43,


示例25: OnText

 /// called on text virtual void OnText( const lChar16 * text, int len, lUInt32 flags ) {     CR_UNUSED(flags);     lString16 txt( text, len );     switch (state) {     case in_start_point:         _curr_bookmark->setStartPos( txt );         break;     case in_end_point:         _curr_bookmark->setEndPos( txt );         break;     case in_header_txt:         _curr_bookmark->setTitleText( txt );         break;     case in_selection_txt:         _curr_bookmark->setPosText( txt );         break;     case in_comment_txt:         _curr_bookmark->setCommentText( txt );         break;     case in_author:         _curr_file->setAuthor( txt );         break;     case in_title:         _curr_file->setTitle( txt );         break;     case in_series:         _curr_file->setSeries( txt );         break;     case in_filename:         _curr_file->setFileName( txt );         break;     case in_filepath:         _curr_file->setFilePath( txt );         break;     case in_filesize:         _curr_file->setFileSize( txt.atoi() );         break;     default:         break;     } }
开发者ID:Frenzie,项目名称:crengine,代码行数:43,


示例26: ui_menu

ui_menu_display_options::ui_menu_display_options(running_machine &machine, render_container *container) : ui_menu(machine, container){	osd_options &options = downcast<osd_options &>(machine.options());	for (int d = 2; d < ARRAY_LENGTH(m_options); ++d)		m_options[d].status = options.int_value(m_options[d].option);	// create video list	m_list.push_back("auto");	m_list.push_back("opengl"); // TODO: check USE_OPENGL	std::string descr = options.description(OSDOPTION_VIDEO);	descr.erase(0, descr.find(":") + 2);	std::string delim = ", ";	size_t p1, p2 = 0;	for (;;)	{		p1 = descr.find_first_not_of(delim, p2);		if (p1 == std::string::npos)			break;		p2 = descr.find_first_of(delim, p1 + 1);		if (p2 != std::string::npos)		{			std::string txt(descr.substr(p1, p2 - p1));			if (txt != "or" && txt != "none")			m_list.push_back(descr.substr(p1, p2 - p1));		}		else		{			m_list.push_back(descr.substr(p1));			break;		}	}	m_options[1].status = 0;	for (int cur = 0; cur < m_list.size(); ++cur)		if (options.video() == m_list[cur])		{			m_options[1].status = cur;			break;		}}
开发者ID:dlabi,项目名称:mame,代码行数:42,


示例27: _T

void FindSequenceDialog::itemSearch ()    {    int a ;	 TVector *v = c->vec ;    wxString s = t->GetValue().Upper() ; // Using original input instead of filtered query    for ( a = 0 ; a < v->items.size() ; a++ )        {        if ( lb->GetCount() > FIND_MAX ) return ;        if ( v->items[a].name.Upper().Find(s) != -1 ||             v->items[a].desc.Upper().Find(s) != -1 )           {           lb->Append ( wxString::Format ( _T("%s: %s (%d-%d)") ,                                 txt("t_vec_item").c_str() ,                                  v->items[a].name.c_str() ,                                 v->items[a].from ,                                  v->items[a].to ) ) ;           vi.Add ( a ) ;                      }            }        }    
开发者ID:magnusmanske,项目名称:gentle-m,代码行数:20,


示例28: AssertCrash

/* appends the next quoted argument and returns the position after it */static const WCHAR *ParseQuoted(const WCHAR *arg, WStrVec *out){    AssertCrash(arg && '"' == *arg);    arg++;    str::Str<WCHAR> txt(str::Len(arg) / 2);    const WCHAR *next;    for (next = arg; *next && *next != '"'; next++) {        // skip escaped quotation marks according to        // http://msdn.microsoft.com/en-us/library/17w5ykft.aspx        if ('//' == *next && '"' == SkipBackslashs(next))            next++;        txt.Append(*next);    }    out->Append(txt.StealData());    if ('"' == *next)        next++;    return next;}
开发者ID:Jens1970,项目名称:sumatrapdf,代码行数:21,



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


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