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

C++ node_type类代码示例

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

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



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

示例1: add_convert_node

			node_type add_convert_node(node_type subject, value_type newtype) {
				value_type type = subject->get_type();
				if (type == newtype)
					return subject;
				if (type != newtype && type != type_tbd) {
					node_type subnode = factory::create_conversion(subject);
					subnode->set_type(newtype);
					return subnode;
				}
				// Not same type, and new is tbd (so just digest the new type)
				subject->set_type(newtype);
				return subject;
			}
开发者ID:TaylorMonacelli,项目名称:nscp,代码行数:13,代码来源:helpers.cpp


示例2:

 RemoteHandlerPtr
 InterfaceTree::m_setHandler(node_type &node,
                             RemoteHandlerPtr const &handler) {
     auto ret = m_removeHandler(node);
     node.value().handler = handler;
     m_handlers.add(handler);
     return ret;
 }
开发者ID:6DB,项目名称:OSVR-Core,代码行数:8,代码来源:InterfaceTree.cpp


示例3: get_performance_data

			virtual perf_list_type get_performance_data(object_factory context, std::string alias, node_type warn, node_type crit, node_type minimum, node_type maximum)  {
				perf_list_type ret;
				native_context_type native_context = reinterpret_cast<native_context_type>(context.get());
				if (native_context != NULL && native_context->has_object()) {
					long long warn_value = 0;
					long long crit_value = 0;
					long long current_value = get_int_value(context);
					if (warn)
						warn_value = warn->get_int_value(context);
					if (crit)
						crit_value = crit->get_int_value(context);
					BOOST_FOREACH(int_performance_generator &p, perfgen) {
						if (!p->is_configured())
							p->configure(name_, context);
						p->eval(ret, context, alias, current_value, warn_value, crit_value, native_context->get_object());
					}
				}
开发者ID:zyberpunker,项目名称:nscp,代码行数:17,代码来源:variable.hpp


示例4: get_column_fun

node_type get_column_fun(const value_type, evaluation_context context, const node_type subject) {
	std::list<node_type> l = subject->get_list_value(context);
	if (l.size() != 1) {
		context->error("Invalid number of arguments for function");
		return factory::create_false();
	}
	node_type f = l.front();
	long long idx = f->get_int_value(context);
	logfile_filter::native_context* n_context = reinterpret_cast<logfile_filter::native_context*>(context.get());
	std::string value = n_context->get_object()->get_column(idx);
	return factory::create_string(value);
}
开发者ID:borgified,项目名称:nscp,代码行数:12,代码来源:filter.cpp


示例5: generate_code_table

void HuffmanTree::generate_code_table(node_type node, code_type map, std::string code) {
    if(node.left == nullptr){ // leaf node
        map.insert({node.get_data(), code}); // add leadf to code table
        return;
    }
    else{ // not a leaf so has left and right child
        std::string left = code + "0";
        std::string right = code + "1";
        HuffmanTree::generate_code_table(*(node.left), map, left );
        HuffmanTree::generate_code_table(*(node.right), map, right);
    }
}
开发者ID:Kojey,项目名称:csc3022h_cpp_3,代码行数:12,代码来源:huffmanTree.cpp


示例6: r1_ge_r2

FEELPP_NO_EXPORT
bool
r1_ge_r2( const node_type& min1, const node_type& max1,
          const node_type& min2, const node_type& max2 )
{
    for ( size_type i=0; i < min1.size(); ++i )
    {
        if ( !( min1[i] <= min2[i] && max1[i] >= max2[i] ) )
            return false;
    }

    return true;
}
开发者ID:LANTZT,项目名称:feelpp,代码行数:13,代码来源:regiontree.cpp


示例7: r1_inter_r2

FEELPP_NO_EXPORT
bool
r1_inter_r2( const node_type& min1, const node_type& max1,
             const node_type& min2, const node_type& max2 )
{
    for ( size_type i=0; i < min1.size(); ++i )
    {
        if ( max1[i] < min2[i] || min1[i] > max2[i] )
            return false;
    }

    return true;
}
开发者ID:LANTZT,项目名称:feelpp,代码行数:13,代码来源:regiontree.cpp


示例8: super

Geo0D<Dim, T>::Geo0D( size_type id, node_type const& __p, bool boundary, bool is_vertex )
    :
    super( id, MESH_ENTITY_INTERNAL ),
    super2( __p ),
    M_master_id( id ),
    M_is_vertex( is_vertex ),
    M_is_parametric( false ),
    M_mesh( nullptr ),
    M_gdim( 0 ),
    M_gtag( 0 ),
    M_uv( 2 )
{
    FEELPP_ASSERT( __p.size() == Dim )( __p )( Dim ).error( "invalid node" );

    this->setOnBoundary( boundary );
}
开发者ID:feelpp,项目名称:feelpp,代码行数:16,代码来源:geo0d.hpp


示例9: infer_binary_type

			value_type infer_binary_type(object_converter factory, node_type &left, node_type &right) {
				value_type rt = right->infer_type(factory);
				value_type lt = left->infer_type(factory);
				if (lt == type_multi || rt == type_multi) {
					if (lt == rt)
						return type_tbd;
					if (lt == type_multi)
						lt = left->infer_type(factory, rt);
					else
						rt = right->infer_type(factory, lt);
				}
				if (lt == rt)
					return lt;
				if (type_is_float(lt) && type_is_int(rt))
					rt = right->infer_type(factory, lt);
				if (type_is_float(rt) && type_is_int(lt))
					lt = left->infer_type(factory, rt);
				if (lt == rt)
					return lt;
				if (rt == type_invalid || lt == type_invalid)
					return type_invalid;
				if (rt == type_tbd && lt == type_tbd)
					return type_tbd;
				if (factory->can_convert(rt, lt)) {
					right = add_convert_node(right, lt);
					return lt;
				}
				if (factory->can_convert(lt, rt)) {
					left = add_convert_node(left, rt);
					return rt;
				}
				if (can_convert(rt, lt)) {
					right = add_convert_node(right, lt);
					return lt;
				}
				if (can_convert(lt, rt)) {
					left = add_convert_node(left, rt);
					return rt;
				}
				factory->error("Cannot compare " + left->to_string() + " to " + right->to_string() + " (" + type_to_string(lt) + " to " + type_to_string(rt) + ")");
				return type_invalid;
			}
开发者ID:mickem,项目名称:nscp,代码行数:42,代码来源:helpers.cpp


示例10: fun_convert_status

node_type fun_convert_status(boost::shared_ptr<tasksched_filter::filter_obj> object, evaluation_context context, node_type subject) {
	std::string status = subject->get_string_value(context);
	long long istat = 0;
	if (object->is_new()) {
		if (status == "queued")
			istat = TASK_STATE_QUEUED;
		else if (status == "unknown")
			istat = TASK_STATE_UNKNOWN;
		else if (status == "ready")
			istat = TASK_STATE_READY;
		else if (status == "running")
			istat = TASK_STATE_RUNNING;
		else if (status == "disabled")
			istat = TASK_STATE_DISABLED;
		else
			context->error("Failed to convert: " + status);
	} else {
		if (status == "ready")
			istat = SCHED_S_TASK_READY;
		else if (status == "running")
			istat = SCHED_S_TASK_RUNNING;
		else if (status == "not_scheduled")
			istat = SCHED_S_TASK_NOT_SCHEDULED;
		else if (status == "has_not_run")
			istat = SCHED_S_TASK_HAS_NOT_RUN;
		else if (status == "disabled")
			istat = SCHED_S_TASK_DISABLED;
		else if (status == "no_more_runs")
			istat = SCHED_S_TASK_NO_MORE_RUNS;
		else if (status == "no_valid_triggers")
			istat = SCHED_S_TASK_NO_VALID_TRIGGERS;
		else
			context->error("Failed to convert: " + status);
	}
	return factory::create_int(istat);
}
开发者ID:Fox-Alpha,项目名称:nscp,代码行数:36,代码来源:filter.cpp


示例11: name

	/**
	   Sets node's name. See the s11n lib manual for what
	   conventions to follow. In short: the "variable name"
	   rules from most programming languages are a good
	   guideline.
	*/
	static void name( node_type & node, const std::string & name )
	{
	    node.name( name );
	}
开发者ID:Mr-Kumar-Abhishek,项目名称:qboard,代码行数:10,代码来源:traits.hpp


示例12: m_removeHandler

 RemoteHandlerPtr InterfaceTree::m_removeHandler(node_type &node) {
     auto ret = node.value().handler;
     node.value().handler.reset();
     m_handlers.remove(ret);
     return ret;
 }
开发者ID:6DB,项目名称:OSVR-Core,代码行数:6,代码来源:InterfaceTree.cpp


示例13: set

	static void set( node_type & node,
			 const std::string & key,
			 const ValueT & value )
	{
	    node.set( key, value );
	}
开发者ID:Mr-Kumar-Abhishek,项目名称:qboard,代码行数:6,代码来源:traits.hpp


示例14: topological_sort

    }

  typedef boost::graph_traits<Graph>::vertex_descriptor Vertex;
  std::vector<Vertex> sorted;
  sorted.reserve (nodes.size ());
  topological_sort (G, back_inserter (sorted));
