• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ parsed函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: is_write_realization_filename_set

  bool reversible_program_options::is_write_realization_filename_set() const
  {
    if ( !parsed() || !d->has_out_realization )
    {
      return false;
    }

    return is_set( "realname" );
  }
开发者ID:Siddhant,项目名称:revkit-2.0,代码行数:9,代码来源:reversible_program_options.cpp


示例2: ApiTraceFrame

void TraceLoader::parseTrace()
{
    QList<ApiTraceFrame*> frames;
    int frameCount = 0;
    int lastPercentReport = 0;

    ApiTraceFrame *currentFrame = new ApiTraceFrame();
    currentFrame->number = frameCount;

    FrameContents frameCalls;
    while (frameCalls.load(this, currentFrame, m_helpHash, m_parser)) {

        if (frameCalls.topLevelCount() == frameCalls.allCallsCount()) {
            currentFrame->setCalls(frameCalls.allCalls(),
                                   frameCalls.allCalls(),
                                   frameCalls.binaryDataSize());
        } else {
            currentFrame->setCalls(frameCalls.topLevelCalls(),
                                   frameCalls.allCalls(),
                                   frameCalls.binaryDataSize());
        }
        frames.append(currentFrame);
        if (frames.count() >= FRAMES_TO_CACHE) {
            emit framesLoaded(frames);
            frames.clear();
        }
        if (m_parser.percentRead() - lastPercentReport >= 5) {
            emit parsed(m_parser.percentRead());
            lastPercentReport = m_parser.percentRead();
        }
        ++frameCount;
        currentFrame = new ApiTraceFrame();
        currentFrame->number = frameCount;

        frameCalls.reset();
    }

    //last frames won't have markers
    //  it's just a bunch of Delete calls for every object
    //  after the last SwapBuffers
    if (!frameCalls.isEmpty()) {
        if (frameCalls.topLevelCount() == frameCalls.allCallsCount()) {
            currentFrame->setCalls(frameCalls.allCalls(),
                                   frameCalls.allCalls(),
                                   frameCalls.binaryDataSize());
        } else {
            currentFrame->setCalls(frameCalls.topLevelCalls(),
                                   frameCalls.allCalls(),
                                   frameCalls.binaryDataSize());
        }
        frames.append(currentFrame);
    }
    if (frames.count()) {
        emit framesLoaded(frames);
    }
}
开发者ID:Acidburn0zzz,项目名称:apitrace,代码行数:56,代码来源:traceloader.cpp


示例3: QObject

GoogleCalendar::GoogleCalendar(QObject *parent, QString url) :
    QObject(parent)
{
    QUrl parsed(url);
    access_manager = new QNetworkAccessManager(this);
    connect(access_manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(dataDownloadComplete(QNetworkReply*)));
    connect(access_manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(dataDownloadSSLError(QNetworkReply*,QList<QSslError>)));
    webpath = parsed;
    qDebug() << QString("Added calendar for %1").arg(url);
    refreshCalendar();
}
开发者ID:JonnyFunFun,项目名称:slfc-dashboard,代码行数:11,代码来源:googlecalendar.cpp


示例4: ReplaceFileSystemURL

bool ReplaceFileSystemURL(const char* base,
                          const URLSegments& baseParsed,
                          const Replacements<char>& replacements,
                          URLQueryCharsetConverter* charsetConverter,
                          URLBuffer<char>& output,
                          URLSegments* outputParsed)
{
    URLComponentSource<char> source(base);
    URLSegments parsed(baseParsed);
    SetupOverrideComponents(base, replacements, &source, &parsed);
    return doCanonicalizeFileSystemURL<char, unsigned char>(base, source, parsed, charsetConverter, output, *outputParsed);
}
开发者ID:ZECTBynmo,项目名称:LabSound,代码行数:12,代码来源:URLCanonFilesystemurl.cpp


示例5: create_cmd_params

po::variables_map create_cmd_params(int argc, char *argv[],
                                    po::options_description const &desc)
{
    po::variables_map vm;
    po::parsed_options parsed (
        po::command_line_parser(argc, argv)
            .options(desc)
            //.allow_unregistered( )
            .run( ));
    po::store(parsed, vm);
    po::notify(vm);
    return vm;
}
开发者ID:newenclave,项目名称:vtrc,代码行数:13,代码来源:main.cpp


