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

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

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

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

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

示例1: output_deps

static voidoutput_deps (IDL_tree tree, 	     OIDL_Run_Info *rinfo, 	     OIDL_C_Info *ci){	if (!tree)		return;	switch (IDL_NODE_TYPE (tree)) {	case IDLN_SRCFILE: {		char *idlfn = IDL_SRCFILE (tree).filename;		fprintf (ci->fh, " ///n/t%s", idlfn);		break;	}	case IDLN_MODULE:		output_deps (IDL_MODULE (tree).definition_list, rinfo, ci);		break;	case IDLN_LIST: {		IDL_tree sub;		for (sub = tree; sub; sub = IDL_LIST (sub).next)			output_deps (IDL_LIST (sub).data, rinfo, ci);		break;	}	case IDLN_INTERFACE:		output_deps (IDL_INTERFACE (tree).body, rinfo, ci);		break;	default:		break;	}}
开发者ID:3v3vuln,项目名称:ORBit2,代码行数:35,


示例2: cc_output_class_ids

static voidcc_output_class_ids (IDL_tree       tree,		     OIDL_Run_Info *rinfo,		     OIDL_C_Info   *ci){	if (!tree || (tree->declspec & IDLF_DECLSPEC_PIDL))		return;	switch (IDL_NODE_TYPE (tree)) {	case IDLN_MODULE:		cc_output_class_ids (IDL_MODULE (tree).definition_list, rinfo, ci);		break;	case IDLN_LIST: {		IDL_tree node;		for (node = tree; node; node = IDL_LIST (node).next)			cc_output_class_ids (IDL_LIST (node).data, rinfo, ci);		break;		}	case IDLN_INTERFACE:		cc_output_class_id (tree, rinfo, ci);		break;	default:		break;	}}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:26,


示例3: orbit_cbe_flatten_args

voidorbit_cbe_flatten_args (IDL_tree tree, FILE *of, const char *name){	int i = 0;	IDL_tree l;	for (l = IDL_OP_DCL(tree).parameter_dcls; l;	     l = IDL_LIST(l).next)		i++;	fprintf (of, "gpointer %s[%d];/n", name, i);		i = 0;	for (l = IDL_OP_DCL(tree).parameter_dcls; l;	     l = IDL_LIST(l).next) {		IDL_tree decl = IDL_LIST (l).data;		IDL_tree tspec = orbit_cbe_get_typespec (decl);		IDL_ParamRole r = 0;		switch(IDL_PARAM_DCL(decl).attr) {		case IDL_PARAM_IN:    r = DATA_IN;    break;		case IDL_PARAM_INOUT: r = DATA_INOUT; break;		case IDL_PARAM_OUT:   r = DATA_OUT;   break;		default:			g_error("Unknown IDL_PARAM type");		}				fprintf (of, "%s[%d] = %s%s;/n",			 name, i,			 orbit_cbe_flatten_ref (r, tspec),			 IDL_IDENT (IDL_PARAM_DCL (decl).simple_declarator).str);		i++;	}}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:34,


示例4: VoyagerWriteParamsForParentCall

