Go to the documentation of this file.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 bool allow_duplicate_typedefs = false);
00046
00047 virtual ~ifr_adding_visitor (void);
00048
00049 virtual int visit_scope (UTL_Scope *node);
00050 virtual int visit_predefined_type (AST_PredefinedType *node);
00051 virtual int visit_module (AST_Module *node);
00052 virtual int visit_interface (AST_Interface *node);
00053 virtual int visit_interface_fwd (AST_InterfaceFwd *node);
00054 virtual int visit_valuebox (AST_ValueBox *node);
00055 virtual int visit_valuetype (AST_ValueType *node);
00056 virtual int visit_valuetype_fwd (AST_ValueTypeFwd *node);
00057 virtual int visit_component (AST_Component *node);
00058 virtual int visit_component_fwd (AST_ComponentFwd *node);
00059 virtual int visit_provides (AST_Provides *node);
00060 virtual int visit_uses (AST_Uses *node);
00061 virtual int visit_publishes (AST_Publishes *node);
00062 virtual int visit_emits (AST_Emits *node);
00063 virtual int visit_consumes (AST_Consumes *node);
00064 virtual int visit_eventtype (AST_EventType *node);
00065 virtual int visit_eventtype_fwd (AST_EventTypeFwd *node);
00066 virtual int visit_home (AST_Home *node);
00067 virtual int visit_structure (AST_Structure *node);
00068 virtual int visit_structure_fwd (AST_StructureFwd *node);
00069 virtual int visit_exception (AST_Exception *node);
00070 virtual int visit_enum (AST_Enum *node);
00071 virtual int visit_operation (AST_Operation *node);
00072 virtual int visit_field (AST_Field *node);
00073 virtual int visit_attribute (AST_Attribute *node);
00074 virtual int visit_union (AST_Union *node);
00075 virtual int visit_union_fwd (AST_UnionFwd *node);
00076 virtual int visit_constant (AST_Constant *node);
00077 virtual int visit_array (AST_Array *node);
00078 virtual int visit_sequence (AST_Sequence *node);
00079 virtual int visit_string (AST_String *node);
00080 virtual int visit_typedef (AST_Typedef *node);
00081 virtual int visit_root (AST_Root *node);
00082 virtual int visit_native (AST_Native *node);
00083
00084 protected:
00085 CORBA::PrimitiveKind expr_type_to_pkind (AST_Expression::ExprType et);
00086 CORBA::PrimitiveKind predefined_type_to_pkind (AST_PredefinedType *node);
00087
00088
00089 void load_any (AST_Expression::AST_ExprValue *ev,
00090 CORBA::Any &any);
00091
00092
00093 void element_type (AST_Type *base_type, bool owned = false);
00094
00095
00096
00097 int create_interface_def (AST_Interface *node);
00098
00099
00100 int create_value_def (AST_ValueType *node);
00101
00102
00103 int create_component_def (AST_Component *node);
00104
00105
00106 int create_home_def (AST_Home *node);
00107
00108
00109 int create_event_def (AST_EventType *node);
00110
00111
00112 int create_value_member (AST_Field *node);
00113
00114
00115 void get_referenced_type (AST_Type *node);
00116
00117
00118
00119 void fill_base_value (CORBA::ValueDef_ptr &result,
00120 AST_ValueType *node);
00121
00122 void fill_base_component (CORBA::ComponentIR::ComponentDef_ptr &result,
00123 AST_Component *node);
00124
00125 void fill_base_home (CORBA::ComponentIR::HomeDef_ptr &result,
00126 AST_Home *node);
00127
00128 void fill_managed_component (CORBA::ComponentIR::ComponentDef_ptr &result,
00129 AST_Home *node);
00130
00131 void fill_primary_key (CORBA::ValueDef_ptr &result,
00132 AST_Home *node);
00133
00134 void fill_abstract_base_values (CORBA::ValueDefSeq &result,
00135 AST_ValueType *node);
00136
00137 void fill_inherited_interfaces (CORBA::InterfaceDefSeq &result,
00138 AST_Interface *node);
00139
00140 void fill_supported_interfaces (CORBA::InterfaceDefSeq &result,
00141 AST_Interface *node);
00142
00143 void fill_interfaces (CORBA::InterfaceDefSeq &result,
00144 AST_Type **list,
00145 CORBA::Long length);
00146
00147 void fill_initializers (CORBA::ExtInitializerSeq &result,
00148 AST_ValueType *node);
00149
00150 void fill_get_exceptions (CORBA::ExceptionDefSeq &result,
00151 AST_Attribute *node);
00152
00153 void fill_set_exceptions (CORBA::ExceptionDefSeq &result,
00154 AST_Attribute *node);
00155
00156 void fill_exceptions (CORBA::ExceptionDefSeq &result,
00157 AST_Decl *node);
00158
00159 void fill_exceptions (CORBA::ExceptionDefSeq &result,
00160 UTL_ExceptList *list);
00161
00162 void fill_params (CORBA::ParDescriptionSeq &result,
00163 UTL_Scope *node);
00164
00165 void visit_all_factories (AST_Home *node,
00166 CORBA::ComponentIR::HomeDef_ptr h);
00167
00168 void visit_all_finders (AST_Home *node,
00169 CORBA::ComponentIR::HomeDef_ptr h);
00170
00171 void expand_id (ACE_CString &str,
00172 const char *local_name);
00173
00174 protected:
00175 CORBA::IDLType_var ir_current_;
00176
00177
00178
00179
00180
00181 AST_Decl *scope_;
00182
00183
00184 bool in_reopened_;
00185
00186
00187 bool allow_duplicate_typedefs_;
00188
00189 };
00190
00191 #endif