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

C++ el函数代码示例

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

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



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

示例1: el

QDomElement
OutputFileParams::toXml(QDomDocument& doc, QString const& name) const
{
    if (isValid()) {
        QDomElement el(doc.createElement(name));
        el.setAttribute("size", QString::number(m_size));
        el.setAttribute("mtime", QString::number(m_mtime));
        return el;
    } else {
        return QDomElement();
    }
}
开发者ID:4sp1r3,项目名称:scantailor,代码行数:12,代码来源:OutputFileParams.cpp


示例2: el

Matrix::Matrix(const Matrix & mt):r(mt.r),c(mt.c)
{
    elm = new double*[r];
    for (int i = 0; i < r; i++) {
        elm[i] = new double[c];
    }
    for (int i = 0; i < r; i++) {
        for (int j = 0; j < c; j++) {
            el(i,j) = mt.el(i,j);
        }
    }
}
开发者ID:yamire,项目名称:COMP2012H_PA3,代码行数:12,代码来源:matrix.cpp


示例3: marshaller

QDomElement
Params::toXml(QDomDocument& doc, QString const& name) const
{
	XmlMarshaller marshaller(doc);
	
	QDomElement el(doc.createElement(name));
	el.setAttribute("mode", m_mode == MODE_AUTO ? "auto" : "manual");
	el.appendChild(marshaller.rectF(m_contentRect, "content-rect"));
	el.appendChild(marshaller.sizeF(m_contentSizeMM, "content-size-mm"));
	el.appendChild(m_deps.toXml(doc, "dependencies"));
	return el;
}
开发者ID:4sp1r3,项目名称:scantailor,代码行数:12,代码来源:Params.cpp


示例4: el

bool
xml_inresp_t::is_fault (int *code, str *msg) const
{
  ptr<const xml_element_t> e;
  ptr<const xml_method_response_t> r;
  ptr<const xml_fault_t> f;

  // comment out debug statement
  // warn << "obj: "<< el ()->xml_typename () << "\n"; 

  if (el () && 
      (r = el ()->to_xml_method_response ()) && 
      (e = r->body ()) &&
      (f = e->to_xml_fault ())) {
    xml_obj_const_t o (f);
    *code = o("faultCode");
    *msg = o("faultString");
    return true;
  }
  return false;
}
开发者ID:LeadsPlus,项目名称:okws,代码行数:21,代码来源:xmlobj.C


示例5: el

 int MenuBar::calculateWidth(SizeConstraint inSizeConstraint) const
 {
     int result = 0;
     std::vector<Element *> items;
     el()->getElementsByTagName(XMLMenuItem::TagName(), items);
     for (size_t idx = 0; idx != items.size(); ++idx)
     {
         MenuItem * item = items[idx]->component()->downcast<MenuItem>();
         result += item->calculateWidth(inSizeConstraint) + Defaults::menuBarSpacing();
     }
     return result;
 }
开发者ID:nContreras40,项目名称:xulwin,代码行数:12,代码来源:Menu.cpp


示例6: has_key

void agg_renderer<T0,T1>::process(dot_symbolizer const& sym,
                                  mapnik::feature_impl & feature,
                                  proj_transform const& prj_trans)
{
    double width = 0.0;
    double height = 0.0;
    bool has_width = has_key(sym,keys::width);
    bool has_height = has_key(sym,keys::height);
    if (has_width && has_height)
    {
        width = get<double>(sym, keys::width, feature, common_.vars_, 0.0);
        height = get<double>(sym, keys::height, feature, common_.vars_, 0.0);
    }
    else if (has_width)
    {
        width = height = get<double>(sym, keys::width, feature, common_.vars_, 0.0);
    }
    else if (has_height)
    {
        width = height = get<double>(sym, keys::height, feature, common_.vars_, 0.0);
    }
    double rx = width/2.0;
    double ry = height/2.0;
    double opacity = get<double>(sym, keys::opacity, feature, common_.vars_, 1.0);
    color const& fill = get<mapnik::color>(sym, keys::fill, feature, common_.vars_, mapnik::color(128,128,128));
    ras_ptr->reset();
    agg::rendering_buffer buf(current_buffer_->raw_data(),current_buffer_->width(),current_buffer_->height(),current_buffer_->width() * 4);
    using blender_type = agg::comp_op_adaptor_rgba_pre<agg::rgba8, agg::order_rgba>;
    using pixfmt_comp_type = agg::pixfmt_custom_blend_rgba<blender_type, agg::rendering_buffer>;
    using renderer_base = agg::renderer_base<pixfmt_comp_type>;
    using renderer_type = agg::renderer_scanline_aa_solid<renderer_base>;
    pixfmt_comp_type pixf(buf);
    pixf.comp_op(static_cast<agg::comp_op_e>(get<composite_mode_e>(sym, keys::comp_op, feature, common_.vars_, src_over)));
    renderer_base renb(pixf);
    renderer_type ren(renb);
    agg::scanline_u8 sl;
    ren.color(agg::rgba8_pre(fill.red(), fill.green(), fill.blue(), int(fill.alpha() * opacity)));
    agg::ellipse el(0,0,rx,ry);
    unsigned num_steps = el.num_steps();
    for (geometry_type const& geom : feature.paths()) {
        double x,y,z = 0;
        unsigned cmd = 1;
        geom.rewind(0);
        while ((cmd = geom.vertex(&x, &y)) != mapnik::SEG_END) {
            if (cmd == SEG_CLOSE) continue;
            prj_trans.backward(x,y,z);
            common_.t_.forward(&x,&y);
            el.init(x,y,rx,ry,num_steps);
            ras_ptr->add_path(el);
            agg::render_scanlines(*ras_ptr, sl, ren);
        }
    }
}
开发者ID:NavtechInc,项目名称:mapnik,代码行数:53,代码来源:process_dot_symbolizer.cpp


