本文整理汇总了C++中IDL_LIST函数的典型用法代码示例。如果您正苦于以下问题:C++ IDL_LIST函数的具体用法?C++ IDL_LIST怎么用?C++ IDL_LIST使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IDL_LIST函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: output_deps
static void
output_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,代码来源:orbit-idl-c-deps.c
示例2: cc_output_class_ids
static void
cc_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,代码来源:orbit-idl-c-common.c
示例3: orbit_cbe_flatten_args
void
orbit_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,代码来源:orbit-idl-c-utils.c
示例4: VoyagerWriteParamsForParentCall
static
void 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,代码来源:orbit-idl-c-stubs.c
示例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,代码来源:matecorba-imodule-utils.c
示例6: orte_idl_tree_fake_ops
static void
orte_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,代码来源:orte-idl-driver.c
示例7: orbit_cbe_unflatten_args
void
orbit_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,代码来源:orbit-idl-c-utils.c
示例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,代码来源:ns.c
示例9: find_arg_with_name
static gboolean
find_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,代码来源:xpidl_typelib.c
示例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,代码来源:orbit-idl-c-common.c
示例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.
*/
static
void 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,代码来源:orbit-idl-c-stubs.c
示例12: typelib_list
static gboolean
typelib_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,代码来源:xpidl_typelib.c
示例13: process_list
static gboolean
process_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,代码来源:xpidl_java.c
示例14: orte_idl_attr_fake_ops
void
orte_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,代码来源:orte-idl-utils.c
示例15: orbit_output_tcstruct_sub_parts
static void
orbit_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,代码来源:orbit-idl-c-typecode.c
示例16: VoyagerOutputOverridenMethodTemplate
static void
VoyagerOutputOverridenMethodTemplate(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,代码来源:orbit-idl-c-stubs.c
示例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,代码来源:ns.c
示例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,代码来源:xpidl_util.c
示例19: typelib_attr_dcl
static gboolean
typelib_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,代码来源:xpidl_typelib.c
示例20: attr_dcl
static gboolean
attr_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,代码来源:xpidlpas_stdcall.c
注:本文中的IDL_LIST函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论