summaryrefslogtreecommitdiff
path: root/TAO/tao/TypeCodeFactory/TypeCodeFactory.pidl
blob: 5e393fa8a56a10a983dd9b5065f236c0864739b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
//
// $Id$
//
// ================================================================
//
// = LIBRARY
//   TAO/tao/TypeCodeFactory
//
// = FILENAME
//   TypeCodeFactory.pidl
//
// = DESCRIPTION
//   This file was used to generate the code in TypeCodeFactoryC.{h,i,cpp}.
//   It was originally part of Interface.idl, but since the TypeCodeFactory
//   has been made into a separate library, and the TypeCodeFactory interface
//   has been made local, it is simpler to generate the necessary stub
//   code in TypeCodeFactoryC.* by splitting Interface.idl into two
//   parts.
//
//   1. Patch this pidl file with
//
//      patch < diffs/TypeCodeFactory.pidl.diff
//
//   This will remove the CORBA module, rename most types foo
//   declared in it as CORBA_foo, unalias the simple typedefs
//   which don't have a CORBA_ analog in corbafwd.h.
//
//   2. Generate the code. The command used to generate code from this
//   IDL file is:
//
//     tao_idl -o orig -Sc -Ge 1 -I../.. -Sci \
//          -Wb,export_macro=TAO_TypeCodeFactory_Export \
//          -Wb,export_include=typecodefactory_export.h \
//          -Wb,pre_include="ace/pre.h" \
//          -Wb,post_include="ace/post.h" \
//          TypeCodeFactory.pidl
//
//   3. Copy the generated files to the current directory.
//
//   4. Patch the generated files, using
//
//      patch < diffs/TypeCodeFactoryC.h.diff
//      patch < diffs/TypeCodeFactoryC.cpp.diff
//
//   If this fails for some reason, the files must be patched
//   by hand, and the diff files regenerated with
//
//      diff -wbu orig/TypeCodeFactoryC.h TypeCodeFactoryC.h > diffs/TypeCodeFactoryC.h.diff
//      diff -wbu orig/TypeCodeFactoryC.cpp TypeCodeFactoryC.cpp > diffs/TypeCodeFactoryC.cpp.diff
//
//   5. Restore TypeCodeFactory.pidl.
//
// ================================================================

#ifndef _TYPECODEFACTORY_IDL_
#define _TYPECODEFACTORY_IDL_

#include "tao/IFR_Client/IFR_Extended.pidl"

#pragma prefix "omg.org"

module CORBA
{
// These are pulled in from #includes.
/*
  typedef string Identifier;
  typedef string RepositoryId;
  typedef short ValueModifier;
*/
  local interface TypeCodeFactory
  {
    TypeCode create_struct_tc (
        in RepositoryId id,
        in Identifier name,
        in StructMemberSeq members
      );

    TypeCode create_union_tc (
        in RepositoryId id,
        in Identifier name,
        in TypeCode discriminator_type,
        in UnionMemberSeq members
      );

    TypeCode create_enum_tc (
        in RepositoryId id,
        in Identifier name,
        in EnumMemberSeq members
      );

    TypeCode create_alias_tc (
        in RepositoryId id,
        in Identifier name,
        in TypeCode original_type
      );

    TypeCode create_exception_tc (
        in RepositoryId id,
        in Identifier name,
        in StructMemberSeq members
      );

    TypeCode create_interface_tc (
        in RepositoryId id,
        in Identifier name
      );

    TypeCode create_string_tc (
        in unsigned long bound
      );

    TypeCode create_wstring_tc (
        in unsigned long bound
      );

    TypeCode create_fixed_tc (
        in unsigned short digits,
        in unsigned short scale
      );

    TypeCode create_sequence_tc (
        in unsigned long bound,
        in TypeCode element_type
      );

    TypeCode create_array_tc (
        in unsigned long length,
        in TypeCode element_type
      );

    TypeCode create_value_tc (
        in RepositoryId id,
        in Identifier name,
        in ValueModifier type_modifier,
        in TypeCode concrete_base,
        in ValueMemberSeq members
      );

    TypeCode create_value_box_tc (
        in RepositoryId id,
        in Identifier name,
        in TypeCode boxed_type
      );

    TypeCode create_native_tc (
        in RepositoryId id,
        in Identifier name
      );

    TypeCode create_recursive_tc (
        in RepositoryId id
      );

    TypeCode create_abstract_interface_tc (
        in RepositoryId id,
        in Identifier name
      );

    TypeCode create_local_interface_tc (
        in RepositoryId id,
        in Identifier name
      );

    TypeCode create_component_tc (
        in RepositoryId id,
        in Identifier name
      );

    TypeCode create_home_tc (
        in RepositoryId id,
        in Identifier name
      );

    TypeCode create_event_tc (
        in RepositoryId id,
        in Identifier name,
        in ValueModifier type_modifier,
        in TypeCode concrete_base,
        in ValueMemberSeq members
      );
  };
};

#endif // _TYPECODEFACTORY_IDL_