示例7: main

int main()
{
	int control = 1; 
	int w = 1; 
	int *d, *path; 
	int n, m; 
	cout << "Please input the number of the city:" << endl; 
	cin >> n; 
	cout << "Please input the number of the flight:" << endl; 
	cin >> m; 
	
	d = new int[n]; 
	path = new int[n];

	extLGraph<int> el(n); 
	int u, v; 
	for(int i = 0; i < m; i++)
	{
		cout << "Please input the start point and end point of the " << i+1 << " flight:" << endl; 
		cin >> u >> v; 
		cout << el.insert(u, v, w) << endl; 
	}
	
	while(control)
	{
		for (int i = 0; i < n; i++) d[i] = INF;
		memset(path, 0, sizeof(path));
		cout << "Please input the start and destination of you travel:"; 
		cin >> u >> v; 
		el.dijkstra(u, d, path); 
		
		if(d[v] != 0 && d[v] < INF)
		{	
			cout << "The length of the route that takes the least transition is:" << d[v] << endl; 
			cout << "And the route is:"; 
			int *p = new int [d[v]]; 
			int t = path[v]; 
			for(int i = 0; i < d[v]; i++){
				p[i] = t; 
				t = path[t]; 
			}
			for(int i = d[v]-1; i >= 0; i--){
				cout << " " << p[i]; 
			}
			cout << " " << v; 
		}
		else
			cout << "Between the two places is no route! or The start and end is same!"; 
		cout << endl << endl << "Enter 1 to continue or 0 to exit."; 
		cin >> control; 
	}
	return 0; 
} 
开发者ID:HsuJv,项目名称:Note,代码行数:53,代码来源:main.cpp


示例8: bug_b

int
bug_b(MENU_ARGS)
{
  char c;

  decaln();

  cup(1, 1);
  el(0);
  printf("Line 11 should be double-wide, line 12 should be cleared.");

  cup(2, 1);
  el(0);
  printf("Then, the letters A-P should be written at the beginning");

  cup(3, 1);
  el(0);
  printf("of lines 12-%d, and the empty line and A-E are scrolled away.", max_lines);

  cup(4, 1);
  el(0);
  printf("If the bug is present, some lines are confused, look at K-P.");

  cup(11, 1);
  decdwl();
  decstbm(12, max_lines);

  cup(12, 1);
  el(0);
  printf("Here we go... ");
  holdit();

  cup(12, 1);
  ri();         /* Bug comes here */
  for (c = 'A'; c <= 'P'; c++)
    printf("%c\n", c);  /* Bug shows here */
  holdit();
  decstbm(0, 0);  /* No scr. region */
  return MENU_NOHOLD;
}
开发者ID:hharte,项目名称:vttest,代码行数:40,代码来源:main.c


示例9: if