示例6: setFocusProxy

void VirtualCluster::addNumberWidget(VirtualClusterLineEdit* pNumberWidget)
{
  _number = pNumberWidget;
  if (! _number)
    return;

  _grid->addWidget(_number, 0, 1);
  setFocusProxy(pNumberWidget);

  connect(_number,	SIGNAL(newId(int)),	this,	 SIGNAL(newId(int)));
  connect(_number,	SIGNAL(parsed()), 	this, 	 SLOT(sRefresh()));
  connect(_number,	SIGNAL(valid(bool)),	this,	 SIGNAL(valid(bool)));
}
开发者ID:aniuska,项目名称:qt-client,代码行数:13,代码来源:virtualCluster.cpp


示例7: read_commandline

	static int read_commandline(options& opt, std::vector<std::string>& args)
	{
		boost::program_options::options_description o_general("Options");
		o_general.add_options()
				("help,h", "display this message")
				("api,a", boost::program_options::value(&opt.api_host), "api host (default: api.supermarx.nl)")
				("config,C", boost::program_options::value(&opt.config), "path to the configfile (default: ./config.yaml)");

		boost::program_options::variables_map vm;

		boost::program_options::options_description options("Allowed options");
		options.add(o_general);

		boost::program_options::parsed_options parsed(boost::program_options::command_line_parser(args).options(options).allow_unregistered().run());
		boost::program_options::store(parsed, vm);
		args = boost::program_options::collect_unrecognized(parsed.options, boost::program_options::include_positional);

		try
		{
			boost::program_options::notify(vm);
		} catch(const boost::program_options::required_option &e)
		{
			std::cerr << "You forgot this: " << e.what() << std::endl;
			return EXIT_FAILURE;
		}

		if(vm.count("help"))
		{
			std::cout
					<< "SuperMarx commandline interface Paul. [https://github.com/SuperMarx/paul]" << std::endl
					<< "Usage [1]: ./paul [options] <empty>" << std::endl
					<< "           Drops Paul into an interactive shell." << std::endl
					<< "Usage [2]: ./paul [options] action" << std::endl
					<< std::endl
					<< "Actions:" << std::endl
					<< "  login                 logs an user in" << std::endl
					<< "  quit                  drops from the interactive cell (if applicable)" << std::endl
					<< std::endl
					<< o_general;

			return EXIT_FAILURE;
		}

		if(!vm.count("api"))
			opt.api_host = "https://api.supermarx.nl";

		if(!vm.count("config"))
			opt.config = "./config.yaml";

		return EXIT_SUCCESS;
	}
开发者ID:Supermarx,项目名称:paul,代码行数:51,代码来源:parser.hpp


示例8: operator

 /// @brief Handle an alias element
 void operator()(elements::AliasElement const &elt) {
     // This is an alias.
     ParsedAlias parsed(elt.getSource());
     if (!parsed.isValid()) {
         OSVR_DEV_VERBOSE("Couldn't parse alias: " << elt.getSource());
         return;
     }
     /// @todo update the element with the normalized source?
     if (!parsed.isSimple()) {
         // Not simple: store the full string as a transform.
         m_source.nestTransform(parsed.getAliasValue());
     }
     m_recurse(parsed.getLeaf());
 }
开发者ID:6DB,项目名称:OSVR-Core,代码行数:15,代码来源:ResolveTreeNode.cpp


示例9: qDebug