staticvoid VoyagerWriteParamsForParentCall(IDL_tree curif, InheritedOutputInfo2 *ioi){  IDL_tree curitem;  char* overridenMethodName;  if(curif == ioi->realif)    return;  overridenMethodName=ioi->chrOverridenMethodName;  for(curitem = IDL_INTERFACE(curif).body; curitem; curitem = IDL_LIST(curitem).next) {    IDL_tree curop = IDL_LIST(curitem).data;    switch(IDL_NODE_TYPE(curop)) {    case IDLN_OP_DCL:      {        /* Check if the current method (introduced by some parent) is the one to be           overriden. */        if(!strcmp(overridenMethodName, IDL_IDENT(IDL_OP_DCL(curop).ident).str)){          IDL_tree  sub;          for (sub = IDL_OP_DCL (curop).parameter_dcls; sub; sub = IDL_LIST (sub).next) {            IDL_tree parm = IDL_LIST (sub).data;            fprintf (ioi->of, "%s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str);          }        }        break;      }	default:	  break;    }  }}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:34,


示例5: MateCORBA_imodule_get_enum_members

static CORBA_EnumMemberSeq *MateCORBA_imodule_get_enum_members (IDL_tree           tree,				CORBA_Environment *ev){	CORBA_EnumMemberSeq *members;	IDL_tree             l;	int                  num_members = 0;	int                  i;	g_return_val_if_fail (IDL_NODE_TYPE (tree) == IDLN_TYPE_ENUM, NULL);	num_members = IDL_list_length (IDL_TYPE_ENUM (tree).enumerator_list);	members = CORBA_EnumMemberSeq__alloc ();	members->_length  = members->_maximum = num_members;	members->_buffer  = CORBA_EnumMemberSeq_allocbuf (members->_length);	members->_release = CORBA_TRUE;	for (i = 0, l = IDL_TYPE_ENUM (tree).enumerator_list; l; i++, l = IDL_LIST (l).next)		members->_buffer [i] = CORBA_string_dup (IDL_IDENT (IDL_LIST (l).data).str);	g_assert (i == num_members);	return members;}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:26,


示例6: orte_idl_tree_fake_ops

static voidorte_idl_tree_fake_ops (IDL_tree tree, IDL_ns ns){	IDL_tree node;	if (!tree)		return;	switch(IDL_NODE_TYPE(tree)) {	case IDLN_MODULE:		orte_idl_tree_fake_ops (IDL_MODULE (tree).definition_list, ns);		break;	case IDLN_INTERFACE:		orte_idl_tree_fake_ops (IDL_INTERFACE (tree).body, ns);		break;	case IDLN_LIST:		for (node = tree; node; node = IDL_LIST (node).next)			orte_idl_tree_fake_ops (IDL_LIST (node).data, ns);		break;	case IDLN_ATTR_DCL:		orte_idl_attr_fake_ops (tree, ns);		break;	default:		break;	}}
开发者ID:jiajw0426,项目名称:easyscada,代码行数:26,


示例7: orbit_cbe_unflatten_args

voidorbit_cbe_unflatten_args (IDL_tree tree, FILE *of, const char *name){	IDL_tree l;	int      i = 0;	for (l = IDL_OP_DCL(tree).parameter_dcls; l;	     l = IDL_LIST(l).next) {		IDL_tree decl = IDL_LIST (l).data;		IDL_tree tspec = orbit_cbe_get_typespec (decl);		IDL_ParamRole r = 0;		char *unflatten;		switch(IDL_PARAM_DCL(decl).attr) {		case IDL_PARAM_IN:    r = DATA_IN;    break;		case IDL_PARAM_INOUT: r = DATA_INOUT; break;		case IDL_PARAM_OUT:   r = DATA_OUT;   break;		default:			g_error("Unknown IDL_PARAM type");		}		unflatten = orbit_cbe_unflatten_ref (r, tspec);		fprintf (of, "%s%s[%d], ", unflatten, name, i++);		g_free (unflatten);	}}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:26,


示例8: IDL_ns_check_for_ambiguous_inheritance

int IDL_ns_check_for_ambiguous_inheritance (IDL_tree interface_ident, IDL_tree p){	/* We use a sorted heap to check for namespace collisions,	   since we must do case-insensitive collision checks.	   visited_interfaces is a hash of visited interface nodes, so	   we only visit common ancestors once. */	GTree *ident_heap;	GHashTable *visited_interfaces;	int is_ambiguous = 0;	if (!p)		return 0;	ident_heap = g_tree_new (IDL_ident_cmp);	visited_interfaces = g_hash_table_new (g_direct_hash, g_direct_equal);	assert (IDL_NODE_TYPE (p) == IDLN_LIST);	for (; p;  p = IDL_LIST (p).next) {		if (!IDL_ns_load_idents_to_tables (interface_ident, IDL_LIST (p).data,						   ident_heap, visited_interfaces))			is_ambiguous = 1;	}	g_tree_destroy (ident_heap);	g_hash_table_destroy (visited_interfaces);	return is_ambiguous;}
开发者ID:AmaneKIRA2Misa,项目名称:libIDL,代码行数:28,


示例9: find_arg_with_name

static gbooleanfind_arg_with_name(TreeState *state, const char *name, int16 *argnum){    int16 count;    IDL_tree params;    XPT_ASSERT(state);    XPT_ASSERT(name);    XPT_ASSERT(argnum);    params = IDL_OP_DCL(IDL_NODE_UP(IDL_NODE_UP(state->tree))).parameter_dcls;    for (count = 0;         params != NULL && IDL_LIST(params).data != NULL;         params = IDL_LIST(params).next, count++)    {        const char *cur_name = IDL_IDENT(                IDL_PARAM_DCL(IDL_LIST(params).data).simple_declarator).str;        if (!strcmp(cur_name, name)) {            /* XXX ought to verify that this is the right type here */            /* XXX for iid_is this must be an iid */            /* XXX for size_is and length_is this must be a uint32 */            *argnum = count;            return TRUE;        }    }    return FALSE;}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:27,


示例10: cc_build_interfaces

static GSList *cc_build_interfaces (GSList *list, IDL_tree tree){	if (!tree)		return list;	switch (IDL_NODE_TYPE (tree)) {	case IDLN_MODULE:		list = cc_build_interfaces (			list, IDL_MODULE (tree).definition_list);		break;	case IDLN_LIST: {		IDL_tree sub;		for (sub = tree; sub; sub = IDL_LIST (sub).next)			list = cc_build_interfaces (				list, IDL_LIST (sub).data);		break;	}	case IDLN_ATTR_DCL: {		IDL_tree curitem;      		for (curitem = IDL_ATTR_DCL (tree).simple_declarations;		     curitem; curitem = IDL_LIST (curitem).next) {			OIDL_Attr_Info *ai = IDL_LIST (curitem).data->data;				list = cc_build_interfaces (list, ai->op1);			if (ai->op2)				list = cc_build_interfaces (list, ai->op2);		}		break;	}	case IDLN_INTERFACE: {		Interface *i = g_new0 (Interface, 1);		i->tree = tree;		list = g_slist_append (list, i);		list = cc_build_interfaces (list, IDL_INTERFACE(tree).body);		break;	}	case IDLN_OP_DCL: {		Interface *i;		g_return_val_if_fail (list != NULL, NULL);		i = ( g_slist_last(list) )->data;		i->methods = g_slist_append (i->methods, tree);		break;	}	case IDLN_EXCEPT_DCL:		break;	default:		break;	}	return list;}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:59,


示例11: VoyagerDoWriteParamsForOverridenMethod

/*  This function is called for each parent to check if the current parent introduced the  overriden method. If yes, the parameter info is taken from this parent and put into the  file. */staticvoid VoyagerDoWriteParamsForOverridenMethod(IDL_tree curif, InheritedOutputInfo2 *ioi){  IDL_tree curitem;  char* overridenMethodName;  if(curif == ioi->realif)    return;  overridenMethodName=ioi->chrOverridenMethodName;  for(curitem = IDL_INTERFACE(curif).body; curitem; curitem = IDL_LIST(curitem).next) {    IDL_tree curop = IDL_LIST(curitem).data;    switch(IDL_NODE_TYPE(curop)) {    case IDLN_OP_DCL:      {        /* Check if the current method (introduced by some parent) is the one to be           overriden. */        if(!strcmp(overridenMethodName, IDL_IDENT(IDL_OP_DCL(curop).ident).str)){          IDL_tree  sub;                    g_assert (IDL_NODE_TYPE(curop) == IDLN_OP_DCL);          /* return typespec */          orbit_cbe_write_param_typespec (ioi->of, curop);                    /* The methodname */          fprintf (ioi->of, " %s%s_%s", "NOMLINK impl_",                   ioi->chrClassName, overridenMethodName);                    fprintf (ioi->of, "(%s* nomSelf, ", ioi->chrClassName);                    /* Write the params including the typespec */                    for (sub = IDL_OP_DCL (curop).parameter_dcls; sub; sub = IDL_LIST (sub).next) {            IDL_tree parm = IDL_LIST (sub).data;                        orbit_cbe_write_param_typespec (ioi->of, parm);                        fprintf (ioi->of, " %s, ", IDL_IDENT (IDL_PARAM_DCL (parm).simple_declarator).str);          }                    if (IDL_OP_DCL (curop).context_expr)            fprintf (ioi->of, "CORBA_Context _ctx, ");                    fprintf (ioi->of, "CORBA_Environment *ev)");        }        break;      }	default:	  break;    }  }}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:59,


示例12: typelib_list

static gbooleantypelib_list(TreeState *state){    IDL_tree iter;    for (iter = state->tree; iter; iter = IDL_LIST(iter).next) {        state->tree = IDL_LIST(iter).data;        if (!xpidl_process_node(state))            return FALSE;    }    return TRUE;}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:11,


示例13: process_list

static gbooleanprocess_list(TreeState *state){    IDL_tree iter;    gint type;    for (iter = state->tree; iter; iter = IDL_LIST(iter).next) {        state->tree = IDL_LIST(iter).data;        type = IDL_NODE_TYPE(state->tree);        if (!xpidl_process_node(state))            return FALSE;    }    return TRUE;}
开发者ID:gtron,项目名称:atrapalotray,代码行数:13,


示例14: orte_idl_attr_fake_ops

voidorte_idl_attr_fake_ops(IDL_tree attr, IDL_ns ns){  IDL_tree attr_name, ident, curnode, op1, op2, intf;  GString *attrname;  OIDL_Attr_Info *setme;  g_assert(attr && IDL_NODE_TYPE(attr) == IDLN_ATTR_DCL);  attrname = g_string_new(NULL);  for(curnode = IDL_ATTR_DCL(attr).simple_declarations; curnode; curnode = IDL_LIST(curnode).next) {    op1 = op2 = NULL;    attr_name = IDL_LIST(curnode).data;    g_string_printf(attrname, "_get_%s",		     IDL_IDENT(attr_name).str);    ident = IDL_ident_new(g_strdup(attrname->str));    IDL_IDENT_TO_NS(ident) = IDL_IDENT_TO_NS(attr_name);    op1 = IDL_op_dcl_new(0, IDL_ATTR_DCL(attr).param_type_spec, ident, NULL, NULL, NULL);    IDL_NODE_UP(op1) = IDL_NODE_UP(attr);    intf = IDL_NODE_UP (IDL_NODE_UP (op1));    IDL_NS(ns).current = IDL_IDENT_TO_NS (IDL_INTERFACE (intf).ident);    IDL_ns_place_new(ns, ident);    if(!IDL_ATTR_DCL(attr).f_readonly) {      g_string_printf(attrname, "_set_%s",		       IDL_IDENT(attr_name).str);      ident = IDL_ident_new(g_strdup(attrname->str));      IDL_IDENT_TO_NS(ident) = IDL_IDENT_TO_NS(attr_name);      op2 = IDL_op_dcl_new(0, NULL, ident, NULL, NULL, NULL);      IDL_NODE_UP(op2) = IDL_NODE_UP(attr);      intf = IDL_NODE_UP (IDL_NODE_UP (op2));      IDL_NS(ns).current = IDL_IDENT_TO_NS (IDL_INTERFACE (intf).ident);      IDL_ns_place_new(ns, ident);      IDL_OP_DCL(op2).parameter_dcls = IDL_list_new(						    IDL_param_dcl_new(IDL_PARAM_IN,								      IDL_ATTR_DCL(attr).param_type_spec,								      IDL_ident_new(g_strdup("value"))));    }    setme = g_new0(OIDL_Attr_Info, 1);    setme->op1 = op1;    setme->op2 = op2;    attr_name->data = setme;  }  g_string_free(attrname, TRUE);}
开发者ID:CTU-IIG,项目名称:orte,代码行数:50,


示例15: orbit_output_tcstruct_sub_parts

static voidorbit_output_tcstruct_sub_parts (FILE *fh, IDL_tree node){	int length = 0;	switch (IDL_NODE_TYPE (node)) {	case IDLN_TYPE_STRUCT:	case IDLN_EXCEPT_DCL: {		IDL_tree l;		for (l = IDL_TYPE_STRUCT (node).member_list; l; l = IDL_LIST (l).next) {			IDL_tree member;			member = IDL_LIST (l).data;			g_assert (IDL_NODE_TYPE (member) == IDLN_MEMBER);			length += IDL_list_length (IDL_MEMBER (member).dcls);		}		}		break;	case IDLN_TYPE_UNION: {		IDL_tree l;		for (l = IDL_TYPE_UNION (node).switch_body; l; l = IDL_LIST (l).next) {			IDL_tree case_stmt;			case_stmt = IDL_LIST (l).data;			g_assert (IDL_NODE_TYPE (case_stmt) == IDLN_CASE_STMT);			length += IDL_list_length (IDL_CASE_STMT (case_stmt).labels);		}		}		break;	case IDLN_TYPE_ENUM:		length = IDL_list_length (IDL_TYPE_ENUM (node).enumerator_list);		break;	case IDLN_IDENT:	case IDLN_TYPE_SEQUENCE:	case IDLN_TYPE_ARRAY:		length = 1;		break;	default:		length = 0;		break;	}	fprintf (fh, "%d/n", length);}
开发者ID:3v3vuln,项目名称:ORBit2,代码行数:50,


示例16: VoyagerOutputOverridenMethodTemplate

static voidVoyagerOutputOverridenMethodTemplate(IDL_tree curif, InheritedOutputInfo2 *ioi){  char *id, *realid;  IDL_tree curitem;  char* overridenMethodName;  if(curif == ioi->realif)    return;  overridenMethodName=ioi->chrOverridenMethodName;  realid = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_INTERFACE(ioi->realif).ident), "_", 0);  id = IDL_ns_ident_to_qstring(IDL_IDENT_TO_NS(IDL_INTERFACE(curif).ident), "_", 0);  for(curitem = IDL_INTERFACE(curif).body; curitem; curitem = IDL_LIST(curitem).next) {    IDL_tree curop = IDL_LIST(curitem).data;    switch(IDL_NODE_TYPE(curop)) {    case IDLN_OP_DCL:      {        /* Check if the current method (introduced by some parent) is the one to be           overriden. */        if(!strcmp(overridenMethodName, IDL_IDENT(IDL_OP_DCL(curop).ident).str)){          fprintf(ioi->of, "/* Call parent *//n");          fprintf(ioi->of, "/*         %s_%s_parent_resolved()*//n",                  realid, IDL_IDENT(IDL_OP_DCL(curop).ident).str);#if 0          fprintf(ioi->of, "#define %s_%s() ///n        %s_%s()/n",                  realid, IDL_IDENT(IDL_OP_DCL(curop).ident).str,                  id, IDL_IDENT(IDL_OP_DCL(curop).ident).str);#endif        }        break;      }	default:	  break;    }  }  g_free(id);  g_free(realid);}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:49,


示例17: IDL_ns_lookup_this_scope

IDL_tree IDL_ns_lookup_this_scope (IDL_ns ns, IDL_tree scope, IDL_tree ident, gboolean *conflict){	IDL_tree p, q;	IDL_NS_ASSERTS;	if (conflict)		*conflict = TRUE;	if (scope == NULL)		return NULL;	assert (IDL_NODE_TYPE (scope) == IDLN_GENTREE);	/* Search this namespace */	if (g_hash_table_lookup_extended (		IDL_GENTREE (scope).children, ident, NULL, (gpointer)&p)) {		assert (IDL_GENTREE (p).data != NULL);		assert (IDL_NODE_TYPE (IDL_GENTREE (p).data) == IDLN_IDENT);		return p;	}	/* If there are inherited namespaces, look in those before giving up */	q = IDL_GENTREE (scope)._import;	if (!q)		return NULL;	assert (IDL_NODE_TYPE (q) == IDLN_LIST);	for (; q != NULL; q = IDL_LIST (q).next) {		IDL_tree r;		assert (IDL_LIST (q).data != NULL);		assert (IDL_NODE_TYPE (IDL_LIST (q).data) == IDLN_IDENT);		assert (IDL_IDENT_TO_NS (IDL_LIST (q).data) != NULL);		assert (IDL_NODE_TYPE (IDL_IDENT_TO_NS (IDL_LIST (q).data)) == IDLN_GENTREE);		/* Search imported namespace scope q */		if (g_hash_table_lookup_extended (			IDL_GENTREE (IDL_IDENT_TO_NS (IDL_LIST (q).data)).children,			ident, NULL, (gpointer)&p)) {			assert (IDL_GENTREE (p).data != NULL);			assert (IDL_NODE_TYPE (IDL_GENTREE (p).data) == IDLN_IDENT);			/* This needs more work, it won't do full ambiguity detection */			if (conflict && !is_inheritance_conflict (p))				*conflict = FALSE;			return p;		}		/* Search up one level */		if (IDL_NODE_TYPE (IDL_NODE_UP (IDL_LIST (q).data)) == IDLN_INTERFACE &&		    (r = IDL_ns_lookup_this_scope (			    ns, IDL_IDENT_TO_NS (IDL_LIST (q).data), ident, conflict)))			return r;	}	return NULL;}
开发者ID:AmaneKIRA2Misa,项目名称:libIDL,代码行数:59,


示例18: find_named_parameter

static IDL_tree /* IDL_PARAM_DCL */find_named_parameter(IDL_tree method_tree, const char *param_name){    IDL_tree iter;    for (iter = IDL_OP_DCL(method_tree).parameter_dcls; iter;         iter = IDL_LIST(iter).next)    {        IDL_tree param = IDL_LIST(iter).data;        IDL_tree simple_decl = IDL_PARAM_DCL(param).simple_declarator;        const char *current_name = IDL_IDENT(simple_decl).str;        if (strcmp(current_name, param_name) == 0)            return param;    }    return NULL;}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:15,


示例19: typelib_attr_dcl

static gbooleantypelib_attr_dcl(TreeState *state){    XPTInterfaceDescriptor *id = CURRENT(state);    XPTMethodDescriptor *meth;    gboolean read_only = IDL_ATTR_DCL(state->tree).f_readonly;    /* XXX this only handles the first ident; elsewhere too... */    IDL_tree ident =        IDL_LIST(IDL_ATTR_DCL(state->tree).simple_declarations).data;    /* If it's marked [noscript], mark it as hidden in the typelib. */    gboolean hidden = (IDL_tree_property_get(ident, "noscript") != NULL);    gboolean wantsJSContext =        (IDL_tree_property_get(ident, "implicit_jscontext") != NULL);    if (!verify_attribute_declaration(state->tree))        return FALSE;    if (!XPT_InterfaceDescriptorAddMethods(ARENA(state), id,                                            (PRUint16) (read_only ? 1 : 2)))        return FALSE;    meth = &id->method_descriptors[NEXT_METH(state)];    return typelib_attr_accessor(state, meth, TRUE, hidden, wantsJSContext) &&        (read_only ||         typelib_attr_accessor(state, meth + 1, FALSE, hidden, wantsJSContext));}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:30,


示例20: attr_dcl

static gbooleanattr_dcl(TreeState *state){    GSList *doc_comments;    if (!verify_attribute_declaration(state->tree))        return FALSE;    doc_comments =        IDL_IDENT(IDL_LIST(IDL_ATTR_DCL                           (state->tree).simple_declarations).data).comments;    if (doc_comments != NULL && comment_level >= 2) {        write_indent(state->file);        printlist(state->file, doc_comments);    }    /*     * XXX lists of attributes with the same type, e.g.     * attribute string foo, bar sil;     * are legal IDL... but we don't do anything with 'em.     */    if (IDL_LIST(IDL_ATTR_DCL(state->tree).simple_declarations).next != NULL) {        XPIDL_WARNING((state->tree, IDL_WARNING1,                       "multiple attributes in a single declaration aren't "                       "currently supported by xpidl"));    }    xpidl_write_comment(state, 2);    write_indent(state->file);    write_indent(state->file);    if (!write_attr_accessor(state->tree, state->file, TRUE, NULL))        return FALSE;    fputs(": Longword; stdcall;/n", state->file);    if (!IDL_ATTR_DCL(state->tree).f_readonly) {        write_indent(state->file);        write_indent(state->file);        if (!write_attr_accessor(state->tree, state->file, FALSE, NULL))            return FALSE;        fputs(": Longword; stdcall;/n", state->file);    }    /*fputc('/n', state->file);*/    return TRUE;}
开发者ID:byong2009,项目名称:bagel,代码行数:47,


示例21: cc_output_skels

static voidcc_output_skels (IDL_tree       tree,		 OIDL_Run_Info *rinfo,		 OIDL_C_Info   *ci,		 int           *idx){	if (!tree || (tree->declspec & IDLF_DECLSPEC_PIDL))		return;	switch (IDL_NODE_TYPE (tree)) {	case IDLN_MODULE:		cc_output_skels (IDL_MODULE (tree).definition_list, rinfo, ci, idx);		break;	case IDLN_LIST: {		IDL_tree node;		for (node = tree; node; node = IDL_LIST (node).next)			cc_output_skels (IDL_LIST (node).data, rinfo, ci, idx);		break;		}	case IDLN_ATTR_DCL: {		OIDL_Attr_Info *ai = tree->data;		IDL_tree        node;      		for (node = IDL_ATTR_DCL (tree).simple_declarations; node; node = IDL_LIST (node).next) {			ai = IDL_LIST (node).data->data;				cc_output_skels (ai->op1, rinfo, ci, idx);			if (ai->op2)				cc_output_skels (ai->op2, rinfo, ci, idx);		}		break;		}	case IDLN_INTERFACE: {		int real_idx = 0;		cc_output_skels (IDL_INTERFACE (tree).body, rinfo, ci, &real_idx);		}		break;	case IDLN_OP_DCL:		cc_output_skel (tree, ci, idx);		break;	default:		break;	}}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:46,


示例22: MateCORBA_imodule_get_union_members

static CORBA_UnionMemberSeq *MateCORBA_imodule_get_union_members (GHashTable        *typecodes,				 IDL_tree           tree,				 CORBA_TypeCode     switchtc,				 CORBA_Environment *ev){	CORBA_UnionMemberSeq *members;	IDL_tree              l;	int                   num_members = 0;	int                   i;	g_return_val_if_fail (IDL_NODE_TYPE (tree) == IDLN_TYPE_UNION, NULL);	for (l = IDL_TYPE_UNION (tree).switch_body; l; l = IDL_LIST (l).next)		num_members += IDL_list_length (IDL_CASE_STMT (IDL_LIST (l).data).labels);	members = CORBA_UnionMemberSeq__alloc ();	members->_length  = members->_maximum = num_members;	members->_buffer  = CORBA_UnionMemberSeq_allocbuf (members->_length);	members->_release = CORBA_TRUE;	for (i = 0, l = IDL_TYPE_UNION (tree).switch_body; l; l = IDL_LIST (l).next) {		CORBA_TypeCode subtc;		IDL_tree       member, label, dcl;		member = IDL_CASE_STMT (IDL_LIST (l).data).element_spec;		g_assert (IDL_NODE_TYPE (member) == IDLN_MEMBER);		subtc = MateCORBA_imodule_get_typecode (				typecodes, IDL_MEMBER (member).type_spec);		dcl = IDL_LIST (IDL_MEMBER (member).dcls).data;		for (label = IDL_CASE_STMT (IDL_LIST (l).data).labels; label;		     label = IDL_LIST (label).next, i++) {			CORBA_UnionMember *umember = &members->_buffer [i];			MateCORBA_imodule_setup_label_any (				switchtc, IDL_LIST (label).data, &umember->label);			umember->label._release = CORBA_TRUE;			umember->name     = CORBA_string_dup (IDL_IDENT (dcl).str);			umember->type     = (CORBA_TypeCode)						CORBA_Object_duplicate ((CORBA_Object) subtc, ev);			umember->type_def = CORBA_OBJECT_NIL; /* Not used? */		}		CORBA_Object_release ((CORBA_Object) subtc, ev);	}	g_assert (i == num_members);	return members;}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:55,


示例23: cs_output_stubs

static voidcs_output_stubs (IDL_tree     tree,		 OIDL_C_Info *ci,		 int         *idx){	if (!tree)		return;	switch (IDL_NODE_TYPE (tree)) {	case IDLN_MODULE:		cs_output_stubs (IDL_MODULE (tree).definition_list, ci, idx);		break;	case IDLN_LIST: {		IDL_tree sub;		for (sub = tree; sub; sub = IDL_LIST (sub).next)			cs_output_stubs (IDL_LIST (sub).data, ci, idx);		break;		}	case IDLN_ATTR_DCL: {		IDL_tree node;      		for (node = IDL_ATTR_DCL (tree).simple_declarations; node; node = IDL_LIST (node).next) {			OIDL_Attr_Info *ai;			ai = IDL_LIST (node).data->data;				cs_output_stubs (ai->op1, ci, idx);			if (ai->op2)				cs_output_stubs (ai->op2, ci, idx);		}		break;		}	case IDLN_INTERFACE: {		int real_idx = 0;		cs_output_stubs (IDL_INTERFACE (tree).body, ci, &real_idx);		break;		}	case IDLN_OP_DCL:		cs_output_stub (tree, ci, idx);		break;	default:		break;	}}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:42,


示例24: write_attr_accessor

/* *  AS_DECL writes 'NS_IMETHOD foo(string bar, long sil)' *  AS_IMPL writes 'NS_IMETHODIMP className::foo(string bar, long sil)' *  AS_CALL writes 'foo(bar, sil)' */static gbooleanwrite_attr_accessor(IDL_tree attr_tree, FILE * outfile,                    gboolean getter, int mode, const char *className){    char *attrname = ATTR_IDENT(attr_tree).str;    const char *binaryname;    IDL_tree ident = IDL_LIST(IDL_ATTR_DCL(attr_tree).simple_declarations).data;    if (mode == AS_DECL) {        if (IDL_tree_property_get(ident, "deprecated"))            fputs("NS_DEPRECATED ", outfile);        if (is_method_scriptable(attr_tree, ident))            fputs("NS_SCRIPTABLE ", outfile);        fputs("NS_IMETHOD ", outfile);    } else if (mode == AS_IMPL) {        fprintf(outfile, "NS_IMETHODIMP %s::", className);    }    fprintf(outfile, "%cet",            getter ? 'G' : 'S');    binaryname = IDL_tree_property_get(ATTR_DECLS(attr_tree), "binaryname");    if (binaryname) {        fprintf(outfile, "%s(",                binaryname);    } else {        fprintf(outfile, "%c%s(",                toupper(*attrname),                attrname + 1);    }    if (mode == AS_DECL || mode == AS_IMPL) {        /* Setters for string, wstring, nsid, domstring, utf8string,          * cstring and astring get const.          */        if (!getter &&            (IDL_NODE_TYPE(ATTR_TYPE_DECL(attr_tree)) == IDLN_TYPE_STRING ||             IDL_NODE_TYPE(ATTR_TYPE_DECL(attr_tree)) == IDLN_TYPE_WIDE_STRING ||             IDL_tree_property_get(ATTR_TYPE_DECL(attr_tree), "nsid") ||             IDL_tree_property_get(ATTR_TYPE_DECL(attr_tree), "domstring")  ||             IDL_tree_property_get(ATTR_TYPE_DECL(attr_tree), "utf8string") ||             IDL_tree_property_get(ATTR_TYPE_DECL(attr_tree), "cstring")    ||             IDL_tree_property_get(ATTR_TYPE_DECL(attr_tree), "astring")))        {            fputs("const ", outfile);        }        if (!write_type(ATTR_TYPE_DECL(attr_tree), getter, outfile))            return FALSE;        fprintf(outfile, "%s%s",                (STARRED_TYPE(attr_tree) ? "" : " "),                (getter && !DIPPER_TYPE(ATTR_TYPE_DECL(attr_tree)))? "*" : "");    }    fprintf(outfile, "a%c%s)", toupper(attrname[0]), attrname + 1);    return TRUE;}
开发者ID:amyvmiwei,项目名称:firefox,代码行数:59,


示例25: cc_output_contexts

static voidcc_output_contexts (FILE *of, const char *method, IDL_tree tree){	/* Build a list of contest names */	if (IDL_OP_DCL (tree).context_expr) {		IDL_tree curitem;		fprintf (of, "/* Exceptions *//n");		fprintf (of, "static CORBA_string %s__contextinfo [] = {/n",			 method);		for (curitem = IDL_OP_DCL (tree).context_expr; curitem;		     curitem = IDL_LIST (curitem).next) {			fprintf (of, "/"%s/"%c", 				 IDL_STRING (IDL_LIST (curitem).data).value,				 IDL_LIST (curitem).next ? ',' : ' ');		}		fprintf (of, "};/n");	}}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:21,


示例26: MateCORBA_imodule_traverse_helper

static voidMateCORBA_imodule_traverse_helper (IDL_tree    tree,			       GFunc       callback,			       gpointer    user_data,			       GHashTable *visited_nodes){	IDL_tree curitem;	if (g_hash_table_lookup (visited_nodes, tree))		return;	g_hash_table_insert (visited_nodes, tree, GINT_TO_POINTER (1));	for (curitem = IDL_INTERFACE (tree).inheritance_spec; curitem;	     curitem = IDL_LIST (curitem).next)		MateCORBA_imodule_traverse_helper (				IDL_get_parent_node (IDL_LIST (curitem).data, IDLN_INTERFACE, NULL),				callback, user_data, visited_nodes);	callback (tree, user_data);}
开发者ID:TheCoffeMaker,项目名称:Mate-Desktop-Environment,代码行数:21,


示例27: for

/*  This function returns the interface name from the given tree. It returns the first  name found. Works for what it's build for (getting the toplevel name for single class  IDL files). No idea what happens with files containing several interfaces... */static voidVoyagerFindInterfaceName(IDL_tree tree, char** iface_id){	if (!tree)      return;	switch (IDL_NODE_TYPE (tree)) {	case IDLN_MODULE:		break;	case IDLN_LIST: {		IDL_tree sub;		for (sub = tree; sub; sub = IDL_LIST (sub).next){          VoyagerFindInterfaceName((IDL_LIST (sub).data), iface_id);        }		break;		}	case IDLN_ATTR_DCL: {		break;		}	case IDLN_INTERFACE: {      VoyagerFindInterfaceName(IDL_INTERFACE (tree).body, iface_id);		break;		}	case IDLN_OP_DCL:      {        char *priviface_id = IDL_ns_ident_to_qstring (                                            IDL_IDENT_TO_NS (IDL_INTERFACE (                                            IDL_get_parent_node (tree, IDLN_INTERFACE, NULL)                                            ).ident), "_", 0);        //printf("----------> %s/n", priviface_id);        if(priviface_id)          *iface_id=priviface_id; /* This is a copy */		break;      }	default:		break;	}    return;}
开发者ID:ErisBlastar,项目名称:voyager,代码行数:45,


示例28: IDL_ns_load_idents_to_tables

/* Return true if adds went okay */static int IDL_ns_load_idents_to_tables (IDL_tree interface_ident, IDL_tree ident_scope,					 GTree *ident_heap, GHashTable *visited_interfaces){	IDL_tree q, scope;	InsertHeapData data;	assert (ident_scope != NULL);	assert (IDL_NODE_TYPE (ident_scope) == IDLN_IDENT);	scope = IDL_IDENT_TO_NS (ident_scope);	if (!scope)		return TRUE;	assert (IDL_NODE_TYPE (scope) == IDLN_GENTREE);	assert (IDL_GENTREE (scope).data != NULL);	assert (IDL_NODE_TYPE (IDL_GENTREE (scope).data) == IDLN_IDENT);	assert (IDL_NODE_UP (IDL_GENTREE (scope).data) != NULL);	assert (IDL_NODE_TYPE (IDL_NODE_UP (IDL_GENTREE (scope).data)) == IDLN_INTERFACE);	if (is_visited_interface (visited_interfaces, scope))		return TRUE;	/* Search this namespace */	data.interface_ident = interface_ident;	data.ident_heap = ident_heap;	data.insert_conflict = 0;	g_hash_table_foreach (IDL_GENTREE (scope).children, (GHFunc)insert_heap_cb, &data);	/* If there are inherited namespaces, look in those before giving up */	q = IDL_GENTREE (scope)._import;	if (!q)		data.insert_conflict = 0;	else		assert (IDL_NODE_TYPE (q) == IDLN_LIST);	/* Add inherited namespace identifiers into heap */	for (; q != NULL; q = IDL_LIST (q).next) {		int r;		assert (IDL_LIST (q).data != NULL);		assert (IDL_NODE_TYPE (IDL_LIST (q).data) == IDLN_IDENT);		assert (IDL_IDENT_TO_NS (IDL_LIST (q).data) != NULL);		assert (IDL_NODE_TYPE (IDL_IDENT_TO_NS (IDL_LIST (q).data)) == IDLN_GENTREE);		assert (IDL_NODE_TYPE (IDL_NODE_UP (IDL_LIST (q).data)) == IDLN_INTERFACE);		if (!(r = IDL_ns_load_idents_to_tables (interface_ident, IDL_LIST (q).data,							ident_heap, visited_interfaces)))			data.insert_conflict = 1;	}	mark_visited_interface (visited_interfaces, scope);	return data.insert_conflict == 0;}
开发者ID:AmaneKIRA2Misa,项目名称:libIDL,代码行数:56,


示例29: xpidl_list_foreach

voidxpidl_list_foreach(IDL_tree p, IDL_tree_func foreach, gpointer user_data){    IDL_tree_func_data tfd;    while (p) {        struct _IDL_LIST *list = &IDL_LIST(p);        tfd.tree = list->data;        if (!foreach(&tfd, user_data))            return;        p = list->next;    }}
开发者ID:EdgarChen,项目名称:mozilla-cvs-history,代码行数:13,


示例30: IDL_tree_traverse_helper

static voidIDL_tree_traverse_helper(IDL_tree p, GFunc f,			 gconstpointer func_data,			 GHashTable *visited_nodes,			 gboolean    include_self){	IDL_tree curitem;	if (g_hash_table_lookup (visited_nodes, p))		return;	g_hash_table_insert (visited_nodes, p, ((gpointer)1));	for (curitem = IDL_INTERFACE (p).inheritance_spec; curitem;	     curitem = IDL_LIST (curitem).next) {		IDL_tree_traverse_helper (IDL_get_parent_node 			(IDL_LIST (curitem).data, IDLN_INTERFACE, NULL), f, func_data, visited_nodes, TRUE);	}	if (include_self)		f(p, (gpointer)func_data);}
开发者ID:CTU-IIG,项目名称:orte,代码行数:22,



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


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