//To print the complex matrix in a formatted way:
//It first converts the complex number in to strings (the display of complex number is the same as the one above)
//and store them in a 2D string array. Then find the longest number in every column, padding the rest to the same
//length by spaces. This can make the matrix look better.
void CplxMatrix::printMatrix() const{
    std::string **output;
    output = new std::string*[r];
    for (int i = 0; i < r; i++) {
        output[i] = new std::string[c];
    }
    for (int i = 0; i < r; i++) {
        for (int j = 0; j < c; j++) {
            std::string realstr = patch::to_string(el(i,j).re);
            realstr.erase (realstr.find_last_not_of('0') + 1, std::string::npos );
            std::string imstr = patch::to_string(el(i, j).im);
            imstr.erase (imstr.find_last_not_of('0') + 1, std::string::npos );
            if (el(i, j).im!=0&&el(i, j).re!=0) {
                output[i][j] = realstr+((el(i, j).im<0)?"":"+")+imstr+"i"+" ";
            }else if(el(i, j).im==0&&el(i, j).re!=0){
                output[i][j] = realstr + " ";
            }else if(el(i, j).im!=0&&el(i, j).re==0){
                output[i][j] = imstr + "i ";
            }else{
                output[i][j] = "0.";
            }
        }
    }
    int maxlength = 0;
    for (int i = 0; i < r; i++) {
        for (int j = 0; j < c; j++) {
            if (output[i][j].length() > maxlength) {
                maxlength = (int)output[i][j].length();
            }
        }
    }
    for (int i = 0; i < r; i++) {
        for (int j = 0; j < c; j++) {
            std::cout<< std::left << std::setw(maxlength) << std::setfill(' ')
            << output[i][j];
        }
        std::cout<<std::endl;
    }
    for (int i = 0; i < r; i++) {
        delete[] output[i];
    }
    delete[] output;
    output = 0;
}
开发者ID:yamire,项目名称:COMP2012H_PA3,代码行数:48,代码来源:matrix.cpp


示例10: el

void StelSphericalIndexMultiRes::insert(StelRegionObjectP regObj)
{
	NodeElem el(regObj);
	int i;
	for (i=1;i<MAX_INDEX_LEVEL&&cosRadius[i]<el.cap.d;++i) {;}
	RootNode* node = treeForRadius[i-1];
	if (node==NULL)
	{
		node=new RootNode(cosRadius[i-1], maxObjectsPerNode, i-1);
		treeForRadius[i-1]=node;
	}
	node->insert(el, 0);
}
开发者ID:Astrocoderguy,项目名称:stellarium,代码行数:13,代码来源:StelSphericalIndexMultiRes.cpp


示例11: el

Element AssetTemplate::create( const QString & name, const Element & parent, const Project & project )
{
	RecordList rl;
	Element e = Element::createFromTemplate( *this, rl );
	ElementList el( rl );
	el.setProjects( project );
	el.commit();
	e.setProject( project );
	e.setParent( parent );
	e.setName( name );
	e.commit();
	return e;
}
开发者ID:attila3d,项目名称:arsenalsuite,代码行数:13,代码来源:assettemplatebase.cpp


示例12: _l

// Construct a tree parity machine with given dimensions
TreeParityMachine::TreeParityMachine(std::size_t k, std::size_t n, std::size_t l): _l(l) {
    std::random_device rd;	// Create random device
	std::mt19937 el(rd());	// Use 32 bit mersenne twister
	std::uniform_int_distribution<int> udist(-_l,_l);
	
    for(int i=0; i<k; i++){
        std::vector<int> temp;
        for(int j=0; j<n; j++){
            temp.push_back(udist(el));
        }
        _w.push_back(temp);
    }
}
开发者ID:permutationlock,项目名称:neural_crypto,代码行数:14,代码来源:tpm.cpp


示例13: marshaller

QDomElement
OutputImageParams::PartialXform::toXml(QDomDocument& doc, QString const& name) const
{
	XmlMarshaller marshaller(doc);
	
	QDomElement el(doc.createElement(name));
	el.appendChild(marshaller.string(Utils::doubleToString(m_11), "m11"));
	el.appendChild(marshaller.string(Utils::doubleToString(m_12), "m12"));
	el.appendChild(marshaller.string(Utils::doubleToString(m_21), "m21"));
	el.appendChild(marshaller.string(Utils::doubleToString(m_22), "m22"));
	
	return el;
}
开发者ID:DikBSD,项目名称:STE,代码行数:13,代码来源:OutputImageParams.cpp


示例14: simple_bce_erases

/*
 * Clear around the box for simple_bce_test().
 */
static void
simple_bce_erases(BOX *box)
{
  int i;

  cup(box->top - 1, min_cols / 2);
  ed(1);        /* clear from home to cursor */
  cuf(1);
  el(0);        /* clear from cursor to end of line */

  cup(box->bottom + 1, min_cols / 2);
  ed(0);        /* clear from cursor to end */
  cub(1);
  el(1);        /* clear to beginning of line */

  for (i = box->top; i <= box->bottom; i++) {
    cup(i, box->left - 1);
    el(1);
    cup(i, box->right + 1);
    el(0);
  }
}
开发者ID:Brybry,项目名称:wTerm,代码行数:25,代码来源:color.c


示例15: setTextColor

void Logger::msg(QString s, int level) {
	setTextColor(Qt::lightGray);
	append(QTime::currentTime().toString("hh:mm:ss")+": ");
	moveCursor(QTextCursor::End);
	switch (level) {
		case 0: setTextColor(Qt::black); break;
		case 1: setTextColor(Qt::gray); break;
		case 99: setTextColor(Qt::red); break;
	}
	insertPlainText(s);
	repaint();
	QEventLoop el(this);
	el.processEvents(QEventLoop::ExcludeUserInputEvents);
}
开发者ID:UhtredBosch,项目名称:mesecina,代码行数:14,代码来源:Logger.cpp