void CrmClusterLineEdit::silentSetId(const int pId)
{
  if (DEBUG)
    qDebug("VCLE %s::silentSetId(%d)", qPrintable(objectName()), pId);

  if (pId == -1)
  {
    XLineEdit::clear();
    _model = new QSqlQueryModel(this);
  }
  else
  {
    XSqlQuery idQ;
    idQ.prepare(_query + _idClause + QString(";"));
    idQ.bindValue(":id", pId);
    idQ.exec();
    if (idQ.first())
    {
      if (_completer)
        static_cast<QSqlQueryModel* >(_completer->model())->setQuery(QSqlQuery());

      _id = pId;
      _valid = true;

      _model->setQuery(idQ);

      setText(idQ.value("number").toString());
      if (_hasName)
        _name = (idQ.value("name").toString());
      if (_hasDescription)
        _description = idQ.value("description").toString();
      if (_hasActive)
        setStrikeOut(!idQ.value("active").toBool());
      if (_hasOwner)
        _owner = idQ.value("owner").toString();
      if (_hasAssignto)
        _assignto = idQ.value("assignto").toString();
    }
    else if (idQ.lastError().type() != QSqlError::NoError)
      QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.")
                            .arg(__FILE__)
                            .arg(__LINE__),
                            idQ.lastError().databaseText());
  }

  _parsed = true;
  sHandleNullStr();
  emit parsed();
}
开发者ID:AlFoX,项目名称:qt-client,代码行数:49,代码来源:crmCluster.cpp


示例10: description

void
yg::GetOptions (int                       argc,
                char                      **argv,
                std::string               &input,
                std::string               &output,
                std::vector <std::string> &tools)
{
    po::options_description description ("Options");

    description.add_options ()
        ("input,i",
         po::value <std::string> (&input)->required (),
         "File to read template from")
        ("output,o",
         po::value <std::string> (&output)->required (),
         "File to write result to")
        ("extra,e",
         po::value <std::vector <std::string>> (&tools)->multitoken (),
         "Extra options");

    po::positional_options_description positionalDescription;
    positionalDescription.add ("extra", -1);

    po::variables_map vm;
    po::command_line_parser parser (argc, argv);

    po::parsed_options parsed (parser.options (description)
                                   .positional (positionalDescription)
                                   .allow_unregistered ()
                                   .run ());

    po::store (parsed,
               vm);

    try
    {
        po::notify (vm);
    }
    catch (std::exception const &e)
    {
        std::stringstream ss;

        ss << e.what () << std::endl;
        ss << "Options Available: " << description << std::endl;

        throw std::logic_error (ss.str ());
    }
}
开发者ID:polysquare,项目名称:yiqi,代码行数:48,代码来源:generators_common.cpp


示例11: data

void LocString::readString(uint32 languageID, Common::SeekableReadStream &stream) {
	uint32 length = stream.readUint32LE();

	std::pair<StringMap::iterator, bool> s = _strings.insert(std::make_pair(languageID, ""));
	if (length == 0)
		return;

	s.first->second = "[???]";

	Common::ScopedPtr<Common::MemoryReadStream> data(stream.readStream(length));
	Common::ScopedPtr<Common::MemoryReadStream> parsed(LangMan.preParseColorCodes(*data));

	Common::Encoding encoding = LangMan.getEncodingLocString(LangMan.getLanguageGendered(languageID));
	if (encoding != Common::kEncodingInvalid)
		s.first->second = Common::readString(*parsed, encoding);
}
开发者ID:Supermanu,项目名称:xoreos,代码行数:16,代码来源:locstring.cpp


示例12: text

// TODO: can we get _recip_id and _recip_type using the inherited sParse()?
void QuoteLineEdit::sParse()
{
  if (! _parsed)
  {
    QString stripped = text().trimmed().toUpper();
    if (stripped.length() == 0)
    {
      _parsed = true;
      setId(-1);
    }
    else
    {
      XSqlQuery numQ;
      numQ.prepare(_query + _numClause +
                  (_extraClause.isEmpty() || !_strict ? "" : " AND " + _extraClause) +
                  QString(";"));
      numQ.bindValue(":number", "^" + stripped);
      numQ.exec();
      if (numQ.first())
      {
        _valid       = true;
        setId(numQ.value("id").toInt());
        if (_hasName)
          _name      = numQ.value("name").toString();
        if (_hasDescription)
          _description = numQ.value("description").toString();
        _recip_id    = numQ.value("recip_id").toInt();
        _recip_type  = numQ.value("recip_type").toString();
      }
      else
      {
        setId(-1);
        if (numQ.lastError().type() != QSqlError::NoError)
            QMessageBox::critical(this, tr("A System Error Occurred at %1::%2.")
                                          .arg(__FILE__)
                                          .arg(__LINE__),
                    numQ.lastError().databaseText());
      }
    }
    emit valid(_valid);
    emit parsed();
  }

  _parsed = true;
  sHandleNullStr();
}
开发者ID:ChristopherCotnoir,项目名称:qt-client,代码行数:47,代码来源:quotecluster.cpp


