summaryrefslogtreecommitdiff
path: root/trunk/CIAO/CCF/CCF/IDL2/SemanticAction/Impl/Factory.hpp
blob: f385fdec57f521eaad911629580c63d87de0a9be (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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
// file      : CCF/IDL2/SemanticAction/Impl/Factory.hpp
// author    : Boris Kolpackov <boris@dre.vanderbilt.edu>
// cvs-id    : $Id$

#ifndef CCF_IDL2_SEMANTIC_ACTION_IMPL_FACTORY_HPP
#define CCF_IDL2_SEMANTIC_ACTION_IMPL_FACTORY_HPP

#include "CCF/CompilerElements/Diagnostic.hpp"

#include "CCF/IDL2/SemanticGraph/Translation.hpp"

#include "CCF/IDL2/SemanticAction/Factory.hpp"

#include "CCF/IDL2/SemanticAction/Impl/Elements.hpp"

//@@ It would be nice to move this includes into .cpp
//
#include "CCF/IDL2/SemanticAction/Impl/Attribute.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Const.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Enum.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Exception.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Include.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Interface.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Member.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Module.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Native.hpp"
#include "CCF/IDL2/SemanticAction/Impl/NumericExpression.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Operation.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Struct.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Typedef.hpp"
#include "CCF/IDL2/SemanticAction/Impl/TypeId.hpp"
#include "CCF/IDL2/SemanticAction/Impl/Union.hpp"
#include "CCF/IDL2/SemanticAction/Impl/ValueType.hpp"
#include "CCF/IDL2/SemanticAction/Impl/ValueTypeFactory.hpp"
#include "CCF/IDL2/SemanticAction/Impl/ValueTypeMember.hpp"

namespace CCF
{
  namespace IDL2
  {
    namespace SemanticAction
    {
      namespace Impl
      {
        struct Factory : virtual IDL2::SemanticAction::Factory
        {
          Factory (CompilerElements::Context& context,
                   Diagnostic::Stream& dout,
                   SemanticGraph::TranslationUnit& tu);

          virtual SemanticAction::Attribute&
          attribute ()
          {
            return attribute_;
          }

          virtual SemanticAction::Const&
          const_ ()
          {
            return const__;
          }

          virtual SemanticAction::Enum&
          enum_ ()
          {
            return enum__;
          }

          virtual SemanticAction::Exception&
          exception ()
          {
            return exception_;
          }

          virtual SemanticAction::Include&
          include ()
          {
            return include_;
          }

          virtual SemanticAction::Interface&
          interface ()
          {
            return interface_;
          }

          virtual SemanticAction::Member&
          member ()
          {
            return member_;
          }

          virtual SemanticAction::Module&
          module ()
          {
            return module_;
          }

          virtual SemanticAction::Native&
          native ()
          {
            return native_;
          }

          virtual SemanticAction::NumericExpression&
          numeric_expression ()
          {
            return numeric_expression_;
          }

          virtual SemanticAction::Operation&
          operation ()
          {
            return operation_;
          }

          virtual SemanticAction::Struct&
          struct_ ()
          {
            return struct__;
          }

          virtual SemanticAction::Typedef&
          typedef_ ()
          {
            return typedef__;
          }

          virtual SemanticAction::TypeId&
          type_id ()
          {
            return type_id_;
          }

          virtual SemanticAction::TypePrefix&
          type_prefix ()
          {
            return type_prefix_;
          }

          virtual SemanticAction::Union&
          union_ ()
          {
            return union__;
          }

          virtual SemanticAction::ValueType&
          value_type ()
          {
            return value_type_;
          }

          virtual ValueTypeFactory&
          value_type_factory ()
          {
            return value_type_factory_;
          }

          virtual SemanticAction::ValueTypeMember&
          value_type_member ()
          {
            return value_type_member_;
          }

        protected:
          Context ctx_;

        private:
          template <typename X>
          void
          define_fund_type (SemanticGraph::Root& root,
                            SemanticGraph::SimpleName const& name);

        private:
          Attribute attribute_;
          Const const__;
          Enum enum__;
          Exception exception_;
          Include include_;
          Interface interface_;
          Member member_;
          Module module_;
          Native native_;
          NumericExpression numeric_expression_;
          Operation operation_;
          Struct struct__;
          Typedef typedef__;
          TypeId type_id_;
          TypePrefix type_prefix_;
          Union union__;
          ValueType value_type_;
          ValueTypeFactory value_type_factory_;
          ValueTypeMember value_type_member_;
        };
      }
    }
  }
}

#endif  // CCF_IDL2_SEMANTIC_ACTION_IMPL_FACTORY_HPP