示例16: construct

void ExtractModel::act(AV& av, collection_nvp<E,S> nvp )
{
	E* entry;
	construct(av, &entry, static_cast<unsigned int>(0));
		av.diveTable(nvp.name);

			putNamedColumn(av.getScope().table(), HIBERLITE_PARENTID_COLUMN, HIBERLITE_ID_STORAGE_CLASS);
			putNamedColumn(av.getScope().table(), HIBERLITE_ENTRY_INDEX_COLUMN, HIBERLITE_ID_STORAGE_CLASS);

			sql_nvp<E> el("item",*entry);
			av & el;
		av.pop();
	destroy(*this, entry, static_cast<unsigned int>(0));
}
开发者ID:ipa-josh,项目名称:hiberlite,代码行数:14,代码来源:ModelExtractor_impl.hpp


示例17: on_event

        virtual BOOL on_event(HELEMENT he, HELEMENT target, BEHAVIOR_EVENTS type, UINT_PTR reason )
        {
            if (EDIT_VALUE_CHANGED == type)
            {
                dom::element el(he);
                json::string stext = el.text();
                el.set_attribute("filename", stext.c_str());
                el.set_attribute("title", stext.c_str());

                dom::element eparent = el.parent();
                eparent.set_attribute("filename", stext.c_str());
            }
            return false;
        }
开发者ID:Beifeng,项目名称:qui,代码行数:14,代码来源:behavior_path.cpp


示例18: marshaller

QDomElement
Dependencies::toXml(QDomDocument& doc, QString const& name) const
{
	XmlMarshaller marshaller(doc);
	
	QDomElement el(doc.createElement(name));
	el.appendChild(
		marshaller.polygonF(
			m_rotatedPageOutline, "rotated-page-outline"
		)
	);
	
	return el;
}
开发者ID:4sp1r3,项目名称:scantailor,代码行数:14,代码来源:Dependencies.cpp


示例19: should_exit_

CmdLine::CmdLine(int argc,char**argv) : should_exit_(false) {
      po::options_description general("General options");

      general.add_options()
          ("directories,d", po::value< std::vector<std::string> >(&dirs_),"directories to display on video")
          ("captions,c", po::value< std::vector<std::string> >(&captions_),"captions to display on videos (in the same order as directories)")
          ("output-directory,o", po::value<std::string>(&output_dir_),"output directory where the concatenated images are stored")
          ("verbose,v", "verbose mode")
          ("debug,D", "debug mode")

          ("help", "produce help message")
          ;

      prog_args.add(general);
      po::store(po::parse_command_line(argc, argv, prog_args), vm_);
      po::notify(vm_);

      if (vm_.count("help")) {
          std::cout << prog_args << std::endl;
          should_exit_ = true;
      }
      DEBUG_WRITE("Debug mode active.");

      unsigned int nbvid=0;
      std::string cur_caption("");
      for(std::vector< std::string >::iterator i=dirs_.begin(), cap_iter=captions_.begin();
          i!=dirs_.end();
          i++,nbvid++){
        if(cap_iter==captions_.end())
          cur_caption = "";
        else{
          cur_caption = *cap_iter;
          cap_iter++;
        }
        boost::shared_ptr<VideoWithCaption> el(new VideoWithCaption());
        el->caption=cur_caption;
        el->path = i->c_str();
        el->reader.setFileName( i->c_str() );
        el->reader.setFirstFrameIndex(0);
        el->reader.open(el->I);
        videos_.push_back(el);
        if(get_verbose()){
          std::cout << "Adding video with path " << el->path << " and caption " << el->caption << std::endl;
        }
      }
      DEBUG_WRITE("Done adding videos.");

      if(get_verbose())
        std::cout << nbvid << " videos added." << std::endl;
}
开发者ID:filipnovotny,项目名称:video_writer,代码行数:50,代码来源:cmd_line.cpp


示例20: return

vector vector::operator=(matrix a)
{ int i,n = a.nrows();

  if (a.ncols() != 1)
  { std::cout << "\nMatrix attempted to assign to vector";
    } else
  if (this != &a)
    { delete [] elem;
      h = n; w= 1;
      elem = new double[h];
      for (i = 0; i < h; i++) el(i) = a.el(i,0);
      }
  return(*this);
  }
开发者ID:ddksr,项目名称:segmentor-meshlab,代码行数:14,代码来源:matrix.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ el_init函数代码示例发布时间:2022-05-30
下一篇:
C++ ekf_type函数代码示例发布时间: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