#if 0
  printf ("sorted size: %ld, input set size: %ld\n", sorted.size (), nodes.size ());
  assert (sorted.size () == nodes.size ());
#endif

  std::vector<node_type> result;
  foreach (Vertex const &v, sorted)
    {
      if (v < nodes.size ())
        {
#if 0
          printf ("%ld[%s]\n", v, nodes[v].c_str ());
#endif
          result.push_back (nodes[v]);
        }
    }

  foreach (node_type const &node, nodes)
    assert (find (result.begin (), result.end (), node) != result.end ());
  foreach (node_type const &node, result)
    assert (find (nodes.begin (), nodes.end (), node) != nodes.end ());

  return result;
}
开发者ID:pippijn,项目名称:makequick,代码行数:30,代码来源:graph.cpp


示例15: Unsets

	/**
	   Unsets (removes) the given property from node. It
	   is not an error to unset an non-existing key.
	*/
	static void unset( node_type & node,
			   const std::string & key )
	{
	    node.unset( key );
	}
开发者ID:Mr-Kumar-Abhishek,项目名称:qboard,代码行数:9,代码来源:traits.hpp


示例16: class_name

	/**
	   Swaps all publically-visible internal state of lhs
	   with that of rhs. This includes:

	   - class_name()

	   - name()

	   - children()

	   - properties()

	   Added in version 1.1.3.
	*/
	static void swap( node_type & lhs, node_type & rhs )
	{
	    return lhs.swap( rhs );
	}
开发者ID:Mr-Kumar-Abhishek,项目名称:qboard,代码行数:18,代码来源:traits.hpp


示例17: is_set

	/**
	   Returns true if node contains a property
	   named key, else returns false.
	*/
	static bool is_set( const node_type & node,
			    const std::string & key )
	{
	    return node.is_set( key );
	}
开发者ID:Mr-Kumar-Abhishek,项目名称:qboard,代码行数:9,代码来源:traits.hpp


示例18: operator

 inline bool operator()(const node_type& x, const node_type& y) const {
   return comp(x.value(), y.value());
 }
开发者ID:metashell,项目名称:headers,代码行数:3,代码来源:array_binary_tree.hpp


示例19: get_output_location

 int2 get_output_location(size_t index) const { return type->get_output_location(placement, index); }
开发者ID:eriser,项目名称:workbench,代码行数:1,代码来源:draw2D-test.cpp


示例20: draw

 void draw(draw_buffer_2d & buffer) const { type->draw(buffer, placement); }
开发者ID:eriser,项目名称:workbench,代码行数:1,代码来源:draw2D-test.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ nodes_t类代码示例发布时间:2022-05-31
下一篇:
C++ node_t类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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