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


C++ xml_node::begin方法代码示例

本文整理汇总了C++中xml_node::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ xml_node::begin方法的具体用法?C++ xml_node::begin怎么用?C++ xml_node::begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在xml_node的用法示例。


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

示例1: load_demo

void gdipp_setting::load_demo(const xml_node &root_node)
{
	for (xml_node::iterator iter = root_node.begin(); iter != root_node.end(); iter++)
	{
		const wstring node_name = iter->name();
		const wstring curr_value = iter->first_child().value();

		if (node_name == L"font")
			_demo_fonts.push_back(curr_value);
		else
			_demo_setting[node_name] = curr_value;
	}
}
开发者ID:Carye,项目名称:gdipp,代码行数:13,代码来源:setting.cpp

示例2: parse_gdimm_setting_node

void gdipp_setting::parse_gdimm_setting_node(const xml_node &setting_node, setting_map &setting_store)
{
	const string_t name = setting_node.name();

	if (name == L"freetype" || name == L"gamma" || name == L"render_mode" || name == L"shadow")
	{
		// these settings have nested items
		for (xml_node::iterator iter = setting_node.begin(); iter != setting_node.end(); iter++)
			setting_store[name + L"/" + iter->name()] = iter->first_child().value();
	}
	else
		setting_store[name] = setting_node.first_child().value();
}
开发者ID:Carye,项目名称:gdipp,代码行数:13,代码来源:setting.cpp

示例3: loadSructure

 void meta::loadSructure(xml_node& val) {
     if (val == 0) return;
     nodetype type_ = nodeType(val.name());
     if (type_ == NT_MF_ROOT) meta_node = val;
     if (type_ == NT_MF_HOME) homeList_node = val;
     if (type_ == NT_MF_REPLIST) reportList_node = val;
     if (type_ == NT_MF_TRENDLIST) trendList_node = val;
     if (type_ == NT_MF_MESSLIST) messageList_node = val;
     num_xmlnode_map* tmpreg = registry(type_);
     if (tmpreg) {
         xml_attribute atr = val.attribute("key");
         if (!atr.empty())
             tmpreg->insert(num_xmlnode_pair(atr.as_int(), val));}
     xml_node_iterator it = val.begin();
     while (it != val.end()) {
         loadSructure(*it);
         it++;}}
开发者ID:sealeks,项目名称:nsdavinci,代码行数:17,代码来源:meta.cpp

示例4: render_stack

void OraHandler::render_stack( xml_node node, QPainter &painter, int offset_x, int offset_y ) const{
	for( xml_node_iterator it = --node.end(); it != --node.begin(); it-- ){
		std::string name( (*it).name() );
		if( name == "stack" ){
			int x = (*it).attribute( "x" ).as_int( 0 );
			int y = (*it).attribute( "y" ).as_int( 0 );
			
			render_stack( *it, painter, offset_x+x, offset_y+y );
		}
		else if( name == "text" ){
			qWarning( "No support for text" );
		}
		else if( name == "layer" ){
			QString source( QString::fromUtf8( (*it).attribute( "src" ).value() ) );
			int x = (*it).attribute( "x" ).as_int( 0 ) + offset_x;
			int y = (*it).attribute( "y" ).as_int( 0 ) + offset_y;
			
			std::string visibility = (*it).attribute( "visibility" ).value();
			if( visibility == "" || visibility == "visible" ){
				//composite-op
				std::string composite = (*it).attribute( "composite-op" ).value();
				QPainter::CompositionMode mode = QPainter::CompositionMode_SourceOver;
				if( !ora_composite_mode( composite, mode ) )
					qWarning( "Unsupported composite-op: %s", composite.c_str() );
				painter.setCompositionMode( mode );
				
				double opacity = (*it).attribute( "opacity" ).as_double( 1.0 );
				painter.setOpacity( opacity );
				
				std::map<QString,QImage>::const_iterator img_it = images.find( source );
				if( img_it != images.end() )
					painter.drawImage( x, y, img_it->second );
				else
					qWarning( "Layer source not found: %s", source.toLocal8Bit().constData() );
				
				//Restore modified settings
				painter.setOpacity( 1.0 );
				painter.setCompositionMode( QPainter::CompositionMode_SourceOver );
			}
		}
		else{
			qWarning( "Unrecognized element: %s", name.c_str() );
		}
	}
}
开发者ID:spillerrec,项目名称:qt5-ora-plugin,代码行数:45,代码来源:OraHandler.cpp

示例5: from_xml

text_placements_ptr text_placements_list::from_xml(xml_node const &xml, fontset_map const & fontsets)
{
    using boost::property_tree::ptree;
    text_placements_list *list = new text_placements_list;
    text_placements_ptr ptr = text_placements_ptr(list);
    list->defaults.from_xml(xml, fontsets);
    xml_node::const_iterator itr = xml.begin();
    xml_node::const_iterator end = xml.end();
    for( ;itr != end; ++itr)
    {
        if (itr->is_text() || !itr->is("Placement")) continue;
        text_symbolizer_properties &p = list->add();
        p.from_xml(*itr, fontsets);
//TODO:        if (strict_ &&
//                !p.format.fontset.size())
//            ensure_font_face(p.format.face_name);
    }
    return ptr;
}
开发者ID:Mappy,项目名称:mapnik,代码行数:19,代码来源:list.cpp

示例6: begin

		const_iterator begin() const
		{
			return node.begin();
		}
开发者ID:AlekseiCherkes,项目名称:ttscpp,代码行数:4,代码来源:foreach.hpp

示例7: load_exclude

void gdipp_setting::load_exclude(const xml_node &root_node)
{
	for (xml_node::iterator iter = root_node.begin(); iter != root_node.end(); iter++)
		_exclude_process.push_back(iter->first_child().value());
}
开发者ID:Carye,项目名称:gdipp,代码行数:5,代码来源:setting.cpp


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