示例13: it

QJSValue RequestPrototype::query(const QJSValue &query)
{
    if (query.isObject()) {
        JSValueIterator it(query);
        while (it.next()) {
            m_query.addQueryItem(
                it.name(),
                it.value().toString());
        }
    } else if (query.isString()) {
        QUrlQuery parsed(query.toString());
        QList<QPair<QString, QString> > items =
            parsed.queryItems(QUrl::FullyDecoded);
        QPair<QString, QString> pair;
        foreach(pair, items) {
            m_query.addQueryItem(pair.first, pair.second);
        }
开发者ID:Cutehacks,项目名称:duperagent,代码行数:17,代码来源:request.cpp


示例14: CreateFile

bool Device::open(boost::asio::io_service &io_service, std::shared_ptr<ICallback> callback)
{
    auto handle = CreateFile(m_path.c_str(), GENERIC_READ|GENERIC_WRITE,
            FILE_SHARE_READ,
            NULL, OPEN_EXISTING,
            FILE_FLAG_OVERLAPPED, NULL);
    if(handle == INVALID_HANDLE_VALUE) {
        return false;
    }
    m_handle=std::shared_ptr<void>(handle, &::CloseHandle);

    // get hid caps
    {
        HIDP_PREPARSED_DATA* preparsedData=0;
        if (!HidD_GetPreparsedData(handle, &preparsedData)){
            return false;
        }
        std::shared_ptr<HIDP_PREPARSED_DATA> parsed(
                preparsedData, HidD_FreePreparsedData);

        HIDP_CAPS caps;
        if (HidP_GetCaps(preparsedData, &caps) != HIDP_STATUS_SUCCESS)
        {
            return false;
        }
        std::cout << "Usage: " << caps.Usage << std::endl;
        std::cout << "UsagePage: " <<  caps.UsagePage << std::endl;
        std::cout << "InputReportByteLength: " 
            << caps.InputReportByteLength << std::endl;
        std::cout << "OutputReportByteLength: " 
            <<  caps.OutputReportByteLength << std::endl;
        std::cout << "FeatureReportByteLength: "
            <<  caps.FeatureReportByteLength << std::endl;
    }

    // setup stream
    m_stream=std::make_shared<boost::asio::windows::stream_handle>(io_service, handle);
    m_callback=callback;

    beginRead();
    m_callback->onConnect(this);

    return true;
}
开发者ID:ousttrue,项目名称:hidloop,代码行数:44,代码来源:device.cpp


示例15: try_main

static
void
try_main(int argc,char* argv[]) {

    strelka_options opt;

    for (int i(0); i<argc; ++i) {
        if (i) opt.cmdline += ' ';
        opt.cmdline += argv[i];
    }

    initialize_blt_signals(pinfo.name(),opt.cmdline.c_str());

    std::vector<std::string> legacy_starling_args;
    po::variables_map vm;
    try {
        po::options_description visible(get_strelka_option_parser(opt));
        po::options_description visible2(get_starling_shared_option_parser(opt));
        visible.add(visible2);
        po::parsed_options parsed(po::command_line_parser(argc,argv).options(visible).allow_unregistered().run());
        po::store(parsed,vm);
        po::notify(vm);

        // allow remaining options to be parsed using starling command-line parser:
        legacy_starling_args = po::collect_unrecognized(parsed.options,po::include_positional);

    } catch (const boost::program_options::error& e) {
        pinfo.usage(e.what());
    }

    if ((argc==1) or vm.count("help")) {
        pinfo.usage();
    }

    // temp workaround for blt/starling options which are not (yet)
    // under program_options control:
    //
    arg_data ad(legacy_starling_args,pinfo,opt.cmdline);
    legacy_starling_arg_parse(ad,opt);

    finalize_strelka_options(pinfo,vm,opt);

    strelka_run(opt);
}
开发者ID:BadSeby,项目名称:isaac_variant_caller,代码行数:44,代码来源:strelka2.cpp


示例16: p12ParseTop

int p12ParseTop(
	CSSM_DATA		&rawBlob,
	CSSM_CSP_HANDLE cspHand,
	CFStringRef 	pwd,
	bool 			verbose)
{
	SecNssCoder coder;
	OidParser parser;
	P12Parsed parsed(coder);
	P12ParseInfo pinfo(coder,
		cspHand, 
		parser,
		pwd,
		NULL,			// no separate pwd
		parsed);

	printf("PKCS12 PFX:\n");
	int rtn = p12Parse(rawBlob, pinfo, 3);
	
	/* find anything? */
	if(verbose) {
		P12KnownBlobs &certs = pinfo.mParsed.mCerts;
		if(certs.mNumBlobs) {
			printf("\n\n");
			for(unsigned dex=0; dex<certs.mNumBlobs; dex++) {
				printf("Cert %u:\n", dex);
				printCert(certs.mBlobs[dex].Data, 
					certs.mBlobs[dex].Length, CSSM_FALSE);
				printf("\n");
			}
		}
		P12KnownBlobs &crls = pinfo.mParsed.mCrls;
		if(crls.mNumBlobs) {
			printf("\n\n");
			for(unsigned dex=0; dex<crls.mNumBlobs; dex++) {
				printf("CRL %u:\n", dex);
				printCrl(crls.mBlobs[dex].Data, 
					crls.mBlobs[dex].Length, CSSM_FALSE);
			}
		}
	}
	return rtn;
}
开发者ID:unofficial-opensource-apple,项目名称:Security,代码行数:43,代码来源:p12Parse.cpp


示例17: parseTail

void Parser::parseTail()
{

    if(!parsed())
    {
        parse();
    }

    if(!_tailParsed)
    {
        try {
            Object::ParsingContext context(object());
            doParseTail();
            _tailParsed = true;
        } catch (const ParsingException& exception) {
            handleParsingException(exception);
        } catch (const Object::ParsingContext::LockException&) {

        }
    }
}
开发者ID:HexaMonkey,项目名称:hexamonkey,代码行数:21,代码来源:parser.cpp


示例18: sql

void UsernameLineEdit::setId(const int pId)
{
  QString sql("SELECT usr_username AS number, "
              " usr_propername AS name "
              " FROM usr"
              " WHERE ((usr_id=:id)");

  if(UsersActive == _type)
    sql += " AND (usr_active)";
  else if(UsersInactive == _type)
    sql += " AND (NOT usr_active)";

  sql += " );";

  XSqlQuery query;
  query.prepare(sql);
  query.bindValue(":id", pId);
  query.exec();
  setStrikeOut(!query.size());
  if(query.first())
  {
    _id = pId;
    _valid = true;
    _username = query.value("number").toString();
    setText(_username);
    _name = query.value("name").toString();
  }
  else
  {
    _id = -1;
    _valid = false;
    _name = QString();
    _description = QString();
  }

  emit newId(_id);
  emit valid(_valid);
  emit parsed();
  _parsed = true;
}
开发者ID:ChristopherCotnoir,项目名称:qt-client,代码行数:40,代码来源:usernameCluster.cpp


示例19: Java_com_felspar_android_Setting_fromJSON

extern "C" JNIEXPORT bool JNICALL
Java_com_felspar_android_Setting_fromJSON(
    JNIEnv *env, jobject self, jstring jdomain, jstring j_string
) {
    try {
        fostlib::string cppstring(fostlib::jni_cast<fostlib::string>(env, j_string)),
            domain(fostlib::jni_cast<fostlib::string>(env, jdomain));
        fostlib::json parsed(fostlib::json::parse(cppstring));
        g_settings.push_back(
            std::unique_ptr<fostlib::settings>(
                new fostlib::settings(domain, parsed)));
        g_sinks.reset(new fostlib::log::global_sink_configuration(c_logging.value()));
        fostlib::log::info(c_module)
            ("domain", domain)
            ("settings", parsed);
        return true;
    } catch ( fostlib::exceptions::exception &e ) {
        fostlib::log::info(c_module)
            ("exception", e.what())
            ("data", e.data());
        return false;
    }
}
开发者ID:KayEss,项目名称:fost-android-java,代码行数:23,代码来源:setting.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ parseip函数代码示例发布时间:2022-05-30
下一篇:
C++ parsecmd函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap