21 from omniidl_be.doil.interface
import template
22 import omniidl_be.doil.yat
as yat
26 'interface': template.ifacefwd_decl,
27 'interface_forward': template.ifacefwd_decl,
28 'struct': template.struct_decl,
29 'struct_forward': template.structfwd_decl,
30 'union': template.union_decl,
31 'union_forward': template.unionfwd_decl,
32 'enum': template.enum_decl,
33 'exception': template.exception_decl,
34 'typedef': template.typedef_decl
39 for key
in [
'idl_fname',
'types_h',
'types_h_path',
'idl_includes']:
40 ifdict[key] = dict[key]
42 for d
in dict[
'tree']:
43 if d[
'corba'][
'decl_type'] ==
'interface':
47 text = t.generate(ifdict)
49 fname = d[
'local'][
'iface_h']
58 for d
in dict[
'tree']:
59 curr_ns = d[
'local'][
'iface_ns']
60 curr_ns_flat = string.join(curr_ns,
'::')
62 nsdict = {
'end_ns': pre_ns,
'begin_ns': curr_ns}
64 ns_text = t.generate(nsdict)
67 pre_ns_flat = curr_ns_flat
69 decl_type = d[
'decl_type']
71 decl_text = t.generate(d)
72 decl.append(decl_text)
74 nsdict = {
'end_ns': curr_ns,
'begin_ns': []}
76 ns_text = t.generate(nsdict)
79 dict[
'declarations'] = decl
81 text = t.generate(dict)
83 f = open(dict[
'types_h'],
"w")
def generate_interface(dict)