00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef TAO_IFR_ADDING_VISITOR_H
00021 #define TAO_IFR_ADDING_VISITOR_H
00022
00023 #include "ifr_visitor.h"
00024 #include "tao/IFR_Client/IFR_ComponentsC.h"
00025
00026 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00027 # pragma once
00028 #endif
00029
00030 class UTL_ExceptList;
00031
00032 class ifr_adding_visitor : public ifr_visitor
00033 {
00034
00035
00036
00037
00038
00039
00040
00041
00042 public:
00043 ifr_adding_visitor (AST_Decl *scope,
00044 CORBA::Boolean in_reopened = 0);
00045
00046
00047 virtual ~ifr_adding_visitor (void);
00048
00049
00050 virtual int visit_scope (UTL_Scope *node);
00051
00052
00053 virtual int visit_predefined_type (AST_PredefinedType *node);
00054
00055
00056 virtual int visit_module (AST_Module *node);
00057
00058
00059 virtual int visit_interface (AST_Interface *node);
00060
00061
00062 virtual int visit_interface_fwd (AST_InterfaceFwd *node);
00063
00064
00065 virtual int visit_valuebox (AST_ValueBox *node);
00066
00067
00068 virtual int visit_valuetype (AST_ValueType *node);
00069
00070
00071 virtual int visit_valuetype_fwd (AST_ValueTypeFwd *node);
00072
00073
00074 virtual int visit_component (AST_Component *node);
00075
00076
00077 virtual int visit_component_fwd (AST_ComponentFwd *node);
00078
00079
00080 virtual int visit_eventtype (AST_EventType *node);
00081
00082
00083 virtual int visit_eventtype_fwd (AST_EventTypeFwd *node);
00084
00085
00086 virtual int visit_home (AST_Home *node);
00087
00088
00089 virtual int visit_factory (AST_Factory *node);
00090
00091
00092 virtual int visit_structure (AST_Structure *node);
00093
00094
00095 virtual int visit_exception (AST_Exception *node);
00096
00097
00098 virtual int visit_enum (AST_Enum *node);
00099
00100
00101 virtual int visit_operation (AST_Operation *node);
00102
00103
00104 virtual int visit_field (AST_Field *node);
00105
00106
00107 virtual int visit_attribute (AST_Attribute *node);
00108
00109
00110 virtual int visit_union (AST_Union *node);
00111
00112
00113 virtual int visit_constant (AST_Constant *node);
00114
00115
00116 virtual int visit_array (AST_Array *node);
00117
00118
00119 virtual int visit_sequence (AST_Sequence *node);
00120
00121
00122 virtual int visit_string (AST_String *node);
00123
00124
00125 virtual int visit_typedef (AST_Typedef *node);
00126
00127
00128 virtual int visit_root (AST_Root *node);
00129
00130
00131 virtual int visit_native (AST_Native *node);
00132
00133
00134 protected:
00135 CORBA::PrimitiveKind expr_type_to_pkind (AST_Expression::ExprType et);
00136 CORBA::PrimitiveKind predefined_type_to_pkind (AST_PredefinedType *node);
00137
00138
00139 void load_any (AST_Expression::AST_ExprValue *ev,
00140 CORBA::Any &any);
00141
00142
00143 void element_type (AST_Type *base_type
00144 ACE_ENV_ARG_DECL);
00145
00146
00147
00148 int create_interface_def (AST_Interface *node
00149 ACE_ENV_ARG_DECL);
00150
00151
00152 int create_value_def (AST_ValueType *node
00153 ACE_ENV_ARG_DECL);
00154
00155
00156 int create_component_def (AST_Component *node
00157 ACE_ENV_ARG_DECL);
00158
00159
00160 int create_home_def (AST_Home *node
00161 ACE_ENV_ARG_DECL);
00162
00163
00164 int create_event_def (AST_EventType *node
00165 ACE_ENV_ARG_DECL);
00166
00167
00168 int create_value_member (AST_Field *node);
00169
00170
00171 void get_referenced_type (AST_Type *node
00172 ACE_ENV_ARG_DECL);
00173
00174
00175
00176 void fill_base_value (CORBA::ValueDef_ptr &result,
00177 AST_ValueType *node
00178 ACE_ENV_ARG_DECL);
00179
00180 void fill_base_component (CORBA::ComponentIR::ComponentDef_ptr &result,
00181 AST_Component *node
00182 ACE_ENV_ARG_DECL);
00183
00184 void fill_base_home (CORBA::ComponentIR::HomeDef_ptr &result,
00185 AST_Home *node
00186 ACE_ENV_ARG_DECL);
00187
00188 void fill_managed_component (CORBA::ComponentIR::ComponentDef_ptr &result,
00189 AST_Home *node
00190 ACE_ENV_ARG_DECL);
00191
00192 void fill_primary_key (CORBA::ValueDef_ptr &result,
00193 AST_Home *node
00194 ACE_ENV_ARG_DECL);
00195
00196 void fill_abstract_base_values (CORBA::ValueDefSeq &result,
00197 AST_ValueType *node
00198 ACE_ENV_ARG_DECL);
00199
00200 void fill_inherited_interfaces (CORBA::InterfaceDefSeq &result,
00201 AST_Interface *node
00202 ACE_ENV_ARG_DECL);
00203
00204 void fill_supported_interfaces (CORBA::InterfaceDefSeq &result,
00205 AST_Interface *node
00206 ACE_ENV_ARG_DECL);
00207
00208 void fill_interfaces (CORBA::InterfaceDefSeq &result,
00209 AST_Interface **list,
00210 CORBA::Long length
00211 ACE_ENV_ARG_DECL);
00212
00213 void fill_initializers (CORBA::ExtInitializerSeq &result,
00214 AST_ValueType *node
00215 ACE_ENV_ARG_DECL);
00216
00217 void fill_get_exceptions (CORBA::ExceptionDefSeq &result,
00218 AST_Attribute *node
00219 ACE_ENV_ARG_DECL);
00220
00221 void fill_set_exceptions (CORBA::ExceptionDefSeq &result,
00222 AST_Attribute *node
00223 ACE_ENV_ARG_DECL);
00224
00225 void fill_exceptions (CORBA::ExceptionDefSeq &result,
00226 AST_Decl *node
00227 ACE_ENV_ARG_DECL);
00228
00229 void fill_exceptions (CORBA::ExceptionDefSeq &result,
00230 UTL_ExceptList *list
00231 ACE_ENV_ARG_DECL);
00232
00233 void fill_params (CORBA::ParDescriptionSeq &result,
00234 AST_Operation *node
00235 ACE_ENV_ARG_DECL);
00236
00237 void visit_all_provides (AST_Component *node,
00238 CORBA::ComponentIR::ComponentDef_ptr c
00239 ACE_ENV_ARG_DECL);
00240
00241 void visit_all_uses (AST_Component *node,
00242 CORBA::ComponentIR::ComponentDef_ptr c
00243 ACE_ENV_ARG_DECL);
00244
00245 void visit_all_emits (AST_Component *node,
00246 CORBA::ComponentIR::ComponentDef_ptr c
00247 ACE_ENV_ARG_DECL);
00248
00249 void visit_all_publishes (AST_Component *node,
00250 CORBA::ComponentIR::ComponentDef_ptr c
00251 ACE_ENV_ARG_DECL);
00252
00253 void visit_all_consumes (AST_Component *node,
00254 CORBA::ComponentIR::ComponentDef_ptr c
00255 ACE_ENV_ARG_DECL);
00256
00257 void visit_all_factories (AST_Home *node,
00258 CORBA::ComponentIR::HomeDef_ptr h
00259 ACE_ENV_ARG_DECL);
00260
00261 void visit_all_finders (AST_Home *node,
00262 CORBA::ComponentIR::HomeDef_ptr h
00263 ACE_ENV_ARG_DECL);
00264
00265 void expand_id (ACE_CString &str,
00266 const char *local_name);
00267
00268 protected:
00269 CORBA::IDLType_var ir_current_;
00270
00271
00272
00273
00274
00275 AST_Decl *scope_;
00276
00277
00278 CORBA::Boolean in_reopened_;
00279
00280 };
00281
00282 #endif